cosmetic name changes
[sfa.git] / sfa / rspecs / pg_rspec.py
index a998f86..adf81a3 100755 (executable)
@@ -7,7 +7,7 @@ from sfa.util.plxrn import hostname_to_urn
 from sfa.util.config import Config 
 from sfa.rspecs.rspec_version import RSpecVersion 
 
-_version = {'type':  'protogeni',
+_version = {'type':  'ProtoGeni',
             'version': '2',
             'schema': 'http://www.protogeni.net/resources/rspec/2/request.xsd',
             'namespace': 'http://www.protogeni.net/resources/rspec/2',
@@ -103,6 +103,19 @@ class PGRSpec(RSpec):
         pass
 
 
+    def merge(self, in_rspec):
+        """
+        Merge contents for specified rspec with current rspec
+        """
+        
+        # just copy over all the child elements under the root element
+        tree = etree.parse(StringIO(in_rspec))
+        root = tree.getroot()
+        for child in root.getchildren():
+            self.xml.append(child)
+                  
+    
+
 if __name__ == '__main__':
     rspec = PGRSpec()
     rspec.add_nodes([1])