You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(26) |
Dec
(13) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(5) |
Feb
(16) |
Mar
(5) |
Apr
(5) |
May
(13) |
Jun
(12) |
Jul
(1) |
Aug
(2) |
Sep
(13) |
Oct
(6) |
Nov
(1) |
Dec
(29) |
| 2008 |
Jan
(2) |
Feb
(2) |
Mar
(2) |
Apr
(57) |
May
(35) |
Jun
(45) |
Jul
(132) |
Aug
(87) |
Sep
(141) |
Oct
(86) |
Nov
(17) |
Dec
(2) |
| 2009 |
Jan
(3) |
Feb
(2) |
Mar
(3) |
Apr
(3) |
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2010 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
1
|
|
2
|
3
|
4
|
5
(1) |
6
|
7
|
8
|
|
9
|
10
(7) |
11
(1) |
12
|
13
|
14
|
15
|
|
16
|
17
|
18
|
19
|
20
|
21
(4) |
22
|
|
23
|
24
|
25
|
26
|
27
|
28
|
29
|
|
30
|
|
|
|
|
|
|
|
From: <jc...@us...> - 2007-09-21 16:48:59
|
Revision: 496
http://omc.svn.sourceforge.net/omc/?rev=496&view=rev
Author: jcarey
Date: 2007-09-21 09:49:02 -0700 (Fri, 21 Sep 2007)
Log Message:
-----------
>From brieske: added memcpy if share count > 1
Modified Paths:
--------------
smash/branches/1.0/src/lib/omc-ipmi/IpmiIfcSdr.cpp
Modified: smash/branches/1.0/src/lib/omc-ipmi/IpmiIfcSdr.cpp
===================================================================
--- smash/branches/1.0/src/lib/omc-ipmi/IpmiIfcSdr.cpp 2007-09-21 16:43:07 UTC (rev 495)
+++ smash/branches/1.0/src/lib/omc-ipmi/IpmiIfcSdr.cpp 2007-09-21 16:49:02 UTC (rev 496)
@@ -502,6 +502,7 @@
OW_LOG_ERROR(g_logger, "IpmiIfcSdrListAdd: failed memory alloc.");
return(-1);
}
+ memcpy(record_data,sdr->record.unknown,sdr->length);
ipmiifc_sdr_list *copySdr;
copySdr = new ipmiifc_sdr_list;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2007-09-21 16:43:22
|
Revision: 495
http://omc.svn.sourceforge.net/omc/?rev=495&view=rev
Author: brieske
Date: 2007-09-21 09:43:07 -0700 (Fri, 21 Sep 2007)
Log Message:
-----------
Added memcpy for sdr on when share count >1
Modified Paths:
--------------
smash/trunk/src/lib/omc-ipmi/IpmiIfcSdr.cpp
Modified: smash/trunk/src/lib/omc-ipmi/IpmiIfcSdr.cpp
===================================================================
--- smash/trunk/src/lib/omc-ipmi/IpmiIfcSdr.cpp 2007-09-21 15:57:23 UTC (rev 494)
+++ smash/trunk/src/lib/omc-ipmi/IpmiIfcSdr.cpp 2007-09-21 16:43:07 UTC (rev 495)
@@ -502,6 +502,7 @@
OW_LOG_ERROR(g_logger, "IpmiIfcSdrListAdd: failed memory alloc.");
return(-1);
}
+ memcpy(record_data,sdr->record.unknown,sdr->length);
ipmiifc_sdr_list *copySdr;
copySdr = new ipmiifc_sdr_list;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jc...@us...> - 2007-09-21 15:57:20
|
Revision: 494
http://omc.svn.sourceforge.net/omc/?rev=494&view=rev
Author: jcarey
Date: 2007-09-21 08:57:23 -0700 (Fri, 21 Sep 2007)
Log Message:
-----------
Changed to not build the ipmi providers at all if the --disable-ipmi is specified
Modified Paths:
--------------
smash/branches/1.0/src/providers/device/ipmi/Makefile.am
Modified: smash/branches/1.0/src/providers/device/ipmi/Makefile.am
===================================================================
--- smash/branches/1.0/src/providers/device/ipmi/Makefile.am 2007-09-21 15:56:49 UTC (rev 493)
+++ smash/branches/1.0/src/providers/device/ipmi/Makefile.am 2007-09-21 15:57:23 UTC (rev 494)
@@ -1,3 +1,5 @@
+if USE_IPMI_NS
+
include $(top_srcdir)/Makefile.incl.am
provider_LTLIBRARIES = \
@@ -136,3 +138,4 @@
-lomcbase \
-version-info 1
+endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jc...@us...> - 2007-09-21 15:56:45
|
Revision: 493
http://omc.svn.sourceforge.net/omc/?rev=493&view=rev
Author: jcarey
Date: 2007-09-21 08:56:49 -0700 (Fri, 21 Sep 2007)
Log Message:
-----------
Changed to not build the ipmi providers at all if the --disable-ipmi is specified
Modified Paths:
--------------
smash/trunk/src/providers/device/ipmi/Makefile.am
Modified: smash/trunk/src/providers/device/ipmi/Makefile.am
===================================================================
--- smash/trunk/src/providers/device/ipmi/Makefile.am 2007-09-11 16:33:58 UTC (rev 492)
+++ smash/trunk/src/providers/device/ipmi/Makefile.am 2007-09-21 15:56:49 UTC (rev 493)
@@ -1,3 +1,5 @@
+if USE_IPMI_NS
+
include $(top_srcdir)/Makefile.incl.am
provider_LTLIBRARIES = \
@@ -136,3 +138,4 @@
-lomcbase \
-version-info 1
+endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ba...@us...> - 2007-09-11 16:34:04
|
Revision: 492
http://omc.svn.sourceforge.net/omc/?rev=492&view=rev
Author: bartw
Date: 2007-09-11 09:33:58 -0700 (Tue, 11 Sep 2007)
Log Message:
-----------
some fixes OMC_UnixProcess.py
Modified Paths:
--------------
pybase/trunk/OMC_LogicalFile.py
pybase/trunk/OMC_UnitaryComputerSystem.py
pybase/trunk/OMC_UnixProcess.py
Modified: pybase/trunk/OMC_LogicalFile.py
===================================================================
--- pybase/trunk/OMC_LogicalFile.py 2007-09-10 17:07:42 UTC (rev 491)
+++ pybase/trunk/OMC_LogicalFile.py 2007-09-11 16:33:58 UTC (rev 492)
@@ -836,8 +836,8 @@
get_file_keys(os.path.dirname(objname), kbs)
model['groupcomponent'] = pywbem.CIMInstanceName(
classname=kbs['CreationClassName'],
- namespace=object_name.namespace,
keybindings=kbs)
+ #namespace=object_name.namespace,
yield model
if (not role or role.lower() == 'groupcomponent') \
and object_name.classname.lower() == 'omc_linuxdirectory':
@@ -851,8 +851,8 @@
get_file_keys(fname, kbs)
model['partcomponent'] = pywbem.CIMInstanceName(
classname=kbs['CreationClassName'],
- namespace=object_name.namespace,
keybindings=kbs)
+ #namespace=object_name.namespace,
yield model
except OSError, arg:
if arg.errno == 13:
Modified: pybase/trunk/OMC_UnitaryComputerSystem.py
===================================================================
--- pybase/trunk/OMC_UnitaryComputerSystem.py 2007-09-10 17:07:42 UTC (rev 491)
+++ pybase/trunk/OMC_UnitaryComputerSystem.py 2007-09-11 16:33:58 UTC (rev 492)
@@ -98,7 +98,7 @@
#model['ElementName'] = # TODO (type = unicode)
#model['Roles'] = # TODO (type = [unicode,])
#model['ResetCapability'] = # TODO (type = pywbem.Uint16 self.Values.ResetCapability)
- #model['NameFormat'] = # TODO (type = unicode self.Values.NameFormat)
+ model['NameFormat'] = self.Values.NameFormat.IP
#model['Caption'] = # TODO (type = unicode)
#model['PowerManagementCapabilities'] = # TODO (type = [pywbem.Uint16,] self.Values.PowerManagementCapabilities)
return model
Modified: pybase/trunk/OMC_UnixProcess.py
===================================================================
--- pybase/trunk/OMC_UnixProcess.py 2007-09-10 17:07:42 UTC (rev 491)
+++ pybase/trunk/OMC_UnixProcess.py 2007-09-11 16:33:58 UTC (rev 492)
@@ -37,11 +37,8 @@
import pywbem, os, sys, pwd, signal, time
from socket import getfqdn
-provdir = os.path.dirname(__file__)
-if provdir not in sys.path:
- sys.path.append(provdir)
-
import OMC_LogicalFile
+from OMC_OperatingSystem import get_os_path
PROC_STATE_DOESNT_EXIST = -1
@@ -738,8 +735,8 @@
% self.__class__.__name__)
for lp in LinuxProcess.procs():
model['PartComponent'] = lp.get_instance_name(
- cim_class.namespace)
- model['GroupComponent'] = get_os_path(cim_class.namespace)
+ model.path.namespace)
+ model['GroupComponent'] = get_os_path(model.path.namespace)
yield model
def set_instance(self, env, instance, previous_instance, cim_class):
@@ -782,7 +779,6 @@
object_name.namespace, sub='omc_operatingsystem',
super=result_class_name):
return
- from OMC_OperatingSystem import get_os_path
lp = LinuxProcess.get_proc(object_name['handle'])
if not lp:
return
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bc...@us...> - 2007-09-10 17:07:40
|
Revision: 491
http://omc.svn.sourceforge.net/omc/?rev=491&view=rev
Author: bcwise
Date: 2007-09-10 10:07:42 -0700 (Mon, 10 Sep 2007)
Log Message:
-----------
CHANGED some routines to have return values consistent with the
declaration.
Modified Paths:
--------------
base/branches/1.0/src/providers/operating-system/linux_os.cpp
Modified: base/branches/1.0/src/providers/operating-system/linux_os.cpp
===================================================================
--- base/branches/1.0/src/providers/operating-system/linux_os.cpp 2007-09-10 17:00:48 UTC (rev 490)
+++ base/branches/1.0/src/providers/operating-system/linux_os.cpp 2007-09-10 17:07:42 UTC (rev 491)
@@ -826,12 +826,7 @@
String
LinuxOperatingSystem::getOtherTypeDescription()
{
-#if 1
- char *s = "";
- return s;
-#else
return String();
-#endif
} // LinuxOperatingSystem::getOtherTypeDescription()
@@ -938,11 +933,7 @@
String
LinuxOperatingSystem::getStatus()
{
-#if 1
- return("NULL");
-#else
return String();
-#endif
} // LinuxOperatingSystem::getStatus()
@@ -996,8 +987,6 @@
String
LinuxOperatingSystem::getVersion()
{
-
-#if 1
struct utsname puname;
String rval = "";
@@ -1008,10 +997,6 @@
rval = puname.release;
return rval;
-#else
- return String();
-#endif
-
} // LinuxOperatingSystem::getVersion()
//==============================================================================
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <np...@us...> - 2007-09-10 17:00:45
|
Revision: 490
http://omc.svn.sourceforge.net/omc/?rev=490&view=rev
Author: npaxton
Date: 2007-09-10 10:00:48 -0700 (Mon, 10 Sep 2007)
Log Message:
-----------
added copyright string
Modified Paths:
--------------
pyprofiles/simpleIdentity/OMC_Account.py
pyprofiles/simpleIdentity/OMC_AccountElementCapabilities.py
pyprofiles/simpleIdentity/OMC_AccountManagementCapabilities.py
pyprofiles/simpleIdentity/OMC_AccountOnSystem.py
pyprofiles/simpleIdentity/OMC_AssignedIdentity.py
pyprofiles/simpleIdentity/OMC_Identity.py
pyprofiles/simpleIdentity/OMC_UserAccntMgmtHostedServiceProvider.py
pyprofiles/simpleIdentity/OMC_UserAccountManagementServiceProvider.py
pyprofiles/simpleIdentity/setup.py
Modified: pyprofiles/simpleIdentity/OMC_Account.py
===================================================================
--- pyprofiles/simpleIdentity/OMC_Account.py 2007-09-10 16:41:07 UTC (rev 489)
+++ pyprofiles/simpleIdentity/OMC_Account.py 2007-09-10 17:00:48 UTC (rev 490)
@@ -1,3 +1,33 @@
+#*******************************************************************************
+# Copyright (C) 2007 Novell, Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# - Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+#
+# - Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# - Neither the name of Novell, Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from this
+# software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL Novell, Inc. OR THE CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+#*****************************************************************************/
"""Python Provider for OMC_Account
Instruments the CIM class OMC_Account
Modified: pyprofiles/simpleIdentity/OMC_AccountElementCapabilities.py
===================================================================
--- pyprofiles/simpleIdentity/OMC_AccountElementCapabilities.py 2007-09-10 16:41:07 UTC (rev 489)
+++ pyprofiles/simpleIdentity/OMC_AccountElementCapabilities.py 2007-09-10 17:00:48 UTC (rev 490)
@@ -1,3 +1,33 @@
+#*******************************************************************************
+# Copyright (C) 2007 Novell, Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# - Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+#
+# - Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# - Neither the name of Novell, Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from this
+# software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL Novell, Inc. OR THE CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+#*****************************************************************************/
"""Python Provider for OMC_AccountElementCapabilities
Instruments the CIM class OMC_AccountElementCapabilities
Modified: pyprofiles/simpleIdentity/OMC_AccountManagementCapabilities.py
===================================================================
--- pyprofiles/simpleIdentity/OMC_AccountManagementCapabilities.py 2007-09-10 16:41:07 UTC (rev 489)
+++ pyprofiles/simpleIdentity/OMC_AccountManagementCapabilities.py 2007-09-10 17:00:48 UTC (rev 490)
@@ -1,3 +1,33 @@
+#*******************************************************************************
+# Copyright (C) 2007 Novell, Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# - Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+#
+# - Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# - Neither the name of Novell, Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from this
+# software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL Novell, Inc. OR THE CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+#*****************************************************************************/
"""Python Provider for OMC_AccountManagementCapabilities
Instruments the CIM class OMC_AccountManagementCapabilities
Modified: pyprofiles/simpleIdentity/OMC_AccountOnSystem.py
===================================================================
--- pyprofiles/simpleIdentity/OMC_AccountOnSystem.py 2007-09-10 16:41:07 UTC (rev 489)
+++ pyprofiles/simpleIdentity/OMC_AccountOnSystem.py 2007-09-10 17:00:48 UTC (rev 490)
@@ -1,3 +1,33 @@
+#*******************************************************************************
+# Copyright (C) 2007 Novell, Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# - Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+#
+# - Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# - Neither the name of Novell, Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from this
+# software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL Novell, Inc. OR THE CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+#*****************************************************************************/
"""Python Provider for OMC_AccountOnSystem
Instruments the CIM class OMC_AccountOnSystem
Modified: pyprofiles/simpleIdentity/OMC_AssignedIdentity.py
===================================================================
--- pyprofiles/simpleIdentity/OMC_AssignedIdentity.py 2007-09-10 16:41:07 UTC (rev 489)
+++ pyprofiles/simpleIdentity/OMC_AssignedIdentity.py 2007-09-10 17:00:48 UTC (rev 490)
@@ -1,3 +1,33 @@
+#*******************************************************************************
+# Copyright (C) 2007 Novell, Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# - Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+#
+# - Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# - Neither the name of Novell, Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from this
+# software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL Novell, Inc. OR THE CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+#*****************************************************************************/
"""Python Provider for OMC_AssignedIdentity
Instruments the CIM class OMC_AssignedIdentity
Modified: pyprofiles/simpleIdentity/OMC_Identity.py
===================================================================
--- pyprofiles/simpleIdentity/OMC_Identity.py 2007-09-10 16:41:07 UTC (rev 489)
+++ pyprofiles/simpleIdentity/OMC_Identity.py 2007-09-10 17:00:48 UTC (rev 490)
@@ -1,3 +1,33 @@
+#*******************************************************************************
+# Copyright (C) 2007 Novell, Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# - Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+#
+# - Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# - Neither the name of Novell, Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from this
+# software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL Novell, Inc. OR THE CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+#*****************************************************************************/
"""Python Provider for OMC_Identity
Instruments the CIM class OMC_Identity
Modified: pyprofiles/simpleIdentity/OMC_UserAccntMgmtHostedServiceProvider.py
===================================================================
--- pyprofiles/simpleIdentity/OMC_UserAccntMgmtHostedServiceProvider.py 2007-09-10 16:41:07 UTC (rev 489)
+++ pyprofiles/simpleIdentity/OMC_UserAccntMgmtHostedServiceProvider.py 2007-09-10 17:00:48 UTC (rev 490)
@@ -1,3 +1,33 @@
+#*******************************************************************************
+# Copyright (C) 2007 Novell, Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# - Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+#
+# - Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# - Neither the name of Novell, Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from this
+# software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL Novell, Inc. OR THE CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+#*****************************************************************************/
"""Python Provider for OMC_UserAccntMgmtHostedService
Instruments the CIM class OMC_UserAccntMgmtHostedService
Modified: pyprofiles/simpleIdentity/OMC_UserAccountManagementServiceProvider.py
===================================================================
--- pyprofiles/simpleIdentity/OMC_UserAccountManagementServiceProvider.py 2007-09-10 16:41:07 UTC (rev 489)
+++ pyprofiles/simpleIdentity/OMC_UserAccountManagementServiceProvider.py 2007-09-10 17:00:48 UTC (rev 490)
@@ -1,3 +1,33 @@
+#*******************************************************************************
+# Copyright (C) 2007 Novell, Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# - Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+#
+# - Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# - Neither the name of Novell, Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from this
+# software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL Novell, Inc. OR THE CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+#*****************************************************************************/
"""Python Provider for OMC_UserAccountManagementService
Instruments the CIM class OMC_UserAccountManagementService
Modified: pyprofiles/simpleIdentity/setup.py
===================================================================
--- pyprofiles/simpleIdentity/setup.py 2007-09-10 16:41:07 UTC (rev 489)
+++ pyprofiles/simpleIdentity/setup.py 2007-09-10 17:00:48 UTC (rev 490)
@@ -1,3 +1,33 @@
+#*******************************************************************************
+# Copyright (C) 2007 Novell, Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# - Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+#
+# - Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# - Neither the name of Novell, Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from this
+# software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL Novell, Inc. OR THE CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+#*****************************************************************************/
#!/usr/bin/env python
# Note, you'll typically want to override where these get installed.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <np...@us...> - 2007-09-10 16:41:03
|
Revision: 489
http://omc.svn.sourceforge.net/omc/?rev=489&view=rev
Author: npaxton
Date: 2007-09-10 09:41:07 -0700 (Mon, 10 Sep 2007)
Log Message:
-----------
move pysoftware under pyprofiles
Added Paths:
-----------
pyprofiles/pysoftware/
Removed Paths:
-------------
pysoftware/
Copied: pyprofiles/pysoftware (from rev 485, pysoftware)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <np...@us...> - 2007-09-10 16:38:45
|
Revision: 488
http://omc.svn.sourceforge.net/omc/?rev=488&view=rev
Author: npaxton
Date: 2007-09-10 09:38:45 -0700 (Mon, 10 Sep 2007)
Log Message:
-----------
simpleIdentity initial checkin, under new top-level pyprofiles
Added Paths:
-----------
pyprofiles/
pyprofiles/simpleIdentity/
pyprofiles/simpleIdentity/MANIFEST
pyprofiles/simpleIdentity/OMC_Account.mof
pyprofiles/simpleIdentity/OMC_Account.py
pyprofiles/simpleIdentity/OMC_Account.reg
pyprofiles/simpleIdentity/OMC_AccountElementCapabilities.mof
pyprofiles/simpleIdentity/OMC_AccountElementCapabilities.py
pyprofiles/simpleIdentity/OMC_AccountElementCapabilities.reg
pyprofiles/simpleIdentity/OMC_AccountManagementCapabilities.mof
pyprofiles/simpleIdentity/OMC_AccountManagementCapabilities.py
pyprofiles/simpleIdentity/OMC_AccountManagementCapabilities.reg
pyprofiles/simpleIdentity/OMC_AccountOnSystem.mof
pyprofiles/simpleIdentity/OMC_AccountOnSystem.py
pyprofiles/simpleIdentity/OMC_AccountOnSystem.reg
pyprofiles/simpleIdentity/OMC_AssignedIdentity.mof
pyprofiles/simpleIdentity/OMC_AssignedIdentity.py
pyprofiles/simpleIdentity/OMC_AssignedIdentity.reg
pyprofiles/simpleIdentity/OMC_Identity.mof
pyprofiles/simpleIdentity/OMC_Identity.py
pyprofiles/simpleIdentity/OMC_Identity.reg
pyprofiles/simpleIdentity/OMC_UserAccntMgmtHostedService.mof
pyprofiles/simpleIdentity/OMC_UserAccntMgmtHostedService.reg
pyprofiles/simpleIdentity/OMC_UserAccntMgmtHostedServiceProvider.py
pyprofiles/simpleIdentity/OMC_UserAccountManagementService.mof
pyprofiles/simpleIdentity/OMC_UserAccountManagementService.reg
pyprofiles/simpleIdentity/OMC_UserAccountManagementServiceProvider.py
pyprofiles/simpleIdentity/omc-simple-identity-management-provider.spec
pyprofiles/simpleIdentity/setup.py
Added: pyprofiles/simpleIdentity/MANIFEST
===================================================================
--- pyprofiles/simpleIdentity/MANIFEST (rev 0)
+++ pyprofiles/simpleIdentity/MANIFEST 2007-09-10 16:38:45 UTC (rev 488)
@@ -0,0 +1,25 @@
+OMC_Account.mof
+OMC_Account.py
+OMC_Account.reg
+OMC_AccountElementCapabilities.mof
+OMC_AccountElementCapabilities.py
+OMC_AccountElementCapabilities.reg
+OMC_AccountManagementCapabilities.mof
+OMC_AccountManagementCapabilities.py
+OMC_AccountManagementCapabilities.reg
+OMC_AccountOnSystem.mof
+OMC_AccountOnSystem.py
+OMC_AccountOnSystem.reg
+OMC_AssignedIdentity.mof
+OMC_AssignedIdentity.py
+OMC_AssignedIdentity.reg
+OMC_Identity.mof
+OMC_Identity.py
+OMC_Identity.reg
+OMC_UserAccntMgmtHostedService.mof
+OMC_UserAccntMgmtHostedService.reg
+OMC_UserAccntMgmtHostedServiceProvider.py
+OMC_UserAccountManagementService.mof
+OMC_UserAccountManagementService.reg
+OMC_UserAccountManagementServiceProvider.py
+setup.py
Property changes on: pyprofiles/simpleIdentity/MANIFEST
___________________________________________________________________
Name: svn:executable
+ *
Added: pyprofiles/simpleIdentity/OMC_Account.mof
===================================================================
--- pyprofiles/simpleIdentity/OMC_Account.mof (rev 0)
+++ pyprofiles/simpleIdentity/OMC_Account.mof 2007-09-10 16:38:45 UTC (rev 488)
@@ -0,0 +1,4 @@
+[Description("Model a Account class for getting user information")]
+class OMC_Account : CIM_Account
+{
+};
Property changes on: pyprofiles/simpleIdentity/OMC_Account.mof
___________________________________________________________________
Name: svn:executable
+ *
Added: pyprofiles/simpleIdentity/OMC_Account.py
===================================================================
--- pyprofiles/simpleIdentity/OMC_Account.py (rev 0)
+++ pyprofiles/simpleIdentity/OMC_Account.py 2007-09-10 16:38:45 UTC (rev 488)
@@ -0,0 +1,414 @@
+"""Python Provider for OMC_Account
+
+Instruments the CIM class OMC_Account
+
+"""
+
+import pywbem
+import pwd
+import os
+from socket import getfqdn
+
+class OMC_AccountProvider(pywbem.CIMProvider):
+ """Instrument the CIM class OMC_Account
+
+ Model a Account class for getting user information
+
+ """
+
+ def __init__ (self, env):
+ logger = env.get_logger()
+ logger.log_debug('Initializing provider %s from %s' \
+ % (self.__class__.__name__, __file__))
+ # If you will be filtering instances yourself according to
+ # property_list, role, result_role, and result_class_name
+ # parameters, set self.filter_results to False
+ # self.filter_results = False
+
+ def get_instance(self, env, model, cim_class):
+ """Return an instance.
+
+ Keyword arguments:
+ env -- Provider Environment (pycimmb.ProviderEnvironment)
+ model -- A template of the pywbem.CIMInstance to be returned. The
+ key properties are set on this instance to correspond to the
+ instanceName that was requested. The properties of the model
+ are already filtered according to the PropertyList from the
+ request. Only properties present in the model need to be
+ given values. If you prefer, you can set all of the
+ values, and the instance will be filtered for you.
+ cim_class -- The pywbem.CIMClass
+
+ Possible Errors:
+ CIM_ERR_ACCESS_DENIED
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ or otherwise incorrect parameters)
+ CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
+ Instance does not exist in the specified namespace)
+ CIM_ERR_FAILED (some other unspecified error occurred)
+
+ """
+
+ logger = env.get_logger()
+ logger.log_debug('Entering %s.get_instance()' \
+ % self.__class__.__name__)
+ for userinfo in pwd.getpwall():
+ if model['Name'] == userinfo[0]:
+ model['UserPassword'] = userinfo[1]
+ model['UserID'] = str(userinfo[2])
+ model['ElementName'] = userinfo[4]+ ':' + userinfo[0]
+ model['OrganizationName'] = 'Novell'
+ break
+
+ #model['Caption'] = # TODO (type = unicode)
+ #model['ComplexPasswordRulesEnforced'] = # TODO (type = [pywbem.Uint16,] self.Values.ComplexPasswordRulesEnforced)
+ #model['Description'] = # TODO (type = unicode)
+ #model['Descriptions'] = # TODO (type = [unicode,])
+ #model['ElementName'] = # TODO (type = unicode)
+ #model['EnabledDefault'] = # TODO (type = pywbem.Uint16 self.Values.EnabledDefault) (default=2L)
+ #model['EnabledState'] = # TODO (type = pywbem.Uint16 self.Values.EnabledState) (default=5L)
+ #model['HealthState'] = # TODO (type = pywbem.Uint16 self.Values.HealthState)
+ #model['Host'] = # TODO (type = [unicode,])
+ #model['InactivityTimeout'] = # TODO (type = pywbem.CIMDateTime)
+ #model['InstallDate'] = # TODO (type = pywbem.CIMDateTime)
+ #model['LastLogin'] = # TODO (type = pywbem.CIMDateTime)
+ #model['LocalityName'] = # TODO (type = [unicode,])
+ #model['MaximumSuccessiveLoginFailures'] = # TODO (type = pywbem.Uint16)
+ #model['ObjectClass'] = # TODO (type = [unicode,])
+ #model['OperationalStatus'] = # TODO (type = [pywbem.Uint16,] self.Values.OperationalStatus)
+ #model['OrganizationName'] = # TODO (type = [unicode,]) (Required)
+ #model['OtherEnabledState'] = # TODO (type = unicode)
+ #model['OU'] = # TODO (type = [unicode,])
+ #model['PasswordExpiration'] = # TODO (type = pywbem.CIMDateTime)
+ #model['PasswordHistoryDepth'] = # TODO (type = pywbem.Uint16)
+ #model['RequestedState'] = # TODO (type = pywbem.Uint16 self.Values.RequestedState) (default=12L)
+ #model['SeeAlso'] = # TODO (type = [unicode,])
+ #model['Status'] = # TODO (type = unicode self.Values.Status)
+ #model['StatusDescriptions'] = # TODO (type = [unicode,])
+ #model['TimeOfLastStateChange'] = # TODO (type = pywbem.CIMDateTime)
+ #model['UserCertificate'] = # TODO (type = [unicode,])
+ #model['UserID'] = # TODO (type = unicode)
+ #model['UserPassword'] = # TODO (type = [unicode,])
+ return model
+
+ def enum_instances(self, env, model, cim_class, keys_only):
+ """Enumerate instances.
+
+ The WBEM operations EnumerateInstances and EnumerateInstanceNames
+ are both mapped to this method.
+ This method is a python generator
+
+ Keyword arguments:
+ env -- Provider Environment (pycimmb.ProviderEnvironment)
+ model -- A template of the pywbem.CIMInstances to be generated.
+ The properties of the model are already filtered according to
+ the PropertyList from the request. Only properties present in
+ the model need to be given values. If you prefer, you can
+ always set all of the values, and the instance will be filtered
+ for you.
+ cim_class -- The pywbem.CIMClass
+ keys_only -- A boolean. True if only the key properties should be
+ set on the generated instances.
+
+ Possible Errors:
+ CIM_ERR_FAILED (some other unspecified error occurred)
+
+ """
+
+ logger = env.get_logger()
+ logger.log_debug('Entering %s.enum_instances()' \
+ % self.__class__.__name__)
+
+ #while False: # TODO more instances?
+ # TODO fetch system resource
+ # Key properties
+ #model['SystemName'] = # TODO (type = unicode)
+ #model['SystemCreationClassName'] = # TODO (type = unicode)
+ model['CreationClassName'] = 'OMC_Account'
+ model['SystemCreationClassName'] = 'OMC_UnitaryComputerSystem'
+ model['SystemName'] = getfqdn()
+ for userinfo in pwd.getpwall():
+ model['Name'] = userinfo[0]
+ #model['Name'] = # TODO (type = unicode)
+ if keys_only:
+ yield model
+ else:
+ try:
+ yield self.get_instance(env, model, cim_class)
+ except pywbem.CIMError, (num, msg):
+ if num not in (pywbem.CIM_ERR_NOT_FOUND,
+ pywbem.CIM_ERR_ACCESS_DENIED):
+ raise
+
+ def set_instance(self, env, instance, previous_instance, cim_class):
+ """Return a newly created or modified instance.
+
+ Keyword arguments:
+ env -- Provider Environment (pycimmb.ProviderEnvironment)
+ instance -- The new pywbem.CIMInstance. If modifying an existing
+ instance, the properties on this instance have been filtered by
+ the PropertyList from the request.
+ previous_instance -- The previous pywbem.CIMInstance if modifying
+ an existing instance. None if creating a new instance.
+ cim_class -- The pywbem.CIMClass
+
+ Return the new instance. The keys must be set on the new instance.
+
+ Possible Errors:
+ CIM_ERR_ACCESS_DENIED
+ CIM_ERR_NOT_SUPPORTED
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ or otherwise incorrect parameters)
+ CIM_ERR_ALREADY_EXISTS (the CIM Instance already exists -- only
+ valid if previous_instance is None, indicating that the operation
+ was CreateInstance)
+ CIM_ERR_NOT_FOUND (the CIM Instance does not exist -- only valid
+ if previous_instance is not None, indicating that the operation
+ was ModifyInstance)
+ CIM_ERR_FAILED (some other unspecified error occurred)
+
+ """
+
+ logger = env.get_logger()
+ logger.log_debug('Entering %s.set_instance()' \
+ % self.__class__.__name__)
+ # TODO create or modify the instance
+ raise pywbem.CIMError(pywbem.CIM_ERR_NOT_SUPPORTED) # Remove to implement
+ return instance
+
+ def delete_instance(self, env, instance_name):
+ """Delete an instance.
+
+ Keyword arguments:
+ env -- Provider Environment (pycimmb.ProviderEnvironment)
+ instance_name -- A pywbem.CIMInstanceName specifying the instance
+ to delete.
+
+ Possible Errors:
+ CIM_ERR_ACCESS_DENIED
+ CIM_ERR_NOT_SUPPORTED
+ CIM_ERR_INVALID_NAMESPACE
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ or otherwise incorrect parameters)
+ CIM_ERR_INVALID_CLASS (the CIM Class does not exist in the specified
+ namespace)
+ CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
+ Instance does not exist in the specified namespace)
+ CIM_ERR_FAILED (some other unspecified error occurred)
+
+ """
+
+ logger = env.get_logger()
+ logger.log_debug('Entering %s.delete_instance()' \
+ % self.__class__.__name__)
+
+ # TODO delete the resource
+ raise pywbem.CIMError(pywbem.CIM_ERR_NOT_SUPPORTED) # Remove to implement
+
+ def cim_method_requeststatechange(self, env, object_name, method,
+ param_requestedstate,
+ param_timeoutperiod):
+ """Implements OMC_Account.RequestStateChange()
+
+ Requests that the state of the element be changed to the value
+ specified in the RequestedState parameter. When the requested
+ state change takes place, the EnabledState and RequestedState of
+ the element will be the same. Invoking the RequestStateChange
+ method multiple times could result in earlier requests being
+ overwritten or lost. If 0 is returned, then the task completed
+ successfully and the use of ConcreteJob was not required. If 4096
+ (0x1000) is returned, then the task will take some time to
+ complete, ConcreteJob will be created, and its reference returned
+ in the output parameter Job. Any other return code indicates an
+ error condition.
+
+ Keyword arguments:
+ env -- Provider Environment (pycimmb.ProviderEnvironment)
+ object_name -- A pywbem.CIMInstanceName or pywbem.CIMCLassName
+ specifying the object on which the method RequestStateChange()
+ should be invoked.
+ method -- A pywbem.CIMMethod representing the method meta-data
+ param_requestedstate -- The input parameter RequestedState (type pywbem.Uint16 self.Values.RequestStateChange.RequestedState)
+ The state requested for the element. This information will be
+ placed into the RequestedState property of the instance if the
+ return code of the RequestStateChange method is 0 ('Completed
+ with No Error'), 3 ('Timeout'), or 4096 (0x1000) ('Job
+ Started'). Refer to the description of the EnabledState and
+ RequestedState properties for the detailed explanations of the
+ RequestedState values.
+
+ param_timeoutperiod -- The input parameter TimeoutPeriod (type pywbem.CIMDateTime)
+ A timeout period that specifies the maximum amount of time that
+ the client expects the transition to the new state to take.
+ The interval format must be used to specify the TimeoutPeriod.
+ A value of 0 or a null parameter indicates that the client has
+ no time requirements for the transition. If this property
+ does not contain 0 or null and the implementation does not
+ support this parameter, a return code of 'Use Of Timeout
+ Parameter Not Supported' must be returned.
+
+
+ Returns a two-tuple containing the return value (type pywbem.Uint32 self.Values.RequestStateChange)
+ and a dictionary with the out-parameters
+
+ Output parameters:
+ Job -- (type REF (pywbem.CIMInstanceName(classname='CIM_ConcreteJob', ...))
+ Reference to the job (can be null if the task is completed).
+
+
+ Possible Errors:
+ CIM_ERR_ACCESS_DENIED
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate,
+ unrecognized or otherwise incorrect parameters)
+ CIM_ERR_NOT_FOUND (the target CIM Class or instance does not
+ exist in the specified namespace)
+ CIM_ERR_METHOD_NOT_AVAILABLE (the CIM Server is unable to honor
+ the invocation request)
+ CIM_ERR_FAILED (some other unspecified error occurred)
+
+ """
+
+ logger = env.get_logger()
+ logger.log_debug('Entering %s.cim_method_requeststatechange()' \
+ % self.__class__.__name__)
+
+ # TODO do something
+ raise pywbem.CIMError(pywbem.CIM_ERR_METHOD_NOT_AVAILABLE) # Remove to implemented
+ out_params = {}
+ #out_params['job'] = # TODO (type REF (pywbem.CIMInstanceName(classname='CIM_ConcreteJob', ...))
+ rval = None # TODO (type pywbem.Uint32 self.Values.RequestStateChange)
+ return (rval, out_params)
+
+ class Values(object):
+ class Status(object):
+ OK = 'OK'
+ Error = 'Error'
+ Degraded = 'Degraded'
+ Unknown = 'Unknown'
+ Pred_Fail = 'Pred Fail'
+ Starting = 'Starting'
+ Stopping = 'Stopping'
+ Service = 'Service'
+ Stressed = 'Stressed'
+ NonRecover = 'NonRecover'
+ No_Contact = 'No Contact'
+ Lost_Comm = 'Lost Comm'
+ Stopped = 'Stopped'
+
+ class RequestedState(object):
+ Enabled = pywbem.Uint16(2)
+ Disabled = pywbem.Uint16(3)
+ Shut_Down = pywbem.Uint16(4)
+ No_Change = pywbem.Uint16(5)
+ Offline = pywbem.Uint16(6)
+ Test = pywbem.Uint16(7)
+ Deferred = pywbem.Uint16(8)
+ Quiesce = pywbem.Uint16(9)
+ Reboot = pywbem.Uint16(10)
+ Reset = pywbem.Uint16(11)
+ Not_Applicable = pywbem.Uint16(12)
+ # DMTF_Reserved = ..
+ # Vendor_Reserved = 32768..65535
+
+ class HealthState(object):
+ Unknown = pywbem.Uint16(0)
+ OK = pywbem.Uint16(5)
+ Degraded_Warning = pywbem.Uint16(10)
+ Minor_failure = pywbem.Uint16(15)
+ Major_failure = pywbem.Uint16(20)
+ Critical_failure = pywbem.Uint16(25)
+ Non_recoverable_error = pywbem.Uint16(30)
+ # DMTF_Reserved = ..
+
+ class EnabledDefault(object):
+ Enabled = pywbem.Uint16(2)
+ Disabled = pywbem.Uint16(3)
+ Not_Applicable = pywbem.Uint16(5)
+ Enabled_but_Offline = pywbem.Uint16(6)
+ No_Default = pywbem.Uint16(7)
+ Quiesce = pywbem.Uint16(9)
+ # DMTF_Reserved = ..
+ # Vendor_Reserved = 32768..65535
+
+ class EnabledState(object):
+ Unknown = pywbem.Uint16(0)
+ Other = pywbem.Uint16(1)
+ Enabled = pywbem.Uint16(2)
+ Disabled = pywbem.Uint16(3)
+ Shutting_Down = pywbem.Uint16(4)
+ Not_Applicable = pywbem.Uint16(5)
+ Enabled_but_Offline = pywbem.Uint16(6)
+ In_Test = pywbem.Uint16(7)
+ Deferred = pywbem.Uint16(8)
+ Quiesce = pywbem.Uint16(9)
+ Starting = pywbem.Uint16(10)
+ # DMTF_Reserved = 11..32767
+ # Vendor_Reserved = 32768..65535
+
+ class ComplexPasswordRulesEnforced(object):
+ Minimum_Length = pywbem.Uint16(2)
+ Preclude_User_ID_Inclusion = pywbem.Uint16(3)
+ Maximum_Repeating_Characters = pywbem.Uint16(4)
+ Lower_Case_Alpha = pywbem.Uint16(5)
+ Upper_Case_Alpha = pywbem.Uint16(6)
+ Numeric_Character = pywbem.Uint16(7)
+ Special_Character = pywbem.Uint16(8)
+ # DMTF_Reserved = ..
+ # Vendor_Reserved = 0x8000..0xFFFF
+
+ class OperationalStatus(object):
+ Unknown = pywbem.Uint16(0)
+ Other = pywbem.Uint16(1)
+ OK = pywbem.Uint16(2)
+ Degraded = pywbem.Uint16(3)
+ Stressed = pywbem.Uint16(4)
+ Predictive_Failure = pywbem.Uint16(5)
+ Error = pywbem.Uint16(6)
+ Non_Recoverable_Error = pywbem.Uint16(7)
+ Starting = pywbem.Uint16(8)
+ Stopping = pywbem.Uint16(9)
+ Stopped = pywbem.Uint16(10)
+ In_Service = pywbem.Uint16(11)
+ No_Contact = pywbem.Uint16(12)
+ Lost_Communication = pywbem.Uint16(13)
+ Aborted = pywbem.Uint16(14)
+ Dormant = pywbem.Uint16(15)
+ Supporting_Entity_in_Error = pywbem.Uint16(16)
+ Completed = pywbem.Uint16(17)
+ Power_Mode = pywbem.Uint16(18)
+ # DMTF_Reserved = ..
+ # Vendor_Reserved = 0x8000..
+
+ class RequestStateChange(object):
+ Completed_with_No_Error = pywbem.Uint32(0)
+ Not_Supported = pywbem.Uint32(1)
+ Unknown_or_Unspecified_Error = pywbem.Uint32(2)
+ Cannot_complete_within_Timeout_Period = pywbem.Uint32(3)
+ Failed = pywbem.Uint32(4)
+ Invalid_Parameter = pywbem.Uint32(5)
+ In_Use = pywbem.Uint32(6)
+ # DMTF_Reserved = ..
+ Method_Parameters_Checked___Job_Started = pywbem.Uint32(4096)
+ Invalid_State_Transition = pywbem.Uint32(4097)
+ Use_of_Timeout_Parameter_Not_Supported = pywbem.Uint32(4098)
+ Busy = pywbem.Uint32(4099)
+ # Method_Reserved = 4100..32767
+ # Vendor_Specific = 32768..65535
+ class RequestedState(object):
+ Enabled = pywbem.Uint16(2)
+ Disabled = pywbem.Uint16(3)
+ Shut_Down = pywbem.Uint16(4)
+ Offline = pywbem.Uint16(6)
+ Test = pywbem.Uint16(7)
+ Defer = pywbem.Uint16(8)
+ Quiesce = pywbem.Uint16(9)
+ Reboot = pywbem.Uint16(10)
+ Reset = pywbem.Uint16(11)
+ # DMTF_Reserved = ..
+ # Vendor_Reserved = 32768..65535
+
+## end of class OMC_AccountProvider
+
+def get_providers(env):
+ omc_account_prov = OMC_AccountProvider(env)
+ return {'OMC_Account': omc_account_prov}
Property changes on: pyprofiles/simpleIdentity/OMC_Account.py
___________________________________________________________________
Name: svn:executable
+ *
Added: pyprofiles/simpleIdentity/OMC_Account.reg
===================================================================
--- pyprofiles/simpleIdentity/OMC_Account.reg (rev 0)
+++ pyprofiles/simpleIdentity/OMC_Account.reg 2007-09-10 16:38:45 UTC (rev 488)
@@ -0,0 +1,9 @@
+// Provider registration for OMC_Account
+instance of OpenWBEM_PyProviderRegistration
+{
+ InstanceID = "OMC:OMC_Account:01";
+ NamespaceNames = {"root/cimv2"};
+ ClassName = "OMC_Account";
+ ProviderTypes = {1,6}; // Instance, Method
+ ModulePath = "/usr/lib/pycim/OMC_Account.py";
+};
Property changes on: pyprofiles/simpleIdentity/OMC_Account.reg
___________________________________________________________________
Name: svn:executable
+ *
Added: pyprofiles/simpleIdentity/OMC_AccountElementCapabilities.mof
===================================================================
--- pyprofiles/simpleIdentity/OMC_AccountElementCapabilities.mof (rev 0)
+++ pyprofiles/simpleIdentity/OMC_AccountElementCapabilities.mof 2007-09-10 16:38:45 UTC (rev 488)
@@ -0,0 +1,11 @@
+[Association,Description("Relationship between a UserAccountService and UserAccountCapabilities")]
+class OMC_AccountElementCapabilities : CIM_ElementCapabilities
+{
+ [Key,Description ("Capabilities of the User Account service")]
+ OMC_AccountManagementCapabilities REF Capabilities;
+
+ [Key, Min(1),Description ("The user account service")]
+ OMC_UserAccountManagementService REF ManagedElement;
+
+
+};
Property changes on: pyprofiles/simpleIdentity/OMC_AccountElementCapabilities.mof
___________________________________________________________________
Name: svn:executable
+ *
Added: pyprofiles/simpleIdentity/OMC_AccountElementCapabilities.py
===================================================================
--- pyprofiles/simpleIdentity/OMC_AccountElementCapabilities.py (rev 0)
+++ pyprofiles/simpleIdentity/OMC_AccountElementCapabilities.py 2007-09-10 16:38:45 UTC (rev 488)
@@ -0,0 +1,286 @@
+"""Python Provider for OMC_AccountElementCapabilities
+
+Instruments the CIM class OMC_AccountElementCapabilities
+
+"""
+
+import pywbem
+
+class OMC_AccountElementCapabilitiesProvider(pywbem.CIMProvider):
+ """Instrument the CIM class OMC_AccountElementCapabilities
+
+ Relationship between a UserAccountService and UserAccountCapabilities
+
+ """
+
+ def __init__ (self, env):
+ logger = env.get_logger()
+ logger.log_debug('Initializing provider %s from %s' \
+ % (self.__class__.__name__, __file__))
+ # If you will be filtering instances yourself according to
+ # property_list, role, result_role, and result_class_name
+ # parameters, set self.filter_results to False
+ # self.filter_results = False
+
+ def get_instance(self, env, model, cim_class):
+ """Return an instance.
+
+ Keyword arguments:
+ env -- Provider Environment (pycimmb.ProviderEnvironment)
+ model -- A template of the pywbem.CIMInstance to be returned. The
+ key properties are set on this instance to correspond to the
+ instanceName that was requested. The properties of the model
+ are already filtered according to the PropertyList from the
+ request. Only properties present in the model need to be
+ given values. If you prefer, you can set all of the
+ values, and the instance will be filtered for you.
+ cim_class -- The pywbem.CIMClass
+
+ Possible Errors:
+ CIM_ERR_ACCESS_DENIED
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ or otherwise incorrect parameters)
+ CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
+ Instance does not exist in the specified namespace)
+ CIM_ERR_FAILED (some other unspecified error occurred)
+
+ """
+
+ logger = env.get_logger()
+ logger.log_debug('Entering %s.get_instance()' \
+ % self.__class__.__name__)
+
+ #model['Characteristics'] = # TODO (type = [pywbem.Uint16,] self.Values.Characteristics)
+ return model
+
+ def enum_instances(self, env, model, cim_class, keys_only):
+ """Enumerate instances.
+
+ The WBEM operations EnumerateInstances and EnumerateInstanceNames
+ are both mapped to this method.
+ This method is a python generator
+
+ Keyword arguments:
+ env -- Provider Environment (pycimmb.ProviderEnvironment)
+ model -- A template of the pywbem.CIMInstances to be generated.
+ The properties of the model are already filtered according to
+ the PropertyList from the request. Only properties present in
+ the model need to be given values. If you prefer, you can
+ always set all of the values, and the instance will be filtered
+ for you.
+ cim_class -- The pywbem.CIMClass
+ keys_only -- A boolean. True if only the key properties should be
+ set on the generated instances.
+
+ Possible Errors:
+ CIM_ERR_FAILED (some other unspecified error occurred)
+
+ """
+
+ logger = env.get_logger()
+ logger.log_debug('Entering %s.enum_instances()' \
+ % self.__class__.__name__)
+ ch = env.get_cimom_handle()
+ """ There is always one instance of OMC_AccountManagementCapbility which has instanceID: OMC:AccountCapability """
+ capabilityInstanceName = pywbem.CIMInstanceName(classname='OMC_AccountManagementCapabilities',
+ namespace=model.path.namespace,
+ keybindings={'InstanceID':'OMC:AccountCapability'})
+ model['Capabilities'] = capabilityInstanceName
+ serviceList = []
+ try:
+ """All the instances of OMC_UserAccountManagementService will be associated with OMC_AccountManagementCapbility which has instanceID: OMC:AccountCapability """
+ ch.EnumerateInstances('OMC_UserAccountManagementService', model.path.namespace, IncludeQualifiers=False, Handler=lambda inst:serviceList.append(inst))
+ except:
+ return
+ for serviceInstance in serviceList:
+ if(serviceInstance['CreationClassName'] == 'OMC_UserAccountManagementService'):
+ model['ManagedElement'] = serviceInstance.path
+ if keys_only:
+ yield model
+ else:
+ try:
+ yield self.get_instance(env, model, cim_class)
+ except pywbem.CIMError, (num, msg):
+ if num not in (pywbem.CIM_ERR_NOT_FOUND,
+ pywbem.CIM_ERR_ACCESS_DENIED):
+ raise
+
+ def set_instance(self, env, instance, previous_instance, cim_class):
+ """Return a newly created or modified instance.
+
+ Keyword arguments:
+ env -- Provider Environment (pycimmb.ProviderEnvironment)
+ instance -- The new pywbem.CIMInstance. If modifying an existing
+ instance, the properties on this instance have been filtered by
+ the PropertyList from the request.
+ previous_instance -- The previous pywbem.CIMInstance if modifying
+ an existing instance. None if creating a new instance.
+ cim_class -- The pywbem.CIMClass
+
+ Return the new instance. The keys must be set on the new instance.
+
+ Possible Errors:
+ CIM_ERR_ACCESS_DENIED
+ CIM_ERR_NOT_SUPPORTED
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ or otherwise incorrect parameters)
+ CIM_ERR_ALREADY_EXISTS (the CIM Instance already exists -- only
+ valid if previous_instance is None, indicating that the operation
+ was CreateInstance)
+ CIM_ERR_NOT_FOUND (the CIM Instance does not exist -- only valid
+ if previous_instance is not None, indicating that the operation
+ was ModifyInstance)
+ CIM_ERR_FAILED (some other unspecified error occurred)
+
+ """
+
+ logger = env.get_logger()
+ logger.log_debug('Entering %s.set_instance()' \
+ % self.__class__.__name__)
+ # TODO create or modify the instance
+ raise pywbem.CIMError(pywbem.CIM_ERR_NOT_SUPPORTED) # Remove to implement
+ return instance
+
+ def delete_instance(self, env, instance_name):
+ """Delete an instance.
+
+ Keyword arguments:
+ env -- Provider Environment (pycimmb.ProviderEnvironment)
+ instance_name -- A pywbem.CIMInstanceName specifying the instance
+ to delete.
+
+ Possible Errors:
+ CIM_ERR_ACCESS_DENIED
+ CIM_ERR_NOT_SUPPORTED
+ CIM_ERR_INVALID_NAMESPACE
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ or otherwise incorrect parameters)
+ CIM_ERR_INVALID_CLASS (the CIM Class does not exist in the specified
+ namespace)
+ CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
+ Instance does not exist in the specified namespace)
+ CIM_ERR_FAILED (some other unspecified error occurred)
+
+ """
+
+ logger = env.get_logger()
+ logger.log_debug('Entering %s.delete_instance()' \
+ % self.__class__.__name__)
+
+ # TODO delete the resource
+ raise pywbem.CIMError(pywbem.CIM_ERR_NOT_SUPPORTED) # Remove to implement
+
+ def references(self, env, object_name, model, assoc_class,
+ result_class_name, role, result_role, keys_only):
+ """Instrument Associations.
+
+ All four association-related operations (Associators, AssociatorNames,
+ References, ReferenceNames) are mapped to this method.
+ This method is a python generator
+
+ Keyword arguments:
+ env -- Provider Environment (pycimmb.ProviderEnvironment)
+ object_name -- A pywbem.CIMInstanceName that defines the source
+ CIM Object whose associated Objects are to be returned.
+ model -- A template pywbem.CIMInstance to serve as a model
+ of the objects to be returned. Only properties present on this
+ model need to be set.
+ assoc_class -- The pywbem.CIMClass.
+ result_class_name -- If not empty, this string acts as a filter on
+ the returned set of Instances by mandating that each returned
+ Instances MUST represent an association between object_name
+ and an Instance of a Class whose name matches this parameter
+ or a subclass.
+ role -- If not empty, MUST be a valid Property name. It acts as a
+ filter on the returned set of Instances by mandating that each
+ returned Instance MUST refer to object_name via a Property
+ whose name matches the value of this parameter.
+ result_role -- If not empty, MUST be a valid Property name. It acts
+ as a filter on the returned set of Instances by mandating that
+ each returned Instance MUST represent associations of
+ object_name to other Instances, where the other Instances play
+ the specified result_role in the association (i.e. the
+ name of the Property in the Association Class that refers to
+ the Object related to object_name MUST match the value of this
+ parameter).
+ keys_only -- A boolean. True if only the key properties should be
+ set on the generated instances.
+
+ The following diagram may be helpful in understanding the role,
+ result_role, and result_class_name parameters.
+ +------------------------+ +-------------------+
+ | object_name.classname | | result_class_name |
+ | ~~~~~~~~~~~~~~~~~~~~~ | | ~~~~~~~~~~~~~~~~~ |
+ +------------------------+ +-------------------+
+ | +-----------------------------------+ |
+ | | [Association] assoc_class | |
+ | object_name | ~~~~~~~~~~~~~~~~~~~~~~~~~ | |
+ +--------------+ object_name.classname REF role | |
+ (CIMInstanceName) | result_class_name REF result_role +------+
+ | |(CIMInstanceName)
+ +-----------------------------------+
+
+ Possible Errors:
+ CIM_ERR_ACCESS_DENIED
+ CIM_ERR_NOT_SUPPORTED
+ CIM_ERR_INVALID_NAMESPACE
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ or otherwise incorrect parameters)
+ CIM_ERR_FAILED (some other unspecified error occurred)
+
+ """
+ logger = env.get_logger()
+ logger.log_debug('Entering %s.references()' \
+ % self.__class__.__name__)
+ ch = env.get_cimom_handle()
+ # This is a common pattern. YMMV
+ if (not role or role.lower() == 'capabilities') and \
+ pywbem.is_subclass(ch, object_name.namespace,
+ sub=object_name.classname,
+ super='OMC_AccountManagementCapabilities'):
+ model['Capabilities'] = object_name
+ serviceList = []
+ try:
+ """All the instances of OMC_UserAccountManagementService will be associated with OMC_AccountManagementCapbility which has instanceID: OMC:AccountCapability """
+ ch.EnumerateInstances('OMC_UserAccountManagementService', model.path.namespace, IncludeQualifiers=False, Handler=lambda inst:serviceList.append(inst))
+ except:
+ return
+ for serviceInstance in serviceList:
+ if(serviceInstance['CreationClassName'] == 'OMC_UserAccountManagementService'):
+ model['ManagedElement'] = serviceInstance.path
+ yield model # TODO: Yield association instances where
+ # object_name is capabilities.
+ # Only appropriate if object_name.classname
+ # is 'OMC_AccountManagementCapabilities' or a subclass.
+
+ if (not role or role.lower() == 'managedelement') and \
+ pywbem.is_subclass(ch, object_name.namespace,
+ sub=object_name.classname,
+ super='OMC_UserAccountManagementService'):
+ model['ManagedElement'] = object_name
+ capabilityList = []
+ try:
+ """All the instances of OMC_UserAccountManagementService will be associated with OMC_AccountManagementCapbility which has instanceID: OMC:AccountCapability """
+ ch.EnumerateInstances('OMC_AccountManagementCapabilities', model.path.namespace, IncludeQualifiers=False, Handler=lambda inst:capabilityList.append(inst))
+ except:
+ return
+ for capabilityInstance in capabilityList:
+ if(capabilityInstance['InstanceID'] == 'OMC:AccountCapability'):
+ model['Capabilities'] = capabilityInstance.path
+ yield model # TODO: Yield association instances where
+ # object_name is managedelement.
+ # Only appropriate if object_name.classname
+ # is 'OMC_UserAccountManagementService' or a subclass.
+
+ class Values(object):
+ class Characteristics(object):
+ Default = pywbem.Uint16(2)
+ Current = pywbem.Uint16(3)
+ # DMTF_Reserved = ..
+ # Vendor_Specific = 32768..65535
+
+## end of class OMC_AccountElementCapabilitiesProvider
+
+def get_providers(env):
+ omc_accountelementcapabilities_prov = OMC_AccountElementCapabilitiesProvider(env)
+ return {'OMC_AccountElementCapabilities': omc_accountelementcapabilities_prov}
Property changes on: pyprofiles/simpleIdentity/OMC_AccountElementCapabilities.py
___________________________________________________________________
Name: svn:executable
+ *
Added: pyprofiles/simpleIdentity/OMC_AccountElementCapabilities.reg
===================================================================
--- pyprofiles/simpleIdentity/OMC_AccountElementCapabilities.reg (rev 0)
+++ pyprofiles/simpleIdentity/OMC_AccountElementCapabilities.reg 2007-09-10 16:38:45 UTC (rev 488)
@@ -0,0 +1,9 @@
+// Provider registration for OMC_ElementCapabilities
+instance of OpenWBEM_PyProviderRegistration
+{
+ InstanceID = "OMC:OMC_AccountElementCapabilities:01";
+ NamespaceNames = {"root/cimv2"};
+ ClassName = "OMC_AccountElementCapabilities";
+ ProviderTypes = {1,3}; // Instance, Associator
+ ModulePath = "/usr/lib/pycim/OMC_AccountElementCapabilities.py";
+};
Property changes on: pyprofiles/simpleIdentity/OMC_AccountElementCapabilities.reg
___________________________________________________________________
Name: svn:executable
+ *
Added: pyprofiles/simpleIdentity/OMC_AccountManagementCapabilities.mof
===================================================================
--- pyprofiles/simpleIdentity/OMC_AccountManagementCapabilities.mof (rev 0)
+++ pyprofiles/simpleIdentity/OMC_AccountManagementCapabilities.mof 2007-09-10 16:38:45 UTC (rev 488)
@@ -0,0 +1,14 @@
+// <change cr="WIPCR00316.003" type="add">new class.</change>
+// ==================================================================
+// OMC_AccountManagementCapabilities
+// ==================================================================
+[Description (
+ "AccountManagementCapabilities describes the capabilities "
+ "supported for managing Accounts associated with an instance of "
+ "AccountManagementService. AccountManagementCapabilities is "
+ "associated with an instance of AccountManagementService "
+ "through the ElementCapabilities association.")]
+class OMC_AccountManagementCapabilities : CIM_AccountManagementCapabilities {
+
+};
+
Property changes on: pyprofiles/simpleIdentity/OMC_AccountManagementCapabilities.mof
___________________________________________________________________
Name: svn:executable
+ *
Added: pyprofiles/simpleIdentity/OMC_AccountManagementCapabilities.py
===================================================================
--- pyprofiles/simpleIdentity/OMC_AccountManagementCapabilities.py (rev 0)
+++ pyprofiles/simpleIdentity/OMC_AccountManagementCapabilities.py 2007-09-10 16:38:45 UTC (rev 488)
@@ -0,0 +1,355 @@
+"""Python Provider for OMC_AccountManagementCapabilities
+
+Instruments the CIM class OMC_AccountManagementCapabilities
+
+"""
+
+import pywbem
+import pwd
+
+class OMC_AccountManagementCapabilitiesProvider(pywbem.CIMProvider):
+ """Instrument the CIM class OMC_AccountManagementCapabilities
+
+ AccountManagementCapabilities describes the capabilities supported for
+ managing Accounts associated with an instance of
+ AccountManagementService. AccountManagementCapabilities is associated
+ with an instance of AccountManagementService through the
+ ElementCapabilities association.
+
+ """
+
+ def __init__ (self, env):
+ logger = env.get_logger()
+ logger.log_debug('Initializing provider %s from %s' \
+ % (self.__class__.__name__, __file__))
+ # If you will be filtering instances yourself according to
+ # property_list, role, result_role, and result_class_name
+ # parameters, set self.filter_results to False
+ # self.filter_results = False
+
+ def get_instance(self, env, model, cim_class):
+ """Return an instance.
+
+ Keyword arguments:
+ env -- Provider Environment (pycimmb.ProviderEnvironment)
+ model -- A template of the pywbem.CIMInstance to be returned. The
+ key properties are set on this instance to correspond to the
+ instanceName that was requested. The properties of the model
+ are already filtered according to the PropertyList from the
+ request. Only properties present in the model need to be
+ given values. If you prefer, you can set all of the
+ values, and the instance will be filtered for you.
+ cim_class -- The pywbem.CIMClass
+
+ Possible Errors:
+ CIM_ERR_ACCESS_DENIED
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ or otherwise incorrect parameters)
+ CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
+ Instance does not exist in the specified namespace)
+ CIM_ERR_FAILED (some other unspecified error occurred)
+
+ """
+
+ logger = env.get_logger()
+ logger.log_debug('Entering %s.get_instance()' \
+ % self.__class__.__name__)
+
+ #model['Caption'] = # TODO (type = unicode)
+ #model['Description'] = # TODO (type = unicode)
+ #model['ElementName'] = # TODO (type = unicode) (Required)
+ #model['ElementNameEditSupported'] = # TODO (type = bool)
+ #model['ElementNameMask'] = # TODO (type = unicode)
+ #model['MaxElementNameLen'] = # TODO (type = pywbem.Uint16)
+ #model['OperationsSupported'] = # TODO (type = [pywbem.Uint16,] self.Values.OperationsSupported)
+ model['ElementName'] = 'AccountManagementCapability'
+ model['ElementNameEditSupported'] = False
+ return model
+
+ def enum_instances(self, env, model, cim_class, keys_only):
+ """Enumerate instances.
+
+ The WBEM operations EnumerateInstances and EnumerateInstanceNames
+ are both mapped to this method.
+ This method is a python generator
+
+ Keyword arguments:
+ env -- Provider Environment (pycimmb.ProviderEnvironment)
+ model -- A template of the pywbem.CIMInstances to be generated.
+ The properties of the model are already filtered according to
+ the PropertyList from the request. Only properties present in
+ the model need to be given values. If you prefer, you can
+ always set all of the values, and the instance will be filtered
+ for you.
+ cim_class -- The pywbem.CIMClass
+ keys_only -- A boolean. True if only the key properties should be
+ set on the generated instances.
+
+ Possible Errors:
+ CIM_ERR_FAILED (some other unspecified error occurred)
+
+ """
+
+ logger = env.get_logger()
+ logger.log_debug('Entering %s.enum_instances()' \
+ % self.__class__.__name__)
+
+ #while true: # TODO more instances?
+ # TODO fetch system resource
+ # Key properties
+ model['InstanceID'] = 'OMC:AccountCapability'
+ if keys_only:
+ yield model
+ else:
+ try:
+ yield self.get_instance(env, model, cim_class)
+ except pywbem.CIMError, (num, msg):
+ if num not in (pywbem.CIM_ERR_NOT_FOUND,
+ pywbem.CIM_ERR_ACCESS_DENIED):
+ raise
+
+ def set_instance(self, env, instance, previous_instance, cim_class):
+ """Return a newly created or modified instance.
+
+ Keyword arguments:
+ env -- Provider Environment (pycimmb.ProviderEnvironment)
+ instance -- The new pywbem.CIMInstance. If modifying an existing
+ instance, the properties on this instance have been filtered by
+ the PropertyList from the request.
+ previous_instance -- The previous pywbem.CIMInstance if modifying
+ an existing instance. None if creating a new instance.
+ cim_class -- The pywbem.CIMClass
+
+ Return the new instance. The keys must be set on the new instance.
+
+ Possible Errors:
+ CIM_ERR_ACCESS_DENIED
+ CIM_ERR_NOT_SUPPORTED
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ or otherwise incorrect parameters)
+ CIM_ERR_ALREADY_EXISTS (the CIM Instance already exists -- only
+ valid if previous_instance is None, indicating that the operation
+ was CreateInstance)
+ CIM_ERR_NOT_FOUND (the CIM Instance does not exist -- only valid
+ if previous_instance is not None, indicating that the operation
+ was ModifyInstance)
+ CIM_ERR_FAILED (some other unspecified error occurred)
+
+ """
+
+ #logger = env.get_logger()
+ #logger.log_debug('Entering %s.set_instance()' \
+ # % self.__class__.__name__)
+ # TODO create or modify the instance
+ raise pywbem.CIMError(pywbem.CIM_ERR_NOT_SUPPORTED) # Remove to implement
+ #return instance
+
+ def delete_instance(self, env, instance_name):
+ """Delete an instance.
+
+ Keyword arguments:
+ env -- Provider Environment (pycimmb.ProviderEnvironment)
+ instance_name -- A pywbem.CIMInstanceName specifying the instance
+ to delete.
+
+ Possible Errors:
+ CIM_ERR_ACCESS_DENIED
+ CIM_ERR_NOT_SUPPORTED
+ CIM_ERR_INVALID_NAMESPACE
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ or otherwise incorrect parameters)
+ CIM_ERR_INVALID_CLASS (the CIM Class does not exist in the specified
+ namespace)
+ CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
+ Instance does not exist in the specified namespace)
+ CIM_ERR_FAILED (some other unspecified error occurred)
+
+ """
+
+ #logger = env.get_logger()
+ #logger.log_debug('Entering %s.delete_instance()' \
+ # % self.__class__.__name__)
+
+ # TODO delete the resource
+ raise pywbem.CIMError(pywbem.CIM_ERR_NOT_SUPPORTED) # Remove to implement
+
+ def cim_method_creategoalsettings(self, env, object_name, method,
+ param_supportedgoalsettings,
+ param_templategoalsettings):
+ """Implements OMC_AccountManagementCapabilities.CreateGoalSettings()
+
+ Method to create a set of supported SettingData elements, from two
+ sets of SettingData elements, provided by the caller. CreateGoal
+ should be used when the SettingData instances that represents the
+ goal will not persist beyond the execution of the client and where
+ those instances are not intended to be shared with other,
+ non-cooperating clients. Both TemplateGoalSettings and
+ SupportedGoalSettings are represented as strings containing
+ EmbeddedInstances of a CIM_SettingData subclass. These embedded
+ instances do not exist in the infrastructure supporting this
+ method but are maintained by the caller/client. This method
+ should return CIM_Error(s) representing that a single named
+ property of a setting (or other) parameter (either reference or
+ embedded object) has an invalid value or that an invalid
+ combination of named properties of a setting (or other) parameter
+ (either reference or embedded object) has been requested. If the
+ input TemplateGoalSettings is NULL or the empty string, this
+ method returns a default SettingData element that is supported by
+ this Capabilities element. If the TemplateGoalSettings specifies
+ values that cannot be supported, this method shall return an
+ appropriate CIM_Error and should return a best match for a
+ SupportedGoalSettings. The client proposes a goal using the
+ TemplateGoalSettings parameter and gets back Success if the
+ TemplateGoalSettings is exactly supportable. It gets back
+ "Alternative Proposed" if the output SupportedGoalSettings
+ represents a supported alternative. This alternative should be a
+ best match, as defined by the implementation. If the
+ implementation is conformant to a RegisteredProfile, then that
+ profile may specify the algorithms used to determine best match. A
+ client may compare the returned value of each property against the
+ requested value to determine if it is left unchanged, degraded or
+ upgraded. Otherwise, if the TemplateGoalSettings is not
+ applicable an "Invalid Parameter" error is returned. When a
+ mutually acceptable SupportedGoalSettings has been achieved, the
+ client may use the contained SettingData instances as input to
+ methods for creating a new object ormodifying an existing object.
+ Also the embedded SettingData instances returned in the
+ SupportedGoalSettings may be instantiated via CreateInstance,
+ either by a client or as a side-effect of the execution of an
+ extrinsic method for which the returned SupportedGoalSettings is
+ passed as an embedded instance.
+
+ Keyword arguments:
+ env -- Provider Environment (pycimmb.ProviderEnvironment)
+ object_name -- A pywbem.CIMInstanceName or pywbem.CIMCLassName
+ specifying the object on which the method CreateGoalSettings()
+ should be invoked.
+ method -- A pywbem.CIMMethod representing the method meta-data
+ param_supportedgoalsettings -- The input parameter SupportedGoalSettings (type pywbem.CIMInstance(classname='CIM_SettingData', ...))
+ SupportedGoalSettings are elements of class CIM_SettingData, or
+ a derived class. At most, one instance of each SettingData
+ subclass may be supplied. All SettingData instances provided
+ by this property are interpreted as a set, relative to this
+ Capabilities instance. To enable a client to provide
+ additional information towards achieving the
+ TemplateGoalSettings, an input set of SettingData instances
+ may be provided. If not provided, this property shall be set
+ to NULL on input.. Note that when provided, what property
+ values are changed, and how, is implementation dependent and
+ may be the subject of other standards. If provided, the input
+ SettingData instances must be ones that the implementation is
+ able to support relative to the ManagedElement associated via
+ ElementCapabilities. Typically, the input SettingData
+ instances are created by a previous instantiation of
+ CreateGoalSettings. If the input SupportedGoalSettings is not
+ supported by the implementation, then an "Invalid Parameter"
+ (5) error is returned by this call. In this case, a
+ corresponding CIM_ERROR should also be returned. On output,
+ this property is used to return the best supported match to
+ the TemplateGoalSettings. If the output SupportedGoalSettings
+ matches the input SupportedGoalSettings, then the
+ implementation is unable to improve further towards meeting
+ the TemplateGoalSettings.
+
+ param_templategoalsettings -- The input parameter TemplateGoalSettings (type pywbem.CIMInstance(classname='CIM_SettingData', ...))
+ If provided, TemplateGoalSettings are elements of class
+ CIM_SettingData, or a derived class, that is used as the
+ template to be matched. . At most, one instance of each
+ SettingData subclass may be supplied. All SettingData
+ instances provided by this property are interpreted as a set,
+ relative to this Capabilities instance. SettingData instances
+ that are not relevant to this instance are ignored. If not
+ provided, it shall be set to NULL. In that case, a SettingData
+ instance representing the default settings of the associated
+ ManagedElement is used.
+
+
+ Returns a two-tuple containing the return value (type pywbem.Uint16 self.Values.CreateGoalSettings)
+ and a dictionary with the out-parameters
+
+ Output parameters:
+ SupportedGoalSettings -- (type pywbem.CIMInstance(classname='CIM_SettingData', ...))
+ SupportedGoalSettings are elements of class CIM_SettingData, or
+ a derived class. At most, one instance of each SettingData
+ subclass may be supplied. All SettingData instances provided
+ by this property are interpreted as a set, relative to this
+ Capabilities instance. To enable a client to provide
+ additional information towards achieving the
+ TemplateGoalSettings, an input set of SettingData instances
+ may be provided. If not provided, this property shall be set
+ to NULL on input.. Note that when provided, what property
+ values are changed, and how, is implementation dependent and
+ may be the subject of other standards. If provided, the input
+ SettingData instances must be ones that the implementation is
+ able to support relative to the ManagedElement associated via
+ ElementCapabilities. Typically, the input SettingData
+ instances are created by a previous instantiation of
+ CreateGoalSettings. If the input SupportedGoalSettings is not
+ supported by the implementation, then an "Invalid Parameter"
+ (5) error is returned by this call. In this case, a
+ corresponding CIM_ERROR should also be returned. On output,
+ this property is used to return the best supported match to
+ the TemplateGoalSettings. If the output SupportedGoalSettings
+ matches the input SupportedGoalSettings, then the
+ implementation is unable to improve further towards meeting
+ the TemplateGoalSettings.
+
+
+ Possible Errors:
+ CIM_ERR_ACCESS_DENIED
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate,
+ unrecognized or otherwise incorrect parameters)
+ CIM_ERR_NOT_FOUND (the target CIM Class or instance does not
+ exist in the specified namespace)
+ CIM_ERR_METHOD_NOT_AVAILABLE (the CIM Server is unable to honor
+ the invocation request)
+ CIM_ERR_FAILED (some other unspecified error occurred)
+
+ """
+
+ logger = env.get_logger()
+ logger.log_debug('Entering %s.cim_method_creategoalsettings()' \
+ % self.__class__.__name__)
+
+ # TODO do something
+ raise pywbem.CIMError(pywbem.CIM_ERR_METHOD_NOT_AVAILABLE) # Remove to implemented
+ out_params = {}
+ #out_params['supportedgoalsettings'] = # TODO (type pywbem.CIMInstance(classname='CIM_SettingData', ...))
+ rval = None # TODO (type pywbem.Uint16 self.Values.CreateGoalSettings)
+ return (rval, out_params)
+
+ class Values(object):
+ class RequestedStatesSupported(object):
+ Enabled = pywbem.Uint16(2)
+ Disabled = pywbem.Uint16(3)
+ Shut_Down = pywbem.Uint16(4)
+ Offline = pywbem.Uint16(6)
+ Test = pywbem.Uint16(7)
+ Defer = pywbem.Uint16(8)
+ Quiesce = pywbem.Uint16(9)
+ Reboot = pywbem.Uint16(10)
+ Reset = pywbem.Uint16(11)
+
+ class CreateGoalSettings(object):
+ Success = pywbem.Uint16(0)
+ Not_Supported = pywbem.Uint16(1)
+ Unknown = pywbem.Uint16(2)
+ Timeout = pywbem.Uint16(3)
+ Failed = pywbem.Uint16(4)
+ Invalid_Parameter = pywbem.Uint16(5)
+ Alternative_Proposed = pywbem.Uint16(6)
+ # DMTF_Reserved = ..
+ # Vendor_Specific = 32768..65535
+
+ class OperationsSupported(object):
+ Create = pywbem.Uint16(2)
+ Modify = pywbem.Uint16(3)
+ Delete = pywbem.Uint16(4)
+ # DMTF_Reserved = ..
+ # Vendor_Reserved = 0x8000..0xFFFF
+
+## end of class OMC_AccountManagementCapabilitiesProvider
+
+def get_providers(env):
+ omc_accountmanagementcapabilities_prov = OMC_AccountManagementCapabilitiesProvider(env)
+ return {'OMC_AccountManagementCapabilities': omc_accountmanagementcapabilities_prov}
Property changes on: pyprofiles/simpleIdentity/OMC_AccountManagementCapabilities.py
___________________________________________________________________
Name: svn:executable
+ *
Added: pyprofiles/simpleIdentity/OMC_AccountManagementCapabilities.reg
===================================================================
--- pyprofiles/simpleIdentity/OMC_AccountManagementCapabilities.reg (rev 0)
+++ pyprofiles/simpleIdentity/OMC_AccountManagementCapabilities.reg 2007-09-10 16:38:45 UTC (rev 488)
@@ -0,0 +1,9 @@
+// Provider registration for OMC_AccountManagementCapabilities
+instance of OpenWBEM_PyProviderRegistration
+{
+ InstanceID = "OMC:OMC_AccountManagementCapabilities:01";
+ NamespaceNames = {"root/cimv2"};
+ ClassName = "OMC_AccountManagementCapabilities";
+ P...
[truncated message content] |
|
From: <np...@us...> - 2007-09-10 16:37:54
|
Revision: 487
http://omc.svn.sourceforge.net/omc/?rev=487&view=rev
Author: npaxton
Date: 2007-09-10 09:37:58 -0700 (Mon, 10 Sep 2007)
Log Message:
-----------
omctools version updates
Modified Paths:
--------------
tools/trunk/configure.ac
tools/trunk/omctools.spec
Modified: tools/trunk/configure.ac
===================================================================
--- tools/trunk/configure.ac 2007-09-10 16:37:15 UTC (rev 486)
+++ tools/trunk/configure.ac 2007-09-10 16:37:58 UTC (rev 487)
@@ -2,8 +2,8 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.57)
-AC_INIT(omctools, 1.0.2)
-AM_INIT_AUTOMAKE(omctools, 1.0.2)
+AC_INIT(omctools, 1.0.3)
+AM_INIT_AUTOMAKE(omctools, 1.0.3)
AC_CONFIG_SRCDIR([cimtester/src/getInstanceTest.cpp])
AC_CONFIG_HEADER([config.h])
Modified: tools/trunk/omctools.spec
===================================================================
--- tools/trunk/omctools.spec 2007-09-10 16:37:15 UTC (rev 486)
+++ tools/trunk/omctools.spec 2007-09-10 16:37:58 UTC (rev 487)
@@ -2,8 +2,8 @@
Name: omctools
BuildRequires: gcc-c++ openwbem-devel openssl-devel readline-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Version: 1.0.1
-Release: 2
+Version: 1.0.3
+Release: 1
License: LGPL
#Copyright: Novell Inc.
Group: System/Management
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <np...@us...> - 2007-09-10 16:37:29
|
Revision: 486
http://omc.svn.sourceforge.net/omc/?rev=486&view=rev
Author: npaxton
Date: 2007-09-10 09:37:15 -0700 (Mon, 10 Sep 2007)
Log Message:
-----------
minor changes to configure.ac
Modified Paths:
--------------
cmpibase/trunk/configure.ac
Modified: cmpibase/trunk/configure.ac
===================================================================
--- cmpibase/trunk/configure.ac 2007-09-10 16:20:08 UTC (rev 485)
+++ cmpibase/trunk/configure.ac 2007-09-10 16:37:15 UTC (rev 486)
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.57)
-AC_INIT(omccmpi, 1.0.1)
+AC_INIT(cmpibase, 1.0.0)
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([src])
AC_CONFIG_HEADER([config.h])
@@ -153,7 +153,7 @@
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h sys/time.h openssl/evp.h sys/param.h sys/vfs.h],,[AC_MSG_ERROR(Missing headers: likely won't compile)])
+AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h sys/time.h sys/param.h sys/vfs.h],,[AC_MSG_ERROR(Missing headers: likely won't compile)])
AC_LANG_CPLUSPLUS
AC_CHECK_HEADERS([cimple/cimple.h],[HAVE_CIMPLE="1"],[HAVE_CIMPLE="0"])
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bc...@us...> - 2007-09-10 16:20:05
|
Revision: 485
http://omc.svn.sourceforge.net/omc/?rev=485&view=rev
Author: bcwise
Date: 2007-09-10 09:20:08 -0700 (Mon, 10 Sep 2007)
Log Message:
-----------
REMOVED commented out code. This code was commented out for debugging,
but was not uncommented.
CHANGED some of the references to structure elements, because the
elements changed.
Modified Paths:
--------------
base/branches/1.0/src/providers/operating-system/linux_os.cpp
Modified: base/branches/1.0/src/providers/operating-system/linux_os.cpp
===================================================================
--- base/branches/1.0/src/providers/operating-system/linux_os.cpp 2007-09-05 14:27:05 UTC (rev 484)
+++ base/branches/1.0/src/providers/operating-system/linux_os.cpp 2007-09-10 16:20:08 UTC (rev 485)
@@ -126,7 +126,6 @@
* Function: read_distro_info
*
*/
-#if 0
void
read_distro_info()
{
@@ -141,7 +140,7 @@
output = "";
String cmd = "/bin/rpm -q ";
- cmd += install_rpm_data[i].file.c_str();
+ cmd += install_rpm_data[i].file;
try
{
@@ -166,7 +165,7 @@
// and desc for all distros
for(i = 0; i < INSTALL_FILE_DATA_SIZE; i++)
{
- ifstream ifstr(install_file_data[i].file.c_str(), std::ios::in);
+ ifstream ifstr(install_file_data[i].file, std::ios::in);
if (!ifstr)
{
continue;
@@ -220,7 +219,6 @@
g_bDistroInfoRead = true;
}
-#endif
@@ -228,7 +226,6 @@
* Function: get_distro_name
*
*/
-#if 0
String
get_distro_name()
{
@@ -236,14 +233,12 @@
read_distro_info();
return g_cim_os_distro_name;
} // get_distro_element_name()
-#endif
/*---------------------------------------------------------------------------
* Function: get_distro_element_name
*
*/
-#if 0
String
get_distro_element_name()
{
@@ -251,14 +246,12 @@
read_distro_info();
return g_cim_os_distro_element_name;
} // get_distro_element_name()
-#endif
/*---------------------------------------------------------------------------
* Function: get_distro_desc
*
*/
-#if 0
String
get_distro_desc()
{
@@ -266,7 +259,6 @@
read_distro_info();
return g_cim_os_distro_desc;
} // get_distro_desc()
-#endif
/*---------------------------------------------------------------------------
@@ -464,12 +456,8 @@
String
LinuxOperatingSystem::getDescription()
{
-#if 0
//return "A class derived from OperatingSystem to represents the running Linux OS.";
return get_distro_desc();
-#else
- return String("");
-#endif
} // LinuxOperatingSystem::getDescription()
@@ -481,11 +469,7 @@
String
LinuxOperatingSystem::getElementName()
{
-#if 0
return get_distro_element_name();
-#else
- return String();
-#endif
} // LinuxOperatingSystem::getElementName()
@@ -497,11 +481,7 @@
String
LinuxOperatingSystem::getDistroName()
{
-#if 0
return get_distro_name();
-#else
- return String();
-#endif
} // LinuxOperatingSystem::getDistroName()
@@ -566,7 +546,6 @@
CIMDateTime
LinuxOperatingSystem::getInstallDate()
{
-#if 0
int i;
/*
@@ -574,9 +553,9 @@
*/
for(i = 0;i < (int) (sizeof(install_rpm_data) / sizeof(distro_file_t)); i++) {
//if(strstr(CIM_OS_DISTRO, install_rpm_data[i].distro.c_str()) != NULL) {
- if (get_distro_name().indexOf(install_rpm_data[i].distro.c_str()) != String::npos) {
+ if (get_distro_name().indexOf(install_rpm_data[i].distro) != String::npos) {
String cmd = "/bin/rpm -q --queryformat %{INSTALLTIME} ";
- cmd += install_rpm_data[i].file.c_str();
+ cmd += install_rpm_data[i].file;
PopenStreams pos = Exec::safePopen(cmd.tokenize());
String output = pos.out()->readAll();
@@ -597,17 +576,16 @@
#endif
for(i = 0;i < (int) (sizeof(install_file_data) / sizeof(distro_file_t)); i++) {
#if LOCAL_DEBUG
- fprintf(stderr, "install_data: distro: %s\n", install_file_data[i].distro.c_str());
- fprintf(stderr, "install_data: file: %s\n", install_file_data[i].file.c_str());
+ fprintf(stderr, "install_data: distro: %s\n", install_file_data[i].distro);
+ fprintf(stderr, "install_data: file: %s\n", install_file_data[i].file);
#endif
- if(install_file_data[i].file.length()) {
+ if(strlen(install_file_data[i].file)) {
struct stat statbuf;
- if(::stat(install_file_data[i].file.c_str(), &statbuf) == 0) {
+ if(::stat(install_file_data[i].file, &statbuf) == 0) {
return CIMDateTime(DateTime((time_t) statbuf.st_mtime));
}
}
}
-#endif
return CIMDateTime();
} // LinuxOperatingSystem::getInstallDate()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bc...@us...> - 2007-09-05 14:27:08
|
Revision: 484
http://omc.svn.sourceforge.net/omc/?rev=484&view=rev
Author: bcwise
Date: 2007-09-05 07:27:05 -0700 (Wed, 05 Sep 2007)
Log Message:
-----------
Changed some structures that were using OpenWBEM Strings to c-style
strings. This was used to fix a problem that was occuring when OpenWBEM
was initializing the library. Some of the library's static data was
found corrupting other data on the heap.
Modified Paths:
--------------
base/branches/1.0/src/providers/operating-system/linux_os.cpp
base/branches/1.0/src/providers/operating-system/linuxos.cpp
Modified: base/branches/1.0/src/providers/operating-system/linux_os.cpp
===================================================================
--- base/branches/1.0/src/providers/operating-system/linux_os.cpp 2007-08-20 16:29:08 UTC (rev 483)
+++ base/branches/1.0/src/providers/operating-system/linux_os.cpp 2007-09-05 14:27:05 UTC (rev 484)
@@ -64,23 +64,23 @@
} meminfo_t;
typedef struct {
- String distro; // Distribution name.
- String file; // rpm file name to check.
+ const char *distro; // Distribution name.
+ const char *file; // rpm file name to check.
} distro_file_t;
// List of distros & associated rpms that are installed (used to get install time).
distro_file_t install_rpm_data[] = {
- {"redhat", "redhat-release"},
+ {"redhat", "redhat-release"},
{"redhat-as", "redhat-release-as"},
- {"sles", "sles-release"},
- {"suse", "suse-release"},
- {"sled", "sled-release"},
- {"fedora", "fedora-release"},
- {"mandrake","mandrake-release"},
- {"mandriva","mandriva-release"},
- {"freebsd", "freebsd-release"},
- {"centos", "centos-release"},
- {"xandros", "xandros-release"},
+ {"sles", "sles-release"},
+ {"suse", "suse-release"},
+ {"sled", "sled-release"},
+ {"fedora", "fedora-release"},
+ {"mandrake", "mandrake-release"},
+ {"mandriva", "mandriva-release"},
+ {"freebsd", "freebsd-release"},
+ {"centos", "centos-release"},
+ {"xandros", "xandros-release"},
};
#define INSTALL_RPM_DATA_SIZE ((int)(sizeof(install_rpm_data) / sizeof(distro_file_t)))
@@ -126,6 +126,7 @@
* Function: read_distro_info
*
*/
+#if 0
void
read_distro_info()
{
@@ -219,6 +220,7 @@
g_bDistroInfoRead = true;
}
+#endif
@@ -226,6 +228,7 @@
* Function: get_distro_name
*
*/
+#if 0
String
get_distro_name()
{
@@ -233,12 +236,14 @@
read_distro_info();
return g_cim_os_distro_name;
} // get_distro_element_name()
+#endif
/*---------------------------------------------------------------------------
* Function: get_distro_element_name
*
*/
+#if 0
String
get_distro_element_name()
{
@@ -246,12 +251,14 @@
read_distro_info();
return g_cim_os_distro_element_name;
} // get_distro_element_name()
+#endif
/*---------------------------------------------------------------------------
* Function: get_distro_desc
*
*/
+#if 0
String
get_distro_desc()
{
@@ -259,6 +266,7 @@
read_distro_info();
return g_cim_os_distro_desc;
} // get_distro_desc()
+#endif
/*---------------------------------------------------------------------------
@@ -456,8 +464,12 @@
String
LinuxOperatingSystem::getDescription()
{
+#if 0
//return "A class derived from OperatingSystem to represents the running Linux OS.";
return get_distro_desc();
+#else
+ return String("");
+#endif
} // LinuxOperatingSystem::getDescription()
@@ -469,7 +481,11 @@
String
LinuxOperatingSystem::getElementName()
{
+#if 0
return get_distro_element_name();
+#else
+ return String();
+#endif
} // LinuxOperatingSystem::getElementName()
@@ -481,7 +497,11 @@
String
LinuxOperatingSystem::getDistroName()
{
+#if 0
return get_distro_name();
+#else
+ return String();
+#endif
} // LinuxOperatingSystem::getDistroName()
@@ -546,6 +566,7 @@
CIMDateTime
LinuxOperatingSystem::getInstallDate()
{
+#if 0
int i;
/*
@@ -586,6 +607,7 @@
}
}
}
+#endif
return CIMDateTime();
} // LinuxOperatingSystem::getInstallDate()
@@ -639,7 +661,6 @@
}
return CIMDateTime();
-
} // LinuxOperatingSystem::getLocalDateTime()
@@ -827,8 +848,12 @@
String
LinuxOperatingSystem::getOtherTypeDescription()
{
+#if 1
char *s = "";
return s;
+#else
+ return String();
+#endif
} // LinuxOperatingSystem::getOtherTypeDescription()
@@ -935,7 +960,11 @@
String
LinuxOperatingSystem::getStatus()
{
+#if 1
return("NULL");
+#else
+ return String();
+#endif
} // LinuxOperatingSystem::getStatus()
@@ -990,6 +1019,7 @@
LinuxOperatingSystem::getVersion()
{
+#if 1
struct utsname puname;
String rval = "";
@@ -1000,6 +1030,9 @@
rval = puname.release;
return rval;
+#else
+ return String();
+#endif
} // LinuxOperatingSystem::getVersion()
Modified: base/branches/1.0/src/providers/operating-system/linuxos.cpp
===================================================================
--- base/branches/1.0/src/providers/operating-system/linuxos.cpp 2007-08-20 16:29:08 UTC (rev 483)
+++ base/branches/1.0/src/providers/operating-system/linuxos.cpp 2007-09-05 14:27:05 UTC (rev 484)
@@ -271,7 +271,7 @@
const CIMClass &cimClass )
{
#if LOCAL_DEBUG
- cout << "\n\n**** enumInstances\n\n";
+ DebugPrintFunctionEnter("enumInstances");
#endif
CIMInstance inst = CreateLinuxOSInst(cimClass);
@@ -317,7 +317,8 @@
DebugPrintFunctionEnter("getInstance");
#endif
- CIMInstance inst = CreateLinuxOSInst(cimClass);
+ CIMInstance inst = cimClass.newInstance();
+
return inst.clone(localOnly, includeQualifiers, includeClassOrigin, propertyList);
} // getInstance()
@@ -610,16 +611,17 @@
CIMInstance instance = cimClass.newInstance();
lib_proc_stat_map_t *lib_proc_stat_map;
- procStat.GetProcStatMap(&lib_proc_stat_map);
-
#if LOCAL_DEBUG
DebugPrintFunctionEnter("CreateLinuxOSInst");
#endif
+ procStat.GetProcStatMap(&lib_proc_stat_map);
+
instance.setProperty("CSCreationClassName", CIMValue(getComputerSystemClassName()));
instance.setProperty("CSName", CIMValue(getComputerSystemName()));
instance.setProperty("CreationClassName", CIMValue(getOperatingSystemClassName()));
instance.setProperty("Name", CIMValue(getOperatingSystemName()));
+
// can't currently use this, because Process uses hard-coded object paths with 'Linux'
// need to fix that, then change this.
//instance.setProperty("Name", CIMValue(los_obj.getDistroName()));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|