Attribute renaming in network element
authorAndy Bavier <acb@cs.princeton.edu>
Mon, 26 Sep 2011 19:58:48 +0000 (15:58 -0400)
committerAndy Bavier <acb@cs.princeton.edu>
Mon, 26 Sep 2011 19:58:48 +0000 (15:58 -0400)
Renamed the 'id' attribute of the 'network' element to 'name',
for compatibility with the PlanetLab RSpec.

sfa/managers/aggregate_manager_eucalyptus.py
sfa/managers/eucalyptus/eucalyptus.rnc
sfa/managers/eucalyptus/eucalyptus.rng

index 42116e1..9a18046 100644 (file)
@@ -546,7 +546,7 @@ def CreateSliver(api, slice_xrn, creds, xml, users, call_id):
     rspecValidator = ET.RelaxNG(schemaXML)
     rspecXML = ET.XML(xml)
     for network in rspecXML.iterfind("./network"):
-        if network.get('id') != cloud['name']:
+        if network.get('name') != cloud['name']:
             # Throw away everything except my own RSpec
             # sfa_logger().error("CreateSliver: deleting %s from rspec"%network.get('id'))
             network.getparent().remove(network)
index 670a01e..ead2a36 100644 (file)
@@ -6,7 +6,7 @@ RSpec = element RSpec {
     network
 }
 network = element network {
-    attribute id { xsd:NMTOKEN },
+    attribute name { xsd:NMTOKEN },
     user_info?,
     ipv4,
     bundles,
index d8be05e..9f40a5e 100644 (file)
@@ -21,7 +21,7 @@
   </define>
   <define name="network">
     <element name="network">
-      <attribute name="id">
+      <attribute name="name">
         <data type="NMTOKEN"/>
       </attribute>
       <optional>