|
From: <ba...@us...> - 2008-09-15 21:07:49
|
Revision: 973
http://omc.svn.sourceforge.net/omc/?rev=973&view=rev
Author: bartw
Date: 2008-09-15 21:07:57 +0000 (Mon, 15 Sep 2008)
Log Message:
-----------
OMC_UnitaryComputerSystem -> OMC_ComputerSystem
Modified Paths:
--------------
test/trunk/OMC_OperatingSystem_Test.py
test/trunk/OMC_UnitaryComputerSystem_Test.py
test/trunk/OMC_UnixProcess_Test.py
test/trunk/omcbase_test.py
Modified: test/trunk/OMC_OperatingSystem_Test.py
===================================================================
--- test/trunk/OMC_OperatingSystem_Test.py 2008-09-15 21:05:04 UTC (rev 972)
+++ test/trunk/OMC_OperatingSystem_Test.py 2008-09-15 21:07:57 UTC (rev 973)
@@ -72,9 +72,9 @@
"Incorrect number of OperatingSystem Instances returned")
os = os_list[0]
#Check OperatingSystem Properties
- if os['CSCreationClassName'].lower() != "omc_unitarycomputersystem":
+ if os['CSCreationClassName'].lower() != "omc_computersystem":
self.add_Error("CSCreationClassName incorrect")
- if os['CSCreationClassName'].lower() != "omc_unitarycomputersystem":
+ if os['CSCreationClassName'].lower() != "omc_computersystem":
self.add_Error("CSCreationClassName incorrect")
if os['CreationClassName'].lower() != "omc_operatingsystem":
self.add_Error("CreationClassName incorrect")
@@ -216,10 +216,10 @@
os_list = self._conn.EnumerateInstances("OMC_OperatingSystem")
self.failUnless(len(os_list) > 0,\
"No OperatingSystem instance returned")
- #Compare inst_os_assoc with UnitaryComputerSystem
+ #Compare inst_os_assoc with ComputerSystem
inst_os_assoc = self._conn.Associators(os_list[0].path, AssocClass="OMC_InstalledOS")
- ucs = self._conn.EnumerateInstances("OMC_UnitaryComputerSystem")
+ ucs = self._conn.EnumerateInstances("OMC_ComputerSystem")
if inst_os_assoc[0]['Name'] != ucs[0]['Name']:
self.add_Error("OMC_InstalledOS association failed")
Modified: test/trunk/OMC_UnitaryComputerSystem_Test.py
===================================================================
--- test/trunk/OMC_UnitaryComputerSystem_Test.py 2008-09-15 21:05:04 UTC (rev 972)
+++ test/trunk/OMC_UnitaryComputerSystem_Test.py 2008-09-15 21:07:57 UTC (rev 973)
@@ -14,10 +14,10 @@
_globalVerbose = True
################################################################################
-# Test for the OMC_UnitaryComputerSystem
+# Test for the OMC_ComputerSystem
#
################################################################################
-class OMC_UnitaryComputerSystem_Test(unittest.TestCase):
+class OMC_ComputerSystem_Test(unittest.TestCase):
_supportedClasses = {}
_verbose = _globalVerbose
@@ -84,33 +84,33 @@
def _showMissingClassNotice(self, classname, testname):
print "NOTICE: Skipping all %s tests for test %s: Class not loaded." % (str(classname), str(testname))
- def _omc_unitarycomputersystem_test(self):
+ def _omc_computersystem_test(self):
hostname = getfqdn()
- insts = self._conn.EnumerateInstances('OMC_UnitaryComputerSystem', LocalOnly=False)
+ insts = self._conn.EnumerateInstances('OMC_ComputerSystem', LocalOnly=False)
if 1 < len(insts):
- self.fail('More than one OMC_UnitaryComputerSystem instance returned from EnumerateInstances')
+ self.fail('More than one OMC_ComputerSystem instance returned from EnumerateInstances')
if insts[0]['name'] != hostname:
- self.fail('EnumerateInstances on OMC_UnitaryComputerSystem returned different instance than expected')
+ self.fail('EnumerateInstances on OMC_ComputerSystem returned different instance than expected')
- insts = self._conn.EnumerateInstanceNames('OMC_UnitaryComputerSystem')
+ insts = self._conn.EnumerateInstanceNames('OMC_ComputerSystem')
if 1 < len(insts):
- self.fail('More than one OMC_UnitaryComputerSystem instance returned from EnumerateInstanceNames')
+ self.fail('More than one OMC_ComputerSystem instance returned from EnumerateInstanceNames')
if insts[0]['name'] != hostname:
- self.fail('EnumerateInstanceNames on OMC_UnitaryComputerSystem returned different instance name than expected')
+ self.fail('EnumerateInstanceNames on OMC_ComputerSystem returned different instance name than expected')
inst = self._conn.GetInstance(insts[0], LocalOnly=False)
if inst is None:
- self.fail('Failed to GetInstance of OMC_UnitaryComputerSystem using %s' % insts[0])
+ self.fail('Failed to GetInstance of OMC_ComputerSystem using %s' % insts[0])
if inst['name'] != hostname:
- self.fail('GetInstance on OMC_UnitaryComputerSystem returned different instance than expected')
+ self.fail('GetInstance on OMC_ComputerSystem returned different instance than expected')
try:
self._conn.DeleteInstance(insts[0])
- self.fail('DeleteInstance of OMC_UnitaryComputerSystem succeeded when it should have failed')
+ self.fail('DeleteInstance of OMC_ComputerSystem succeeded when it should have failed')
except pywbem.CIMError, ce:
if ce[0] != 7:
- self.fail('Exception on DeleteInstance of OMC_UnitaryComputerSystem was not "Not Supported" as expected')
+ self.fail('Exception on DeleteInstance of OMC_ComputerSystem was not "Not Supported" as expected')
pass
try:
@@ -119,23 +119,23 @@
caption = 'Caption2'
inst['Caption'] = caption
self._conn.ModifyInstance(inst)
- insts = self._conn.EnumerateInstances('OMC_UnitaryComputerSystem', LocalOnly=False)
+ insts = self._conn.EnumerateInstances('OMC_ComputerSystem', LocalOnly=False)
if insts[0]['Caption'] != caption:
- self.fail('Attempt to ModifyInstance of OMC_UnitaryComputerSystem failed')
+ self.fail('Attempt to ModifyInstance of OMC_ComputerSystem failed')
except pywbem.CIMError, ce:
self.failUnless(ce[0] == pywbem.CIM_ERR_NOT_SUPPORTED,\
- 'ModifyInstance of OMC_UnitaryComputerSystem failed')
+ 'ModifyInstance of OMC_ComputerSystem failed')
try:
- inst = pywbem.CIMInstance('OMC_UnitaryComputerSystem',
- properties={'CreationClassName' : 'OMC_UnitaryComputerSystem',
+ inst = pywbem.CIMInstance('OMC_ComputerSystem',
+ properties={'CreationClassName' : 'OMC_ComputerSystem',
'Name':getfqdn()})
self._conn.CreateInstance(inst)
- self.fail('CreateInstance of OMC_UnitaryComputerSystem succeeded when it should have failed')
+ self.fail('CreateInstance of OMC_ComputerSystem succeeded when it should have failed')
except pywbem.CIMError, ce:
if ce[0] != 7:
# Should be 7, not supported.
- self.fail('Exception on CreateInstance of OMC_UnitaryComputerSystem was not "Not Supported" as expected')
+ self.fail('Exception on CreateInstance of OMC_ComputerSystem was not "Not Supported" as expected')
# def _omc_hostnamesettingdata_test(self):
# hostname = getfqdn()
@@ -214,7 +214,7 @@
# self.fail('Exception on CreateInstance of OMC_HostNameSettingData was not "Not Supported" as expected')
#
# def _omc_computersystemhostnamesettingdata_test(self):
-# ucs_op = self._conn.EnumerateInstanceNames('OMC_UnitaryComputerSystem')[0]
+# ucs_op = self._conn.EnumerateInstanceNames('OMC_ComputerSystem')[0]
# hnsd_op = self._conn.EnumerateInstanceNames('OMC_HostNameSettingData')[0]
# insts = self._conn.EnumerateInstances('OMC_ComputerSystemHostNameSettingData', LocalOnly=False)
# if 1 < len(insts):
@@ -234,7 +234,7 @@
#
# refs = self._conn.References(ucs_op, ResultClass='OMC_ComputerSystemHostNameSettingData')
# if 1 < len(refs):
-# self.fail('References of OMC_UnitaryComputersystem returned multiple instances when only one was expected')
+# self.fail('References of OMC_Computersystem returned multiple instances when only one was expected')
# if refs[0]['ManagedElement'] != ucs_op:
# self.fail('ManagedElement property of OMC_ComputerSystemHostNameSettingData not valid')
# if refs[0]['SettingData'] != hnsd_op:
@@ -250,7 +250,7 @@
#
# assocs = self._conn.AssociatorNames(ucs_op, AssocClass='OMC_ComputerSystemHostNameSettingData')
# if 1 < len(assocs):
-# self.fail('AssociatorNames of OMC_UnitaryComputerSystem returned multiple instances when only one was expected')
+# self.fail('AssociatorNames of OMC_ComputerSystem returned multiple instances when only one was expected')
# qualified_hnsd_op = str(hnsd_op)
# if not qualified_hnsd_op.startswith('//%s/' % getfqdn()):
# qualified_hnsd_op = str(hnsd_op)
@@ -275,17 +275,17 @@
else:
testmap[classname]()
- def test_unitary_computer_system(self):
- ucsClasses = {'OMC_UnitaryComputerSystem' : self._omc_unitarycomputersystem_test}
+ def test_computer_system(self):
+ ucsClasses = {'OMC_ComputerSystem' : self._omc_computersystem_test}
#'OMC_HostNameSettingData' : self._omc_hostnamesettingdata_test,
#'OMC_ComputerSystemHostNameSettingData' : self._omc_computersystemhostnamesettingdata_test}
- self._run_omcbase_component_tests('unitary_computer_system', ucsClasses)
+ self._run_omcbase_component_tests('computer_system', ucsClasses)
def get_unit_test():
- return (OMC_UnitaryComputerSystem_Test)
+ return (OMC_ComputerSystem_Test)
if __name__ == '__main__':
- suite = unittest.makeSuite(OMC_UnitaryComputerSystem_Test)
+ suite = unittest.makeSuite(OMC_ComputerSystem_Test)
unittest.TextTestRunner(verbosity=2).run(suite)
Modified: test/trunk/OMC_UnixProcess_Test.py
===================================================================
--- test/trunk/OMC_UnixProcess_Test.py 2008-09-15 21:05:04 UTC (rev 972)
+++ test/trunk/OMC_UnixProcess_Test.py 2008-09-15 21:07:57 UTC (rev 973)
@@ -305,7 +305,7 @@
if proc['handle'] == str(os.getpid()) or proc['ParentProcessID'] == str(os.getpid()):
break
if prop.lower() == "cscreationclassname":
- if proc[prop].lower() != "omc_unitarycomputersystem":
+ if proc[prop].lower() != "omc_computersystem":
self.add_Error("PID: %s: %s does not match"% \
(str(proc['Handle'],str(prop))))
if prop.lower() == "csname":
Modified: test/trunk/omcbase_test.py
===================================================================
--- test/trunk/omcbase_test.py 2008-09-15 21:05:04 UTC (rev 972)
+++ test/trunk/omcbase_test.py 2008-09-15 21:07:57 UTC (rev 973)
@@ -124,7 +124,7 @@
def _omc_hostedinitdservice_test(self):
if self._isSupportedAssn('OMC_HostedInitdService',
- 'OMC_UnitaryComputerSystem',
+ 'OMC_ComputerSystem',
'OMC_InitdService',
'initd'):
# Test the assn
@@ -136,33 +136,33 @@
def _omc_initdservicerunlevel_test(self):
pass
- def _omc_unitarycomputersystem_test(self):
+ def _omc_computersystem_test(self):
hostname = getfqdn()
- insts = self._conn.EnumerateInstances('OMC_UnitaryComputerSystem', LocalOnly=False)
+ insts = self._conn.EnumerateInstances('OMC_ComputerSystem', LocalOnly=False)
if 1 < len(insts):
- self.fail('More than one OMC_UnitaryComputerSystem instance returned from EnumerateInstances')
+ self.fail('More than one OMC_ComputerSystem instance returned from EnumerateInstances')
if insts[0]['name'] != hostname:
- self.fail('EnumerateInstances on OMC_UnitaryComputerSystem returned different instance than expected')
+ self.fail('EnumerateInstances on OMC_ComputerSystem returned different instance than expected')
- insts = self._conn.EnumerateInstanceNames('OMC_UnitaryComputerSystem')
+ insts = self._conn.EnumerateInstanceNames('OMC_ComputerSystem')
if 1 < len(insts):
- self.fail('More than one OMC_UnitaryComputerSystem instance returned from EnumerateInstanceNames')
+ self.fail('More than one OMC_ComputerSystem instance returned from EnumerateInstanceNames')
if insts[0]['name'] != hostname:
- self.fail('EnumerateInstanceNames on OMC_UnitaryComputerSystem returned different instance name than expected')
+ self.fail('EnumerateInstanceNames on OMC_ComputerSystem returned different instance name than expected')
inst = self._conn.GetInstance(insts[0], LocalOnly=False)
if inst is None:
- self.fail('Failed to GetInstance of OMC_UnitaryComputerSystem using %s' % insts[0])
+ self.fail('Failed to GetInstance of OMC_ComputerSystem using %s' % insts[0])
if inst['name'] != hostname:
- self.fail('GetInstance on OMC_UnitaryComputerSystem returned different instance than expected')
+ self.fail('GetInstance on OMC_ComputerSystem returned different instance than expected')
try:
self._conn.DeleteInstance(insts[0])
- self.fail('DeleteInstance of OMC_UnitaryComputerSystem succeeded when it should have failed')
+ self.fail('DeleteInstance of OMC_ComputerSystem succeeded when it should have failed')
except pywbem.CIMError, ce:
if ce[0] != 7:
- self.fail('Exception on DeleteInstance of OMC_UnitaryComputerSystem was not "Not Supported" as expected')
+ self.fail('Exception on DeleteInstance of OMC_ComputerSystem was not "Not Supported" as expected')
pass
try:
@@ -171,22 +171,22 @@
caption = 'Caption2'
inst['Caption'] = caption
self._conn.ModifyInstance(inst)
- insts = self._conn.EnumerateInstances('OMC_UnitaryComputerSystem', LocalOnly=False)
+ insts = self._conn.EnumerateInstances('OMC_ComputerSystem', LocalOnly=False)
if insts[0]['Caption'] != caption:
- self.fail('Attempt to ModifyInstance of OMC_UnitaryComputerSystem failed')
+ self.fail('Attempt to ModifyInstance of OMC_ComputerSystem failed')
except pywbem.CIMError, ce:
- self.fail('ModifyInstance of OMC_UnitaryComputerSystem failed')
+ self.fail('ModifyInstance of OMC_ComputerSystem failed')
try:
- inst = pywbem.CIMInstance('OMC_UnitaryComputerSystem',
- properties={'CreationClassName' : 'OMC_UnitaryComputerSystem',
+ inst = pywbem.CIMInstance('OMC_ComputerSystem',
+ properties={'CreationClassName' : 'OMC_ComputerSystem',
'Name':getfqdn()})
self._conn.CreateInstance(inst)
- self.fail('CreateInstance of OMC_UnitaryComputerSystem succeeded when it should have failed')
+ self.fail('CreateInstance of OMC_ComputerSystem succeeded when it should have failed')
except pywbem.CIMError, ce:
if ce[0] != 7:
# Should be 7, not supported.
- self.fail('Exception on CreateInstance of OMC_UnitaryComputerSystem was not "Not Supported" as expected')
+ self.fail('Exception on CreateInstance of OMC_ComputerSystem was not "Not Supported" as expected')
def _omc_hostnamesettingdata_test(self):
hostname = getfqdn()
@@ -265,7 +265,7 @@
self.fail('Exception on CreateInstance of OMC_HostNameSettingData was not "Not Supported" as expected')
# def _omc_computersystemhostnamesettingdata_test(self):
-# ucs_op = self._conn.EnumerateInstanceNames('OMC_UnitaryComputerSystem')[0]
+# ucs_op = self._conn.EnumerateInstanceNames('OMC_ComputerSystem')[0]
# hnsd_op = self._conn.EnumerateInstanceNames('OMC_HostNameSettingData')[0]
# insts = self._conn.EnumerateInstances('OMC_ComputerSystemHostNameSettingData', LocalOnly=False)
# if 1 < len(insts):
@@ -285,7 +285,7 @@
#
# refs = self._conn.References(ucs_op, ResultClass='OMC_ComputerSystemHostNameSettingData')
# if 1 < len(refs):
-# self.fail('References of OMC_UnitaryComputersystem returned multiple instances when only one was expected')
+# self.fail('References of OMC_Computersystem returned multiple instances when only one was expected')
# if refs[0]['ManagedElement'] != ucs_op:
# self.fail('ManagedElement property of OMC_ComputerSystemHostNameSettingData not valid')
# if refs[0]['SettingData'] != hnsd_op:
@@ -301,7 +301,7 @@
#
# assocs = self._conn.AssociatorNames(ucs_op, AssocClass='OMC_ComputerSystemHostNameSettingData')
# if 1 < len(assocs):
-# self.fail('AssociatorNames of OMC_UnitaryComputerSystem returned multiple instances when only one was expected')
+# self.fail('AssociatorNames of OMC_ComputerSystem returned multiple instances when only one was expected')
# qualified_hnsd_op = str(hnsd_op)
# if not qualified_hnsd_op.startswith('//%s/' % getfqdn()):
# qualified_hnsd_op = '//%s/%s' % (getfqdn(), str(hnsd_op))
@@ -467,11 +467,11 @@
# else:
# self.fail("OMC_OperatingSystem _isSupportedAssn failed")
- def test_unitary_computer_system(self):
- ucsClasses = {'OMC_UnitaryComputerSystem' : self._omc_unitarycomputersystem_test,
+ def test_computer_system(self):
+ ucsClasses = {'OMC_ComputerSystem' : self._omc_computersystem_test,
'OMC_HostNameSettingData' : self._omc_hostnamesettingdata_test,
'OMC_ComputerSystemHostNameSettingData' : self._omc_computersystemhostnamesettingdata_test}
- self._run_omcbase_component_tests('unitary_computer_system', ucsClasses)
+ self._run_omcbase_component_tests('computer_system', ucsClasses)
#
# def _omc_process_executable(self):
# '''OMC_ProcessExecutable'''
@@ -569,7 +569,7 @@
# ci = pywbem.CIMInstance("OMC_SystemTimeService")
# ci['CreationClassName'] = "OMC_SystemTimeService"
# ci['Name'] = "timeservice_test"
-# ci['SystemCreationClassName'] = "OMC_UnitaryComputerSystem"
+# ci['SystemCreationClassName'] = "OMC_ComputerSystem"
# ci['SystemName'] = "c119.cim.lab.novell.com"
# ci['AvailableRequestedState'] = [ pywbem.Uint16(2) ]
# ci['Caption'] = 'test'
@@ -647,7 +647,7 @@
#
# def _omc_hosted_time_service(self):
# if self._isSupportedAssn('OMC_HostedTimeService',
-# 'OMC_UnitaryComputerSystem',
+# 'OMC_ComputerSystem',
# 'OMC_SystemTimeService',
# 'h_time_test'):
# try:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|