Opened 12 years ago

Closed 12 years ago

#51 closed (fixed)

Slice.__init__() function no longer accepts sa parameter

Reported by: chaos@bbn.com Owned by: somebody
Priority: major Milestone: 2012-09-04 client release
Component: Clients Version:
Keywords: v0.3.0 Cc:
Dependencies:

Description

The code:

    gmoc.Slice(
      'urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+chaos-montreve-macaddr',
      slice_uuid = 'ff6d2b12-f10e-11e0-bf86-000c29f89f7b',
      created = datetime.datetime.fromtimestamp(1318028753),
      expires = datetime.datetime.fromtimestamp(1348981200),
      creator = users['urn:publicid:IDN+pgeni.gpolab.bbn.com+user+chaos'],
      sa = sa,
    ),

yields:

Traceback (most recent call last):
  File "./report_foam_relations", line 241, in <module>
    sa = sa,
TypeError: __init__() got an unexpected keyword argument 'sa'

Change History (1)

comment:1 Changed 12 years ago by chaos@bbn.com

Resolution: fixed
Status: newclosed

Fixed. The code:

slices = {
  'urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+chaos-montreve-macaddr':
    gmoc.Slice(
      'urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+chaos-montreve-macaddr',
      uuid_ = 'ff6d2b12-f10e-11e0-bf86-000c29f89f7b',
      created = datetime.datetime.fromtimestamp(1318028753),
      expires = datetime.datetime.fromtimestamp(1348981200),
      creator = users['urn:publicid:IDN+pgeni.gpolab.bbn.com+user+chaos'],
      sa = sa,
    ),
  'urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+chaos-poblano1101-datapath':
    gmoc.Slice(
      'urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+chaos-poblano1101-datapath',
      uuid_ = '10b14362-f10c-11e0-bf86-000c29f89f7b',
      created = datetime.datetime.fromtimestamp(1318027494),
      expires = datetime.datetime.fromtimestamp(1348981200),
      creator = users['urn:publicid:IDN+pgeni.gpolab.bbn.com+user+chaos'],
      sa = sa,
    ),
}
print [s.sliceAuthority for s in slices.values()]

now yields:

[<gmoc.SliceAuthority object at 0x9e5c74c>, <gmoc.SliceAuthority object at 0x9e5c74c>]
Note: See TracTickets for help on using tickets.