incubator-tashi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rg...@apache.org
Subject svn commit: r979334 - in /incubator/tashi/trunk/src/zoni: client/zoni-cli.py extra/zoniDbSetup.py system/registration/register_node
Date Mon, 26 Jul 2010 16:03:20 GMT
Author: rgass
Date: Mon Jul 26 16:03:20 2010
New Revision: 979334

URL: http://svn.apache.org/viewvc?rev=979334&view=rev
Log:
fix problem with db creation

adding Id tags to register_node

prs->zoni

Modified:
    incubator/tashi/trunk/src/zoni/client/zoni-cli.py
    incubator/tashi/trunk/src/zoni/extra/zoniDbSetup.py
    incubator/tashi/trunk/src/zoni/system/registration/register_node   (props changed)

Modified: incubator/tashi/trunk/src/zoni/client/zoni-cli.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/zoni/client/zoni-cli.py?rev=979334&r1=979333&r2=979334&view=diff
==============================================================================
--- incubator/tashi/trunk/src/zoni/client/zoni-cli.py (original)
+++ incubator/tashi/trunk/src/zoni/client/zoni-cli.py Mon Jul 26 16:03:20 2010
@@ -58,7 +58,7 @@ def main():
 	rev = revision
 
 	configFile = getConfig()
-	#logit(configFile['logFile'], "Starting prs_client")
+	#logit(configFile['logFile'], "Starting Zoni client")
 	#logit(configFile['logFile'], "Loading config file")
 
 	parser = optparse.OptionParser(usage="%prog [-n] [-u] [--uid] [-v]", version="%prog " +
ver + " " + rev)
@@ -97,7 +97,7 @@ def main():
 	parser.add_option_group(group)
 	#parser.add_option("-p", "--printResources", dest="printResources", help="Print available
resources to choose from", action="store_true", default=False)
 
-	#  Admin INterface
+	#  Admin Interface
 	group = optparse.OptionGroup(parser, "Admin Interface", "Administration Interface:")
 	group.add_option("--admin", dest="ADMIN", help="Enter Admin mode", action="store_true",
default=False)
 	group.add_option("--addPxeImage", "--addpxeimage", dest="imageName", help="Add PXE image
to database", action="store_true", default=False)
@@ -126,7 +126,7 @@ def main():
 	#  Allocation Interface
 	group = optparse.OptionGroup(parser, "Allocation Interface", "Change current systems allocations:")
 	#group.add_option("-a", "--allocateResources", dest="allocateResources", help="Allocate
resource", action="store_true", default=False)
-	group.add_option("--addImage", "--addimage", dest="addImage", help="Add image to PRS - amd64-image:dist:dist_ver")
+	group.add_option("--addImage", "--addimage", dest="addImage", help="Add image to Zoni -
amd64-image:dist:dist_ver")
 	group.add_option("--delImage", "--delimage", dest="delImage", help="Delete PXE image")
 	group.add_option("--assignImage", "--assignimage", dest="assignImage", help="Assign image
to resource")
 
@@ -432,7 +432,7 @@ def main():
 		query.delImage(options.delImage)
 
 	#  Admin Interface
-	#  snmpwalk -v2c -c prs-domain sw0-r1r1 .1.3.6.1.2.1.17.7.1.4.3.1.5    
+	#  snmpwalk -v2c -c zoni-domain sw0-r1r1 .1.3.6.1.2.1.17.7.1.4.3.1.5    
 	if (options.ADMIN):
 
 		if not options.nodeName and not  options.createVlanId and not options.removeVlanId and
not options.switchPort and not options.interactiveSwitchConfig:

Modified: incubator/tashi/trunk/src/zoni/extra/zoniDbSetup.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/zoni/extra/zoniDbSetup.py?rev=979334&r1=979333&r2=979334&view=diff
==============================================================================
--- incubator/tashi/trunk/src/zoni/extra/zoniDbSetup.py (original)
+++ incubator/tashi/trunk/src/zoni/extra/zoniDbSetup.py Mon Jul 26 16:03:20 2010
@@ -58,6 +58,7 @@ def CreateZoniDb(self, config, adminUser
 	adminUser = adminUser
 	adminPassword = adminPassword
 	passwd = config['dbPassword']
+	#db = "`" + config['dbInst'] + "`"
 	db = config['dbInst']
 
 	if config['dbPort'] == "":
@@ -111,7 +112,7 @@ def createTables(conn):
 	'''  Create Tables  '''
 	#  Create sysinfo 
 	sys.stdout.write("    Creating sysinfo...")
-	execQuery(conn, "CREATE TABLE IF NOT EXISTS `sysinfo` (`sys_id` int(8) NOT NULL auto_increment,
`mac_addr` char(64) NOT NULL, `num_procs` int(10) unsigned default NULL, `num_cores` int(10)
unsigned default NULL, `mem_sticks` int(10) unsigned default NULL, `mem_slots` int(10) unsigned
default NULL, `mem_total` int(10) unsigned default NULL, `mem_limit` int(10) unsigned default
NULL, `clock_speed` int(10) unsigned default NULL, `sys_vendor` text, `sys_model` text, `proc_vendor`
char(64) default NULL, `proc_model` char(128) default NULL, `proc_cache` char(32) default
NULL, `service_tag` char(64) default NULL, 'express_service_code' char(64) default NULL, `cpu_flags`
text, `location` text, `bios_rev` char(32) default NULL, `ip_addr` varchar(64) NOT NULL, `init_checkin`
timestamp NOT NULL default CURRENT_TIMESTAMP, PRIMARY KEY  (`sys_id`))")
+	execQuery(conn, "CREATE TABLE IF NOT EXISTS `sysinfo` (`sys_id` int(8) NOT NULL auto_increment,
`mac_addr` char(64) NOT NULL, `num_procs` int(10) unsigned default NULL, `num_cores` int(10)
unsigned default NULL, `mem_sticks` int(10) unsigned default NULL, `mem_slots` int(10) unsigned
default NULL, `mem_total` int(10) unsigned default NULL, `mem_limit` int(10) unsigned default
NULL, `clock_speed` int(10) unsigned default NULL, `sys_vendor` text, `sys_model` text, `proc_vendor`
char(64) default NULL, `proc_model` char(128) default NULL, `proc_cache` char(32) default
NULL, `service_tag` char(64) default NULL, `express_service_code` char(64) default NULL, `cpu_flags`
text, `location` text, `bios_rev` char(32) default NULL, `ip_addr` varchar(64) NOT NULL, `init_checkin`
timestamp NOT NULL default CURRENT_TIMESTAMP, PRIMARY KEY  (`sys_id`))")
 	sys.stdout.write("Success\n")
 
 	#  Create hardwareinfo

Propchange: incubator/tashi/trunk/src/zoni/system/registration/register_node
------------------------------------------------------------------------------
    svn:keywords = Id



Mime
View raw message