Opened 12 years ago
Closed 12 years ago
#38 closed (fixed)
when Aggregate.resource() is used to set an aggregate's resources, this fails to set Resource.aggregate
Reported by: | chaos@bbn.com | Owned by: | somebody |
---|---|---|---|
Priority: | major | Milestone: | 2012-09-04 client release |
Component: | Clients | Version: | |
Keywords: | Cc: | ||
Dependencies: |
Description
I'm using the following code to define resources and attach them to an aggregate:
... aggregate = gmoc.Aggregate( info['site_tag'], type = 'foam', version = info['version'], pop = config['POPNAME'], operator = config['ORGNAME'], ) ... resource = {} for datapath in info['datapaths']: resource[datapath] = gmoc.Resource( datapath, type = 'datapath', pop = config['POPNAME'], organization = config['ORGNAME'], ) aggregate.resources = resource.values()
When this code is run, aggregate.resources
becomes an array of Resource
objects as expected.
However, each resource's aggregate
parameter should also be populated with the aggregate, and instead remains None
.
Change History (2)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Looks fixed.
Before linking: aggregate[<gmoc.Aggregate object at 0x8b5076c>].resources: [] resource[urn:publicid:IDN+gmoc.geni.net+node+04:4d:00:26:f1:3f:3b:00].aggregate: None resource[urn:publicid:IDN+gmoc.geni.net+node+04:4d:00:26:f1:3f:3b:00].aggregate: None After: aggregate[<gmoc.Aggregate object at 0x8b5076c>].resources: [<gmoc.Resource object at 0x8b507ec>, <gmoc.Resource object at 0x8b507cc>] resource[urn:publicid:IDN+gmoc.geni.net+node+04:4d:00:26:f1:3f:3b:00].aggregate: <gmoc.Aggregate object at 0x8b5076c> resource[urn:publicid:IDN+gmoc.geni.net+node+04:4d:00:26:f1:3f:3b:00].aggregate: <gmoc.Aggregate object at 0x8b5076c>
Note: See
TracTickets for help on using
tickets.
Note: i discovered the typo in 39 while trying to get clean output to demonstrate this issue. However, that typo is not the cause of this problem. After patching that typo in my own gmoc.py, i still see: