Opened 12 years ago
Closed 12 years ago
#41 closed (fixed)
typo in Resources.slices and Aggregate.slices getters
Reported by: | chaos@bbn.com | Owned by: | somebody |
---|---|---|---|
Priority: | major | Milestone: | 2012-09-04 client release |
Component: | Clients | Version: | |
Keywords: | v0.2.0 | Cc: | |
Dependencies: |
Description
The class Resources
has a slices getter:
def slices(self): slices = {} for sliver in self.__slivers: for slice in sliver.slices: slices[slice.id] = slice
However, the sliver list in Resources
is named _slivers
not __slivers
, so this throws an error:
File "/home/chaos/gmoc.py", line 969, in slices for sliver in self.__slivers: AttributeError: 'Resource' object has no attribute '_Resource__slivers'
Change History (2)
comment:1 Changed 12 years ago by
Summary: | typo in Resources.slices getter → typo in Resources.slices and Aggregate.slices getters |
---|
comment:2 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
The Aggregate.slices getter works in 0.2.1:
print [s.id for s in aggregate.slices] aggregate.slivers = slivers.values() print [s.id for s in aggregate.slices]
yields:
[] ['urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+chaos-poblano1101-datapath', 'urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+chaos-montreve-macaddr']
I don't have resource/sliver mappings working yet in my code, but resource.slices returns an empty array without error, so this typo is fixed there too.
Note: See
TracTickets for help on using
tickets.
This typo also exists in Aggregate.slices, so i modified the summary: