incubator-tashi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strou...@apache.org
Subject svn commit: r1351049 [2/2] - in /incubator/tashi/trunk/src: tashi/ tashi/accounting/ tashi/agents/ tashi/client/ tashi/clustermanager/ tashi/clustermanager/data/ tashi/dfs/ tashi/messaging/ tashi/nodemanager/ tashi/nodemanager/vmcontrol/ tashi/rpycserv...
Date Sun, 17 Jun 2012 05:16:02 GMT
Modified: incubator/tashi/trunk/src/zoni/hardware/f10s50switch.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/zoni/hardware/f10s50switch.py?rev=1351049&r1=1351048&r2=1351049&view=diff
==============================================================================
--- incubator/tashi/trunk/src/zoni/hardware/f10s50switch.py (original)
+++ incubator/tashi/trunk/src/zoni/hardware/f10s50switch.py Sun Jun 17 05:16:00 2012
@@ -26,15 +26,13 @@ import datetime
 import time
 import thread
 import string
-import getpass
 import socket
 import tempfile
 import logging
 
 #import zoni
-from zoni.data.resourcequerysql import *
-from zoni.hardware.hwswitchinterface import HwSwitchInterface
 from zoni.data.resourcequerysql import ResourceQuerySql
+from zoni.hardware.hwswitchinterface import HwSwitchInterface
 from zoni.agents.dhcpdns import DhcpDns
 
 
@@ -49,7 +47,7 @@ class HwF10S50Switch(HwSwitchInterface):
 		self.log = logging.getLogger(os.path.basename(__file__))
 
 
- 	def setVerbose(self, verbose):
+	def setVerbose(self, verbose):
 		self.verbose = verbose
 
 	def __login(self):
@@ -138,7 +136,7 @@ class HwF10S50Switch(HwSwitchInterface):
 		child.expect(["conf-if", pexpect.EOF])
 		child.sendline("switchport")
 		child.sendline("exit")
-		child.sendline("interface vlan " + vlan")
+		child.sendline("interface vlan %s" % vlan)
 		child.expect(["conf-if", pexpect.EOF])
 		cmd = "tagged port-channel 1"
 		child.sendline(cmd)
@@ -214,10 +212,10 @@ class HwF10S50Switch(HwSwitchInterface):
 				i=child.expect(['console','#', 'Name:', pexpect.EOF, pexpect.TIMEOUT], timeout=2)
 				i=child.expect(['console','#', 'Name:', pexpect.EOF, pexpect.TIMEOUT], timeout=2)
 				
-			except EOF:
+			except pexpect.EOF:
 				print "EOF", i
 				#child.sendline()
-			except TIMEOUT:
+			except pexpect.TIMEOUT:
 				print "TIMEOUT", i
 		#child.interact(escape_character='\x1d', input_filter=None, output_filter=None)
 
@@ -237,7 +235,7 @@ class HwF10S50Switch(HwSwitchInterface):
 		child = self.__login()
 		child.logfile = sys.stdout
 		child.sendline('config')
-		cmd = "interface vlan " + vlan)
+		cmd = "interface vlan %s" % (vlan)
 		child.sendline(cmd)
 		i=child.expect(['conf-if', pexpect.EOF, pexpect.TIMEOUT])
 		if i > 0:
@@ -270,7 +268,7 @@ class HwF10S50Switch(HwSwitchInterface):
 		child.logfile = sys.stdout
 		cmd = "show interfaces g 0/" + str(self.host['hw_port'])
 		child.sendline(cmd)
-		i = child.expect(['#', pexpect.EOF, pexpect.TIMEOUT])
+		__i = child.expect(['#', pexpect.EOF, pexpect.TIMEOUT])
 		child.terminate()
 
 	def interactiveSwitchConfig(self):
@@ -374,12 +372,12 @@ class HwF10S50Switch(HwSwitchInterface):
 
 		user = "public"
 		oid = eval("1,3,6,1,4,1,674,10895,3000,1,2,100,1,0")
-		errorIndication, errorStatus, errorIndex, varBinds = cmdgen.CommandGenerator().getCmd(
\
+		__errorIndication, __errorStatus, __errorIndex, varBinds = cmdgen.CommandGenerator().getCmd(
\
 		cmdgen.CommunityData('my-agent', user, 0), \
 		cmdgen.UdpTransportTarget((host, 161)), oid)
 		a['hw_model'] = str(varBinds[0][1])
 		oid = eval("1,3,6,1,4,1,674,10895,3000,1,2,100,3,0")
-		errorIndication, errorStatus, errorIndex, varBinds = cmdgen.CommandGenerator().getCmd(
\
+		__errorIndication, __errorStatus, __errorIndex, varBinds = cmdgen.CommandGenerator().getCmd(
\
 		cmdgen.CommunityData('my-agent', user, 0), \
 		cmdgen.UdpTransportTarget((host, 161)), oid)
 		a['hw_make'] = str(varBinds[0][1])

Modified: incubator/tashi/trunk/src/zoni/hardware/hpilo.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/zoni/hardware/hpilo.py?rev=1351049&r1=1351048&r2=1351049&view=diff
==============================================================================
--- incubator/tashi/trunk/src/zoni/hardware/hpilo.py (original)
+++ incubator/tashi/trunk/src/zoni/hardware/hpilo.py Sun Jun 17 05:16:00 2012
@@ -19,7 +19,6 @@
 #
 
 import sys
-import os 
 import pexpect
 import time
 
@@ -41,8 +40,6 @@ def log(f):
 	myF.__name__ = f.__name__
 	return myF
 
-import time
-
 def timeF(f):
 	def myF(*args, **kw):
 		start = time.time()

Modified: incubator/tashi/trunk/src/zoni/hardware/hpswitch.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/zoni/hardware/hpswitch.py?rev=1351049&r1=1351048&r2=1351049&view=diff
==============================================================================
--- incubator/tashi/trunk/src/zoni/hardware/hpswitch.py (original)
+++ incubator/tashi/trunk/src/zoni/hardware/hpswitch.py Sun Jun 17 05:16:00 2012
@@ -25,13 +25,11 @@ import sys
 import pexpect
 import datetime
 import thread
-import time
 import threading
 import logging
 
 
 from hwswitchinterface import HwSwitchInterface
-from resourcequerysql import ResourceQuerySql
 
 
 class HwHPSwitch(HwSwitchInterface):
@@ -169,10 +167,10 @@ class HwHPSwitch(HwSwitchInterface):
 				i=child.expect(['console','sw', 'Name:', pexpect.EOF, pexpect.TIMEOUT], timeout=2)
 				i=child.expect(['console','sw', 'Name:', pexpect.EOF, pexpect.TIMEOUT], timeout=2)
 
-			except EOF:
+			except pexpect.EOF:
 				print "EOF", i
 				#child.sendline()
-			except TIMEOUT:
+			except pexpect.TIMEOUT:
 				print "TIMEOUT", i
 		#child.interact(escape_character='\x1d', input_filter=None, output_filter=None)
 
@@ -245,7 +243,7 @@ class HwHPSwitch(HwSwitchInterface):
 		cmd = "/info/port " + str(self.host['hw_port'])
 		child.sendline(cmd)
 		child.logfile = sys.stdout
-		opt = child.expect(['Info(.*)', pexpect.EOF, pexpect.TIMEOUT])
+		__opt = child.expect(['Info(.*)', pexpect.EOF, pexpect.TIMEOUT])
 
 	#  this needs to be removed or rewritten
 	def interactiveSwitchConfig(self):

Modified: incubator/tashi/trunk/src/zoni/hardware/hwswitchinterface.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/zoni/hardware/hwswitchinterface.py?rev=1351049&r1=1351048&r2=1351049&view=diff
==============================================================================
--- incubator/tashi/trunk/src/zoni/hardware/hwswitchinterface.py (original)
+++ incubator/tashi/trunk/src/zoni/hardware/hwswitchinterface.py Sun Jun 17 05:16:00 2012
@@ -18,8 +18,6 @@
 #  $Id$
 #
 
-import sys
-import os 
 
 class HwSwitchInterface(object):
 	"""  Interface description for hardware switches

Modified: incubator/tashi/trunk/src/zoni/hardware/ipmi.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/zoni/hardware/ipmi.py?rev=1351049&r1=1351048&r2=1351049&view=diff
==============================================================================
--- incubator/tashi/trunk/src/zoni/hardware/ipmi.py (original)
+++ incubator/tashi/trunk/src/zoni/hardware/ipmi.py Sun Jun 17 05:16:00 2012
@@ -18,11 +18,8 @@
 #  $Id$
 #
 
-import sys
-import os 
 import subprocess
 import logging
-import string
 
 from systemmanagementinterface import SystemManagementInterface
 

Modified: incubator/tashi/trunk/src/zoni/hardware/raritanpdu.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/zoni/hardware/raritanpdu.py?rev=1351049&r1=1351048&r2=1351049&view=diff
==============================================================================
--- incubator/tashi/trunk/src/zoni/hardware/raritanpdu.py (original)
+++ incubator/tashi/trunk/src/zoni/hardware/raritanpdu.py Sun Jun 17 05:16:00 2012
@@ -18,19 +18,19 @@
 #  $Id$
 #
 
-import sys
-import os 
-import string
 import warnings
 import logging
+import string
+import sys
 import time
+
 warnings.filterwarnings("ignore")
 
 from pysnmp.entity.rfc3413.oneliner import cmdgen
 from pysnmp.proto import rfc1902
-from zoni.data.resourcequerysql import *
+from zoni.data.resourcequerysql import ResourceQuerySql
 from zoni.hardware.systemmanagementinterface import SystemManagementInterface
-
+from zoni.agents.dhcpdns import DhcpDns
 
 #class systemmagement():
 	#def __init__(self, proto):
@@ -90,7 +90,7 @@ class raritanDominionPx(SystemManagement
 	'''
 	def getOffset(self):
 		thisoid = eval(str(self.oid) + str(self.oid_status) + "," + str(0))
-		errorIndication, errorStatus, errorIndex, varBinds = cmdgen.CommandGenerator().getCmd(
\
+		__errorIndication, __errorStatus, __errorIndex, varBinds = cmdgen.CommandGenerator().getCmd(
\
 		cmdgen.CommunityData('my-agent', self.user, 0), \
 		cmdgen.UdpTransportTarget((self.pdu_name, 161)), thisoid)
 		output = varBinds[0][1]
@@ -102,7 +102,7 @@ class raritanDominionPx(SystemManagement
 
 	def __setPowerStatus(self):
 		thisoid = eval(str(self.oid) + str(self.oid_status) + "," + str(self.port))
-		errorIndication, errorStatus, errorIndex, varBinds = cmdgen.CommandGenerator().getCmd(
\
+		__errorIndication, __errorStatus, __errorIndex, varBinds = cmdgen.CommandGenerator().getCmd(
\
 		cmdgen.CommunityData('my-agent', self.user, 0), \
 		cmdgen.UdpTransportTarget((self.pdu_name, 161)), thisoid)
 		output = varBinds[0][1]
@@ -134,7 +134,7 @@ class raritanDominionPx(SystemManagement
 
 	def powerOn(self):
 		thisoid = eval(str(self.oid) + str(self.oid_status) + "," + str(self.port)) 
-		errorIndication, errorStatus, errorIndex, varBinds = cmdgen.CommandGenerator().setCmd(
\
+		__errorIndication, __errorStatus, __errorIndex, __varBinds = cmdgen.CommandGenerator().setCmd(
\
 		cmdgen.CommunityData('my-agent', self.user, 1), \
 		cmdgen.UdpTransportTarget((self.pdu_name, 161)), \
 		(thisoid, rfc1902.Integer('1')))
@@ -142,7 +142,7 @@ class raritanDominionPx(SystemManagement
 
 	def powerOff(self):
 		thisoid = eval(str(self.oid) + str(self.oid_status) + "," + str(self.port)) 
-		errorIndication, errorStatus, errorIndex, varBinds = cmdgen.CommandGenerator().setCmd(
\
+		__errorIndication, __errorStatus, __errorIndex, __varBinds = cmdgen.CommandGenerator().setCmd(
\
 		cmdgen.CommunityData('my-agent', self.user, 1), \
 		cmdgen.UdpTransportTarget((self.pdu_name, 161)), \
 		(thisoid, rfc1902.Integer('0')))
@@ -181,7 +181,7 @@ class raritanDominionPx(SystemManagement
 
 		a={}
 		oid = eval(str("1,3,6,1,2,1,1,1,0"))
-		errorIndication, errorStatus, errorIndex, varBinds = cmdgen.CommandGenerator().getCmd(
\
+		__errorIndication, __errorStatus, __errorIndex, varBinds = cmdgen.CommandGenerator().getCmd(
\
 		cmdgen.CommunityData('my-agent', user, 0), \
 		cmdgen.UdpTransportTarget((host, 161)), oid)
 
@@ -193,7 +193,7 @@ class raritanDominionPx(SystemManagement
 		a['hw_make'] = str(varBinds[0][1])
 
 		oid = eval("1,3,6,1,4,1,13742,4,1,1,6,0")
-		errorIndication, errorStatus, errorIndex, varBinds = cmdgen.CommandGenerator().getCmd(
\
+		__errorIndication, __errorStatus, __errorIndex, varBinds = cmdgen.CommandGenerator().getCmd(
\
 		cmdgen.CommunityData('my-agent', user, 0), \
 		cmdgen.UdpTransportTarget((host, 161)), oid)
 		x = []
@@ -204,7 +204,7 @@ class raritanDominionPx(SystemManagement
 		a['hw_mac'] = ":".join(['%s' % d for d in x])
 
 		oid = eval("1,3,6,1,4,1,13742,4,1,1,2,0")
-		errorIndication, errorStatus, errorIndex, varBinds = cmdgen.CommandGenerator().getCmd(
\
+		__errorIndication, __errorStatus, __errorIndex, varBinds = cmdgen.CommandGenerator().getCmd(
\
 		cmdgen.CommunityData('my-agent', user, 0), \
 		cmdgen.UdpTransportTarget((host, 161)), oid)
 		serial = str(varBinds[0][1])
@@ -214,13 +214,13 @@ class raritanDominionPx(SystemManagement
 		a['hw_notes'] = val + "; Serial " + serial
 
 		oid = eval("1,3,6,1,4,1,13742,4,1,1,1,0")
-		errorIndication, errorStatus, errorIndex, varBinds = cmdgen.CommandGenerator().getCmd(
\
+		__errorIndication, __errorStatus, __errorIndex, varBinds = cmdgen.CommandGenerator().getCmd(
\
 		cmdgen.CommunityData('my-agent', user, 0), \
 		cmdgen.UdpTransportTarget((host, 161)), oid)
 		a['hw_version_fw'] = str(varBinds[0][1])
 
 		oid = eval("1,3,6,1,4,1,13742,4,1,1,12,0")
-		errorIndication, errorStatus, errorIndex, varBinds = cmdgen.CommandGenerator().getCmd(
\
+		__errorIndication, __errorStatus, __errorIndex, varBinds = cmdgen.CommandGenerator().getCmd(
\
 		cmdgen.CommunityData('my-agent', user, 0), \
 		cmdgen.UdpTransportTarget((host, 161)), oid)
 		a['hw_model'] = str(varBinds[0][1])

Modified: incubator/tashi/trunk/src/zoni/hardware/systemmanagement.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/zoni/hardware/systemmanagement.py?rev=1351049&r1=1351048&r2=1351049&view=diff
==============================================================================
--- incubator/tashi/trunk/src/zoni/hardware/systemmanagement.py (original)
+++ incubator/tashi/trunk/src/zoni/hardware/systemmanagement.py Sun Jun 17 05:16:00 2012
@@ -19,13 +19,11 @@
 #  $Id$  
 #
 
-import sys
-import os 
 import logging
 import threading
+import time
 
 from systemmanagementinterface import SystemManagementInterface
-from zoni.data.resourcequerysql import *
 
 from tashi.util import instantiateImplementation
 
@@ -41,7 +39,7 @@ class SystemManagement(SystemManagementI
 
 
 	def getInfo(self, nodeName):
-		self.host = self.data.getHostInfo(node)
+		self.host = self.data.getHostInfo(nodeName)
 		
 		
 	def setVerbose(self, verbose):
@@ -65,7 +63,7 @@ class SystemManagement(SystemManagementI
 		#  [2] = hw method password
 		success = 0
 		for i in hw:
-			inst = instantiateImplementation(self.config['hardwareControl'][i[0]]['class'], self.config,
nodeName, self.host)
+			__inst = instantiateImplementation(self.config['hardwareControl'][i[0]]['class'], self.config,
nodeName, self.host)
 			a = "inst.%s" % mycmd
 			for count in range(retries):
 				doit = eval(a)
@@ -89,7 +87,7 @@ class SystemManagement(SystemManagementI
 	def softPowerConfirm(self, method, nodeName):
 		#  using a sleep for now...
 		time.sleep(30)
-		inst = instantiateImplementation(self.config['hardwareControl'][method]['class'], self.config,
nodeName, self.host)
+		__inst = instantiateImplementation(self.config['hardwareControl'][method]['class'], self.config,
nodeName, self.host)
 		mycmd = "%s()" % ("powerOff")
 		a = "inst.%s" % mycmd
 		doit = eval(a)

Modified: incubator/tashi/trunk/src/zoni/hardware/systemmanagementinterface.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/zoni/hardware/systemmanagementinterface.py?rev=1351049&r1=1351048&r2=1351049&view=diff
==============================================================================
--- incubator/tashi/trunk/src/zoni/hardware/systemmanagementinterface.py (original)
+++ incubator/tashi/trunk/src/zoni/hardware/systemmanagementinterface.py Sun Jun 17 05:16:00
2012
@@ -18,9 +18,6 @@
 #  $Id$
 #
 
-import sys
-import os 
-
 
 class SystemManagementInterface(object):
 	"""  Interface description for hardware management controllers 

Modified: incubator/tashi/trunk/src/zoni/install/db/zoniDbSetup.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/zoni/install/db/zoniDbSetup.py?rev=1351049&r1=1351048&r2=1351049&view=diff
==============================================================================
--- incubator/tashi/trunk/src/zoni/install/db/zoniDbSetup.py (original)
+++ incubator/tashi/trunk/src/zoni/install/db/zoniDbSetup.py Sun Jun 17 05:16:00 2012
@@ -20,10 +20,8 @@
 
 import os 
 import sys
-import string
 try:
 	import MySQLdb
-	import traceback
 	import optparse
 	import getpass
 except ImportError, e:
@@ -38,8 +36,8 @@ sys.path.append(a)
 a = os.path.join("../../..")
 sys.path.append(a)
 
-from zoni.version import *
-from zoni.extra.util import *
+from zoni.version import version, revision
+from zoni.extra.util import getConfig
 
 
 def main():
@@ -53,7 +51,7 @@ def main():
 	parser.add_option("-u", "--userName", "--username", dest="userName", help="Mysql username")
 	parser.add_option("-p", "--password", dest="password", help="Admin mysql password")
 	#parser.add_option("-v", "--verbose", dest="verbosity", help="Be verbose", action="store_true",
default=False)
-	(options, args) = parser.parse_args()
+	(options, __args) = parser.parse_args()
 
 	if not options.userName:
 		parser.print_help()
@@ -63,7 +61,7 @@ def main():
 	if not options.password:
 		password = getpass.getpass()
 
-	(configs, configFiles) = getConfig()
+	(configs, __configFiles) = getConfig()
 
 	CreateZoniDb(configs, options.userName, password)
 
@@ -174,7 +172,7 @@ def createTables(conn):
 	sys.stdout.write("    Creating sysdomainmembermap...")
 	execQuery(conn, "CREATE TABLE IF NOT EXISTS `sysdomainmembermap` (`sys_id` int(11) unsigned
NOT NULL, `domain_id` int(11) NOT NULL)")
 	sys.stdout.write("Success\n")
- 	#  Create allocationinfo
+	#  Create allocationinfo
 	sys.stdout.write("    Creating allocationinfo...")
 	execQuery(conn, "CREATE TABLE IF NOT EXISTS `allocationinfo` ( `allocation_id` int(11) unsigned
NOT NULL auto_increment, `sys_id` int(11) unsigned NOT NULL, `reservation_id` int(11) unsigned
NOT NULL, `pool_id` int(11) unsigned NULL, `hostname` varchar(64) default NULL, `domain_id`
int(11) unsigned NOT NULL, `notes` tinytext, `expire_time` timestamp default 0 NOT NULL, PRIMARY
KEY  (`allocation_id`)) ENGINE=INNODB")
 	sys.stdout.write("Success\n")
@@ -224,10 +222,10 @@ def createRegistration(conn, config):
 	if checkVal:
 		sys.stdout.write("    Kernel already exists in DB...\n")
 		#  Get the kernel_id
-		kernelId = str(checkVal[1][0][0])
+		#kernelId = str(checkVal[1][0][0])
 	else:
-		r = execQuery(conn, "INSERT into `kernelinfo` (kernel_name, kernel_release, kernel_arch)
values ('linux-2.6.24-19-server', '2.6.24-19-server', 'x86_64' )")
-		kernelId = str(r.lastrowid)
+		__r = execQuery(conn, "INSERT into `kernelinfo` (kernel_name, kernel_release, kernel_arch)
values ('linux-2.6.24-19-server', '2.6.24-19-server', 'x86_64' )")
+		#kernelId = str(r.lastrowid)
 		sys.stdout.write("    Success\n")
 
 	#  Initrd
@@ -325,7 +323,7 @@ def addInitialConfig(conn, config):
 	if checkVal:
 		sys.stdout.write("Default Domain (ZoniHome) already linked to vlan " + config['zoniHomeDomain']
+ "...\n")
 		#  Get the domainId 
-		valId = str(checkVal[1][0][0])
+		#valId = str(checkVal[1][0][0])
 	else:
 		r = execQuery(conn, "INSERT into `domainmembermap` (domain_id, vlan_id) values (" + domainId
+ ", " + vlanId + ")")
 		domainId = str(r.lastrowid)
@@ -358,7 +356,7 @@ def addInitialConfig(conn, config):
 	if checkVal:
 		sys.stdout.write("Default pool (ZoniHome) already exists...\n")
 		#  Get the domainId 
-		poolId = str(checkVal[1][0][0])
+		#poolId = str(checkVal[1][0][0])
 	else:
 		r = execQuery(conn, "INSERT into `poolmap` (pool_id, vlan_id) values (" + zoniPoolId +
", " + vlanId + ")")
 		domainId = str(r.lastrowid)
@@ -370,7 +368,7 @@ def addInitialConfig(conn, config):
 		sys.stdout.write("Default pool (ZoniHome) already exists...\n")
 		#  XXX probably should delete first then add, do it later
 		#  Get the domainId 
-		poolId = str(checkVal[1][0][0])
+		#poolId = str(checkVal[1][0][0])
 	else:
 		r = execQuery(conn, "INSERT into `poolmap` (pool_id, vlan_id) values (" + zoniIpmiId +
", " + vlanId + ")")
 		domainId = str(r.lastrowid)

Modified: incubator/tashi/trunk/src/zoni/install/dnsdhcp/zoniDnsDhcpSetup.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/zoni/install/dnsdhcp/zoniDnsDhcpSetup.py?rev=1351049&r1=1351048&r2=1351049&view=diff
==============================================================================
--- incubator/tashi/trunk/src/zoni/install/dnsdhcp/zoniDnsDhcpSetup.py (original)
+++ incubator/tashi/trunk/src/zoni/install/dnsdhcp/zoniDnsDhcpSetup.py Sun Jun 17 05:16:00
2012
@@ -21,10 +21,7 @@
 
 import os 
 import sys
-import string
-import traceback
 import optparse
-import getpass
 
 a = os.path.join("../")
 sys.path.append(a)
@@ -33,8 +30,8 @@ sys.path.append(a)
 a = os.path.join("../../..")
 sys.path.append(a)
 
-from zoni.version import *
-from zoni.extra.util import *
+from zoni.version import version, revision
+from zoni.extra.util import createKey
 
 
 def main():
@@ -47,13 +44,13 @@ def main():
 	parser = optparse.OptionParser(usage="%prog -k keyname", version="%prog " + ver + " " +
rev)
 	parser.add_option("-k", "--keyName", "--keyname", dest="keyName", help="Key name")
 	#parser.add_option("-v", "--verbose", dest="verbosity", help="Be verbose", action="store_true",
default=False)
-	(options, args) = parser.parse_args()
+	(options, __args) = parser.parse_args()
 
 	if not options.keyName:
 		parser.print_help()
 		exit(1)
 
-	(configs, configFiles) = getConfig()
+	#(configs, configFiles) = getConfig()
 
 
 	key = createKey(options.keyName)

Modified: incubator/tashi/trunk/src/zoni/install/pxe/zoniPxeSetup.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/zoni/install/pxe/zoniPxeSetup.py?rev=1351049&r1=1351048&r2=1351049&view=diff
==============================================================================
--- incubator/tashi/trunk/src/zoni/install/pxe/zoniPxeSetup.py (original)
+++ incubator/tashi/trunk/src/zoni/install/pxe/zoniPxeSetup.py Sun Jun 17 05:16:00 2012
@@ -21,9 +21,6 @@
 
 import os 
 import sys
-import string
-import traceback
-import optparse
 import shutil
 import urllib
 import tarfile
@@ -38,21 +35,21 @@ sys.path.append(a)
 a = os.path.join("../../..")
 sys.path.append(a)
 
-from zoni.extra.util import *
-from zoni.version import *
+from zoni.extra.util import getConfig, checkSuper, createDir
+#from zoni.version import version, revision
 from zoni.bootstrap.pxe import Pxe
 
 
 def main():
 	''' This file sets up PXE for Zoni '''
 
-	ver = version.split(" ")[0]
-	rev = revision
+	#ver = version.split(" ")[0]
+	#rev = revision
 
-	parser = optparse.OptionParser(usage="%prog ", version="%prog " + ver + " " + rev)
-	(options, args) = parser.parse_args()
+	#parser = optparse.OptionParser(usage="%prog ", version="%prog " + ver + " " + rev)
+	#(options, args) = parser.parse_args()
 
-	(configs, configFile) = getConfig()
+	(configs, __configFile) = getConfig()
 
 	ZoniPxeSetup(configs)
 	ZoniGetSyslinux(configs)
@@ -62,11 +59,11 @@ def ZoniPxeSetup(config):
 	tftpRootDir = config['tftpRootDir']
 	tftpImageDir = config['tftpImageDir']
 	tftpBootOptionsDir = config['tftpBootOptionsDir']
-	tftpUpdateFile =  config['tftpUpdateFile'] 
+	#tftpUpdateFile =  config['tftpUpdateFile'] 
 	tftpBaseFile = config['tftpBaseFile'] 
 	tftpBaseMenuFile = config['tftpBaseMenuFile'] 
 	installBaseDir = config['installBaseDir']
-	registrationBaseDir = config['registrationBaseDir']
+	#registrationBaseDir = config['registrationBaseDir']
 	
 
 	#  Create the directory structure

Modified: incubator/tashi/trunk/src/zoni/install/www/zoniWebSetup.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/zoni/install/www/zoniWebSetup.py?rev=1351049&r1=1351048&r2=1351049&view=diff
==============================================================================
--- incubator/tashi/trunk/src/zoni/install/www/zoniWebSetup.py (original)
+++ incubator/tashi/trunk/src/zoni/install/www/zoniWebSetup.py Sun Jun 17 05:16:00 2012
@@ -22,12 +22,8 @@
 import os 
 import sys
 import time
-import string
-import traceback
-import optparse
+#import optparse
 import shutil
-import urllib
-import tarfile
 
 a = os.path.join("../")
 sys.path.append(a)
@@ -36,21 +32,20 @@ sys.path.append(a)
 a = os.path.join("../../..")
 sys.path.append(a)
 
-from zoni.extra.util import *
-from zoni.version import *
-from zoni.bootstrap.pxe import Pxe
+from zoni.extra.util import getConfig, checkSuper, createDir
+#from zoni.version import version, revision
 
 
 def main():
 	''' This file sets up the web files for Zoni '''
 
-	ver = version.split(" ")[0]
-	rev = revision
+	#ver = version.split(" ")[0]
+	#rev = revision
 
-	parser = optparse.OptionParser(usage="%prog ", version="%prog " + ver + " " + rev)
-	(options, args) = parser.parse_args()
+	#parser = optparse.OptionParser(usage="%prog ", version="%prog " + ver + " " + rev)
+	#(options, args) = parser.parse_args()
 
-	(configs, configFiles) = getConfig()
+	(configs, __configFiles) = getConfig()
 
 	ZoniWebSetup(configs)
 	ZoniCreateWebConfigFile(configs)

Modified: incubator/tashi/trunk/src/zoni/services/pcvciservice.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/zoni/services/pcvciservice.py?rev=1351049&r1=1351048&r2=1351049&view=diff
==============================================================================
--- incubator/tashi/trunk/src/zoni/services/pcvciservice.py (original)
+++ incubator/tashi/trunk/src/zoni/services/pcvciservice.py Sun Jun 17 05:16:00 2012
@@ -19,7 +19,6 @@
 #  $Id$
 #
 
-import threading
 import logging
 
 from tashi.util import instantiateImplementation
@@ -49,10 +48,11 @@ class pcmService(object):
 			
 	def requestResources(self, key, specs, quantity):
 		vcm = self.__key2vcm(key)
-		node = specs
+		#node = specs
 		'''  Check for keys later  '''
 		self.log.info("VCM_REQUEST_RESOURCE: VCM %s RESOURCE %s(%s)" % (vcm, specs, quantity))
-		# go to scheduler val = self.agent.requestResource(specs)
+		# go to scheduler
+		val = self.agent.requestResource(specs)
 		if val:
 			return 1
 		return 0

Modified: incubator/tashi/trunk/src/zoni/services/zonimanager.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/zoni/services/zonimanager.py?rev=1351049&r1=1351048&r2=1351049&view=diff
==============================================================================
--- incubator/tashi/trunk/src/zoni/services/zonimanager.py (original)
+++ incubator/tashi/trunk/src/zoni/services/zonimanager.py Sun Jun 17 05:16:00 2012
@@ -20,18 +20,11 @@
 #
 
 import os
-import sys
-import threading
-import signal
 import logging.config
-import signal
 
-from tashi.util import instantiateImplementation, signalHandler
+from tashi.util import instantiateImplementation
 
-from zoni.extra.util import loadConfigFile, getConfig, debugConsole
-from zoni.version import *
-from zoni.services.hardwareservice import HardwareService
-from zoni.services.pcvciservice import pcmService
+from zoni.extra.util import getConfig, debugConsole
 from zoni.services.rpycservices import ManagerService
 
 from rpyc.utils.server import ThreadedServer

Modified: incubator/tashi/trunk/src/zoni/version.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/zoni/version.py?rev=1351049&r1=1351048&r2=1351049&view=diff
==============================================================================
--- incubator/tashi/trunk/src/zoni/version.py (original)
+++ incubator/tashi/trunk/src/zoni/version.py Sun Jun 17 05:16:00 2012
@@ -15,7 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.    
 
-id = "$Id: version.py 964467 2010-07-15 15:31:02Z rgass $"
+_id = "$Id: version.py 964467 2010-07-15 15:31:02Z rgass $"
 lastChangeDate = "$LastChangedDate$"
 lastChangeRevision = "$Rev: 964467 $"
 revision = lastChangeRevision



Mime
View raw message