From 1e85b3cd13fd0b95c3bb825b81bdab32e02ff22a Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Wed, 26 Oct 2011 15:00:16 -0400 Subject: [PATCH] fix NameErrors --- sfa/plc/slices.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sfa/plc/slices.py b/sfa/plc/slices.py index 74de0a83..5edce647 100644 --- a/sfa/plc/slices.py +++ b/sfa/plc/slices.py @@ -4,7 +4,7 @@ from collections import defaultdict from sfa.util.xrn import get_leaf, get_authority, urn_to_hrn from sfa.util.plxrn import hrn_to_pl_slicename from sfa.util.policy import Policy - +from sfa.rspecs.rspec import RSpec from sfa.plc.vlink import VLink MAXINT = 2L**31-1 @@ -185,7 +185,7 @@ class Slices: def verify_slice_links(self, slice, links, aggregate): # nodes is undefined here - if not links or not nodes: + if not links or not aggregate.nodes: return for link in links: topo_rspec = VLink.get_topo_rspec(link) @@ -536,8 +536,7 @@ class Slices: # add requested_attributes for attribute in added_slice_attributes: try: - name, value, node_id = attribute['name'], attribute['value'], attribute.get('node_id', None) - self.api.plshell.AddSliceTag(self.api.plauth, slice['name'], name, value, node_id) + self.api.plshell.AddSliceTag(self.api.plauth, slice['name'], attribute['name'], attribute['value'], attribute.get('node_id', None)) except Exception, e: self.api.logger.warn('Failed to add sliver attribute. name: %s, value: %s, node_id: %s\nCause:%s'\ % (name, value, node_id, str(e))) -- 2.43.0