Opened 12 years ago
Closed 12 years ago
#70 closed (fixed)
Sliver.state parameter is encoded incorrectly in XML serialization
Reported by: | chaos@bbn.com | Owned by: | somebody |
---|---|---|---|
Priority: | major | Milestone: | 2012-09-04 client release |
Component: | Clients | Version: | |
Keywords: | v0.5.0 | Cc: | |
Dependencies: |
Description
When instantiating a sliver, i pass along the value "Up" for the sliver state. This code:
print "State = %s" % sinfo['state'] slivers[sliver] = gmoc.Sliver( sliver, expires = expiration_time, state = sinfo['state'], aggregate = aggregate, creator = users['urn:publicid:IDN+pgeni.gpolab.bbn.com+user+chaos'], )
yields:
State = Up
and no error is thrown by Sliver.__init__()
.
At serialization time, this code:
s = sliver.toXML(doc, node) print sliver.state print s.toprettyxml()
yields:
Up <sliver created="1342549645" creator="urn:publicid:IDN+pgeni.gpolab.bbn.com+user+chaos" expires="1348992000" local_name="urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+chaos-montreve-macaddr:b72b0a06-beb9-4be2-94ba-cfbd8654ad82" slice_urn="urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+chaos-montreve-macaddr" slice_uuid="ff6d2b12-f10e-11e0-bf86-000c29f89f7b" state="Unknown" uuid="b72b0a06-beb9-4be2-94ba-cfbd8654ad82">
The state is still known to the sliver object as "Up", but is encoded as "Unknown" by XML serialization.
Note: See
TracTickets for help on using
tickets.
In v0.5.2, my submitted value of "Up" is rejected by
Sliver.__init__()
, and when i instead submitgmoc.SLIVER_STATE_UP
, it is correctly serialized into the value "Up":