clearer comments on how the newint stuff is used
[tests.git] / system / config_default.py
index 98a0be7..0938240 100644 (file)
@@ -27,21 +27,39 @@ def sfa_root (index):
 
 def nodes(options,index):
     return [{'name':'node%d'%index,
-             'node_fields': {'hostname': 'deferred-nodename%d'%index,
-                             'model':'qemu/minhw', } ,
+             'node_fields':             {'hostname': 'deferred-nodename%d'%index,
+                                         'model':'qemu/minhw', } ,
              'host_box': 'deferred-node-hostbox-%d'%index,
              'owner' : 'pi',
              'nodegroups' : 'mynodegroup',
-             'interface_fields': { 'method':'static',
-                                   'type':'ipv4',
-                                   'ip':'xxx-deferred-xxx',
-                                   'gateway':'xxx-deferred-xxx',
-                                   'network':'xxx-deferred-xxx',
-                                   'broadcast':'xxx-deferred-xxx',
-                                   'netmask':'xxx-deferred-xxx',
-                                   'dns1': 'xxx-deferred-xxx',
-                                   'dns2': 'xxx-deferred-xxx',
-                                   },
+             'interface_fields':        { 'method':'static',
+                                          'type':'ipv4',
+                                          'ip':'xxx-deferred-xxx',
+                                          'gateway':'xxx-deferred-xxx',
+                                          'network':'xxx-deferred-xxx',
+                                          'broadcast':'xxx-deferred-xxx',
+                                          'netmask':'xxx-deferred-xxx',
+                                          'dns1': 'xxx-deferred-xxx',
+                                          'dns2': 'xxx-deferred-xxx',
+                                          },
+             ######## how to deal with the new plcapi way of modeling interfaces
+             # this pertains to the node as per the new interface - using UpdateNode
+             # after node_fields above is used to create the Node
+             'node_fields_nint' :       { 'dns':'xxx-deferred-xxx',
+                                          },
+             # used in replacement of interface_fields above
+             'interface_fields_nint' :  { 'is_primary' : True,
+                                          'method' : 'static',
+                                          },
+             # used to create an IpAddress
+             'ipaddress_fields' :       { 'type' : 'ipv4',
+                                          'ip_addr' : 'xxx-deferred-xxx',
+                                          'netmask' : 'xxx-deferred-xxx',
+                                          } ,
+             # used to create a Route
+             'route_fields' :           { 'subnet' : '0.0.0.0/0',
+                                          'next_hop' : 'xxx-deferred-xxx',
+                                          },
              }]
 
 def all_nodenames (options,index):
@@ -333,6 +351,7 @@ def plc (options,index) :
         'leases' : leases (options, index),
     }
 
+# NOTE: SFA currently has SFA_AGGREGATE_API_VERSION=2 baked into the code
 def sfa (options,index) :
     return { 
         # the default is to use AMs in the various aggregates.xml
@@ -347,8 +366,7 @@ def sfa (options,index) :
        'SFA_PLC_URL' : 'deferred-myplc-api-url',
         'SFA_PLC_USER' : 'root@test.onelab.eu',
         'SFA_PLC_PASSWORD' : 'test++',
-# use -c apiv2 to override this one
-#        'SFA_AGGREGATE_API_VERSION' : 1,
+# use -c sfadebug to increment this one
         'SFA_API_LOGLEVEL': 1,
         # details of the slices to create
         'sfa_slice_specs' : [ sfa_slice_spec(options,index,rspec_style)