From: Faiyaz Ahmed Date: Fri, 13 Mar 2009 19:17:14 +0000 (+0000) Subject: Adds linkspecs to netspec. X-Git-Tag: sfa-0.9-0@14641~579 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=b976a8943fceab5bb4e729f6f34810381f6a317a;p=sfa.git Adds linkspecs to netspec. --- diff --git a/geni/aggregate.py b/geni/aggregate.py index 604d759b..d8a46226 100644 --- a/geni/aggregate.py +++ b/geni/aggregate.py @@ -250,6 +250,8 @@ class Aggregate(GeniServer): # Get the required nodes if type in ['aggregate']: nodes = self.shell.GetNodes(self.auth) + try: linkspecs = self.shell.GetLinkSpecs() # if call is supported + except: linkspecs = [] elif type in ['slice']: slicename = hrn_to_pl_slicename(hrn) slices = self.shell.GetSlices(self.auth, [slicename]) @@ -290,7 +292,11 @@ class Aggregate(GeniServer): duration = end_time - start_time # create the plc dict - networks = [{'nodes': nodes, 'name': self.hrn, 'start_time': start_time, 'duration': duration}] + networks = [{'nodes': nodes, + 'name': self.hrn, + 'start_time': start_time, + 'duration': duration, + 'links': linkspecs}] resources = {'networks': networks, 'start_time': start_time, 'duration': duration} # convert the plc dict to an rspec dict