From: Tony Mack Date: Mon, 24 Oct 2011 21:02:37 +0000 (-0400) Subject: added verify_slice_links() method X-Git-Tag: sfa-1.1-1~53 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=0494e19e9c10be8212f07c37774f3af8b29cee4f;p=sfa.git added verify_slice_links() method --- diff --git a/sfa/plc/slices.py b/sfa/plc/slices.py index 82ac9c9d..33204147 100644 --- a/sfa/plc/slices.py +++ b/sfa/plc/slices.py @@ -10,6 +10,7 @@ from sfa.util.specdict import * from sfa.util.faults import * from sfa.util.record import SfaRecord from sfa.util.policy import Policy +from fsa.plc.vlink import VLink from sfa.util.prefixTree import prefixTree from collections import defaultdict @@ -26,6 +27,8 @@ class Slices: self.origin_hrn = origin_hrn self.registry = api.registries[api.hrn] self.credential = api.getCredential() + self.nodes = [] + self.persons = [] def get_slivers(self, xrn, node=None): hrn, type = urn_to_hrn(xrn) @@ -187,6 +190,13 @@ class Slices: except: self.api.logger.log_exc('Failed to add/remove slice from nodes') + def verify_slice_links(self, slice, links, peer=None): + if not links or not nodes: + return + for link in links: + topo_rspec = VLink.get_topo_rspec(link) + + def handle_peer(self, site, slice, persons, peer): if peer: # bind site