--- /dev/null
+# -*-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)
+
-# 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':
+# -*-python-*-
+# $Id$
+# $URL$
#################### slice tag types
# xxx this should move to PLC/Accessors
+# -*-python-*-
+# $Id$
+# $URL$
#################### node tags
default_node_tags = [
{ 'tagname' : 'arch',
'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)
--- /dev/null
+# -*-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)
+# -*-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,
]
]
-for setting_type in setting_types:
+for setting_type in wireless_interface_types:
SetTagType(setting_type)
+# -*-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',
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)
+# -*-python-*-
+# $Id$
+# $URL$
#################### initscripts
# Default Initscripts
default_initscripts = []
+# -*-python-*-
+# $Id$
+# $URL$
#################### body for messages
installfailed = """Once the node meets these requirements, please reinitiate the install
+# -*-python-*-
+# $Id$
+# $URL$
+####################
# Create/update system slices
# get the MyPLC url
+# -*-python-*-
+# $Id$
+# $URL$
+####################
# Create/update system slices
# get the MyPLC url
+# -*-python-*-
+# $Id$
+# $URL$
+####################
# Create/update system slices
# get the MyPLC url
slice = \
{
- 'name': plc['slice_prefix'] + "_genicw",
+ 'name': plc['slice_prefix'] + "_sfacm",
'description': description,
'url': url,
'instantiation': "plc-instantiated",
--- /dev/null
+# -*-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)
+++ /dev/null
-########
-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)
+++ /dev/null
-########
-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)