From 030484b45e546eab4fc87ae544954e7615223b68 Mon Sep 17 00:00:00 2001
From: Andy Bavier <acb@cs.princeton.edu>
Date: Tue, 5 Jul 2011 15:22:45 -0400
Subject: [PATCH] Change <cloud> tag to <network>

The PlanetLab SM requires that each aggregate's RSpec
be enclosed in a <network> tag.
---
 sfa/managers/aggregate_manager_eucalyptus.py | 2 +-
 sfa/managers/eucalyptus/eucalyptus.rnc       | 4 ++--
 sfa/managers/eucalyptus/eucalyptus.rng       | 6 +++---
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/sfa/managers/aggregate_manager_eucalyptus.py b/sfa/managers/aggregate_manager_eucalyptus.py
index 68669bd9..1b6d1432 100644
--- a/sfa/managers/aggregate_manager_eucalyptus.py
+++ b/sfa/managers/aggregate_manager_eucalyptus.py
@@ -345,7 +345,7 @@ class EucaRSpecBuilder(object):
         xml = self.eucaRSpec
         cloud = self.cloudInfo
         with xml.RSpec(type='eucalyptus'):
-            with xml.cloud(id=cloud['name']):
+            with xml.network(id=cloud['name']):
                 with xml.ipv4:
                     xml << cloud['ip']
                 #self.__keyPairsXML(cloud['keypairs'])
diff --git a/sfa/managers/eucalyptus/eucalyptus.rnc b/sfa/managers/eucalyptus/eucalyptus.rnc
index ba9758c4..bc61ce3f 100644
--- a/sfa/managers/eucalyptus/eucalyptus.rnc
+++ b/sfa/managers/eucalyptus/eucalyptus.rnc
@@ -1,9 +1,9 @@
 start = RSpec
 RSpec = element RSpec {
     attribute type { xsd:NMTOKEN },
-    cloud
+    network
 }
-cloud = element cloud {
+network = element network {
     attribute id { xsd:NMTOKEN },
     user_info?,
     ipv4,
diff --git a/sfa/managers/eucalyptus/eucalyptus.rng b/sfa/managers/eucalyptus/eucalyptus.rng
index 51d23c64..d7a85b49 100644
--- a/sfa/managers/eucalyptus/eucalyptus.rng
+++ b/sfa/managers/eucalyptus/eucalyptus.rng
@@ -8,11 +8,11 @@
       <attribute name="type">
         <data type="NMTOKEN"/>
       </attribute>
-      <ref name="cloud"/>
+      <ref name="network"/>
     </element>
   </define>
-  <define name="cloud">
-    <element name="cloud">
+  <define name="network">
+    <element name="network">
       <attribute name="id">
         <data type="NMTOKEN"/>
       </attribute>
-- 
2.47.0