Merge branch 'geni-v3' of ssh://git.onelab.eu/git/sfa into geni-v3
[sfa.git] / sfa / rspecs / versions / iotlabv1.py
index a4a8300..ad49157 100644 (file)
@@ -19,7 +19,7 @@ class Iotlabv1(RSpecVersion):
     valid Iotlab XML Rspec.
     """
     #enabled = True
-    type = 'Slab'
+    type = 'Iotlab'
     content_type = 'ad'
     version = '1'
     #template = '<RSpec type="%s"></RSpec>' % type
@@ -64,8 +64,8 @@ class Iotlabv1(RSpecVersion):
     def add_connection_information(self, ldap_username, sites_set):
         return Iotlabv1Node.add_connection_information(self.xml,ldap_username, sites_set)
 
-    def add_nodes(self, nodes, check_for_dupes=False):
-        return Iotlabv1Node.add_nodes(self.xml,nodes )
+    def add_nodes(self, nodes, check_for_dupes=False, rspec_content_type=None):
+        return Iotlabv1Node.add_nodes(self.xml,nodes, rspec_content_type)
 
     def merge_node(self, source_node_tag, network, no_dupes = False):
         logger.debug("SLABV1 merge_node")
@@ -139,7 +139,8 @@ class Iotlabv1(RSpecVersion):
     def add_default_sliver_attribute(self, name, value, network=None):
         pass
 
-    def add_slivers(self, hostnames, attributes=[], sliver_urn=None, append=False):
+    def add_slivers(self, hostnames, attributes=None, sliver_urn=None, append=False):
+        if attributes is None: attributes=[]
         # all nodes hould already be present in the rspec. Remove all
         # nodes that done have slivers
         print>>sys.stderr, "\r\n \r\n \r\n \t\t\t Iotlabv1.PY add_slivers  ----->get_node "
@@ -245,6 +246,28 @@ class Iotlabv1(RSpecVersion):
         SFAv1Lease.add_leases(self.xml, leases)
         #Iotlabv1Lease.add_leases(self.xml, leases)
 
+    # Spectrum
+
+    def get_channels(self, filter=None):
+        return []
+
+    def add_channels(self, channels, network = None, no_dupes=False):
+        pass
+
+    # Links
+
+    def get_links(self, network=None):
+        return []
+
+    def get_link_requests(self):
+        return []
+
+    def add_links(self, links):
+        pass
+    def add_link_requests(self, links):
+        pass
+
+
     def cleanup(self):
         # remove unncecessary elements, attributes
         if self.type in ['request', 'manifest']: