You are viewing a plain text version of this content. The canonical link for it is here.
Posted to tashi-commits@incubator.apache.org by rg...@apache.org on 2010/07/15 15:31:03 UTC

svn commit: r964467 - in /incubator/tashi/trunk: etc/ src/zoni/ src/zoni/agents/ src/zoni/bootstrap/ src/zoni/client/ src/zoni/data/ src/zoni/extra/ src/zoni/hardware/

Author: rgass
Date: Thu Jul 15 15:31:02 2010
New Revision: 964467

URL: http://svn.apache.org/viewvc?rev=964467&view=rev
Log:
Initial move of zoni code out of imports and into main tree.

Reorganization of structure  and addition of keywords



Added:
    incubator/tashi/trunk/etc/ZoniDefaults.cfg   (contents, props changed)
      - copied, changed from r947655, incubator/tashi/import/zoni-intel-r843/ZONI_DEFAULT.conf
    incubator/tashi/trunk/src/zoni/Makefile   (props changed)
      - copied unchanged from r947655, incubator/tashi/import/zoni-intel-r843/Makefile
    incubator/tashi/trunk/src/zoni/__init__.py   (contents, props changed)
      - copied, changed from r947655, incubator/tashi/import/zoni-intel-r843/__init__.py
    incubator/tashi/trunk/src/zoni/agents/
    incubator/tashi/trunk/src/zoni/agents/__init__.py   (with props)
    incubator/tashi/trunk/src/zoni/agents/dhcpdns.py   (contents, props changed)
      - copied, changed from r947655, incubator/tashi/import/zoni-intel-r843/dhcpdns.py
    incubator/tashi/trunk/src/zoni/bootstrap/
    incubator/tashi/trunk/src/zoni/bootstrap/__init__.py   (with props)
    incubator/tashi/trunk/src/zoni/bootstrap/bootstrapinterface.py   (with props)
    incubator/tashi/trunk/src/zoni/bootstrap/pxe.py   (contents, props changed)
      - copied, changed from r947655, incubator/tashi/import/zoni-intel-r843/pxe.py
    incubator/tashi/trunk/src/zoni/client/
    incubator/tashi/trunk/src/zoni/client/__init__.py   (with props)
    incubator/tashi/trunk/src/zoni/client/zoni-cli.py   (contents, props changed)
      - copied, changed from r947655, incubator/tashi/import/zoni-intel-r843/zoni-cli.py
    incubator/tashi/trunk/src/zoni/data/
    incubator/tashi/trunk/src/zoni/data/__init__.py   (with props)
    incubator/tashi/trunk/src/zoni/data/infostore.py   (with props)
    incubator/tashi/trunk/src/zoni/data/resourcequerysql.py   (contents, props changed)
      - copied, changed from r947655, incubator/tashi/import/zoni-intel-r843/resourcequerysql.py
    incubator/tashi/trunk/src/zoni/data/usermanagement.py   (props changed)
      - copied unchanged from r947655, incubator/tashi/import/zoni-intel-r843/usermanagement.py
    incubator/tashi/trunk/src/zoni/data/usermanagementinterface.py   (props changed)
      - copied unchanged from r947655, incubator/tashi/import/zoni-intel-r843/usermanagementinterface.py
    incubator/tashi/trunk/src/zoni/extra/
    incubator/tashi/trunk/src/zoni/extra/util.py   (contents, props changed)
      - copied, changed from r947655, incubator/tashi/import/zoni-intel-r843/util.py
    incubator/tashi/trunk/src/zoni/hardware/
    incubator/tashi/trunk/src/zoni/hardware/__init__.py   (with props)
    incubator/tashi/trunk/src/zoni/hardware/delldrac.py   (props changed)
      - copied unchanged from r947655, incubator/tashi/import/zoni-intel-r843/delldrac.py
    incubator/tashi/trunk/src/zoni/hardware/hpswitch.py   (props changed)
      - copied unchanged from r947655, incubator/tashi/import/zoni-intel-r843/hpswitch.py
    incubator/tashi/trunk/src/zoni/hardware/hwswitch.py   (contents, props changed)
      - copied, changed from r947655, incubator/tashi/import/zoni-intel-r843/hwswitch.py
    incubator/tashi/trunk/src/zoni/hardware/hwswitchinterface.py   (props changed)
      - copied unchanged from r947655, incubator/tashi/import/zoni-intel-r843/hwswitchinterface.py
    incubator/tashi/trunk/src/zoni/hardware/ipmi.py   (props changed)
      - copied unchanged from r947655, incubator/tashi/import/zoni-intel-r843/ipmi.py
    incubator/tashi/trunk/src/zoni/hardware/raritanpdu.py   (props changed)
      - copied unchanged from r947655, incubator/tashi/import/zoni-intel-r843/raritanpdu.py
    incubator/tashi/trunk/src/zoni/hardware/systemmanagementinterface.py   (props changed)
      - copied unchanged from r947655, incubator/tashi/import/zoni-intel-r843/systemmanagementinterface.py
    incubator/tashi/trunk/src/zoni/version.py   (contents, props changed)
      - copied, changed from r947655, incubator/tashi/import/zoni-intel-r843/version.py

Copied: incubator/tashi/trunk/etc/ZoniDefaults.cfg (from r947655, incubator/tashi/import/zoni-intel-r843/ZONI_DEFAULT.conf)
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/etc/ZoniDefaults.cfg?p2=incubator/tashi/trunk/etc/ZoniDefaults.cfg&p1=incubator/tashi/import/zoni-intel-r843/ZONI_DEFAULT.conf&r1=947655&r2=964467&rev=964467&view=diff
==============================================================================
--- incubator/tashi/import/zoni-intel-r843/ZONI_DEFAULT.conf (original)
+++ incubator/tashi/trunk/etc/ZoniDefaults.cfg Thu Jul 15 15:31:02 2010
@@ -20,7 +20,7 @@
 
 #  Logfile
 [logging]
-LOG_FILE = /tmp/prs_logfile.txt
+LOG_FILE = /var/tmp/zoni_logfile.txt
 
 #  DB host
 [dbConnection]
@@ -34,9 +34,9 @@ DB_PASSWORD = "xx_db_password_xx"
 [tftp]
 TFTP_ROOT_DIR = /var/lib/tftpboot
 TFTP_IMAGE_DIR = /var/lib/tftpboot/pxelinux.cfg
-TFTP_BOOT_OPTIONS_DIR = /var/lib/tftpboot/pxelinux.cfg/boot_options_prs
-TFTP_UPDATE_FILE = /var/lib/tftpboot/pxelinux.cfg/update.prs
-TFTP_BASE_FILE = /var/lib/tftpboot/pxelinux.cfg/base.prs
+TFTP_BOOT_OPTIONS_DIR = /var/lib/tftpboot/pxelinux.cfg/boot_options_zoni
+TFTP_UPDATE_FILE = /var/lib/tftpboot/pxelinux.cfg/update.zoni
+TFTP_BASE_FILE = /var/lib/tftpboot/pxelinux.cfg/base.zoni
 TFTP_BASE_MENU_FILE = /var/lib/tftpboot/pxelinux.cfg/base-menu
 
 [snmp]

Propchange: incubator/tashi/trunk/etc/ZoniDefaults.cfg
------------------------------------------------------------------------------
    svn:mergeinfo = 

Propchange: incubator/tashi/trunk/src/zoni/Makefile
------------------------------------------------------------------------------
    svn:mergeinfo = 

Copied: incubator/tashi/trunk/src/zoni/__init__.py (from r947655, incubator/tashi/import/zoni-intel-r843/__init__.py)
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/zoni/__init__.py?p2=incubator/tashi/trunk/src/zoni/__init__.py&p1=incubator/tashi/import/zoni-intel-r843/__init__.py&r1=947655&r2=964467&rev=964467&view=diff
==============================================================================
--- incubator/tashi/import/zoni-intel-r843/__init__.py (original)
+++ incubator/tashi/trunk/src/zoni/__init__.py Thu Jul 15 15:31:02 2010
@@ -15,7 +15,6 @@
 # specific language governing permissions and limitations
 # under the License.    
 
-import os
-import sys
-
-from util import *
+#
+#  $Id$
+#

Propchange: incubator/tashi/trunk/src/zoni/__init__.py
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: incubator/tashi/trunk/src/zoni/__init__.py
------------------------------------------------------------------------------
    svn:mergeinfo = 

Added: incubator/tashi/trunk/src/zoni/agents/__init__.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/zoni/agents/__init__.py?rev=964467&view=auto
==============================================================================
--- incubator/tashi/trunk/src/zoni/agents/__init__.py (added)
+++ incubator/tashi/trunk/src/zoni/agents/__init__.py Thu Jul 15 15:31:02 2010
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.    
+
+#
+#  $Id$
+#

Propchange: incubator/tashi/trunk/src/zoni/agents/__init__.py
------------------------------------------------------------------------------
    svn:keywords = Id

Copied: incubator/tashi/trunk/src/zoni/agents/dhcpdns.py (from r947655, incubator/tashi/import/zoni-intel-r843/dhcpdns.py)
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/zoni/agents/dhcpdns.py?p2=incubator/tashi/trunk/src/zoni/agents/dhcpdns.py&p1=incubator/tashi/import/zoni-intel-r843/dhcpdns.py&r1=947655&r2=964467&rev=964467&view=diff
==============================================================================
--- incubator/tashi/import/zoni-intel-r843/dhcpdns.py (original)
+++ incubator/tashi/trunk/src/zoni/agents/dhcpdns.py Thu Jul 15 15:31:02 2010
@@ -39,45 +39,9 @@ class DhcpDns():
 		self.dhcpServer = config['dhcpServer']
 		self.dhcpKeyName = config['dhcpKeyName']
 		self.dhcpSecretKey = config['dhcpSecretKey']
-		#exit()
-		#items.sort()
-		#self.ipRange = {}
-		#for item in items:
-			#(name, value) = item
-			#name = name.lower()
-			#if (name.startswith('iprange')):
-				#network = name[7:]
-				#try:
-					#network = int(network)
-				#except:
-					#continue
-				#self.ipRange[network] = value	
+
 		self.reverseDns = True
-		#self.log = logging.getLogger(__file__)
-		#self.ipMin = {}
-		#self.ipMax = {}
-		#self.currentIP = {}
-		#self.usedIPs = {}
-		#for k in self.ipRange:
-			#ipRange = self.ipRange[k]
-			#(min, max) = ipRange.split("-")	
-			#min = min.strip()
-			#max = max.strip()
-			#ipNum = self.strToIp(min)
-			#self.ipMin[k] = self.strToIp(min)
-			#self.ipMax[k] = self.strToIp(max)
-			#self.currentIP[k] = self.ipMin[k]
-		#instances = self.client.getInstances()
-		#for i in instances:
-			#for nic in i.nics:
-				#try:
-					#ip = nic.ip
-					#ipNum = self.strToIp(ip)
-					#self.log.info('Added %s->%s during reinitialization' % (i.name, ip))
-					#self.usedIPs[ipNum] = ip
-				#except Exception, e:
-					#pass
-		#
+
 	def strToIp(self, s):
 		ipNum = -1
 		try:

Propchange: incubator/tashi/trunk/src/zoni/agents/dhcpdns.py
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: incubator/tashi/trunk/src/zoni/agents/dhcpdns.py
------------------------------------------------------------------------------
    svn:mergeinfo = 

Added: incubator/tashi/trunk/src/zoni/bootstrap/__init__.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/zoni/bootstrap/__init__.py?rev=964467&view=auto
==============================================================================
--- incubator/tashi/trunk/src/zoni/bootstrap/__init__.py (added)
+++ incubator/tashi/trunk/src/zoni/bootstrap/__init__.py Thu Jul 15 15:31:02 2010
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.    
+
+#
+#  $Id$
+#

Propchange: incubator/tashi/trunk/src/zoni/bootstrap/__init__.py
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/tashi/trunk/src/zoni/bootstrap/bootstrapinterface.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/zoni/bootstrap/bootstrapinterface.py?rev=964467&view=auto
==============================================================================
--- incubator/tashi/trunk/src/zoni/bootstrap/bootstrapinterface.py (added)
+++ incubator/tashi/trunk/src/zoni/bootstrap/bootstrapinterface.py Thu Jul 15 15:31:02 2010
@@ -0,0 +1,35 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.    
+#
+#  $Id$
+#
+
+import sys
+import os 
+import optparse
+
+
+class BootStrapInterface(object):
+	"""  Interface description for booting
+    """
+	def __init__(self, config):
+		self.config = config
+
+
+	def createPxeConfig(self):
+		'''  Create the pxe config file'''
+		raise NotImplementedError

Propchange: incubator/tashi/trunk/src/zoni/bootstrap/bootstrapinterface.py
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: incubator/tashi/trunk/src/zoni/bootstrap/bootstrapinterface.py
------------------------------------------------------------------------------
    svn:mergeinfo = 

Copied: incubator/tashi/trunk/src/zoni/bootstrap/pxe.py (from r947655, incubator/tashi/import/zoni-intel-r843/pxe.py)
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/zoni/bootstrap/pxe.py?p2=incubator/tashi/trunk/src/zoni/bootstrap/pxe.py&p1=incubator/tashi/import/zoni-intel-r843/pxe.py&r1=947655&r2=964467&rev=964467&view=diff
==============================================================================
--- incubator/tashi/import/zoni-intel-r843/pxe.py (original)
+++ incubator/tashi/trunk/src/zoni/bootstrap/pxe.py Thu Jul 15 15:31:02 2010
@@ -26,10 +26,10 @@ import subprocess
 import MySQLdb
 import traceback
 
-from util import logit
-from bootmanagementinterface import BootManagementInterface
+from zoni.extra.util import logit
+from zoni.bootstrap.bootstrapinterface import BootStrapInterface
 
-class Pxe(BootManagementInterface):
+class Pxe(BootStrapInterface):
 	def __init__(self, config, verbose=None):
 		self.verbose  = verbose
 		self.host = config['dbHost']

Propchange: incubator/tashi/trunk/src/zoni/bootstrap/pxe.py
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: incubator/tashi/trunk/src/zoni/bootstrap/pxe.py
------------------------------------------------------------------------------
    svn:mergeinfo = 

Added: incubator/tashi/trunk/src/zoni/client/__init__.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/zoni/client/__init__.py?rev=964467&view=auto
==============================================================================
--- incubator/tashi/trunk/src/zoni/client/__init__.py (added)
+++ incubator/tashi/trunk/src/zoni/client/__init__.py Thu Jul 15 15:31:02 2010
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.    
+
+# 
+#  $Id$
+#

Propchange: incubator/tashi/trunk/src/zoni/client/__init__.py
------------------------------------------------------------------------------
    svn:keywords = Id

Copied: incubator/tashi/trunk/src/zoni/client/zoni-cli.py (from r947655, incubator/tashi/import/zoni-intel-r843/zoni-cli.py)
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/zoni/client/zoni-cli.py?p2=incubator/tashi/trunk/src/zoni/client/zoni-cli.py&p1=incubator/tashi/import/zoni-intel-r843/zoni-cli.py&r1=947655&r2=964467&rev=964467&view=diff
==============================================================================
--- incubator/tashi/import/zoni-intel-r843/zoni-cli.py (original)
+++ incubator/tashi/trunk/src/zoni/client/zoni-cli.py Thu Jul 15 15:31:02 2010
@@ -1,4 +1,4 @@
-# /usr/bin/env python
+#! /usr/bin/env python
 #
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
@@ -25,22 +25,28 @@ import sys
 import optparse
 
 
-import resourcequerysql
-from systemmanagementinterface import SystemManagementInterface
-from ipmi import Ipmi
-from usermanagementinterface import UserManagementInterface
-
-from bootmanagementinterface import BootManagementInterface
-import pxe 
-from raritanpdu import raritanDominionPx
-from delldrac import dellDrac
-from util import * 
-import version
+#from zoni import *
+#from zoni.data.resourcequerysql import ResourceQuerySql
+import zoni
+from zoni.data.resourcequerysql import *
+
+from zoni.data.usermanagementinterface import UserManagementInterface
+from zoni.data.usermanagementinterface import UserManagementInterface
+
+from zoni.bootstrap.bootstrapinterface import BootStrapInterface
+from zoni.bootstrap.pxe import Pxe
+
+from zoni.hardware.systemmanagementinterface import SystemManagementInterface
+from zoni.hardware.ipmi import Ipmi
+from zoni.hardware.hwswitchinterface import HwSwitchInterface
+from zoni.hardware.hwswitch import HwDellSwitch
+from zoni.hardware.raritanpdu import raritanDominionPx
+from zoni.hardware.delldrac import dellDrac
 
-from hwswitchinterface import HwSwitchInterface
-from hwswitch import HwDellSwitch
+from zoni.extra.util import * 
+from zoni.version import *
 
-import usermanagement 
+#import zoni.data.usermanagement 
 #from usermanagement import UserManagement
 
 def parseTable():
@@ -48,10 +54,10 @@ def parseTable():
 
 def main():
 	"""  Main """
-	ver = version.version.split(" ")[1]
-	rev = version.revision
+	ver = version.split(" ")[0]
+	rev = revision
 
-	configFile = loadConfigFile("ZONI_DEFAULT.conf")
+	configFile = getConfig()
 	#logit(configFile['logFile'], "Starting prs_client")
 	#logit(configFile['logFile'], "Loading config file")
 
@@ -146,7 +152,7 @@ def main():
 	cmdargs = {}
 
 	#  setup db connection
-	query = resourcequerysql.ResourceQuerySql(configFile, options.verbosity)
+	query = zoni.data.resourcequerysql.ResourceQuerySql(configFile, options.verbosity)
 
 	#  Get host info
 	host=None

Propchange: incubator/tashi/trunk/src/zoni/client/zoni-cli.py
------------------------------------------------------------------------------
    svn:executable = *

Propchange: incubator/tashi/trunk/src/zoni/client/zoni-cli.py
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: incubator/tashi/trunk/src/zoni/client/zoni-cli.py
------------------------------------------------------------------------------
    svn:mergeinfo = 

Added: incubator/tashi/trunk/src/zoni/data/__init__.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/zoni/data/__init__.py?rev=964467&view=auto
==============================================================================
--- incubator/tashi/trunk/src/zoni/data/__init__.py (added)
+++ incubator/tashi/trunk/src/zoni/data/__init__.py Thu Jul 15 15:31:02 2010
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.    
+
+#
+#  $Id$
+#

Propchange: incubator/tashi/trunk/src/zoni/data/__init__.py
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/tashi/trunk/src/zoni/data/infostore.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/zoni/data/infostore.py?rev=964467&view=auto
==============================================================================
--- incubator/tashi/trunk/src/zoni/data/infostore.py (added)
+++ incubator/tashi/trunk/src/zoni/data/infostore.py Thu Jul 15 15:31:02 2010
@@ -0,0 +1,58 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.    
+#
+#  $Id$
+#
+
+import sys
+import os 
+import optparse
+
+
+class InfoStore (object):
+	"""  Interface description for query system resources
+    """
+	def __init__(self, config):
+		self.config = config
+
+	#def updateDatabase(self, query):
+		#raise NotImplementedError
+
+
+	def printAll(self):
+		raise NotImplementedError
+
+	def showResources(self, cmdargs):
+		raise NotImplementedError
+	
+	def printResources(self):
+		raise NotImplementedError
+
+	def showAllocation(self):
+		raise NotImplementedError
+
+	def showPxeImages(self):
+		raise NotImplementedError
+
+	def showPxeImagesToSystemMap(self):
+		raise NotImplementedError
+
+	def getHwAccessMethod(self):
+		'''  Get hardware access method and return a list 
+		'''
+		raise NotImplementedError
+	

Propchange: incubator/tashi/trunk/src/zoni/data/infostore.py
------------------------------------------------------------------------------
    svn:keywords = Id

Copied: incubator/tashi/trunk/src/zoni/data/resourcequerysql.py (from r947655, incubator/tashi/import/zoni-intel-r843/resourcequerysql.py)
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/zoni/data/resourcequerysql.py?p2=incubator/tashi/trunk/src/zoni/data/resourcequerysql.py&p1=incubator/tashi/import/zoni-intel-r843/resourcequerysql.py&r1=947655&r2=964467&rev=964467&view=diff
==============================================================================
--- incubator/tashi/import/zoni-intel-r843/resourcequerysql.py (original)
+++ incubator/tashi/trunk/src/zoni/data/resourcequerysql.py Thu Jul 15 15:31:02 2010
@@ -27,9 +27,9 @@ import traceback
 
 import usermanagement
 
-from infostore import InfoStore
-from util import logit
-from dhcpdns import DhcpDns
+from zoni.data.infostore import InfoStore
+from zoni.extra.util import logit
+from zoni.agents.dhcpdns import DhcpDns
 
 def timeF(f):
     def myF(*args, **kw):
@@ -78,7 +78,10 @@ class ResourceQuerySql(InfoStore):
 			self.conn = MySQLdb.connect(host = self.host, port = self.port, user = self.user, passwd = self.passwd, db = self.db)
 		except MySQLdb.OperationalError, e:
 			if e[0] == 2005:
-				print "ZONI ERROR:" + str(e[1])
+				print "ERROR :" + str(e[1])
+				exit(1)
+			else:
+				print "ERROR : ", e
 				exit(1)
 			#traceback.print_exc(sys.exc_info())
 		#cursor.execute ("SELECT VERSION()")

Propchange: incubator/tashi/trunk/src/zoni/data/resourcequerysql.py
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: incubator/tashi/trunk/src/zoni/data/resourcequerysql.py
------------------------------------------------------------------------------
    svn:mergeinfo = 

Propchange: incubator/tashi/trunk/src/zoni/data/usermanagement.py
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: incubator/tashi/trunk/src/zoni/data/usermanagement.py
------------------------------------------------------------------------------
    svn:mergeinfo = 

Propchange: incubator/tashi/trunk/src/zoni/data/usermanagementinterface.py
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: incubator/tashi/trunk/src/zoni/data/usermanagementinterface.py
------------------------------------------------------------------------------
    svn:mergeinfo = 

Copied: incubator/tashi/trunk/src/zoni/extra/util.py (from r947655, incubator/tashi/import/zoni-intel-r843/util.py)
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/zoni/extra/util.py?p2=incubator/tashi/trunk/src/zoni/extra/util.py&p1=incubator/tashi/import/zoni-intel-r843/util.py&r1=947655&r2=964467&rev=964467&view=diff
==============================================================================
--- incubator/tashi/import/zoni-intel-r843/util.py (original)
+++ incubator/tashi/trunk/src/zoni/extra/util.py Thu Jul 15 15:31:02 2010
@@ -18,12 +18,13 @@
 #  $Id$
 #
 
+import os
 import ConfigParser
 import time
 
-def loadConfigFile(filename):
-	parser = ConfigParser.ConfigParser()
-	parser.read(filename)
+def loadConfigFile(parser):
+	#parser = ConfigParser.ConfigParser()
+	#parser.read(filename)
 	config = {}
 	#  Logging
 	config['logFile'] = parser.get("logging", "LOG_FILE").split()[0]
@@ -67,6 +68,20 @@ def loadConfigFile(filename):
 	#self.ap_model['radius'] = int(parser.get("wireless_range", "radius").split()[0])
 	return config
 
+def getConfig(additionalNames=[], additionalFiles=[]):
+	"""Creates many permutations of a list of locations to look for config 
+	   files and then loads them"""
+	config = ConfigParser.ConfigParser()
+	baseLocations = ['./etc/', '/usr/share/zoni/', '/etc/zoni/', os.path.expanduser('~/.zoni/')]
+	names = ['Zoni'] + additionalNames
+	names = reduce(lambda x, y: x + [y+"Defaults", y], names, [])
+	allLocations = reduce(lambda x, y: x + reduce(lambda z, a: z + [y + a + ".cfg"], names, []), baseLocations, []) + additionalFiles
+	configFiles = config.read(allLocations)
+	if (len(configFiles) == 0):
+		raise Exception("No config file could be found: %s" % (str(allLocations)))
+
+	return loadConfigFile(config)
+
 def logit(logfile, mesg):
 	fd = open(logfile, "a+");
 	mesg = str(time.time()) + " " + mesg + "\n"

Propchange: incubator/tashi/trunk/src/zoni/extra/util.py
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: incubator/tashi/trunk/src/zoni/extra/util.py
------------------------------------------------------------------------------
    svn:mergeinfo = 

Added: incubator/tashi/trunk/src/zoni/hardware/__init__.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/zoni/hardware/__init__.py?rev=964467&view=auto
==============================================================================
--- incubator/tashi/trunk/src/zoni/hardware/__init__.py (added)
+++ incubator/tashi/trunk/src/zoni/hardware/__init__.py Thu Jul 15 15:31:02 2010
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.    
+
+#
+#  $Id$
+#

Propchange: incubator/tashi/trunk/src/zoni/hardware/__init__.py
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: incubator/tashi/trunk/src/zoni/hardware/delldrac.py
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: incubator/tashi/trunk/src/zoni/hardware/delldrac.py
------------------------------------------------------------------------------
    svn:mergeinfo = 

Propchange: incubator/tashi/trunk/src/zoni/hardware/hpswitch.py
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: incubator/tashi/trunk/src/zoni/hardware/hpswitch.py
------------------------------------------------------------------------------
    svn:mergeinfo = 

Copied: incubator/tashi/trunk/src/zoni/hardware/hwswitch.py (from r947655, incubator/tashi/import/zoni-intel-r843/hwswitch.py)
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/zoni/hardware/hwswitch.py?p2=incubator/tashi/trunk/src/zoni/hardware/hwswitch.py&p1=incubator/tashi/import/zoni-intel-r843/hwswitch.py&r1=947655&r2=964467&rev=964467&view=diff
==============================================================================
--- incubator/tashi/import/zoni-intel-r843/hwswitch.py (original)
+++ incubator/tashi/trunk/src/zoni/hardware/hwswitch.py Thu Jul 15 15:31:02 2010
@@ -25,9 +25,9 @@ import datetime
 import thread
 
 
-from hwswitchinterface import HwSwitchInterface
-from resourcequerysql import ResourceQuerySql
-from util import logit
+from zoni.hardware.hwswitchinterface import HwSwitchInterface
+from zoni.data.resourcequerysql import ResourceQuerySql
+from zoni.extra.util import logit
 
 
 '''  Using pexpect to control switches because couldn't get snmp to work 

Propchange: incubator/tashi/trunk/src/zoni/hardware/hwswitch.py
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: incubator/tashi/trunk/src/zoni/hardware/hwswitch.py
------------------------------------------------------------------------------
    svn:mergeinfo = 

Propchange: incubator/tashi/trunk/src/zoni/hardware/hwswitchinterface.py
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: incubator/tashi/trunk/src/zoni/hardware/hwswitchinterface.py
------------------------------------------------------------------------------
    svn:mergeinfo = 

Propchange: incubator/tashi/trunk/src/zoni/hardware/ipmi.py
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: incubator/tashi/trunk/src/zoni/hardware/ipmi.py
------------------------------------------------------------------------------
    svn:mergeinfo = 

Propchange: incubator/tashi/trunk/src/zoni/hardware/raritanpdu.py
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: incubator/tashi/trunk/src/zoni/hardware/raritanpdu.py
------------------------------------------------------------------------------
    svn:mergeinfo = 

Propchange: incubator/tashi/trunk/src/zoni/hardware/systemmanagementinterface.py
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: incubator/tashi/trunk/src/zoni/hardware/systemmanagementinterface.py
------------------------------------------------------------------------------
    svn:mergeinfo = 

Copied: incubator/tashi/trunk/src/zoni/version.py (from r947655, incubator/tashi/import/zoni-intel-r843/version.py)
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/zoni/version.py?p2=incubator/tashi/trunk/src/zoni/version.py&p1=incubator/tashi/import/zoni-intel-r843/version.py&r1=947655&r2=964467&rev=964467&view=diff
==============================================================================
--- incubator/tashi/import/zoni-intel-r843/version.py (original)
+++ incubator/tashi/trunk/src/zoni/version.py Thu Jul 15 15:31:02 2010
@@ -15,6 +15,10 @@
 # specific language governing permissions and limitations
 # under the License.    
 
-id = "$Id:$"
-version = "$LastChangedDate:$"
-revision = "$Rev:$"
+id = "$Id$"
+lastChangeDate = "$LastChangedDate$"
+lastChangeRevision = "$Rev$"
+revision = lastChangeRevision
+#version="$LastChangedDate: 2010-05-24 10:55:50 -0400 (Mon, 24 May 2010) $"
+version = "HEAD"
+

Propchange: incubator/tashi/trunk/src/zoni/version.py
------------------------------------------------------------------------------
    svn:keywords = LastChangeRevision Rev Id

Propchange: incubator/tashi/trunk/src/zoni/version.py
------------------------------------------------------------------------------
    svn:mergeinfo =