define PLC_MAIL_FROM_ADDRESS
[tests.git] / system / config_default.py
index 4deba9a..82331d3 100644 (file)
@@ -1,6 +1,6 @@
 # -*- python3 -*-
 # Thierry Parmentelat <thierry.parmentelat@inria.fr>
-# Copyright (C) 2015 INRIA 
+# Copyright (C) 2015 INRIA
 #
 # a configuration module is expected:
 # (*) to define a config method
 pldomain = "onelab.eu"
 
 ### for the sfa dual setup
-def login_base (index): 
+def login_base (index):
     if index == 1: return 'inri'
     elif index == 2: return 'princ'
-    # index=3=>'sitea'  4=>'siteb' 
+    # index=3=>'sitea'  4=>'siteb'
     else: return 'site{}'.format(chr(index+94))
 
 # only one rspec style
@@ -65,7 +65,7 @@ def nodes(options, index):
              'route_fields' :           { 'subnet' : '0.0.0.0/0',
                                           'next_hop' : 'xxx-deferred-xxx',
                                           },
-             'bootmedium_options' :     [ 'serial', 'no-hangcheck', 'systemd-debug' ],
+             'bootmedium_options' :     [ 'serial', 'no-hangcheck', 'systemd-console' ],
              'tags'               :     {
                  # no tags anymore
              },
@@ -78,7 +78,7 @@ def all_nodenames (options, index):
     return [ node['name'] for node in nodes(options, index)]
 
 def users (options) :
-    return [ 
+    return [
         {'name' : 'admin', 'key_names' : [ 'key_admin' ],
          'user_fields' : {'first_name' : 'Admin',
                           'last_name' : 'Admin',
@@ -103,14 +103,14 @@ def users (options) :
          'roles':['pi','tech']},
 
         {'name' : 'tech', 'key_names' : [ 'key_user' ],
-         'user_fields' : {'first_name' : 'Tech', 'last_name' : 'Tech',
+         'user_fields' : {'first_name' : 'André', 'last_name' : 'Tech',
                           'enabled' : 'true',
                           'email' : 'fake-tech1@{}'.format(pldomain),
                           'password' : 'testtech'},
          'roles':['tech']},
 
         {'name' : 'user', 'key_names' : [ 'key_user' ],
-         'user_fields' : {'first_name' : 'User', 'last_name' : 'User',
+         'user_fields' : {'first_name' : 'Eylül', 'last_name' : 'User',
                           'enabled' : 'true',
                           'email' : 'fake-user1@{}'.format(pldomain),
                           'password' : 'testuser'},
@@ -282,7 +282,7 @@ QfzAAZLU2BabjwIfmWetj55ZKiFXRQLkYkz1GPXr2m3FopZb+6apq9M7tTERq1J9
 ORxipg3+uy/eYngUAmNmzOnK/9zklEPjNm9Nw3xHnZO+SyQLNI421KkdHOja/GGd
 awKBgQCLtk0+RpswH451PWyAJ6F+U4YDVaHR0s6pwp4TJAkDVlFBiRO28jEb5y0N
 bI1R7vrRdq07SgI3USLXqDokQ/pXJhC03w2r7W7niAkNaUll3YtJ2DZVSvuQguR9
-xwRNsuo0x60e7bivU+kNZtLn5FqWuGoBONZnbhgP6y7jPsNrig == 
+xwRNsuo0x60e7bivU+kNZtLn5FqWuGoBONZnbhgP6y7jPsNrig ==
 -----END RSA PRIVATE KEY-----
 """
 
@@ -368,7 +368,7 @@ function restart () {
   stop
   start
 }
-case $command in 
+case $command in
 start) start ;;
 stop) stop ;;
 restart) restart ;;
@@ -379,7 +379,7 @@ esac
 initscript_by_code = initscript_by_name.replace("initscript_by_name","initscript_by_code")
 
 # one single initscript in the InitScripts table
-def initscripts(options, index): 
+def initscripts(options, index):
     return [ { 'initscript_fields' : { 'enabled' : True,
                                        'name' : 'initscript_by_name',
                                        'script' : initscript_by_name,
@@ -433,7 +433,7 @@ def all_slicenames (options, index):
 def tcp_specs (options, index):
     # only run the test on the first plc
     if index != 1: return None
-    # 
+    #
     slice1 = '{}_sl1'.format(login_base(1))
     slice2 = '{}_sl2'.format(login_base(1))
     # with the addition of omf-friendly slices..
@@ -485,7 +485,7 @@ def leases (options, index):
     return leases
 
 def plc (options, index) :
-    return { 
+    return {
         'index' : index,
         'name' : 'plctest{}'.format(index),
         # as of yet, not sure we can handle foreign hosts, but this is required though
@@ -501,9 +501,12 @@ def plc (options, index) :
             'PLC_ROOT_PASSWORD' : 'test++',
             'PLC_SLICE_PREFIX' : 'auto',
             'PLC_HRN_ROOT': sfa_root(index),
-            'PLC_SHORTNAME' : 'Rlab',
+            'PLC_SHORTNAME' : 'Tlab',
             'PLC_MAIL_ENABLED' : 'false',
             'PLC_MAIL_SUPPORT_ADDRESS' : 'thierry.parmentelat@inria.fr',
+            # in the real word, use root@host.domain
+            # like e.g. root@r2labapi.inria.fr
+            'PLC_MAIL_FROM_ADDRESS' : 'thierry.parmentelat@inria.fr',
             'PLC_DB_HOST' : 'deferred-myplc-hostname',
 #            'PLC_DB_PASSWORD' : 'mnbvcxzlkjhgfdsapoiuytrewq',
             'PLC_API_HOST' : 'deferred-myplc-hostname',
@@ -533,7 +536,7 @@ def plc (options, index) :
     }
 
 def sfa (options, index) :
-    return { 
+    return {
         # the port used to generate the various aggregates.xml
         # stack config_sfamesh to point to SMs instead
         'neighbours-port':12346,
@@ -573,7 +576,7 @@ def test_auth_sfa_spec (options, index):
     user_alias = 'regular-user'
 #    pi_alias = 'pi'
 #    user_alias = 'user'
-    # 
+    #
     pi_spec = {
         'name':         pi_alias,
         'email':        full_mail (pi_alias),
@@ -600,21 +603,21 @@ def test_auth_sfa_spec (options, index):
         'key_name':    'key_sfauser',
         'nodenames':    all_nodenames(options, index),
         }
-        
+
     # we're already in a dedicated site/authority so no need to encumber with odd names
 
-    return { 
+    return {
              'login_base' : login_base,
              'domain'     : domain,
              'pi_spec'    : pi_spec,
              'user_spec'  : user_spec,
              'slice_spec' : slice_spec,
-             } 
+             }
 
 
 def config (plc_specs, options):
     result = plc_specs
-    # plc 'index' starts with 1 
+    # plc 'index' starts with 1
     for i in range(options.size):
         result.append(plc(options, i+1))
     return result