reordered
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Mon, 18 Jan 2010 17:14:40 +0000 (17:14 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Mon, 18 Jan 2010 17:14:40 +0000 (17:14 +0000)
17 files changed:
db-config.d/001-admin_user [new file with mode: 0644]
db-config.d/002-system_site [moved from db-config.d/01-init with 71% similarity]
db-config.d/010-slice_tags [moved from db-config.d/04-slicetags with 99% similarity]
db-config.d/011-node_tags [moved from db-config.d/02-nodetags with 75% similarity]
db-config.d/012-interface_tags [new file with mode: 0644]
db-config.d/013-wireless_tags [moved from db-config.d/03-interfacesettings with 61% similarity]
db-config.d/020-boot_states [moved from db-config.d/11-bootstates with 60% similarity]
db-config.d/030-conf_files [moved from db-config.d/05-conffiles with 100% similarity]
db-config.d/040-init_scripts [moved from db-config.d/06-initscripts with 95% similarity]
db-config.d/050-pcu_types [moved from db-config.d/10-pcutypes with 100% similarity]
db-config.d/060-messages [moved from db-config.d/09-messages with 99% similarity]
db-config.d/080-slice_netflow [moved from db-config.d/07-netflow_slice with 93% similarity]
db-config.d/081-slice_sirius [moved from db-config.d/08-sirius_slice with 93% similarity]
db-config.d/082-slice_sfacm [moved from db-config.d/08-genicw_slice with 84% similarity]
db-config.d/090-my_ops [new file with mode: 0644]
db-config.d/12-sitetags [deleted file]
db-config.d/13-persontags [deleted file]

diff --git a/db-config.d/001-admin_user b/db-config.d/001-admin_user
new file mode 100644 (file)
index 0000000..8797164
--- /dev/null
@@ -0,0 +1,24 @@
+# -*-python-*-
+# $Id$
+# $URL$
+#################### 
+# Create/update the default administrator account (should be person_id 2).
+
+admin = { 'person_id': 2,
+          'first_name': "Default",
+          'last_name': "Administrator",
+          'email': plc['root_user'],
+          'password': plc['root_password'] }
+persons = GetPersons([admin['person_id']])
+if not persons:
+    person_id = AddPerson(admin)
+    if person_id != admin['person_id']:
+        # Huh? Someone deleted the account manually from the database.
+        DeletePerson(person_id)
+        raise Exception, "Someone deleted the \"%s %s\" account from the database!" % \
+              (admin['first_name'], admin['last_name'])
+    UpdatePerson(person_id, { 'enabled': True })
+else:
+    person_id = persons[0]['person_id']
+    UpdatePerson(person_id, admin)
+
similarity index 71%
rename from db-config.d/01-init
rename to db-config.d/002-system_site
index 1880c39..ced75a7 100644 (file)
@@ -1,24 +1,10 @@
-# Create/update the default administrator account (should be person_id 2).
+# -*-python-*-
+# $Id$
+# $URL$
+#################### 
+# Create/update and populate the default site (should be site_id 1)
 
-admin = { 'person_id': 2,
-          'first_name': "Default",
-          'last_name': "Administrator",
-          'email': plc['root_user'],
-          'password': plc['root_password'] }
-persons = GetPersons([admin['person_id']])
-if not persons:
-    person_id = AddPerson(admin)
-    if person_id != admin['person_id']:
-        # Huh? Someone deleted the account manually from the database.
-        DeletePerson(person_id)
-        raise Exception, "Someone deleted the \"%s %s\" account from the database!" % \
-              (admin['first_name'], admin['last_name'])
-    UpdatePerson(person_id, { 'enabled': True })
-else:
-    person_id = persons[0]['person_id']
-    UpdatePerson(person_id, admin)
-
-# Create/update the default site (should be site_id 1)
+### plc_www holds the contents of the PLC_WWW configuration category
 if plc_www['port'] == '80':
     url = "http://" + plc_www['host'] + "/"
 elif plc_www['port'] == '443':
similarity index 99%
rename from db-config.d/04-slicetags
rename to db-config.d/010-slice_tags
index 989150b..282bc0c 100644 (file)
@@ -1,3 +1,6 @@
+# -*-python-*-
+# $Id$
+# $URL$
 #################### slice tag types
 # xxx this should move to PLC/Accessors
 
similarity index 75%
rename from db-config.d/02-nodetags
rename to db-config.d/011-node_tags
index 8991a9f..3d03521 100644 (file)
@@ -1,3 +1,6 @@
+# -*-python-*-
+# $Id$
+# $URL$
 #################### node tags
 default_node_tags = [
     { 'tagname' : 'arch',
@@ -13,10 +16,6 @@ default_node_tags = [
       'category' : 'node/operation', 
       'min_role_id' : 10} ,
 
-    { 'tagname' : 'exempt_node_until',
-      'description' : 'Exclude this node from MyOps until given date (YYYYMMDD)',
-      'category' : 'node/myops', 
-      'min_role_id' : 10} ,
     ]
 
 for node_type in default_node_tags: SetTagType (node_type)
diff --git a/db-config.d/012-interface_tags b/db-config.d/012-interface_tags
new file mode 100644 (file)
index 0000000..e184c39
--- /dev/null
@@ -0,0 +1,26 @@
+# -*-python-*-
+# $Id$
+# $URL$
+#################### interface settings
+# xxx this should move to PLC/Accessors
+
+default_interface_types = \
+[
+    {'category' : "interface/general",
+     'tagname' : "ifname",
+     'description': "Set interface name, instead of eth0 or the like",
+     'min_role_id' : 40},
+
+    {'category' : "interface/multihome",
+     'tagname' : "alias",
+     'description': "Specifies that the network is used for multihoming",
+     'min_role_id' : 40},
+    
+    {'category' : "interface/hidden",
+     'tagname' : "backdoor",
+     'description': "For testing new settings",
+     'min_role_id' : 10},
+]
+
+for setting_type in default_interface_types:
+    SetTagType(setting_type)
similarity index 61%
rename from db-config.d/03-interfacesettings
rename to db-config.d/013-wireless_tags
index e95e224..77c6683 100644 (file)
@@ -1,24 +1,10 @@
+# -*-python-*-
+# $Id: 012-interface_tags -1   $
+# $URL: svn+ssh://thierry@svn.planet-lab.org/svn/MyPLC/trunk/db-config.d/012-interface_tags $
 #################### interface settings
 # xxx this should move to PLC/Accessors
 
-# Setup default slice attribute types
-setting_types = \
-[
-    {'category' : "interface/general",
-     'tagname' : "ifname",
-     'description': "Set interface name, instead of eth0 or the like",
-     'min_role_id' : 40},
-
-    {'category' : "interface/multihome",
-     'tagname' : "alias",
-     'description': "Specifies that the network is used for multihoming",
-     'min_role_id' : 40},
-    
-    {'category' : "interface/hidden",
-     'tagname' : "backdoor",
-     'description': "For testing new settings",
-     'min_role_id' : 10},
-    ] + [
+wireless_interface_types = [
 
     { 'category' : "interface/wifi",
       'tagname' : x,
@@ -58,5 +44,5 @@ setting_types = \
     ]
     ]
 
-for setting_type in setting_types:
+for setting_type in wireless_interface_types:
     SetTagType(setting_type)
similarity index 60%
rename from db-config.d/11-bootstates
rename to db-config.d/020-boot_states
index 698abf6..b7a8a5b 100644 (file)
@@ -1,3 +1,7 @@
+# -*-python-*-
+# $Id: 012-slice_tags -1   $
+# $URL: svn+ssh://thierry@svn.planet-lab.org/svn/MyPLC/trunk/db-config.d/012-slice_tags $
+#################### slice tag types
 default_boot_states = [
     'boot',
     'failboot',
@@ -12,7 +16,7 @@ for state in default_boot_states:
         AddBootState(state)
 
 # TODO: Delete old boot states. 
-if False:# NOTE: Only set Ture if all federating peers have the new default boot states above.
+if False:# NOTE: Only set to true if all federating peers have the new default boot states above.
     for state in current_boot_states:
         if state not in default_boot_states:
             DeleteBootState(state)
similarity index 95%
rename from db-config.d/06-initscripts
rename to db-config.d/040-init_scripts
index 1cc06a3..e86ec0f 100644 (file)
@@ -1,3 +1,6 @@
+# -*-python-*-
+# $Id$
+# $URL$
 #################### initscripts
 # Default Initscripts
 default_initscripts = []
similarity index 99%
rename from db-config.d/09-messages
rename to db-config.d/060-messages
index ce9e2dc..78eaa71 100644 (file)
@@ -1,3 +1,6 @@
+# -*-python-*-
+# $Id$
+# $URL$
 #################### body for messages
 
 installfailed = """Once the node meets these requirements, please reinitiate the install
similarity index 93%
rename from db-config.d/07-netflow_slice
rename to db-config.d/080-slice_netflow
index 81549dc..7af59e0 100644 (file)
@@ -1,3 +1,7 @@
+# -*-python-*-
+# $Id$
+# $URL$
+####################
 # Create/update system slices
 
 # get the MyPLC url
similarity index 93%
rename from db-config.d/08-sirius_slice
rename to db-config.d/081-slice_sirius
index 98c107f..dca2399 100644 (file)
@@ -1,3 +1,7 @@
+# -*-python-*-
+# $Id$
+# $URL$
+####################
 # Create/update system slices
 
 # get the MyPLC url
similarity index 84%
rename from db-config.d/08-genicw_slice
rename to db-config.d/082-slice_sfacm
index 080354f..eaf06fc 100644 (file)
@@ -1,3 +1,7 @@
+# -*-python-*-
+# $Id$
+# $URL$
+####################
 # Create/update system slices
 
 # get the MyPLC url
@@ -10,7 +14,7 @@ Component Manger.
 
 slice = \
 {
-    'name': plc['slice_prefix'] + "_genicw",
+    'name': plc['slice_prefix'] + "_sfacm",
     'description': description,
     'url': url,
     'instantiation': "plc-instantiated",
diff --git a/db-config.d/090-my_ops b/db-config.d/090-my_ops
new file mode 100644 (file)
index 0000000..75ae9fd
--- /dev/null
@@ -0,0 +1,32 @@
+# -*-python-*-
+# $Id$
+# $URL$
+########
+myops_node_tags = [
+    { 'tagname' : 'exempt_node_until',
+      'description' : 'Exclude this node from MyOps until given date (YYYYMMDD)',
+      'category' : 'node/myops', 
+      'min_role_id' : 10} ,
+]
+
+for node_type in myops_node_tags: SetTagType (node_type)
+
+########
+myops_site_tags = [
+    { 'tagname' : 'exempt_site_until',
+      'description' : 'Exclude this site from MyOps until given date (YYYYMMDD)',
+      'category' : 'site/myops', 
+      'min_role_id' : 10} ,
+]
+
+for site_type in myops_site_tags: SetTagType (site_type)
+########
+myops_person_tags = [
+    { 'tagname' : 'exempt_person_until',
+      'description' : 'Exclude this person from MyOps until given date (YYYYMMDD)',
+      'category' : 'person/myops', 
+      'min_role_id' : 10} ,
+]
+
+for person_type in myops_person_tags: SetTagType (person_type)
diff --git a/db-config.d/12-sitetags b/db-config.d/12-sitetags
deleted file mode 100644 (file)
index 982f81b..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-########
-default_site_tags = [
-    { 'tagname' : 'exempt_site_until',
-      'description' : 'Exclude this site from MyOps until given date (YYYYMMDD)',
-      'category' : 'site/myops', 
-      'min_role_id' : 10} ,
-]
-
-for site_type in default_site_tags: SetTagType (site_type)
diff --git a/db-config.d/13-persontags b/db-config.d/13-persontags
deleted file mode 100644 (file)
index d4fb89b..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-########
-default_person_tags = [
-    { 'tagname' : 'exempt_person_until',
-      'description' : 'Exclude this person from MyOps until given date (YYYYMMDD)',
-      'category' : 'person/myops', 
-      'min_role_id' : 10} ,
-]
-
-for person_type in default_person_tags: SetTagType (person_type)