isolate settings for plc-config-tty or sfa-config-tty in a separate 'settings' dict...
[tests.git] / system / config_wifilab.py
index b73b0e3..4da5c9d 100644 (file)
@@ -1,3 +1,6 @@
+# Thierry Parmentelat <thierry.parmentelat@inria.fr>
+# Copyright (C) 2010 INRIA 
+#
 # a configuration module is expected:
 # (*) to define a config method
 # (*) that takes two arguments
@@ -30,7 +33,7 @@
 # I'm pretty sure that yum.conf.php still needs hacking, at least for centos5
 ########## unclear stuff
 
-onelab="one-lab.org"
+onelab="onelab.eu"
 
 # these are real nodes, they dont get started by the framework
 def nodes():
@@ -38,8 +41,8 @@ def nodes():
               'node_fields': {'hostname': 'wlab02.inria.fr', 'model':'Dell Latitude 830'},
               'owner' : 'pi',
               'nodegroups' : 'wifi',
-              'network_fields': { 'method':'dhcp', 'type' : 'ipv4', 'ip':'138.96.250.162',},
-              'extra_interfaces' : [ { 'network_fields' : { 'method' : 'dhcp',
+              'interface_fields': { 'method':'dhcp', 'type' : 'ipv4', 'ip':'138.96.250.162',},
+              'extra_interfaces' : [ { 'interface_fields' : { 'method' : 'dhcp',
                                                             'type' : 'ipv4',
                                                             'mac' : '00:1B:77:70:F4:C6',
                                                             'ip' : '138.96.250.192', },
@@ -52,8 +55,8 @@ def nodes():
               'node_fields': {'hostname': 'wlab17.inria.fr', 'model':'Dell Latitude 830'},
               'owner' : 'pi',
               'nodegroups' : ['wifi','x86_64'] ,
-              'network_fields': { 'method':'dhcp', 'type' : 'ipv4', 'ip':'138.96.250.177',},
-              'extra_interfaces' : [ { 'network_fields' : { 'method' : 'dhcp',
+              'interface_fields': { 'method':'dhcp', 'type' : 'ipv4', 'ip':'138.96.250.177',},
+              'extra_interfaces' : [ { 'interface_fields' : { 'method' : 'dhcp',
                                                             'type' : 'ipv4',
                                                             'mac' : '00:1c:bf:51:3c:19',
                                                             'ip' : '138.96.250.207',},
@@ -66,8 +69,8 @@ def nodes():
               'node_fields': {'hostname': 'wlab05.inria.fr', 'model':'Dell Latitude 830'},
               'owner' : 'pi',
               'nodegroups' : 'wifi',
-              'network_fields': { 'method':'dhcp', 'type' : 'ipv4', 'ip':'138.96.250.165',},
-              'extra_interfaces' : [ { 'network_fields' : { 'method' : 'static',
+              'interface_fields': { 'method':'dhcp', 'type' : 'ipv4', 'ip':'138.96.250.165',},
+              'extra_interfaces' : [ { 'interface_fields' : { 'method' : 'static',
                                                             'type' : 'ipv4',
                                                             'mac' : '00:1B:77:70:FC:84',
                                                             'ip' : '138.96.250.215',
@@ -80,7 +83,7 @@ def nodes():
                                        'settings' : { 'essid' : 'guest-inria-sophia',
                                                       'ifname' : 'wlan0',},
                                        },
-                                     { 'network_fields' : { 'method' : 'dhcp',
+                                     { 'interface_fields' : { 'method' : 'dhcp',
                                                             'type' : 'ipv4',
                                                             'mac' : '00:20:A6:4E:FF:E6',
                                                             'ip' : '138.96.250.50',
@@ -140,7 +143,7 @@ def sites ():
                                'login_base':'wifi',
                                'abbreviated_name':'wifi',
                                'max_slices':100,
-                               'url':'http://testbox1.one-lab.org',
+                               'url':'http://test.onelab.eu',
                                },
               'address_fields' : {'line1':'route des lucioles',
                                   'city':'sophia',
@@ -153,7 +156,7 @@ def sites ():
             }]
 
 ##########
-public_key="""ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA4jNj8yT9ieEc6nSJz/ESu4fui9WrJ2y/MCfqIZ5WcdVKhBFUYyIenmUaeTduMcSqvoYRQ4QnFR1BFdLG8XR9D6FWZ5zTKUgpkew22EVNeqai4IXeWYKyt1Qf3ehaz9E3o1PG/bmQNIM6aQay6TD1Y4lqXI+eTVXVQev4K2fixySjFQpp9RB4UHbeA8c28yoa/cgAYHqCqlvm9uvpGMjgm/Qa4M+ZeO7NdjowfaF/wF4BQIzVFN9YRhvQ/d8WDz84B5Pr0J7pWpaX7EyC4bvdskxl6kmdNIwIRcIe4OcuIiX5Z9oO+7h/chsEVJWF4vqNIYlL9Zvyhnr0hLLhhuk2bw== root@test.one-lab.org
+public_key="""ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA4jNj8yT9ieEc6nSJz/ESu4fui9WrJ2y/MCfqIZ5WcdVKhBFUYyIenmUaeTduMcSqvoYRQ4QnFR1BFdLG8XR9D6FWZ5zTKUgpkew22EVNeqai4IXeWYKyt1Qf3ehaz9E3o1PG/bmQNIM6aQay6TD1Y4lqXI+eTVXVQev4K2fixySjFQpp9RB4UHbeA8c28yoa/cgAYHqCqlvm9uvpGMjgm/Qa4M+ZeO7NdjowfaF/wF4BQIzVFN9YRhvQ/d8WDz84B5Pr0J7pWpaX7EyC4bvdskxl6kmdNIwIRcIe4OcuIiX5Z9oO+7h/chsEVJWF4vqNIYlL9Zvyhnr0hLLhhuk2bw== root@test.onelab.eu
 """
 private_key="""-----BEGIN RSA PRIVATE KEY-----
 MIIEogIBAAKCAQEA4jNj8yT9ieEc6nSJz/ESu4fui9WrJ2y/MCfqIZ5WcdVKhBFU
@@ -232,6 +235,7 @@ def slices ():
 
 def plc () :
     return { 
+        'index' : index,
         'name' : 'wifilab',
         # as of yet, not sure we can handle foreign hosts, but this is required though
         'hostname' : 'wlab24.inria.fr',
@@ -239,17 +243,20 @@ def plc () :
         # 'vservername': 'somename'
         # 'vserverip': '138.96.250.131'
         'role' : 'root',
-        'PLC_ROOT_USER' : 'root@wlab24.inria.fr',
-        'PLC_ROOT_PASSWORD' : 'test++',
-        'PLC_NAME' : 'WifiLab',
-        'PLC_MAIL_ENABLED':'true',
-        'PLC_MAIL_SUPPORT_ADDRESS' : 'thierry.parmentelat@sophia.inria.fr',
-        'PLC_DB_HOST' : 'wlab24.inria.fr',
-        'PLC_API_HOST' : 'wlab24.inria.fr',
-        'PLC_WWW_HOST' : 'wlab24.inria.fr',
-        'PLC_BOOT_HOST' : 'wlab24.inria.fr',
-        'PLC_NET_DNS1' : '138.96.0.10',
-        'PLC_NET_DNS2' : '138.96.0.11',
+        'settings': {
+            'PLC_ROOT_USER' : 'root@wlab24.inria.fr',
+            'PLC_ROOT_PASSWORD' : 'test++',
+            'PLC_NAME' : 'WifiLab',
+            'PLC_MAIL_ENABLED':'true',
+            'PLC_MAIL_SUPPORT_ADDRESS' : 'thierry.parmentelat@inria.fr',
+            'PLC_DB_HOST' : 'wlab24.inria.fr',
+            'PLC_API_HOST' : 'wlab24.inria.fr',
+            'PLC_WWW_HOST' : 'wlab24.inria.fr',
+            'PLC_BOOT_HOST' : 'wlab24.inria.fr',
+            'PLC_NET_DNS1' : '138.96.0.10',
+            'PLC_NET_DNS2' : '138.96.0.11',
+            'PLC_DNS_ENABLED' : 'false',
+        },
         'sites' : sites(),
         'keys' : keys(),
         'initscripts': initscripts(),
@@ -257,4 +264,7 @@ def plc () :
     }
 
 def config (plc_specs,options):
+    print "config_wifilab is obsolete .."
+    import sys
+    sys.exit(1)
     return plc_specs + [ plc() ]