From tashi-commits-return-162-apmail-incubator-tashi-commits-archive=incubator.apache.org@incubator.apache.org Mon Jul 26 16:04:13 2010 Return-Path: Delivered-To: apmail-incubator-tashi-commits-archive@minotaur.apache.org Received: (qmail 78401 invoked from network); 26 Jul 2010 16:04:13 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 26 Jul 2010 16:04:13 -0000 Received: (qmail 22019 invoked by uid 500); 26 Jul 2010 16:04:13 -0000 Delivered-To: apmail-incubator-tashi-commits-archive@incubator.apache.org Received: (qmail 21991 invoked by uid 500); 26 Jul 2010 16:04:13 -0000 Mailing-List: contact tashi-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: tashi-dev@incubator.apache.org Delivered-To: mailing list tashi-commits@incubator.apache.org Received: (qmail 21980 invoked by uid 99); 26 Jul 2010 16:04:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Jul 2010 16:04:13 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Jul 2010 16:04:12 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 59C89238899C; Mon, 26 Jul 2010 16:03:20 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: tashi-commits@incubator.apache.org From: rgass@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100726160320.59C89238899C@eris.apache.org> 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