# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id: AddressTypes.py,v 1.4 2006/10/20 17:43:30 mlhuang Exp $
+# $Id: AddressTypes.py,v 1.5 2006/10/24 20:02:22 mlhuang Exp $
#
from types import StringTypes
join_tables = ['address_address_type']
fields = {
'address_type_id': Parameter(int, "Address type identifier"),
- 'name': Parameter(str, "Address type", max = 20, optional = False),
+ 'name': Parameter(str, "Address type", max = 20),
'description': Parameter(str, "Address type description", max = 254),
}
join_tables = ['address_address_type', 'site_address']
fields = {
'address_id': Parameter(int, "Address identifier"),
- 'line1': Parameter(str, "Address line 1", max = 254, optional = False),
+ 'line1': Parameter(str, "Address line 1", max = 254),
'line2': Parameter(str, "Address line 2", max = 254),
'line3': Parameter(str, "Address line 3", max = 254),
- 'city': Parameter(str, "City", max = 254, optional = False),
- 'state': Parameter(str, "State or province", max = 254, optional = False),
- 'postalcode': Parameter(str, "Postal code", max = 64, optional = False),
- 'country': Parameter(str, "Country", max = 128, optional = False),
+ 'city': Parameter(str, "City", max = 254),
+ 'state': Parameter(str, "State or province", max = 254),
+ 'postalcode': Parameter(str, "Postal code", max = 64),
+ 'country': Parameter(str, "Country", max = 128),
'address_type_ids': Parameter([int], "Address type identifiers", ro = True),
'address_types': Parameter([str], "Address types", ro = True),
}
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id: ConfFiles.py,v 1.3 2006/10/24 13:46:43 mlhuang Exp $
+# $Id: ConfFiles.py,v 1.4 2006/10/24 20:02:22 mlhuang Exp $
#
from PLC.Faults import *
fields = {
'conf_file_id': Parameter(int, "Configuration file identifier"),
'enabled': Parameter(bool, "Configuration file is active"),
- 'source': Parameter(str, "Relative path on the boot server where file can be downloaded", max = 255, optional = False),
- 'dest': Parameter(str, "Absolute path where file should be installed", max = 255, optional = False),
+ 'source': Parameter(str, "Relative path on the boot server where file can be downloaded", max = 255),
+ 'dest': Parameter(str, "Absolute path where file should be installed", max = 255),
'file_permissions': Parameter(str, "chmod(1) permissions", max = 20),
'file_owner': Parameter(str, "chown(1) owner", max = 50),
'file_group': Parameter(str, "chgrp(1) owner", max = 50),
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id: NodeGroups.py,v 1.13 2006/10/20 17:50:33 mlhuang Exp $
+# $Id: NodeGroups.py,v 1.14 2006/10/24 20:02:22 mlhuang Exp $
#
from types import StringTypes
join_tables = ['nodegroup_node', 'conf_file_nodegroup']
fields = {
'nodegroup_id': Parameter(int, "Node group identifier"),
- 'name': Parameter(str, "Node group name", max = 50, optional = False),
+ 'name': Parameter(str, "Node group name", max = 50),
'description': Parameter(str, "Node group description", max = 200),
'node_ids': Parameter([int], "List of nodes in this node group"),
'conf_file_ids': Parameter([int], "List of configuration files specific to this node group"),
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id: NodeNetworks.py,v 1.9 2006/10/20 17:51:08 mlhuang Exp $
+# $Id: NodeNetworks.py,v 1.10 2006/10/24 20:02:22 mlhuang Exp $
#
from types import StringTypes
primary_key = 'nodenetwork_id'
fields = {
'nodenetwork_id': Parameter(int, "Node interface identifier"),
- 'method': Parameter(str, "Addressing method (e.g., 'static' or 'dhcp')", optional = False),
- 'type': Parameter(str, "Address type (e.g., 'ipv4')", optional = False),
+ 'method': Parameter(str, "Addressing method (e.g., 'static' or 'dhcp')"),
+ 'type': Parameter(str, "Address type (e.g., 'ipv4')"),
'ip': Parameter(str, "IP address"),
'mac': Parameter(str, "MAC address"),
'gateway': Parameter(str, "IP address of primary gateway"),
'dns2': Parameter(str, "IP address of secondary DNS server"),
'bwlimit': Parameter(int, "Bandwidth limit", min = 0),
'hostname': Parameter(str, "(Optional) Hostname"),
- 'node_id': Parameter(int, "Node associated with this interface", optional = False),
+ 'node_id': Parameter(int, "Node associated with this interface"),
'is_primary': Parameter(bool, "Is the primary interface for this node"),
}
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id: Nodes.py,v 1.12 2006/10/20 17:51:32 mlhuang Exp $
+# $Id: Nodes.py,v 1.13 2006/10/24 20:02:22 mlhuang Exp $
#
from types import StringTypes
primary_key = 'node_id'
fields = {
'node_id': Parameter(int, "Node identifier"),
- 'hostname': Parameter(str, "Fully qualified hostname", max = 255, optional = False),
- 'site_id': Parameter(int, "Site at which this node is located", optional = False),
- 'boot_state': Parameter(str, "Boot state", max = 20, optional = False),
+ 'hostname': Parameter(str, "Fully qualified hostname", max = 255),
+ 'site_id': Parameter(int, "Site at which this node is located"),
+ 'boot_state': Parameter(str, "Boot state", max = 20),
'model': Parameter(str, "Make and model of the actual machine", max = 255),
'boot_nonce': Parameter(str, "(Admin only) Random value generated by the node at last boot", max = 128),
'version': Parameter(str, "Apparent Boot CD version", max = 64),
'ssh_rsa_key': Parameter(str, "Last known SSH host key", max = 1024),
- 'date_created': Parameter(str, "Date and time when node entry was created", ro = True),
- 'last_updated': Parameter(str, "Date and time when node entry was created", ro = True),
+ 'date_created': Parameter(int, "Date and time when node entry was created", ro = True),
+ 'last_updated': Parameter(int, "Date and time when node entry was created", ro = True),
'key': Parameter(str, "(Admin only) Node key", max = 256),
'session': Parameter(str, "(Admin only) Node session value", max = 256),
'nodenetwork_ids': Parameter([int], "List of network interfaces that this node has", ro = True),
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id: PCUs.py,v 1.4 2006/10/20 17:56:36 mlhuang Exp $
+# $Id: PCUs.py,v 1.5 2006/10/24 20:02:22 mlhuang Exp $
#
from PLC.Faults import *
join_tables = ['pcu_node']
fields = {
'pcu_id': Parameter(int, "PCU identifier"),
- 'site_id': Parameter(int, "Identifier of site where PCU is located", optional = False),
+ 'site_id': Parameter(int, "Identifier of site where PCU is located"),
'hostname': Parameter(str, "PCU hostname", max = 254),
- 'ip': Parameter(str, "PCU IP address", max = 254, optional = False),
+ 'ip': Parameter(str, "PCU IP address", max = 254),
'protocol': Parameter(str, "PCU protocol, e.g. ssh, https, telnet", max = 16),
'username': Parameter(str, "PCU username", max = 254),
'password': Parameter(str, "PCU username", max = 254),
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id: Persons.py,v 1.12 2006/10/20 17:52:24 mlhuang Exp $
+# $Id: Persons.py,v 1.13 2006/10/24 20:02:22 mlhuang Exp $
#
from types import StringTypes
primary_key = 'person_id'
fields = {
'person_id': Parameter(int, "Account identifier"),
- 'first_name': Parameter(str, "Given name", max = 128, optional = False),
- 'last_name': Parameter(str, "Surname", max = 128, optional = False),
+ 'first_name': Parameter(str, "Given name", max = 128),
+ 'last_name': Parameter(str, "Surname", max = 128),
'title': Parameter(str, "Title", max = 128),
- 'email': Parameter(str, "Primary e-mail address", max = 254, optional = False),
+ 'email': Parameter(str, "Primary e-mail address", max = 254),
'phone': Parameter(str, "Telephone number", max = 64),
'url': Parameter(str, "Home page", max = 254),
'bio': Parameter(str, "Biography", max = 254),
'enabled': Parameter(bool, "Has been enabled"),
- 'password': Parameter(str, "Account password in crypt() form", max = 254, optional = False),
- 'last_updated': Parameter(str, "Date and time of last update", ro = True),
- 'date_created': Parameter(str, "Date and time when account was created", ro = True),
+ 'password': Parameter(str, "Account password in crypt() form", max = 254),
+ 'last_updated': Parameter(int, "Date and time of last update", ro = True),
+ 'date_created': Parameter(int, "Date and time when account was created", ro = True),
'role_ids': Parameter([int], "List of role identifiers", ro = True),
'roles': Parameter([str], "List of roles", ro = True),
'site_ids': Parameter([int], "List of site identifiers", ro = True),
primary_key = 'site_id'
fields = {
'site_id': Parameter(int, "Site identifier"),
- 'name': Parameter(str, "Full site name", max = 254, optional = False),
- 'abbreviated_name': Parameter(str, "Abbreviated site name", max = 50, optional = False),
- 'login_base': Parameter(str, "Site slice prefix", max = 20, optional = False),
+ 'name': Parameter(str, "Full site name", max = 254),
+ 'abbreviated_name': Parameter(str, "Abbreviated site name", max = 50),
+ 'login_base': Parameter(str, "Site slice prefix", max = 20),
'is_public': Parameter(bool, "Publicly viewable site"),
'latitude': Parameter(float, "Decimal latitude of the site", min = -90.0, max = 90.0),
'longitude': Parameter(float, "Decimal longitude of the site", min = -180.0, max = 180.0),
join_tables = ['slice_attribute']
fields = {
'attribute_type_id': Parameter(int, "Slice attribute type identifier"),
- 'name': Parameter(str, "Slice attribute type name", max = 100, optional = False),
+ 'name': Parameter(str, "Slice attribute type name", max = 100),
'description': Parameter(str, "Slice attribute type description", max = 254),
'min_role_id': Parameter(int, "Minimum (least powerful) role that can set or change this attribute"),
}
fields = {
'slice_id': Parameter(int, "Slice identifier"),
'site_id': Parameter(int, "Identifier of the site to which this slice belongs"),
- 'name': Parameter(str, "Slice name", max = 32, optional = False),
+ 'name': Parameter(str, "Slice name", max = 32),
'instantiation': Parameter(str, "Slice instantiation state"),
'url': Parameter(str, "URL further describing this slice", max = 254),
'description': Parameter(str, "Slice description", max = 2048),