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
|
From: <np...@us...> - 2007-02-01 17:55:31
|
Revision: 432 http://svn.sourceforge.net/omc/?rev=432&view=rev Author: npaxton Date: 2007-02-01 09:55:26 -0800 (Thu, 01 Feb 2007) Log Message: ----------- Change CIM_SoftwareIdentityCollection to CIM_SystemSpecificCollection: SoftwareIdentityCollection was removed from the cimv2.14 exp. schema. All refs to it revert back to CIM_SystemSpecificCollection Modified Paths: -------------- schema/branches/1.0/mof/smash/omc-firmware-inventory-profile.mof Modified: schema/branches/1.0/mof/smash/omc-firmware-inventory-profile.mof =================================================================== --- schema/branches/1.0/mof/smash/omc-firmware-inventory-profile.mof 2007-02-01 17:50:42 UTC (rev 431) +++ schema/branches/1.0/mof/smash/omc-firmware-inventory-profile.mof 2007-02-01 17:55:26 UTC (rev 432) @@ -14,8 +14,12 @@ Description ( "SoftwareIdentityCollection for installed firmware") ] class OMC_InstalledFirmwareIdentityCollection - : CIM_SoftwareIdentityCollection -{ + : CIM_SystemSpecificCollection + // NOTE: This was previously CIM_SoftwareIdentityCollection, but + // that class was removed from the cimv2.14 exp version of the + // schema. All refs to SoftwareIdentityCollection revert back + // to CIM_SystemSpecificCollection +{ }; // ================================================================== @@ -25,7 +29,11 @@ Description ( "SoftwareIdentityCollection for available firmware") ] class OMC_AvailableFirmwareIdentityCollection - : CIM_SoftwareIdentityCollection + : CIM_SystemSpecificCollection + // NOTE: This was previously CIM_SoftwareIdentityCollection, but + // that class was removed from the cimv2.14 exp version of the + // schema. All refs to SoftwareIdentityCollection revert back + // to CIM_SystemSpecificCollection { }; @@ -37,7 +45,11 @@ "SoftwareIdentityCollection for firmware images that are " "available for remote systems") ] class OMC_ServableFirmwareIdentityCollection - : CIM_SoftwareIdentityCollection + : CIM_SystemSpecificCollection + // NOTE: This was previously CIM_SoftwareIdentityCollection, but + // that class was removed from the cimv2.14 exp version of the + // schema. All refs to SoftwareIdentityCollection revert back + // to CIM_SystemSpecificCollection { }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <np...@us...> - 2007-02-01 17:50:49
|
Revision: 431 http://svn.sourceforge.net/omc/?rev=431&view=rev Author: npaxton Date: 2007-02-01 09:50:42 -0800 (Thu, 01 Feb 2007) Log Message: ----------- Change CIM_SoftwareIdentityCollection to CIM_SystemSpecificCollection: SoftwareIdentityCollection was removed from the cimv2.14 exp. schema. All refs to it revert back to CIM_SystemSpecificCollection Modified Paths: -------------- smash/branches/1.0/src/providers/base-server-profile/Notes.txt smash/branches/1.0/src/providers/firmware-inventory-profile/HostedFirmwareCollection.cpp smash/branches/1.0/src/providers/firmware-inventory-profile/RegisteredFirmwareInvProfile.cpp Modified: smash/branches/1.0/src/providers/base-server-profile/Notes.txt =================================================================== --- smash/branches/1.0/src/providers/base-server-profile/Notes.txt 2007-02-01 17:45:21 UTC (rev 430) +++ smash/branches/1.0/src/providers/base-server-profile/Notes.txt 2007-02-01 17:50:42 UTC (rev 431) @@ -13,7 +13,10 @@ CIM_LogicalDevice (From various other profiles) Novell_SystemTimeService (CIM_TimeService) CIM_ConcreteCollection (System Collection Profile) -CIM_SoftwareIdentityCollection (SystemCollectionProfile) +// NOTE: This was previously CIM_SoftwareIdentityCollection, but that class +// was removed from the cim experimental schema in cim v 2.14. All refs to +// that class revert back to parent class: CIM_SystemSpecificCollection +CIM_SystemSpecificCollection (SystemCollectionProfile) Profile Associations: Novell_HostedTimeService (CIM_HostedService) Modified: smash/branches/1.0/src/providers/firmware-inventory-profile/HostedFirmwareCollection.cpp =================================================================== --- smash/branches/1.0/src/providers/firmware-inventory-profile/HostedFirmwareCollection.cpp 2007-02-01 17:45:21 UTC (rev 430) +++ smash/branches/1.0/src/providers/firmware-inventory-profile/HostedFirmwareCollection.cpp 2007-02-01 17:50:42 UTC (rev 431) @@ -179,11 +179,14 @@ } else { - // If this is the CIM_SoftwareIdentityCollection or one + // If this is the CIM_SystemSpecificCollection or one // of it's base classes, then do all // OMC_XXXFirmwareIdentityCollection classes + // NOTE: This was previously CIM_SoftwareIdentityCollection, but that class + // was removed from the cim experimental schema in cim v 2.14. All refs to + // that class revert back to parent class: CIM_SystemSpecificCollection if (!OMC::CIMUtils::classIsDerivedFrom( - "CIM_SoftwareIdentityCollection", resultClass, + "CIM_SystemSpecificCollection", resultClass, env->getCIMOMHandle(), ns)) { return; Modified: smash/branches/1.0/src/providers/firmware-inventory-profile/RegisteredFirmwareInvProfile.cpp =================================================================== --- smash/branches/1.0/src/providers/firmware-inventory-profile/RegisteredFirmwareInvProfile.cpp 2007-02-01 17:45:21 UTC (rev 430) +++ smash/branches/1.0/src/providers/firmware-inventory-profile/RegisteredFirmwareInvProfile.cpp 2007-02-01 17:50:42 UTC (rev 431) @@ -211,11 +211,14 @@ } else { - // If this is the CIM_SoftwareIdentityCollection or one + // If this is the CIM_SystemSpecificCollection or one // of it's base classes, then do all // OMC_XXXFirmwareIdentityCollection classes + // NOTE: This was previously CIM_SoftwareIdentityCollection, but that class + // was removed from the cim experimental schema in cim v 2.14. All refs to + // that class revert back to parent class: CIM_SystemSpecificCollection if (!OMC::CIMUtils::classIsDerivedFrom( - "CIM_SoftwareIdentityCollection", resultClass, + "CIM_SystemSpecificCollection", resultClass, env->getCIMOMHandle(), ns)) { return; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <np...@us...> - 2007-02-01 17:45:25
|
Revision: 430 http://svn.sourceforge.net/omc/?rev=430&view=rev Author: npaxton Date: 2007-02-01 09:45:21 -0800 (Thu, 01 Feb 2007) Log Message: ----------- fix ipmi crash Modified Paths: -------------- smash/branches/1.0/src/lib/omc-ipmi/IpmiIfcFru.cpp Modified: smash/branches/1.0/src/lib/omc-ipmi/IpmiIfcFru.cpp =================================================================== --- smash/branches/1.0/src/lib/omc-ipmi/IpmiIfcFru.cpp 2007-01-29 23:32:37 UTC (rev 429) +++ smash/branches/1.0/src/lib/omc-ipmi/IpmiIfcFru.cpp 2007-02-01 17:45:21 UTC (rev 430) @@ -286,7 +286,8 @@ IpmiIfcFruInstantiateAll(ipmi_drv *drv) { ipmiifc_sdr_list *sdr; - + int cc = 0; + UInt32 saveAddress = drv->target_addr; UInt8 saveLun = drv->target_lun; UInt8 saveChannel = drv->target_channel; @@ -311,7 +312,6 @@ for (int retries=5;retries;retries-- ) { - int cc; cc=IpmiIfcFruGetInv(drv, sdr->record.fruloc->device_id); if (cc==0xc3) // retry if timeout { @@ -320,16 +320,20 @@ } break; } - IpmiFruOptionalRefArray optRefArray = IpmiIfcFruParseOptional(); + + if(cc == 0) + { + IpmiFruOptionalRefArray optRefArray = IpmiIfcFruParseOptional(); - IpmiFruRef sref; - sref = new IpmiFru((int)sdr->length, - (unsigned char *)sdr->record.full); - sref->setOptionalRefArray(optRefArray); - IpmiFruOptionalRefArray tmpRefArray; - tmpRefArray = sref->getOptionalRefArray(); + IpmiFruRef sref; + sref = new IpmiFru((int)sdr->length, + (unsigned char *)sdr->record.full); + sref->setOptionalRefArray(optRefArray); + IpmiFruOptionalRefArray tmpRefArray; + tmpRefArray = sref->getOptionalRefArray(); - g_fruArray.append(sref); + g_fruArray.append(sref); + } } drv->target_addr = saveAddress; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bni...@us...> - 2007-01-29 23:32:36
|
Revision: 429 http://svn.sourceforge.net/omc/?rev=429&view=rev Author: bnicholes Date: 2007-01-29 15:32:37 -0800 (Mon, 29 Jan 2007) Log Message: ----------- Relicense the composite device provider (aka. aggregator) as BSD Modified Paths: -------------- LICENSE Modified: LICENSE =================================================================== --- LICENSE 2007-01-29 23:31:55 UTC (rev 428) +++ LICENSE 2007-01-29 23:32:37 UTC (rev 429) @@ -1,9 +1,8 @@ OMC is a project with many modules / sub-projects. As such it is constrained by various open-source licenses. Primarily, license differences will occur at the sub-project level. However, even within a project, some files may have a more restrictive license than the primary license for the project, for various reasons. -For example, within the SMASH sub-project, which is primarily BSD license, the composite-device provider code is constrained by the GPL license. -Likewise, in the BASE sub-project, the syslogng provider is necessarily constrained by the GPL license, as it uses GPL code from syslogng. -This is not meant to be a complete list of license 'abnormalities', but rather just a few examples. +For example, in the BASE sub-project, the syslogng provider is necessarily constrained by the GPL license, as it uses GPL code from syslogng. +This is not meant to be a complete list of license 'abnormalities', but rather just an example. If your use of the code requires such, please pay attention to the license for each file. Below are some of the license notices you will encounter throughout the OMC project: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bni...@us...> - 2007-01-29 23:31:58
|
Revision: 428 http://svn.sourceforge.net/omc/?rev=428&view=rev Author: bnicholes Date: 2007-01-29 15:31:55 -0800 (Mon, 29 Jan 2007) Log Message: ----------- Relicense the composite device provider (aka. aggregator) as BSD Modified Paths: -------------- smash/branches/1.0/LICENSE smash/branches/1.0/src/providers/device/composite-device/CompositeAssociations.cpp smash/branches/1.0/src/providers/device/composite-device/CompositeCapabilitiesProvider.cpp smash/branches/1.0/src/providers/device/composite-device/CompositeCapabilitiesProvider.hpp smash/branches/1.0/src/providers/device/composite-device/CompositeDeviceProvider.cpp smash/branches/1.0/src/providers/device/composite-device/CompositeDeviceProvider.hpp smash/branches/1.0/src/providers/device/composite-device/CompositeMethods.cpp smash/branches/1.0/src/providers/device/composite-device/MergeInstances.cpp smash/branches/1.0/src/providers/device/composite-device/MergeInstances.hpp smash/branches/1.0/src/providers/device/composite-device/ResultHandlers.cpp smash/branches/1.0/src/providers/device/composite-device/ResultHandlers.hpp smash/trunk/LICENSE smash/trunk/src/providers/device/composite-device/CompositeAssociations.cpp smash/trunk/src/providers/device/composite-device/CompositeCapabilitiesProvider.cpp smash/trunk/src/providers/device/composite-device/CompositeCapabilitiesProvider.hpp smash/trunk/src/providers/device/composite-device/CompositeDeviceProvider.cpp smash/trunk/src/providers/device/composite-device/CompositeDeviceProvider.hpp smash/trunk/src/providers/device/composite-device/CompositeMethods.cpp smash/trunk/src/providers/device/composite-device/MergeInstances.cpp smash/trunk/src/providers/device/composite-device/MergeInstances.hpp smash/trunk/src/providers/device/composite-device/ResultHandlers.cpp smash/trunk/src/providers/device/composite-device/ResultHandlers.hpp Modified: smash/branches/1.0/LICENSE =================================================================== --- smash/branches/1.0/LICENSE 2007-01-18 01:17:01 UTC (rev 427) +++ smash/branches/1.0/LICENSE 2007-01-29 23:31:55 UTC (rev 428) @@ -1,6 +1,4 @@ OMC-Smash is primarily BSD. -However, within this project, some files have a more restrictive license (GPL). -* Composite-Device Provider Code Please pay attention to the license for each file. Modified: smash/branches/1.0/src/providers/device/composite-device/CompositeAssociations.cpp =================================================================== --- smash/branches/1.0/src/providers/device/composite-device/CompositeAssociations.cpp 2007-01-18 01:17:01 UTC (rev 427) +++ smash/branches/1.0/src/providers/device/composite-device/CompositeAssociations.cpp 2007-01-29 23:31:55 UTC (rev 428) @@ -1,22 +1,33 @@ -/**************************************************************************** -* Copyright (c) 2005,2006 Novell, Inc. -* All Rights Reserved. +/****************************************************************************** +* Copyright (c) 2005,2006, Novell, Inc. All rights reserved. * -* This program is free software; you can redistribute it and/or -* modify it under the terms of version 2 of the GNU General Public License as -* published by the Free Software Foundation. +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* - Redistributions of source code must retain the above copyright notice, +* this list of conditions and the following disclaimer. * -* You should have received a copy of the GNU General Public License -* along with this program; if not, contact Novell, Inc. +* - 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. * -* To contact Novell about this file by physical or electronic mail, -* you may find current contact information at www.novell.com -****************************************************************************/ +* - Neither the name of Novell 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 THE COPYRIGHT OWNER OR 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. +******************************************************************************/ #include <openwbem/OW_CppSimpleAssociatorProviderIFC.hpp> #include <openwbem/OW_CIMValue.hpp> Modified: smash/branches/1.0/src/providers/device/composite-device/CompositeCapabilitiesProvider.cpp =================================================================== --- smash/branches/1.0/src/providers/device/composite-device/CompositeCapabilitiesProvider.cpp 2007-01-18 01:17:01 UTC (rev 427) +++ smash/branches/1.0/src/providers/device/composite-device/CompositeCapabilitiesProvider.cpp 2007-01-29 23:31:55 UTC (rev 428) @@ -1,22 +1,33 @@ -/**************************************************************************** -* Copyright (c) 2005,2006 Novell, Inc. -* All Rights Reserved. +/****************************************************************************** +* Copyright (c) 2005,2006, Novell, Inc. All rights reserved. * -* This program is free software; you can redistribute it and/or -* modify it under the terms of version 2 of the GNU General Public License as -* published by the Free Software Foundation. +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* - Redistributions of source code must retain the above copyright notice, +* this list of conditions and the following disclaimer. * -* You should have received a copy of the GNU General Public License -* along with this program; if not, contact Novell, Inc. +* - 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. * -* To contact Novell about this file by physical or electronic mail, -* you may find current contact information at www.novell.com -****************************************************************************/ +* - Neither the name of Novell 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 THE COPYRIGHT OWNER OR 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. +******************************************************************************/ #include <config.h> #include <openwbem/OW_Format.hpp> Modified: smash/branches/1.0/src/providers/device/composite-device/CompositeCapabilitiesProvider.hpp =================================================================== --- smash/branches/1.0/src/providers/device/composite-device/CompositeCapabilitiesProvider.hpp 2007-01-18 01:17:01 UTC (rev 427) +++ smash/branches/1.0/src/providers/device/composite-device/CompositeCapabilitiesProvider.hpp 2007-01-29 23:31:55 UTC (rev 428) @@ -1,22 +1,33 @@ -/**************************************************************************** -* Copyright (c) 2005,2006 Novell, Inc. -* All Rights Reserved. +/****************************************************************************** +* Copyright (c) 2005,2006, Novell, Inc. All rights reserved. * -* This program is free software; you can redistribute it and/or -* modify it under the terms of version 2 of the GNU General Public License as -* published by the Free Software Foundation. +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* - Redistributions of source code must retain the above copyright notice, +* this list of conditions and the following disclaimer. * -* You should have received a copy of the GNU General Public License -* along with this program; if not, contact Novell, Inc. +* - 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. * -* To contact Novell about this file by physical or electronic mail, -* you may find current contact information at www.novell.com -****************************************************************************/ +* - Neither the name of Novell 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 THE COPYRIGHT OWNER OR 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. +******************************************************************************/ #ifndef COMPOSITECAPABILITIESPROVIDER_HPP_GUARD #define COMPOSITECAPABILITIESPROVIDER_HPP_GUARD Modified: smash/branches/1.0/src/providers/device/composite-device/CompositeDeviceProvider.cpp =================================================================== --- smash/branches/1.0/src/providers/device/composite-device/CompositeDeviceProvider.cpp 2007-01-18 01:17:01 UTC (rev 427) +++ smash/branches/1.0/src/providers/device/composite-device/CompositeDeviceProvider.cpp 2007-01-29 23:31:55 UTC (rev 428) @@ -1,22 +1,33 @@ -/**************************************************************************** -* Copyright (c) 2005,2006 Novell, Inc. -* All Rights Reserved. +/****************************************************************************** +* Copyright (c) 2005,2006, Novell, Inc. All rights reserved. * -* This program is free software; you can redistribute it and/or -* modify it under the terms of version 2 of the GNU General Public License as -* published by the Free Software Foundation. +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* - Redistributions of source code must retain the above copyright notice, +* this list of conditions and the following disclaimer. * -* You should have received a copy of the GNU General Public License -* along with this program; if not, contact Novell, Inc. +* - 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. * -* To contact Novell about this file by physical or electronic mail, -* you may find current contact information at www.novell.com -****************************************************************************/ +* - Neither the name of Novell 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 THE COPYRIGHT OWNER OR 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. +******************************************************************************/ #include <config.h> #include <openwbem/OW_Format.hpp> Modified: smash/branches/1.0/src/providers/device/composite-device/CompositeDeviceProvider.hpp =================================================================== --- smash/branches/1.0/src/providers/device/composite-device/CompositeDeviceProvider.hpp 2007-01-18 01:17:01 UTC (rev 427) +++ smash/branches/1.0/src/providers/device/composite-device/CompositeDeviceProvider.hpp 2007-01-29 23:31:55 UTC (rev 428) @@ -1,22 +1,33 @@ -/**************************************************************************** -* Copyright (c) 2005,2006 Novell, Inc. -* All Rights Reserved. +/****************************************************************************** +* Copyright (c) 2005,2006, Novell, Inc. All rights reserved. * -* This program is free software; you can redistribute it and/or -* modify it under the terms of version 2 of the GNU General Public License as -* published by the Free Software Foundation. +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* - Redistributions of source code must retain the above copyright notice, +* this list of conditions and the following disclaimer. * -* You should have received a copy of the GNU General Public License -* along with this program; if not, contact Novell, Inc. +* - 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. * -* To contact Novell about this file by physical or electronic mail, -* you may find current contact information at www.novell.com -****************************************************************************/ +* - Neither the name of Novell 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 THE COPYRIGHT OWNER OR 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. +******************************************************************************/ #ifndef COMPOSITEPROVIDER_HPP_GUARD #define COMPOSITEPROVIDER_HPP_GUARD Modified: smash/branches/1.0/src/providers/device/composite-device/CompositeMethods.cpp =================================================================== --- smash/branches/1.0/src/providers/device/composite-device/CompositeMethods.cpp 2007-01-18 01:17:01 UTC (rev 427) +++ smash/branches/1.0/src/providers/device/composite-device/CompositeMethods.cpp 2007-01-29 23:31:55 UTC (rev 428) @@ -1,22 +1,33 @@ -/**************************************************************************** -* Copyright (c) 2005,2006 Novell, Inc. -* All Rights Reserved. +/****************************************************************************** +* Copyright (c) 2005,2006, Novell, Inc. All rights reserved. * -* This program is free software; you can redistribute it and/or -* modify it under the terms of version 2 of the GNU General Public License as -* published by the Free Software Foundation. +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* - Redistributions of source code must retain the above copyright notice, +* this list of conditions and the following disclaimer. * -* You should have received a copy of the GNU General Public License -* along with this program; if not, contact Novell, Inc. +* - 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. * -* To contact Novell about this file by physical or electronic mail, -* you may find current contact information at www.novell.com -****************************************************************************/ +* - Neither the name of Novell 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 THE COPYRIGHT OWNER OR 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. +******************************************************************************/ #include <openwbem/OW_CppMethodProviderIFC.hpp> #include <openwbem/OW_CIMValue.hpp> #include <openwbem/OW_Format.hpp> Modified: smash/branches/1.0/src/providers/device/composite-device/MergeInstances.cpp =================================================================== --- smash/branches/1.0/src/providers/device/composite-device/MergeInstances.cpp 2007-01-18 01:17:01 UTC (rev 427) +++ smash/branches/1.0/src/providers/device/composite-device/MergeInstances.cpp 2007-01-29 23:31:55 UTC (rev 428) @@ -1,22 +1,33 @@ -/**************************************************************************** -* Copyright (c) 2005,2006 Novell, Inc. -* All Rights Reserved. +/****************************************************************************** +* Copyright (c) 2005,2006, Novell, Inc. All rights reserved. * -* This program is free software; you can redistribute it and/or -* modify it under the terms of version 2 of the GNU General Public License as -* published by the Free Software Foundation. +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* - Redistributions of source code must retain the above copyright notice, +* this list of conditions and the following disclaimer. * -* You should have received a copy of the GNU General Public License -* along with this program; if not, contact Novell, Inc. +* - 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. * -* To contact Novell about this file by physical or electronic mail, -* you may find current contact information at www.novell.com -****************************************************************************/ +* - Neither the name of Novell 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 THE COPYRIGHT OWNER OR 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. +******************************************************************************/ #include <config.h> Modified: smash/branches/1.0/src/providers/device/composite-device/MergeInstances.hpp =================================================================== --- smash/branches/1.0/src/providers/device/composite-device/MergeInstances.hpp 2007-01-18 01:17:01 UTC (rev 427) +++ smash/branches/1.0/src/providers/device/composite-device/MergeInstances.hpp 2007-01-29 23:31:55 UTC (rev 428) @@ -1,22 +1,33 @@ -/**************************************************************************** -* Copyright (c) 2005,2006 Novell, Inc. -* All Rights Reserved. +/****************************************************************************** +* Copyright (c) 2005,2006, Novell, Inc. All rights reserved. * -* This program is free software; you can redistribute it and/or -* modify it under the terms of version 2 of the GNU General Public License as -* published by the Free Software Foundation. +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* - Redistributions of source code must retain the above copyright notice, +* this list of conditions and the following disclaimer. * -* You should have received a copy of the GNU General Public License -* along with this program; if not, contact Novell, Inc. +* - 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. * -* To contact Novell about this file by physical or electronic mail, -* you may find current contact information at www.novell.com -****************************************************************************/ +* - Neither the name of Novell 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 THE COPYRIGHT OWNER OR 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. +******************************************************************************/ #ifndef MERGE_INSTANCES_HPP_GUARD #define MERGE_INSTANCES_HPP_GUARD Modified: smash/branches/1.0/src/providers/device/composite-device/ResultHandlers.cpp =================================================================== --- smash/branches/1.0/src/providers/device/composite-device/ResultHandlers.cpp 2007-01-18 01:17:01 UTC (rev 427) +++ smash/branches/1.0/src/providers/device/composite-device/ResultHandlers.cpp 2007-01-29 23:31:55 UTC (rev 428) @@ -1,22 +1,33 @@ -/**************************************************************************** -* Copyright (c) 2005,2006 Novell, Inc. -* All Rights Reserved. +/****************************************************************************** +* Copyright (c) 2005,2006, Novell, Inc. All rights reserved. * -* This program is free software; you can redistribute it and/or -* modify it under the terms of version 2 of the GNU General Public License as -* published by the Free Software Foundation. +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* - Redistributions of source code must retain the above copyright notice, +* this list of conditions and the following disclaimer. * -* You should have received a copy of the GNU General Public License -* along with this program; if not, contact Novell, Inc. +* - 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. * -* To contact Novell about this file by physical or electronic mail, -* you may find current contact information at www.novell.com -****************************************************************************/ +* - Neither the name of Novell 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 THE COPYRIGHT OWNER OR 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. +******************************************************************************/ #include <config.h> Modified: smash/branches/1.0/src/providers/device/composite-device/ResultHandlers.hpp =================================================================== --- smash/branches/1.0/src/providers/device/composite-device/ResultHandlers.hpp 2007-01-18 01:17:01 UTC (rev 427) +++ smash/branches/1.0/src/providers/device/composite-device/ResultHandlers.hpp 2007-01-29 23:31:55 UTC (rev 428) @@ -1,22 +1,33 @@ -/**************************************************************************** -* Copyright (c) 2005,2006 Novell, Inc. -* All Rights Reserved. +/****************************************************************************** +* Copyright (c) 2005,2006, Novell, Inc. All rights reserved. * -* This program is free software; you can redistribute it and/or -* modify it under the terms of version 2 of the GNU General Public License as -* published by the Free Software Foundation. +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* - Redistributions of source code must retain the above copyright notice, +* this list of conditions and the following disclaimer. * -* You should have received a copy of the GNU General Public License -* along with this program; if not, contact Novell, Inc. +* - 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. * -* To contact Novell about this file by physical or electronic mail, -* you may find current contact information at www.novell.com -****************************************************************************/ +* - Neither the name of Novell 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 THE COPYRIGHT OWNER OR 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. +******************************************************************************/ #ifndef RESULTHANDLERS_HPP_GUARD #define RESULTHANDLERS_HPP_GUARD Modified: smash/trunk/LICENSE =================================================================== --- smash/trunk/LICENSE 2007-01-18 01:17:01 UTC (rev 427) +++ smash/trunk/LICENSE 2007-01-29 23:31:55 UTC (rev 428) @@ -1,6 +1,4 @@ OMC-Smash is primarily BSD. -However, within this project, some files have a more restrictive license (GPL). -* Composite-Device Provider Code Please pay attention to the license for each file. Modified: smash/trunk/src/providers/device/composite-device/CompositeAssociations.cpp =================================================================== --- smash/trunk/src/providers/device/composite-device/CompositeAssociations.cpp 2007-01-18 01:17:01 UTC (rev 427) +++ smash/trunk/src/providers/device/composite-device/CompositeAssociations.cpp 2007-01-29 23:31:55 UTC (rev 428) @@ -1,22 +1,33 @@ -/**************************************************************************** -* Copyright (c) 2005,2006 Novell, Inc. -* All Rights Reserved. +/****************************************************************************** +* Copyright (c) 2005,2006, Novell, Inc. All rights reserved. * -* This program is free software; you can redistribute it and/or -* modify it under the terms of version 2 of the GNU General Public License as -* published by the Free Software Foundation. +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* - Redistributions of source code must retain the above copyright notice, +* this list of conditions and the following disclaimer. * -* You should have received a copy of the GNU General Public License -* along with this program; if not, contact Novell, Inc. +* - 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. * -* To contact Novell about this file by physical or electronic mail, -* you may find current contact information at www.novell.com -****************************************************************************/ +* - Neither the name of Novell 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 THE COPYRIGHT OWNER OR 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. +******************************************************************************/ #include <openwbem/OW_CppSimpleAssociatorProviderIFC.hpp> #include <openwbem/OW_CIMValue.hpp> Modified: smash/trunk/src/providers/device/composite-device/CompositeCapabilitiesProvider.cpp =================================================================== --- smash/trunk/src/providers/device/composite-device/CompositeCapabilitiesProvider.cpp 2007-01-18 01:17:01 UTC (rev 427) +++ smash/trunk/src/providers/device/composite-device/CompositeCapabilitiesProvider.cpp 2007-01-29 23:31:55 UTC (rev 428) @@ -1,22 +1,33 @@ -/**************************************************************************** -* Copyright (c) 2005,2006 Novell, Inc. -* All Rights Reserved. +/****************************************************************************** +* Copyright (c) 2005,2006, Novell, Inc. All rights reserved. * -* This program is free software; you can redistribute it and/or -* modify it under the terms of version 2 of the GNU General Public License as -* published by the Free Software Foundation. +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* - Redistributions of source code must retain the above copyright notice, +* this list of conditions and the following disclaimer. * -* You should have received a copy of the GNU General Public License -* along with this program; if not, contact Novell, Inc. +* - 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. * -* To contact Novell about this file by physical or electronic mail, -* you may find current contact information at www.novell.com -****************************************************************************/ +* - Neither the name of Novell 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 THE COPYRIGHT OWNER OR 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. +******************************************************************************/ #include <config.h> #include <openwbem/OW_Format.hpp> Modified: smash/trunk/src/providers/device/composite-device/CompositeCapabilitiesProvider.hpp =================================================================== --- smash/trunk/src/providers/device/composite-device/CompositeCapabilitiesProvider.hpp 2007-01-18 01:17:01 UTC (rev 427) +++ smash/trunk/src/providers/device/composite-device/CompositeCapabilitiesProvider.hpp 2007-01-29 23:31:55 UTC (rev 428) @@ -1,22 +1,33 @@ -/**************************************************************************** -* Copyright (c) 2005,2006 Novell, Inc. -* All Rights Reserved. +/****************************************************************************** +* Copyright (c) 2005,2006, Novell, Inc. All rights reserved. * -* This program is free software; you can redistribute it and/or -* modify it under the terms of version 2 of the GNU General Public License as -* published by the Free Software Foundation. +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* - Redistributions of source code must retain the above copyright notice, +* this list of conditions and the following disclaimer. * -* You should have received a copy of the GNU General Public License -* along with this program; if not, contact Novell, Inc. +* - 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. * -* To contact Novell about this file by physical or electronic mail, -* you may find current contact information at www.novell.com -****************************************************************************/ +* - Neither the name of Novell 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 THE COPYRIGHT OWNER OR 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. +******************************************************************************/ #ifndef COMPOSITECAPABILITIESPROVIDER_HPP_GUARD #define COMPOSITECAPABILITIESPROVIDER_HPP_GUARD Modified: smash/trunk/src/providers/device/composite-device/CompositeDeviceProvider.cpp =================================================================== --- smash/trunk/src/providers/device/composite-device/CompositeDeviceProvider.cpp 2007-01-18 01:17:01 UTC (rev 427) +++ smash/trunk/src/providers/device/composite-device/CompositeDeviceProvider.cpp 2007-01-29 23:31:55 UTC (rev 428) @@ -1,22 +1,33 @@ -/**************************************************************************** -* Copyright (c) 2005,2006 Novell, Inc. -* All Rights Reserved. +/****************************************************************************** +* Copyright (c) 2005,2006, Novell, Inc. All rights reserved. * -* This program is free software; you can redistribute it and/or -* modify it under the terms of version 2 of the GNU General Public License as -* published by the Free Software Foundation. +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* - Redistributions of source code must retain the above copyright notice, +* this list of conditions and the following disclaimer. * -* You should have received a copy of the GNU General Public License -* along with this program; if not, contact Novell, Inc. +* - 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. * -* To contact Novell about this file by physical or electronic mail, -* you may find current contact information at www.novell.com -****************************************************************************/ +* - Neither the name of Novell 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 THE COPYRIGHT OWNER OR 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. +******************************************************************************/ #include <config.h> #include <openwbem/OW_Format.hpp> Modified: smash/trunk/src/providers/device/composite-device/CompositeDeviceProvider.hpp =================================================================== --- smash/trunk/src/providers/device/composite-device/CompositeDeviceProvider.hpp 2007-01-18 01:17:01 UTC (rev 427) +++ smash/trunk/src/providers/device/composite-device/CompositeDeviceProvider.hpp 2007-01-29 23:31:55 UTC (rev 428) @@ -1,22 +1,33 @@ -/**************************************************************************** -* Copyright (c) 2005,2006 Novell, Inc. -* All Rights Reserved. +/****************************************************************************** +* Copyright (c) 2005,2006, Novell, Inc. All rights reserved. * -* This program is free software; you can redistribute it and/or -* modify it under the terms of version 2 of the GNU General Public License as -* published by the Free Software Foundation. +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* - Redistributions of source code must retain the above copyright notice, +* this list of conditions and the following disclaimer. * -* You should have received a copy of the GNU General Public License -* along with this program; if not, contact Novell, Inc. +* - 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. * -* To contact Novell about this file by physical or electronic mail, -* you may find current contact information at www.novell.com -****************************************************************************/ +* - Neither the name of Novell 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 THE COPYRIGHT OWNER OR 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. +******************************************************************************/ #ifndef COMPOSITEPROVIDER_HPP_GUARD #define COMPOSITEPROVIDER_HPP_GUARD Modified: smash/trunk/src/providers/device/composite-device/CompositeMethods.cpp =================================================================== --- smash/trunk/src/providers/device/composite-device/CompositeMethods.cpp 2007-01-18 01:17:01 UTC (rev 427) +++ smash/trunk/src/providers/device/composite-device/CompositeMethods.cpp 2007-01-29 23:31:55 UTC (rev 428) @@ -1,22 +1,33 @@ -/**************************************************************************** -* Copyright (c) 2005,2006 Novell, Inc. -* All Rights Reserved. +/****************************************************************************** +* Copyright (c) 2005,2006, Novell, Inc. All rights reserved. * -* This program is free software; you can redistribute it and/or -* modify it under the terms of version 2 of the GNU General Public License as -* published by the Free Software Foundation. +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* - Redistributions of source code must retain the above copyright notice, +* this list of conditions and the following disclaimer. * -* You should have received a copy of the GNU General Public License -* along with this program; if not, contact Novell, Inc. +* - 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. * -* To contact Novell about this file by physical or electronic mail, -* you may find current contact information at www.novell.com -****************************************************************************/ +* - Neither the name of Novell 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 THE COPYRIGHT OWNER OR 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. +******************************************************************************/ #include <openwbem/OW_CppMethodProviderIFC.hpp> #include <openwbem/OW_CIMValue.hpp> #include <openwbem/OW_Format.hpp> Modified: smash/trunk/src/providers/device/composite-device/MergeInstances.cpp =================================================================== --- smash/trunk/src/providers/device/composite-device/MergeInstances.cpp 2007-01-18 01:17:01 UTC (rev 427) +++ smash/trunk/src/providers/device/composite-device/MergeInstances.cpp 2007-01-29 23:31:55 UTC (rev 428) @@ -1,22 +1,33 @@ -/**************************************************************************** -* Copyright (c) 2005,2006 Novell, Inc. -* All Rights Reserved. +/****************************************************************************** +* Copyright (c) 2005,2006, Novell, Inc. All rights reserved. * -* This program is free software; you can redistribute it and/or -* modify it under the terms of version 2 of the GNU General Public License as -* published by the Free Software Foundation. +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* - Redistributions of source code must retain the above copyright notice, +* this list of conditions and the following disclaimer. * -* You should have received a copy of the GNU General Public License -* along with this program; if not, contact Novell, Inc. +* - 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. * -* To contact Novell about this file by physical or electronic mail, -* you may find current contact information at www.novell.com -****************************************************************************/ +* - Neither the name of Novell 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 THE COPYRIGHT OWNER OR 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. +******************************************************************************/ #include <config.h> Modified: smash/trunk/src/providers/device/composite-device/MergeInstances.hpp =================================================================== --- smash/trunk/src/providers/device/composite-device/MergeInstances.hpp 2007-01-18 01:17:01 UTC (rev 427) +++ smash/trunk/src/providers/device/composite-device/MergeInstances.hpp 2007-01-29 23:31:55 UTC (rev 428) @@ -1,22 +1,33 @@ -/**************************************************************************** -* Copyright (c) 2005,2006 Novell, Inc. -* All Rights Reserved. +/****************************************************************************** +* Copyright (c) 2005,2006, Novell, Inc. All rights reserved. * -* This program is free software; you can redistribute it and/or -* modify it under the terms of version 2 of the GNU General Public License as -* published by the Free Software Foundation. +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* - Redistributions of source code must retain the above copyright notice, +* this list of conditions and the following disclaimer. * -* You should have received a copy of the GNU General Public License -* along with this program; if not, contact Novell, Inc. +* - 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. * -* To contact Novell about this file by physical or electronic mail, -* you may find current contact information at www.novell.com -****************************************************************************/ +* - Neither the name of Novell 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 THE COPYRIGHT OWNER OR 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. +******************************************************************************/ #ifndef MERGE_INSTANCES_HPP_GUARD #define MERGE_INSTANCES_HPP_GUARD Modified: smash/trunk/src/providers/device/composite-device/ResultHandlers.cpp =================================================================== --- smash/trunk/src/providers/device/composite-device/ResultHandlers.cpp 2007-01-18 01:17:01 UTC (rev 427) +++ smash/trunk/src/providers/device/composite-device/ResultHandlers.cpp 2007-01-29 23:31:55 UTC (rev 428) @@ -1,22 +1,33 @@ -/**************************************************************************** -* Copyright (c) 2005,2006 Novell, Inc. -* All Rights Reserved. +/****************************************************************************** +* Copyright (c) 2005,2006, Novell, Inc. All rights reserved. * -* This program is free software; you can redistribute it and/or -* modify it under the terms of version 2 of the GNU General Public License as -* published by the Free Software Foundation. +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* - Redistributions of source code must retain the above copyright notice, +* this list of conditions and the following disclaimer. * -* You should have received a copy of the GNU General Public License -* along with this program; if not, contact Novell, Inc. +* - 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. * -* To contact Novell about this file by physical or electron... [truncated message content] |
From: <ba...@us...> - 2007-01-18 01:17:01
|
Revision: 427 http://svn.sourceforge.net/omc/?rev=427&view=rev Author: bartw Date: 2007-01-17 17:17:01 -0800 (Wed, 17 Jan 2007) Log Message: ----------- removed xml service schema Modified Paths: -------------- schema/branches/1.0/mof/base/omc-base-providers.mof Removed Paths: ------------- schema/branches/1.0/mof/base/omc-xml-service.mof Modified: schema/branches/1.0/mof/base/omc-base-providers.mof =================================================================== --- schema/branches/1.0/mof/base/omc-base-providers.mof 2007-01-18 01:15:58 UTC (rev 426) +++ schema/branches/1.0/mof/base/omc-base-providers.mof 2007-01-18 01:17:01 UTC (rev 427) @@ -7,4 +7,3 @@ #pragma include ("omc-time-service.mof") #pragma include ("omc-initd.mof") #pragma include ("omc-syslog-ng.mof") -#pragma include ("omc-xml-service.mof") Deleted: schema/branches/1.0/mof/base/omc-xml-service.mof =================================================================== --- schema/branches/1.0/mof/base/omc-xml-service.mof 2007-01-18 01:15:58 UTC (rev 426) +++ schema/branches/1.0/mof/base/omc-xml-service.mof 2007-01-18 01:17:01 UTC (rev 427) @@ -1,282 +0,0 @@ -#pragma locale ("en_US") - -// ================================================================== -// OMC_ServiceFromXML -// ================================================================== -[ Description("The OMC_ServiceFromXML class represents a service " - "that is instrumented by the XML service provider") ] -class OMC_ServiceFromXML : CIM_Service -{ - [ Description("HealthPollingInterval specifies how often the " - "XML Service provider will check the health of the service"), - Units("Seconds") ] - uint64 HealthPollingInterval; - - [ Description("RequiredBadHits specifies the number of times " - "a service must report a unhealthy status at poll time " - "before an indication is generated. If this property is " - "not specified the value of 3 is assumed") ] - uint32 RequiredBadHits = 3; - - [ Description ("The BadHealthActions property holds the actions that must " - "be performed when the HealthState property for this service reaches " - "a degraded(10) or major failure(20) state. The only actions that can " - "be performed are stop and re-start. The property is an array of 2 " - "elements with the elements corresponding to the HealthState " - "property as follows:\n" - "Index 0 = Action to perform for degraded state(HealthState==10)\n" - "Index 1 = Action to perform for major failure state(HealthState==20\n" - "The value for each one of the elements can be as follows:\n" - "0 = Do nothing\n" - "1 = Restart the service\n" - "2 = Stop the service"), - ValueMap { 0, 1, 2 }, - Values{ "No Action", "Restart", "Stop" }, - ArrayType ("Indexed"), - ModelCorrespondence { "CIM_ManagedSystemElement.HealthState" } ] - - uint16 BadHealthActions[]; -}; - -// ================================================================== -// OMC_ServiceFromXMLConfigTool -// ================================================================== -class OMC_ServiceFromXMLConfigTool -{ - [ Key, Propagated("OMC_ServiceFromXML.Name"), - Description("This is the name of the service that configuration " - "tool is used for") ] - string ServiceName; - - [ Key, Description("The TaskName property provides a short name for the " - "task this configuration tool is used for") ] - string TaskName; - - [ Description("The Description property provides discriptive test " - "about this task/configuration tool") ] - string Description; - - [ Required, Description("The Type property specifies what type of " - "access is needed to use the configuration tool") ] - string Type; - - [ Required, Description("The Uri property provides the addressing " - "information needed to access the configuration tool") ] - String Uri; -}; - -// ================================================================== -// OMC_ServiceHealthData -// ================================================================== -[ Description("The OMC_ServiceHealthData class represents a single health " - "data item for a service") ] -class OMC_ServiceHealthData -{ - [ Key, Propagated("OMC_ServiceFromXML.Name"), - Description("This is the name of the service that this health data " - "belongs to.") ] - string ServiceName; - - [ Key, Description("The name of the health data being reported by " - "the service") ] - string DataName; - - [ Description("Free form text that describes this health data") ] - string Description; - - [ Description ("The information in the DataValue property and any " - "of the thresholds is presented as string data. However the " - "appropriate datatype for this information may be something " - "else (e.g. signed 32 bit integer). Knowledge of the appropriate " - "data type may be needed for comparison when processing " - "thresholds."), - ValueMap { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }, - Values{ "Unknown", "String", "Unsigned 8 bit", "Signed 8 bit", - "Unsigned 16 bit", "Signed 16 bit", "Unsigned 32 bit", - "Signed 32 bit", "Unsigned 64 bit", "Signed 64 bit", - "Real 32 bit", "Real 64 bit" } ] - uint16 DataType; - - [ Description("The value of the health data specified by DataName " - "for the service") ] - string DataValue; - - [ ArrayType ("Indexed"), - Description("These are the default thresholds that have been set by " - "the service provider. They are used if the actual thresholds " - "have not been set by the administrator. This is an array of " - "six elements with each element representing a certain " - "threshold. The array is ordered as follows:\n" - "0 = Lower Fatal threshold\n" - "1 = Lower Critical threshold\n" - "2 = Lower Non-Critical threshold\n" - "3 = Upper Non-Critical threshold\n" - "4 = Upper Critical threshold\n" - "5 = Upper Fatal threshold\n" - "Each element is the string representation of that threshold " - "value."), - ModelCorrespondence { - "OMC_ServiceHealthData.DataType", - "OMC_ServiceHealthData.DataValue" } ] - string DefaultThresholds[]; - - [ Write, ArrayType ("Indexed"), - Description("These are the thresholds specified by the administrator " - "If they are present, the DefaultThresholds are ignored." - "This is an array of six elements with each element representing " - "a certain threshold. The array is ordered as follows:\n" - "0 = Lower Fatal threshold\n" - "1 = Lower Critical threshold\n" - "2 = Lower Non-Critical threshold\n" - "3 = Upper Non-Critical threshold\n" - "4 = Upper Critical threshold\n" - "5 = Upper Fatal threshold\n" - "Each element is the string representation of that threshold " - "value."), - ModelCorrespondence { - "OMC_ServiceHealthData.DataType", - "OMC_ServiceHealthData.DataValue" } ] - string ActualThresholds[]; - - [ Description("The health state the value of the health item " - "represents"), - ValueMap { "0", "5", "10", "20" }, - Values { "Unknown", "OK", "Degraded/Warning", - "Major failure" } ] - uint16 HealthState; -}; - -// ================================================================== -// OMC_AssociatedConfigTool -// ================================================================== -[ Association, Version ( "0.0.1" ), - Description ("The AssociatedConfigTool association related the " - "service to its configuration tools") ] -class OMC_AssociatedConfigTool -{ - [ Key, Min(1), Max(1), Description("The service the health " - "data belongs to") ] - OMC_ServiceFromXML REF Service; - - [ Key, Description("A configuration tool object for the service") ] - OMC_ServiceFromXMLConfigTool REF ConfigTool; -}; - -// ================================================================== -// OMC_AssociatedHealthData -// ================================================================== -[ Association, Version ( "0.0.1" ), - Description ("The AssociatedHealthData association related the " - "ServiceHealthData objects with the ServiceFromXML " - "objects") ] -class OMC_AssociatedHealthData -{ - [ Key, Min(1), Max(1), Description("The service the health " - "data belongs to") ] - OMC_ServiceFromXML REF Service; - - [ Key, Description("A health data object for the service") ] - OMC_ServiceHealthData REF HealthData; -}; - -// ================================================================== -// OMC_XMLServiceProcess -// ================================================================== -[ Association, Version ( "0.0.1" ), - Description ("The XMLService process relates a service " - "to its processes") ] -class OMC_XMLServiceProcess : CIM_ServiceProcess -{ - [ Override("Service"), Key, Description("The ServiceFromXML " - "that is associated to a process.") ] - OMC_ServiceFromXML REF Service; - - [ Override("Process"), Key, Description("The process that " - "the XMLService is running in.") ] - OMC_UnixProcess REF Process; -}; - -// ================================================================== -// OMC_HostedXMLService -// ================================================================== -[ Association, Version ( "0.0.1" ), - Description ("The HostedXMLService relates the service to " - "the computer system it is running on") ] -class OMC_HostedXMLService : CIM_HostedService -{ - [ Override("Antecedent"), Key, Description("The computer system " - "that hosts the service") ] - OMC_UnitaryComputerSystem REF Antecedent; - - [ Override("Dependent"), Key, Description("The service that is hosted " - "on the computer system.") ] - OMC_ServiceFromXML REF Dependent; -}; - -// ================================================================== -// OMC_XMLServiceServiceDependency -// ================================================================== -[ Association, Description("OMC_XMLServiceServiceDependency " - "represents the relationship of one OMC_ServiceFromXML " - "depending on another") ] -class OMC_XMLServiceServiceDependency : CIM_ServiceServiceDependency -{ - [Override ( "Antecedent" ), Description ( - "The required Service.")] - OMC_ServiceFromXML REF Antecedent; - - [Override ( "Dependent" ), Description ( - "The Service that is dependent on an underlying Service.")] - OMC_ServiceFromXML REF Dependent; -}; - -// ================================================================== -// OMC_XMLServiceHealthAlert -// ================================================================== -[ Indication, - Description("The alert that goes out when health data exceeds the " - "critical or fatal thresholds") ] -class OMC_XMLServiceHealthAlert : CIM_AlertIndication -{ - [ Description("The name of the service the alert is for." - "This is one of the keys to the OMC_ServiceHealthData object") ] - string ServiceName; - - [ Description("The name of the health data item that has exceeded " - "the critical or fatal threshold. This is one of the keys to the " - "OMC_ServiceHealthData object") ] - string HealthDataItemName; - - [ Description("The current value of the item specified in by the " - "HealthDataitemName property") ] - string CurrentValue; - - [ Description ("The information in the CurrentValue property and any " - "of the thresholds is presented as string data. However the " - "appropriate datatype for this information may be something " - "else (e.g. signed 32 bit integer). Knowledge of the appropriate " - "data type may be needed for comparison when processing " - "thresholds."), - ValueMap { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }, - Values{ "Unknown", "String", "Unsigned 8 bit", "Signed 8 bit", - "Unsigned 16 bit", "Signed 16 bit", "Unsigned 32 bit", - "Signed 32 bit", "Unsigned 64 bit", "Signed 64 bit", - "Real 32 bit", "Real 64 bit" } ] - uint16 DataType; - - [ Description("The threshold the current value has exceeded"), - ValueMap { 0, 1, 2, 3, 4, 5 }, - Values{ "Lower Fatal", "Lower Critical", "Lower Non-Critical", - "Upper Fatal", "Upper Critical", "Upper Non-Critical" } ] - uint16 ThresholdType; - - [ Description("The value of the threshold that has been exceeded") ] - string ThresholdValue; - - [ Description("The health state the ThresholdValue represents"), - ValueMap { "0", "5", "10", "20" }, - Values { "Unknown", "OK", "Degraded/Warning", - "Major failure" } ] - uint16 HealthState; -}; - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ba...@us...> - 2007-01-18 01:16:01
|
Revision: 426 http://svn.sourceforge.net/omc/?rev=426&view=rev Author: bartw Date: 2007-01-17 17:15:58 -0800 (Wed, 17 Jan 2007) Log Message: ----------- removed xml service provider Modified Paths: -------------- base/branches/1.0/configure.ac base/branches/1.0/src/providers/Makefile.am Removed Paths: ------------- base/branches/1.0/src/providers/xml-service/ Modified: base/branches/1.0/configure.ac =================================================================== --- base/branches/1.0/configure.ac 2007-01-12 00:35:28 UTC (rev 425) +++ base/branches/1.0/configure.ac 2007-01-18 01:15:58 UTC (rev 426) @@ -186,7 +186,6 @@ src/providers/time-service/Makefile src/providers/initd/Makefile src/providers/syslog/Makefile - src/providers/xml-service/Makefile test/Makefile test/unit/Makefile ]) Modified: base/branches/1.0/src/providers/Makefile.am =================================================================== --- base/branches/1.0/src/providers/Makefile.am 2007-01-12 00:35:28 UTC (rev 425) +++ base/branches/1.0/src/providers/Makefile.am 2007-01-18 01:15:58 UTC (rev 426) @@ -10,8 +10,7 @@ operating-system \ posix-file-elements \ processes \ -syslog \ -xml-service +syslog if DO_INITD_PROVIDER SUBDIRS += initd This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jc...@us...> - 2007-01-12 00:35:30
|
Revision: 425 http://svn.sourceforge.net/omc/?rev=425&view=rev Author: jcarey Date: 2007-01-11 16:35:28 -0800 (Thu, 11 Jan 2007) Log Message: ----------- Changed location where the xml service provider looks for xml service description documents to %{prefix}/share/omc/svcinfo.d Modified Paths: -------------- contrib/xml-service-provider/trunk/configure.ac contrib/xml-service-provider/trunk/example-services/apache/Apache.xml contrib/xml-service-provider/trunk/openwbem-xmlservice-providers.spec contrib/xml-service-provider/trunk/src/servicexml/XMLSvcUtils.hpp contrib/xml-service-provider/trunk/xmlschema/xml-service-provider.xsd Modified: contrib/xml-service-provider/trunk/configure.ac =================================================================== --- contrib/xml-service-provider/trunk/configure.ac 2006-12-13 00:50:35 UTC (rev 424) +++ contrib/xml-service-provider/trunk/configure.ac 2007-01-12 00:35:28 UTC (rev 425) @@ -32,17 +32,19 @@ ## It now uses compile (primarily) but still uses pre-processor for interim transition / backward compatibility ## pre-processor needs the CPPFLAGS +if test "x$prefix" != "xNONE"; then + prefixDir=${prefix} +else + prefixDir=${ac_default_prefix} +fi +AC_DEFINE_UNQUOTED(XMLSVC_PREFIX_DIR, "${prefixDir}", "Default prefix dir") ####################################################################### # set the location of the sysconf dir if test "x$sysconfdir" != "x\${prefix}/etc"; then tempDir=$sysconfdir else - if test "x$prefix" != "xNONE"; then - tempDir=${prefix}/etc - else - tempDir=${ac_default_prefix}/etc - fi + tempDir=${prefixDir}/etc fi AC_DEFINE_UNQUOTED(XMLSVC_SYSCONF_DIR, "${tempDir}", "Default sysconfig dir") Modified: contrib/xml-service-provider/trunk/example-services/apache/Apache.xml =================================================================== --- contrib/xml-service-provider/trunk/example-services/apache/Apache.xml 2006-12-13 00:50:35 UTC (rev 424) +++ contrib/xml-service-provider/trunk/example-services/apache/Apache.xml 2007-01-12 00:35:28 UTC (rev 425) @@ -2,7 +2,7 @@ <!-- Sample Service Description XML Document. -This file should be placed in /etc/omc/svcinfo.d +This file should be placed in /usr/share/omc/svcinfo.d It should be named <service name>.xml. The reason for the naming scheme, is that other services can refer to this service in their dependency list using the file name minus the '.xml' extension. @@ -53,7 +53,8 @@ <!-- Define the services that this service has a dependency on. There must be a corresponding Service Description XML file - for the antecedent service in the /etc/omc/svcinfo.d directory. + for the antecedent service in the /usr/share/omc/svcinfo.d + directory. --> <dependsOn> <serviceName>Service1-That-Apache-Depends-On</serviceName> Modified: contrib/xml-service-provider/trunk/openwbem-xmlservice-providers.spec =================================================================== --- contrib/xml-service-provider/trunk/openwbem-xmlservice-providers.spec 2006-12-13 00:50:35 UTC (rev 424) +++ contrib/xml-service-provider/trunk/openwbem-xmlservice-providers.spec 2007-01-12 00:35:28 UTC (rev 425) @@ -57,7 +57,8 @@ %{__mkdir} -p $RPM_BUILD_ROOT # Tell 'make install' to install into the BuildRoot make DESTDIR=$RPM_BUILD_ROOT install -mkdir -p $RPM_BUILD_ROOT/%{xmlsvcsysconfdir}/omc/svcinfo.d +mkdir -p $RPM_BUILD_ROOT/%{xmlsvcprefix}/share/omc/svcinfo.d + MOFDIR=$RPM_BUILD_ROOT/%{xmlsvcprefix}/share/mof/%{name} install -d $MOFDIR install mof/*.mof $MOFDIR/ @@ -102,8 +103,9 @@ %{xmlsvcprefix}/%_lib/lib*.so* %dir %{xmlsvcprefix}/share/mof/%{name} %{xmlsvcprefix}/share/mof/%{name}/* -%dir %{xmlsvcsysconfdir}/omc -%dir %{xmlsvcsysconfdir}/omc/svcinfo.d +%dir %{xmlsvcprefix}/share/omc +%dir %{xmlsvcprefix}/share/omc/svcinfo.d + %changelog -n openwbem-xmlservice-providers Modified: contrib/xml-service-provider/trunk/src/servicexml/XMLSvcUtils.hpp =================================================================== --- contrib/xml-service-provider/trunk/src/servicexml/XMLSvcUtils.hpp 2006-12-13 00:50:35 UTC (rev 424) +++ contrib/xml-service-provider/trunk/src/servicexml/XMLSvcUtils.hpp 2007-01-12 00:35:28 UTC (rev 425) @@ -41,10 +41,8 @@ return env->getLogger(COMPONENT); } +#define SVCINFO_DIR XMLSVC_PREFIX_DIR"/share/omc/svcinfo.d" -//#define SVCINFO_DIR "/etc/omc/svcinfo.d" -#define SVCINFO_DIR XMLSVC_SYSCONF_DIR"/omc/svcinfo.d" - // XML Tags #define SERVICE_DESC_TAG "serviceDescription" #define NAME_TAG "name" Modified: contrib/xml-service-provider/trunk/xmlschema/xml-service-provider.xsd =================================================================== --- contrib/xml-service-provider/trunk/xmlschema/xml-service-provider.xsd 2006-12-13 00:50:35 UTC (rev 424) +++ contrib/xml-service-provider/trunk/xmlschema/xml-service-provider.xsd 2007-01-12 00:35:28 UTC (rev 425) @@ -60,10 +60,10 @@ <xs:documentation xml:lang="en-US"> Define the services that this service has a dependency on. There must be a corresponding Service Description XML file - for the antecedent service in the /etc/omc/svcinfo.d directory. + for the antecedent service in the /usr/share/omc/svcinfo.d directory. If serviceName is specified as "Foo", then it is assumed the the Service Description XML document for "Foo" is contained in - the file /etc/omc/svcinfo.d/Foo.xml. + the file /usr/share/omc/svcinfo.d/Foo.xml. </xs:documentation> </xs:annotation> <xs:sequence> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bni...@us...> - 2006-12-13 00:50:37
|
Revision: 424 http://svn.sourceforge.net/omc/?rev=424&view=rev Author: bnicholes Date: 2006-12-12 16:50:35 -0800 (Tue, 12 Dec 2006) Log Message: ----------- Since the prompt is really the handshaking mechanism between the client and the server, make sure that we only send the prompt after a response. Sending prompts out of order confuses the client Modified Paths: -------------- clp/trunk/src/omcclpdsvrconnection.cpp Modified: clp/trunk/src/omcclpdsvrconnection.cpp =================================================================== --- clp/trunk/src/omcclpdsvrconnection.cpp 2006-12-12 21:35:53 UTC (rev 423) +++ clp/trunk/src/omcclpdsvrconnection.cpp 2006-12-13 00:50:35 UTC (rev 424) @@ -158,14 +158,20 @@ try { String line; + String prompt = "\r\n"CLPPROMPT; while (sistr.good()) { line.erase(); - /* Send the prompt to the client */ - sostr << "\r\n"CLPPROMPT; - sostr.flush(); + /* Only send a prompt if we have handled a request */ + if (prompt.length()) + { + /* Send the prompt to the client */ + sostr << "\r\n"CLPPROMPT; + sostr.flush(); + prompt.erase(); + } int selType = Select::SELECT_INTERRUPTED; while(selType == Select::SELECT_INTERRUPTED) @@ -197,6 +203,7 @@ Format("OMCClpdSvrConnection received line: %1", line)); clpref->runCommand(line); sostr.flush(); + prompt = "\r\n"CLPPROMPT; } if (clpref->shouldExit()) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bni...@us...> - 2006-12-12 21:35:53
|
Revision: 423 http://svn.sourceforge.net/omc/?rev=423&view=rev Author: bnicholes Date: 2006-12-12 13:35:53 -0800 (Tue, 12 Dec 2006) Log Message: ----------- Realign the socket interaction of the server so that all of the data input is detected by the select call rather than the getline function. Modified Paths: -------------- clp/trunk/src/omcclpc.cpp clp/trunk/src/omcclpdsvrconnection.cpp Modified: clp/trunk/src/omcclpc.cpp =================================================================== --- clp/trunk/src/omcclpc.cpp 2006-12-12 21:33:29 UTC (rev 422) +++ clp/trunk/src/omcclpc.cpp 2006-12-12 21:35:53 UTC (rev 423) @@ -440,7 +440,7 @@ bool runOnce = false; String histFile = getenv ("HOME"); String prompt; - char lineBuf[1024]; + char lineBuf[4096]; /* Get the timout value from the configuration file. */ String item = getConfigItem(OMCClpdConfigOpts::SERVER_TIMEOUT_opt, @@ -587,7 +587,7 @@ /* Read the data from the socket and parse it on carriage returns. */ memset(lineBuf, 0, sizeof(lineBuf)); - int bytesRead = m_socket.read(lineBuf, sizeof(lineBuf)); + int bytesRead = m_socket.read(lineBuf, sizeof(lineBuf)-1); /* If we got data back then process it. Otherwise consider it to be an EOF and bail out. */ Modified: clp/trunk/src/omcclpdsvrconnection.cpp =================================================================== --- clp/trunk/src/omcclpdsvrconnection.cpp 2006-12-12 21:33:29 UTC (rev 422) +++ clp/trunk/src/omcclpdsvrconnection.cpp 2006-12-12 21:35:53 UTC (rev 423) @@ -61,37 +61,37 @@ ////////////////////////////////////////////////////////////////////////////// OMCClpdSvrConnection::OMCClpdSvrConnection(const Socket& socket, - OMCClpdServer* pServer, - IntrusiveReference<UnnamedPipe>& upipe) - : Runnable() - , m_pServer(pServer) - , m_socket(socket) - , m_upipe(upipe) - , m_shutdown(false) + OMCClpdServer* pServer, + IntrusiveReference<UnnamedPipe>& upipe) + : Runnable() + , m_pServer(pServer) + , m_socket(socket) + , m_upipe(upipe) + , m_shutdown(false) , m_clpSession() { - OW_LOG_DEBUG(pServer->getEnv()->getLogger(COMPONENT_NAME), - "OMCClpdSvrConnection object created"); + OW_LOG_DEBUG(pServer->getEnv()->getLogger(COMPONENT_NAME), + "OMCClpdSvrConnection object created"); - String item = pServer->getEnv()->getConfigItem( - OMCClpdConfigOpts::SERVER_TIMEOUT_opt, OMCCLPD_DEFAULT_SERVER_TIMEOUT); - m_socket.setTimeouts(item.toInt32()); + String item = pServer->getEnv()->getConfigItem( + OMCClpdConfigOpts::SERVER_TIMEOUT_opt, OMCCLPD_DEFAULT_SERVER_TIMEOUT); + m_socket.setTimeouts(item.toInt32()); } ////////////////////////////////////////////////////////////////////////////// // Destructor OMCClpdSvrConnection::~OMCClpdSvrConnection() { - try - { - m_socket.disconnect(); - } - catch (...) - { - // don't let exceptions escape - } + try + { + m_socket.disconnect(); + } + catch (...) + { + // don't let exceptions escape + } - OW_LOG_DEBUG(m_pServer->getEnv()->getLogger(COMPONENT_NAME), - "OMCClpdSvrConnection object destroyed"); + OW_LOG_DEBUG(m_pServer->getEnv()->getLogger(COMPONENT_NAME), + "OMCClpdSvrConnection object destroyed"); } ////////////////////////////////////////////////////////////////////////////// @@ -101,55 +101,52 @@ { String bfr; - if (is) - { - size_t count = 0; - std::streambuf *sb = is.rdbuf(); - - while (1) - { - int ch = sb->sbumpc(); - if (ch == EOF) - { - is.setstate(count == 0 - ? (std::ios::failbit | std::ios::eofbit) : std::ios::eofbit); - break; - } - - ++count; - - if ((ch == '\n') || (ch == '\r')) - { - break; - } + if (is) + { + std::streambuf *sb = is.rdbuf(); + sb->sgetc(); + std::streamsize count = sb->in_avail(); + bool stopReading = false; - bfr += String((char)ch); - } - } + /* Since the CLP will only allow a single command before + responding, read a line up to the \n or \r and then + empty the buffer to make sure that the server + stays insync with the client. */ + while (count-- > 0) + { + int ch = sb->sbumpc(); + + if ((ch == '\n') || (ch == '\r')) + stopReading = true; - return bfr; + if (!stopReading) + bfr += String((char)ch); + } + } + + return bfr; } ////////////////////////////////////////////////////////////////////////////// void OMCClpdSvrConnection::run() { - LoggerRef logger = m_pServer->getEnv()->getLogger(COMPONENT_NAME); + LoggerRef logger = m_pServer->getEnv()->getLogger(COMPONENT_NAME); - OW_LOG_DEBUG(logger, "OMCClpdSvrConnection::run entered"); + OW_LOG_DEBUG(logger, "OMCClpdSvrConnection::run entered"); - SelectTypeArray selArray; - selArray.push_back(m_upipe->getSelectObj()); - selArray.push_back(m_socket.getSelectObj()); + SelectTypeArray selArray; + selArray.push_back(m_upipe->getSelectObj()); + selArray.push_back(m_socket.getSelectObj()); - // Get input & output streams from socket - std::istream& sistr(m_socket.getInputStream()); - std::ostream& sostr(m_socket.getOutputStream()); + // Get input & output streams from socket + std::istream& sistr(m_socket.getInputStream()); + std::ostream& sostr(m_socket.getOutputStream()); - // Get timeout value - String item = m_pServer->getEnv()->getConfigItem( - OMCClpdConfigOpts::SERVER_TIMEOUT_opt, OMCCLPD_DEFAULT_SERVER_TIMEOUT); - Int32 timeout = item.toInt32(); + // Get timeout value + String item = m_pServer->getEnv()->getConfigItem( + OMCClpdConfigOpts::SERVER_TIMEOUT_opt, OMCCLPD_DEFAULT_SERVER_TIMEOUT); + Int32 timeout = item.toInt32(); OMCCLPProgramRef clpref(new OMCCLPDaemon(sostr)); clpref->setLogger(logger); @@ -158,105 +155,89 @@ { setCLPSession(clpref); - try - { - bool firstLine = true; + try + { + String line; - while (sistr.good()) - { - if (!firstLine) - { - String line = getLine(sistr); - OW_LOG_DEBUG(logger, - Format("OMCClpdSvrConnection received line: %1", line)); + while (sistr.good()) + { + line.erase(); - if (!line.empty()) { - clpref->runCommand(line); - sostr.flush(); - } - - if (clpref->shouldExit()) - { - line = "Good-bye :-)"; - sostr << line << "\r\n"; - sostr.flush(); - break; - } - } - else - firstLine = false; - /* Send the prompt to the client */ sostr << "\r\n"CLPPROMPT; sostr.flush(); - - // only select if the buffer is empty - if (sistr.rdbuf()->in_avail() == 0) - { - int selType = Select::SELECT_INTERRUPTED; - while(selType == Select::SELECT_INTERRUPTED) - { - selType = Select::select(selArray, timeout * 1000); // *1000 to convert seconds to milliseconds - } - - if (selType == Select::SELECT_ERROR) - { - OW_THROW(SocketException, "Error occurred during select()"); - } - if (selType == Select::SELECT_TIMEOUT) - { - OW_LOG_INFO(logger, "Client connection timed out"); - return; - } - if (selType == 0) // Unnamped pipe/event selected - { - OW_LOG_DEBUG(logger, "Server is shutting down. Closing connection"); - return; - } - } - else - { - // check for server shutting down message. - int selType = Select::select(selArray, 0); // 0 so we don't block - if (selType == 0) // Unnamped pipe/event selected - { - OW_LOG_DEBUG(logger, - "Server is shutting down. Closing connection"); - return; - } - } - } // while (sistr.good()) + int selType = Select::SELECT_INTERRUPTED; + while(selType == Select::SELECT_INTERRUPTED) + { + selType = Select::select(selArray, timeout * 1000); // *1000 to convert seconds to milliseconds + } + + if (selType == Select::SELECT_ERROR) + { + OW_THROW(SocketException, "Error occurred during select()"); + } + if (selType == Select::SELECT_TIMEOUT) + { + OW_LOG_INFO(logger, "Client connection timed out"); + break; + } + if (selType == 0) // Unnamped pipe/event selected + { + OW_LOG_DEBUG(logger, "Server is shutting down. Closing connection"); + break; + } + else if (selType == 1) + { + line = getLine(sistr); + } + + if (line.length()) { + OW_LOG_DEBUG(logger, + Format("OMCClpdSvrConnection received line: %1", line)); + clpref->runCommand(line); + sostr.flush(); + } + + if (clpref->shouldExit()) + { + line = "Good-bye :-)"; + sostr << line << "\r\n"; + sostr.flush(); + break; + } + } // while (sistr.good()) + clpref->destroyCLPSessionInfo(); - } // try - catch (Exception& e) - { - OW_LOG_ERROR(logger, Format("%1", e)); - } - catch (std::ios_base::failure& e) - { - // This happens if the socket is closed, so we don't - //have to do anything. - OW_LOG_DEBUG(logger, "Caught std::ios_base::failure, " - "client has closed the connection"); - } - catch (std::exception& e) - { - OW_LOG_ERROR(logger, Format("Caught std::exception (%1) " - "in OMCClpdSvrConnection::run()", e.what())); - } - catch (ThreadCancelledException&) - { - OW_LOG_ERROR(logger, "Got Thread Cancelled Exception in " - "OMCClpdSvrConnection::run()"); - throw; - } - catch (...) - { - OW_LOG_ERROR(logger, "Got Unknown Exception in " - "OMCClpdSvrConnection::run()"); - } + } // try + catch (Exception& e) + { + OW_LOG_ERROR(logger, Format("%1", e)); + } + catch (std::ios_base::failure& e) + { + // This happens if the socket is closed, so we don't + //have to do anything. + OW_LOG_DEBUG(logger, "Caught std::ios_base::failure, " + "client has closed the connection"); + } + catch (std::exception& e) + { + OW_LOG_ERROR(logger, Format("Caught std::exception (%1) " + "in OMCClpdSvrConnection::run()", e.what())); + } + catch (ThreadCancelledException&) + { + OW_LOG_ERROR(logger, "Got Thread Cancelled Exception in " + "OMCClpdSvrConnection::run()"); + throw; + } + catch (...) + { + OW_LOG_ERROR(logger, "Got Unknown Exception in " + "OMCClpdSvrConnection::run()"); + } } else { @@ -264,23 +245,23 @@ "OMCClpdSvrConnection::run()"); } - OW_LOG_DEBUG(logger, "OMCClpdSvrConnection::run exiting"); + OW_LOG_DEBUG(logger, "OMCClpdSvrConnection::run exiting"); } ////////////////////////////////////////////////////////////////////////////// String OMCClpdSvrConnection::getHostName() { - //return m_socket.getLocalAddress().getName(); - return SocketAddress::getAnyLocalHost().getName(); + //return m_socket.getLocalAddress().getName(); + return SocketAddress::getAnyLocalHost().getName(); } ////////////////////////////////////////////////////////////////////////////// void OMCClpdSvrConnection::doCooperativeCancel() { - m_shutdown = true; - m_socket.disconnect(); + m_shutdown = true; + m_socket.disconnect(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bni...@us...> - 2006-12-12 21:33:32
|
Revision: 422 http://svn.sourceforge.net/omc/?rev=422&view=rev Author: bnicholes Date: 2006-12-12 13:33:29 -0800 (Tue, 12 Dec 2006) Log Message: ----------- Make the display method of the omcclpcommand class obey the default output format Modified Paths: -------------- clp/trunk/src/omcclpcommand.cpp Modified: clp/trunk/src/omcclpcommand.cpp =================================================================== --- clp/trunk/src/omcclpcommand.cpp 2006-12-12 17:23:19 UTC (rev 421) +++ clp/trunk/src/omcclpcommand.cpp 2006-12-12 21:33:29 UTC (rev 422) @@ -650,8 +650,13 @@ OMCCLPProgram* clpSession = getCLPSession(); std::ostream& clpout(clpSession->clpout()); - displayHeader(OUTPUT_DISPLAY_TEXT); + /* Get any output format option information from the + command object. This should have been put here during + the parsing phase. */ + Int32 optArg = getOptionValueInt(E_OPT_OUTPUT, E_SUBOPT_FORMAT); + displayHeader(optArg); + if (!getErrMessage().empty()) { clpout << getErrMessage(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bni...@us...> - 2006-12-12 17:24:01
|
Revision: 421 http://svn.sourceforge.net/omc/?rev=421&view=rev Author: bnicholes Date: 2006-12-12 09:23:19 -0800 (Tue, 12 Dec 2006) Log Message: ----------- Fix the CLP prompt to conform to the spec. The prompt should be -><space> Modified Paths: -------------- clp/trunk/src/omcclpc.cpp clp/trunk/src/omcclpc.h clp/trunk/src/omcclpcommon.h clp/trunk/src/omcclpdsvrconnection.cpp Modified: clp/trunk/src/omcclpc.cpp =================================================================== --- clp/trunk/src/omcclpc.cpp 2006-12-11 23:33:10 UTC (rev 420) +++ clp/trunk/src/omcclpc.cpp 2006-12-12 17:23:19 UTC (rev 421) @@ -309,7 +309,7 @@ int count = 0; /* Wait for the prompt from the server */ - while (!prompt.endsWith("-->") && (count < 10)) + while (!prompt.endsWith(PROMPT) && (count < 10)) { if (m_socket.waitForInput(1)) { @@ -351,8 +351,8 @@ { String UFiP(0); - /* We need to get the session UFiP from the CLP server. - Send the command to get the session UFiP */ + /* We need to make sure that the 'session' reserved target + exists so that we can use it when needed */ String cmd = "show -o format=keyword session"; m_socket.write(cmd.c_str(), cmd.length()); m_socket.write("\r\n", 2); Modified: clp/trunk/src/omcclpc.h =================================================================== --- clp/trunk/src/omcclpc.h 2006-12-11 23:33:10 UTC (rev 420) +++ clp/trunk/src/omcclpc.h 2006-12-12 17:23:19 UTC (rev 421) @@ -77,7 +77,7 @@ void doExit(); void shutdown(); String getServerPrompt(); - bool isValidPrompt (String prompt) {prompt.endsWith("-->");} + bool isValidPrompt (String prompt) {prompt.endsWith(PROMPT);} bool socketConnect(); void createLogger(); Modified: clp/trunk/src/omcclpcommon.h =================================================================== --- clp/trunk/src/omcclpcommon.h 2006-12-11 23:33:10 UTC (rev 420) +++ clp/trunk/src/omcclpcommon.h 2006-12-12 17:23:19 UTC (rev 421) @@ -61,6 +61,8 @@ s = s.substring(0,s.length()-1); } #define CLPENDL "\r\n" +#define PROMPT "-> " +#define CLPPROMPT "CLP"PROMPT namespace OMCCLP { Modified: clp/trunk/src/omcclpdsvrconnection.cpp =================================================================== --- clp/trunk/src/omcclpdsvrconnection.cpp 2006-12-11 23:33:10 UTC (rev 420) +++ clp/trunk/src/omcclpdsvrconnection.cpp 2006-12-12 17:23:19 UTC (rev 421) @@ -187,7 +187,7 @@ firstLine = false; /* Send the prompt to the client */ - sostr << "\r\nCLP-->"; + sostr << "\r\n"CLPPROMPT; sostr.flush(); // only select if the buffer is empty This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <np...@us...> - 2006-12-11 23:33:11
|
Revision: 420 http://svn.sourceforge.net/omc/?rev=420&view=rev Author: npaxton Date: 2006-12-11 15:33:10 -0800 (Mon, 11 Dec 2006) Log Message: ----------- some fixes to spec and Makefile to help find config files, etc Modified Paths: -------------- clp/trunk/configure.ac clp/trunk/src/Makefile.am clp/trunk/src/spec/omcclp.spec Modified: clp/trunk/configure.ac =================================================================== --- clp/trunk/configure.ac 2006-12-08 23:08:19 UTC (rev 419) +++ clp/trunk/configure.ac 2006-12-11 23:33:10 UTC (rev 420) @@ -2,7 +2,7 @@ AC_CONFIG_AUX_DIR(config) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(omcclp, 0.5) +AM_INIT_AUTOMAKE(omcclp, 0.7) AC_LANG_CPLUSPLUS AC_PROG_CXX Modified: clp/trunk/src/Makefile.am =================================================================== --- clp/trunk/src/Makefile.am 2006-12-08 23:08:19 UTC (rev 419) +++ clp/trunk/src/Makefile.am 2006-12-11 23:33:10 UTC (rev 420) @@ -95,12 +95,13 @@ stlini.cpp stlini.h \ version.h -dist_omcclp_DATA = omcclpd.conf omcclpaddr.ini oemextensions.ini omcclphelp.ini -dist_omcclpd_DATA = omcclpd.conf omcclpaddr.ini oemextensions.ini -dist_omcclpc_DATA = omcclpd.conf omcclpaddr.ini oemextensions.ini omcclphelp.ini -omcclpdir = $(sysconfdir)/omcclp -omcclpddir = $(sysconfdir)/omcclpd -omcclpcdir = $(sysconfdir)/omcclpc +dist_omcclp_DATA = omcclpaddr.ini oemextensions.ini omcclphelp.ini omcclpd.conf +#dist_omcclp_DATA = omcclpd.conf omcclpaddr.ini oemextensions.ini omcclphelp.ini +#dist_omcclpd_DATA = omcclpd.conf omcclpaddr.ini oemextensions.ini +#dist_omcclpc_DATA = omcclpd.conf omcclpaddr.ini oemextensions.ini omcclphelp.ini +omcclpdir = $(sysconfdir) +#omcclpddir = $(sysconfdir) +#omcclpcdir = $(sysconfdir) # set the include path found by configure INCLUDES= $(all_includes) \ Modified: clp/trunk/src/spec/omcclp.spec =================================================================== --- clp/trunk/src/spec/omcclp.spec 2006-12-08 23:08:19 UTC (rev 419) +++ clp/trunk/src/spec/omcclp.spec 2006-12-11 23:33:10 UTC (rev 420) @@ -1,11 +1,12 @@ Summary: Implementation of the SMCLP specification -Name: smclp +Name: omcclp BuildRequires: gcc-c++ openwbem-devel openssl-devel readline-devel -Version: 0.1 +Version: 0.7 Release: 1 -Copyright: Novell Inc. +#Copyright: Novell Inc. +License: Novell, Inc. Group: SMASH Applications -Source: omcclp-0.1.tar.gz +Source: omcclp-0.7.tar.gz URL: https://svn.innerweb.novell.com/svn/novlclp/trunk/omcclp Distribution: SUSE Linux Packager: Brad Nicholes <bni...@no...> @@ -17,18 +18,26 @@ %setup %build -./configure --prefix=/usr --sysconfdir=/etc +./configure --prefix=/usr --sysconfdir=/etc/omcclp --enable-debug-mode make %install make install +install /etc/omcclp/omcclpd.conf $BUILD_ROOT_DIR/etc/omcclp/omcclpc.conf +install /etc/omcclp/omcclpd.conf $BUILD_ROOT_DIR/etc/omcclp/omcclp.conf %files %dir /etc/omcclp %config /etc/omcclp/omcclp.conf +%config /etc/omcclp/omcclpc.conf +%config /etc/omcclp/omcclpd.conf %config /etc/omcclp/omcclpaddr.ini +%config /etc/omcclp/oemextensions.ini +%config /etc/omcclp/omcclphelp.ini + /usr/bin/omcclp +/usr/bin/omcclpc +/usr/sbin/omcclpd - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bni...@us...> - 2006-12-08 23:08:18
|
Revision: 419 http://svn.sourceforge.net/omc/?rev=419&view=rev Author: bnicholes Date: 2006-12-08 15:08:19 -0800 (Fri, 08 Dec 2006) Log Message: ----------- Fix a typo with COMMAND COMPLETED Modified Paths: -------------- clp/trunk/src/omcclpcmdalias.cpp clp/trunk/src/omcclpcmdcd.cpp clp/trunk/src/omcclpcmdcreate.cpp clp/trunk/src/omcclpcmddelete.cpp clp/trunk/src/omcclpcmddump.cpp clp/trunk/src/omcclpcmdexit.cpp clp/trunk/src/omcclpcmdhelp.cpp clp/trunk/src/omcclpcmdload.cpp clp/trunk/src/omcclpcmdreset.cpp clp/trunk/src/omcclpcmdset.cpp clp/trunk/src/omcclpcmdshow.cpp clp/trunk/src/omcclpcmdstart.cpp clp/trunk/src/omcclpcmdstop.cpp clp/trunk/src/omcclpcmdversion.cpp clp/trunk/src/omcclpcommandstatus.cpp clp/trunk/src/omcclpcommandstatus.h Modified: clp/trunk/src/omcclpcmdalias.cpp =================================================================== --- clp/trunk/src/omcclpcmdalias.cpp 2006-12-08 22:45:14 UTC (rev 418) +++ clp/trunk/src/omcclpcmdalias.cpp 2006-12-08 23:08:19 UTC (rev 419) @@ -120,7 +120,7 @@ conf->SaveConfigurationFile(); } - getCmdStatusRef()->setStatus(COMMAND_COMPLETE); + getCmdStatusRef()->setStatus(COMMAND_COMPLETED); return true; } Modified: clp/trunk/src/omcclpcmdcd.cpp =================================================================== --- clp/trunk/src/omcclpcmdcd.cpp 2006-12-08 22:45:14 UTC (rev 418) +++ clp/trunk/src/omcclpcmdcd.cpp 2006-12-08 23:08:19 UTC (rev 419) @@ -107,7 +107,7 @@ return false; } - getCmdStatusRef()->setStatus(COMMAND_COMPLETE); + getCmdStatusRef()->setStatus(COMMAND_COMPLETED); return true; } Modified: clp/trunk/src/omcclpcmdcreate.cpp =================================================================== --- clp/trunk/src/omcclpcmdcreate.cpp 2006-12-08 22:45:14 UTC (rev 418) +++ clp/trunk/src/omcclpcmdcreate.cpp 2006-12-08 23:08:19 UTC (rev 419) @@ -172,7 +172,7 @@ try { CIMValue cv = cc->invokeMethod (invokeCop, methodName, inParams, outParams); - getCmdStatusRef()->setStatus(COMMAND_COMPLETE); + getCmdStatusRef()->setStatus(COMMAND_COMPLETED); return true; } catch ( CIMException& ce ) @@ -198,7 +198,7 @@ return false; } - getCmdStatusRef()->setStatus(COMMAND_COMPLETE); + getCmdStatusRef()->setStatus(COMMAND_COMPLETED); return true; } Modified: clp/trunk/src/omcclpcmddelete.cpp =================================================================== --- clp/trunk/src/omcclpcmddelete.cpp 2006-12-08 22:45:14 UTC (rev 418) +++ clp/trunk/src/omcclpcmddelete.cpp 2006-12-08 23:08:19 UTC (rev 419) @@ -175,7 +175,7 @@ if (ret) { - getCmdStatusRef()->setStatus(COMMAND_COMPLETE); + getCmdStatusRef()->setStatus(COMMAND_COMPLETED); } else { Modified: clp/trunk/src/omcclpcmddump.cpp =================================================================== --- clp/trunk/src/omcclpcmddump.cpp 2006-12-08 22:45:14 UTC (rev 418) +++ clp/trunk/src/omcclpcmddump.cpp 2006-12-08 23:08:19 UTC (rev 419) @@ -50,7 +50,7 @@ /*XXX Not implemented yet */ - getCmdStatusRef()->setStatus(COMMAND_COMPLETE); + getCmdStatusRef()->setStatus(COMMAND_COMPLETED); return true; } Modified: clp/trunk/src/omcclpcmdexit.cpp =================================================================== --- clp/trunk/src/omcclpcmdexit.cpp 2006-12-08 22:45:14 UTC (rev 418) +++ clp/trunk/src/omcclpcmdexit.cpp 2006-12-08 23:08:19 UTC (rev 419) @@ -51,7 +51,7 @@ /* Set the exit flag in the main program object */ clpSession->doExit(); - getCmdStatusRef()->setStatus(COMMAND_COMPLETE); + getCmdStatusRef()->setStatus(COMMAND_COMPLETED); return true; } Modified: clp/trunk/src/omcclpcmdhelp.cpp =================================================================== --- clp/trunk/src/omcclpcmdhelp.cpp 2006-12-08 22:45:14 UTC (rev 418) +++ clp/trunk/src/omcclpcmdhelp.cpp 2006-12-08 23:08:19 UTC (rev 419) @@ -59,7 +59,7 @@ { /* Nothing to execute for the help command */ - getCmdStatusRef()->setStatus(COMMAND_COMPLETE); + getCmdStatusRef()->setStatus(COMMAND_COMPLETED); return true; } Modified: clp/trunk/src/omcclpcmdload.cpp =================================================================== --- clp/trunk/src/omcclpcmdload.cpp 2006-12-08 22:45:14 UTC (rev 418) +++ clp/trunk/src/omcclpcmdload.cpp 2006-12-08 23:08:19 UTC (rev 419) @@ -51,7 +51,7 @@ /*XXX Not yet implemented */ - getCmdStatusRef()->setStatus(COMMAND_COMPLETE); + getCmdStatusRef()->setStatus(COMMAND_COMPLETED); return true; } Modified: clp/trunk/src/omcclpcmdreset.cpp =================================================================== --- clp/trunk/src/omcclpcmdreset.cpp 2006-12-08 22:45:14 UTC (rev 418) +++ clp/trunk/src/omcclpcmdreset.cpp 2006-12-08 23:08:19 UTC (rev 419) @@ -136,7 +136,7 @@ return false; } - getCmdStatusRef()->setStatus(COMMAND_COMPLETE); + getCmdStatusRef()->setStatus(COMMAND_COMPLETED); return true; } Modified: clp/trunk/src/omcclpcmdset.cpp =================================================================== --- clp/trunk/src/omcclpcmdset.cpp 2006-12-08 22:45:14 UTC (rev 418) +++ clp/trunk/src/omcclpcmdset.cpp 2006-12-08 23:08:19 UTC (rev 419) @@ -188,7 +188,7 @@ } else { - getCmdStatusRef()->setStatus(COMMAND_COMPLETE); + getCmdStatusRef()->setStatus(COMMAND_COMPLETED); ret = true; } } @@ -279,7 +279,7 @@ } else { - getCmdStatusRef()->setStatus(COMMAND_COMPLETE); + getCmdStatusRef()->setStatus(COMMAND_COMPLETED); ret = true; } } Modified: clp/trunk/src/omcclpcmdshow.cpp =================================================================== --- clp/trunk/src/omcclpcmdshow.cpp 2006-12-08 22:45:14 UTC (rev 418) +++ clp/trunk/src/omcclpcmdshow.cpp 2006-12-08 23:08:19 UTC (rev 419) @@ -419,7 +419,7 @@ return false; } - getCmdStatusRef()->setStatus(COMMAND_COMPLETE); + getCmdStatusRef()->setStatus(COMMAND_COMPLETED); return true; } Modified: clp/trunk/src/omcclpcmdstart.cpp =================================================================== --- clp/trunk/src/omcclpcmdstart.cpp 2006-12-08 22:45:14 UTC (rev 418) +++ clp/trunk/src/omcclpcmdstart.cpp 2006-12-08 23:08:19 UTC (rev 419) @@ -136,7 +136,7 @@ return false; } - getCmdStatusRef()->setStatus(COMMAND_COMPLETE); + getCmdStatusRef()->setStatus(COMMAND_COMPLETED); return true; } Modified: clp/trunk/src/omcclpcmdstop.cpp =================================================================== --- clp/trunk/src/omcclpcmdstop.cpp 2006-12-08 22:45:14 UTC (rev 418) +++ clp/trunk/src/omcclpcmdstop.cpp 2006-12-08 23:08:19 UTC (rev 419) @@ -138,7 +138,7 @@ return false; } - getCmdStatusRef()->setStatus(COMMAND_COMPLETE); + getCmdStatusRef()->setStatus(COMMAND_COMPLETED); return true; } Modified: clp/trunk/src/omcclpcmdversion.cpp =================================================================== --- clp/trunk/src/omcclpcmdversion.cpp 2006-12-08 22:45:14 UTC (rev 418) +++ clp/trunk/src/omcclpcmdversion.cpp 2006-12-08 23:08:19 UTC (rev 419) @@ -49,7 +49,7 @@ { // XXX we may need to get the version from the // CLP service running in the CIMOM. - getCmdStatusRef()->setStatus(COMMAND_COMPLETE); + getCmdStatusRef()->setStatus(COMMAND_COMPLETED); return true; } Modified: clp/trunk/src/omcclpcommandstatus.cpp =================================================================== --- clp/trunk/src/omcclpcommandstatus.cpp 2006-12-08 22:45:14 UTC (rev 418) +++ clp/trunk/src/omcclpcommandstatus.cpp 2006-12-08 23:08:19 UTC (rev 419) @@ -35,7 +35,7 @@ } cmdmsg; static cmdmsg cmdstatus[] = { - {COMMAND_COMPLETE, "COMMAND COMPLETE"}, + {COMMAND_COMPLETED, "COMMAND COMPLETED"}, {COMMAND_SPAWNED, "COMMAND SPAWNED"}, {COMMAND_PROCESSING_FAILED, "COMMAND PROCESSING FAILED"}, {COMMAND_EXECUTION_FAILED, "COMMAND EXECUTION FAILED"}, Modified: clp/trunk/src/omcclpcommandstatus.h =================================================================== --- clp/trunk/src/omcclpcommandstatus.h 2006-12-08 22:45:14 UTC (rev 418) +++ clp/trunk/src/omcclpcommandstatus.h 2006-12-08 23:08:19 UTC (rev 419) @@ -39,7 +39,7 @@ namespace OMCCLP { // Command Status values -#define COMMAND_COMPLETE 0 +#define COMMAND_COMPLETED 0 #define COMMAND_SPAWNED 1 #define COMMAND_PROCESSING_FAILED 2 #define COMMAND_EXECUTION_FAILED 3 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bni...@us...> - 2006-12-08 22:45:20
|
Revision: 418 http://svn.sourceforge.net/omc/?rev=418&view=rev Author: bnicholes Date: 2006-12-08 14:45:14 -0800 (Fri, 08 Dec 2006) Log Message: ----------- Allow the value map values on a set command to be resolved before passing them to the cimom Modified Paths: -------------- clp/trunk/src/omcclpcmdmapping.cpp clp/trunk/src/omcclpcmdmapping.h Modified: clp/trunk/src/omcclpcmdmapping.cpp =================================================================== --- clp/trunk/src/omcclpcmdmapping.cpp 2006-12-08 22:43:44 UTC (rev 417) +++ clp/trunk/src/omcclpcmdmapping.cpp 2006-12-08 22:45:14 UTC (rev 418) @@ -25,7 +25,7 @@ #ifdef HAVE_CONFIG_H - #include <config.h> + #include <config.h> #endif #include "omcclpprogram.h" @@ -48,33 +48,33 @@ */ CIMValue SMCmdMapping::smRequestStateChange (const CIMObjectPath& cop, Int32 reqState) { - m_methodToCall = m_methodCalled = "RequestStateChange"; - m_cimObjectPath = cop; + m_methodToCall = m_methodCalled = "RequestStateChange"; + m_cimObjectPath = cop; - try - { - /* Push the parameters on the input parameter array. */ - /*XXX For now we aren't going to worry about the timeoutperiod. - That will come later */ - m_inParams.push_back(CIMParamValue("RequestedState", CIMValue(UInt16(reqState)))); - m_inParams.push_back(CIMParamValue("TimeoutPeriod", CIMValue(CIMDateTime(0)))); + try + { + /* Push the parameters on the input parameter array. */ + /*XXX For now we aren't going to worry about the timeoutperiod. + That will come later */ + m_inParams.push_back(CIMParamValue("RequestedState", CIMValue(UInt16(reqState)))); + m_inParams.push_back(CIMParamValue("TimeoutPeriod", CIMValue(CIMDateTime(0)))); - /*XXX The out paramenter should be checked for a job object, but that will come later */ + /*XXX The out paramenter should be checked for a job object, but that will come later */ - m_returnValue = m_cimClient->invokeMethod (m_cimObjectPath, m_methodToCall, m_inParams, m_outParams); - } - catch (const CIMException& ce) - { - cerr << ce << CLPENDL; - m_returnValue = CIMValue(2u); - m_errorMsg = String(ce.getDescription()); - } - catch (Exception& e) - { - cerr << e << CLPENDL; - } + m_returnValue = m_cimClient->invokeMethod (m_cimObjectPath, m_methodToCall, m_inParams, m_outParams); + } + catch (const CIMException& ce) + { + cerr << ce << CLPENDL; + m_returnValue = CIMValue(2u); + m_errorMsg = String(ce.getDescription()); + } + catch (Exception& e) + { + cerr << e << CLPENDL; + } - return m_returnValue; + return m_returnValue; } /** @@ -82,8 +82,8 @@ */ CIMValue SMCmdMapping::smResetRSC (const CIMObjectPath& cop) { - // Send a reset which evaluates to id 11 - return smRequestStateChange (cop, 11); + // Send a reset which evaluates to id 11 + return smRequestStateChange (cop, 11); } /** @@ -91,8 +91,8 @@ */ CIMValue SMCmdMapping::smStartRSC (const CIMObjectPath& cop) { - // Send a Enabled which evaluates to id 2 - return smRequestStateChange (cop, 2); + // Send a Enabled which evaluates to id 2 + return smRequestStateChange (cop, 2); } /** @@ -100,8 +100,8 @@ */ CIMValue SMCmdMapping::smStopRSC (const CIMObjectPath& cop) { - // Send a Disabled which evaluates to id 3 - return smRequestStateChange (cop, 3); + // Send a Disabled which evaluates to id 3 + return smRequestStateChange (cop, 3); } /** @@ -110,7 +110,7 @@ */ CIMValue SMCmdMapping::smOpDeleteInstance (const CIMObjectPath& cop) { - m_returnValue = CIMValue(0u); + m_returnValue = CIMValue(0u); try { @@ -145,15 +145,15 @@ } catch (const CIMException& ce) { - m_errorMsg = String(ce.getDescription()); - /*XXX Need to specify a real error value here */ - m_returnValue = CIMValue(2u); + m_errorMsg = String(ce.getDescription()); + /*XXX Need to specify a real error value here */ + m_returnValue = CIMValue(2u); } catch (Exception& e) { - m_errorMsg = String(e.getMessage()); - /*XXX Need to specify a real error value here */ - m_returnValue = CIMValue(2u); + m_errorMsg = String(e.getMessage()); + /*XXX Need to specify a real error value here */ + m_returnValue = CIMValue(2u); } return m_returnValue; @@ -165,35 +165,39 @@ */ CIMValue SMCmdMapping::smModifyInstance (const CIMObjectPath& cop) { - m_returnValue = CIMValue(0u); + m_returnValue = CIMValue(0u); - CIMInstance ci; - try - { - ci = m_cimClient->getInstance(cop); - } - catch (const CIMException& ce) - { - cerr << ce << CLPENDL; - /*XXX Need to specify a real error value here */ - m_returnValue = CIMValue(2u); - } + CIMInstance ci; + try + { + ci = m_cimClient->getInstance(cop, WBEMFlags::E_NOT_LOCAL_ONLY, + WBEMFlags::E_INCLUDE_QUALIFIERS); + } + catch (const CIMException& ce) + { + cerr << ce << CLPENDL; + /*XXX Need to specify a real error value here */ + m_returnValue = CIMValue(2u); + } - for (int i=0;i<m_property_names.size();i++) - { - ci.updatePropertyValue(m_property_names[i], m_property_values[i]); - } - try - { - m_cimClient->modifyInstance(ci, WBEMFlags::E_EXCLUDE_QUALIFIERS, &m_property_names); - } - catch (const CIMException& ce) - { - m_returnValue = CIMValue((UInt32)ce.getErrNo()); - m_errorMsg = String(ce.getDescription()); - } + for (int i=0;i<m_property_names.size();i++) + { + CIMProperty cprop = ci.getProperty(CIMName(m_property_names[i])); + CIMValue cv = resolveMappedValue(cprop, m_property_values[i].toString()); - return m_returnValue; + ci.updatePropertyValue(m_property_names[i], cv); + } + try + { + m_cimClient->modifyInstance(ci, WBEMFlags::E_EXCLUDE_QUALIFIERS, &m_property_names); + } + catch (const CIMException& ce) + { + m_returnValue = CIMValue((UInt32)ce.getErrNo()); + m_errorMsg = String(ce.getDescription()); + } + + return m_returnValue; } /** @@ -203,26 +207,26 @@ */ CIMValue SMCmdMapping::smInvokeMethod (const CIMObjectPath& cop) { - m_cimObjectPath = cop; + m_cimObjectPath = cop; - try - { - m_methodCalled = m_methodToCall; - m_returnValue = m_cimClient->invokeMethod (m_cimObjectPath, m_methodToCall, - m_inParams, m_outParams); - } - catch (const CIMException& ce) - { - cerr << ce << CLPENDL; - m_returnValue = CIMValue((UInt32)-1); - m_errorMsg = String(ce.getDescription()); - } - catch (Exception& e) - { - cerr << e << CLPENDL; - } + try + { + m_methodCalled = m_methodToCall; + m_returnValue = m_cimClient->invokeMethod (m_cimObjectPath, m_methodToCall, + m_inParams, m_outParams); + } + catch (const CIMException& ce) + { + cerr << ce << CLPENDL; + m_returnValue = CIMValue((UInt32)-1); + m_errorMsg = String(ce.getDescription()); + } + catch (Exception& e) + { + cerr << e << CLPENDL; + } - return m_returnValue; + return m_returnValue; } /** @@ -231,8 +235,8 @@ */ void SMCmdMapping::setProperty (const String name, const CIMValue value) { - m_property_names.push_back(name); - m_property_values.push_back(value); + m_property_names.push_back(name); + m_property_values.push_back(value); } /** @@ -241,144 +245,279 @@ * val - String value to be converted to the correct type and * set */ +CIMValue SMCmdMapping::resolveMappedValue (const CIMProperty prop, const String val) +{ + CIMValue cv(val); + + try + { + switch (prop.getDataType().getType()) + { + case CIMDataType::UINT8: + try + { + cv = CIMValue(val.toUInt8()); + } + catch (Exception& e) + { + String v = getPropertyMappedValue(prop,val); + cv = CIMValue(v.toUInt8()); + } + break; + case CIMDataType::SINT8: + try + { + cv = CIMValue(val.toInt8()); + } + catch (Exception& e) + { + String v = getPropertyMappedValue(prop,val); + cv = CIMValue(v.toInt8()); + } + break; + case CIMDataType::UINT16: + try + { + cv = CIMValue(val.toUInt16()); + } + catch (Exception& e) + { + String v = getPropertyMappedValue(prop,val); + cv = CIMValue(v.toUInt16()); + } + break; + case CIMDataType::SINT16: + try + { + cv = CIMValue(val.toInt16()); + } + catch (Exception& e) + { + String v = getPropertyMappedValue(prop,val); + cv = CIMValue(v.toInt16()); + } + break; + case CIMDataType::UINT32: + try + { + cv = CIMValue(val.toUInt32()); + } + catch (Exception& e) + { + String v = getPropertyMappedValue(prop,val); + cv = CIMValue(v.toUInt32()); + } + break; + case CIMDataType::SINT32: + try + { + cv = CIMValue(val.toInt32()); + } + catch (Exception& e) + { + String v = getPropertyMappedValue(prop,val); + cv = CIMValue(v.toInt32()); + } + break; + case CIMDataType::UINT64: + try + { + cv = CIMValue(val.toUInt64()); + } + catch (Exception& e) + { + String v = getPropertyMappedValue(prop,val); + cv = CIMValue(v.toUInt64()); + } + break; + case CIMDataType::SINT64: + try + { + cv = CIMValue(val.toInt64()); + } + catch (Exception& e) + { + String v = getPropertyMappedValue(prop,val); + cv = CIMValue(v.toInt64()); + } + break; + case CIMDataType::BOOLEAN: + cv = CIMValue(val.toBool()); + break; + case CIMDataType::REAL32: + cv = CIMValue(val.toReal32()); + break; + case CIMDataType::REAL64: + cv = CIMValue(val.toReal64()); + break; + // case CIMDataType::DATETIME: + // cv = CIMValue(val.toDateTime()); + // break; + // case CIMDataType::CHAR16: + // cv = CIMValue(val.toChar16()); + // break; + } + } + catch (const CIMException& ce) + { + cerr << ce << CLPENDL; + m_returnValue = CIMValue((UInt32)-1); + m_errorMsg = String("Invalid property type "); + cv = CIMValue(val); + } + catch (Exception& e) + { + cerr << e << CLPENDL; + cv = CIMValue(val); + } + + return cv; +} + +/** +* Set an IN parameter for a method that will be invoked +* param - String name of the parameter +* val - String value to be converted to the correct type and +* set +*/ bool SMCmdMapping::setInParamValue (String param, String val) { - String paramName; - bool ret = true; + String paramName; + bool ret = true; - try - { - for (int i=0; i<m_inParamsDesc.size(); i++) - { - paramName = m_inParamsDesc[i].getName(); - if (param.equalsIgnoreCase(paramName)) - { - CIMValue cv(val); - switch (m_inParamsDesc[i].getType().getType()) - { - case CIMDataType::UINT8: - try - { - cv = CIMValue(val.toUInt8()); - } - catch (Exception& e) - { - String v = getParameterMappedValue(m_inParamsDesc[i],val); - cv = CIMValue(v.toUInt8()); - } - break; - case CIMDataType::SINT8: - try - { - cv = CIMValue(val.toInt8()); - } - catch (Exception& e) - { - String v = getParameterMappedValue(m_inParamsDesc[i],val); - cv = CIMValue(v.toInt8()); - } - break; - case CIMDataType::UINT16: - try - { - cv = CIMValue(val.toUInt16()); - } - catch (Exception& e) - { - String v = getParameterMappedValue(m_inParamsDesc[i],val); - cv = CIMValue(v.toUInt16()); - } - break; - case CIMDataType::SINT16: - try - { - cv = CIMValue(val.toInt16()); - } - catch (Exception& e) - { - String v = getParameterMappedValue(m_inParamsDesc[i],val); - cv = CIMValue(v.toInt16()); - } - break; - case CIMDataType::UINT32: - try - { - cv = CIMValue(val.toUInt32()); - } - catch (Exception& e) - { - String v = getParameterMappedValue(m_inParamsDesc[i],val); - cv = CIMValue(v.toUInt32()); - } - break; - case CIMDataType::SINT32: - try - { - cv = CIMValue(val.toInt32()); - } - catch (Exception& e) - { - String v = getParameterMappedValue(m_inParamsDesc[i],val); - cv = CIMValue(v.toInt32()); - } - break; - case CIMDataType::UINT64: - try - { - cv = CIMValue(val.toUInt64()); - } - catch (Exception& e) - { - String v = getParameterMappedValue(m_inParamsDesc[i],val); - cv = CIMValue(v.toUInt64()); - } - break; - case CIMDataType::SINT64: - try - { - cv = CIMValue(val.toInt64()); - } - catch (Exception& e) - { - String v = getParameterMappedValue(m_inParamsDesc[i],val); - cv = CIMValue(v.toInt64()); - } - break; - case CIMDataType::BOOLEAN: - cv = CIMValue(val.toBool()); - break; - case CIMDataType::REAL32: - cv = CIMValue(val.toReal32()); - break; - case CIMDataType::REAL64: - cv = CIMValue(val.toReal64()); - break; + try + { + for (int i=0; i<m_inParamsDesc.size(); i++) + { + paramName = m_inParamsDesc[i].getName(); + if (param.equalsIgnoreCase(paramName)) + { + CIMValue cv(val); + switch (m_inParamsDesc[i].getType().getType()) + { + case CIMDataType::UINT8: + try + { + cv = CIMValue(val.toUInt8()); + } + catch (Exception& e) + { + String v = getParameterMappedValue(m_inParamsDesc[i],val); + cv = CIMValue(v.toUInt8()); + } + break; + case CIMDataType::SINT8: + try + { + cv = CIMValue(val.toInt8()); + } + catch (Exception& e) + { + String v = getParameterMappedValue(m_inParamsDesc[i],val); + cv = CIMValue(v.toInt8()); + } + break; + case CIMDataType::UINT16: + try + { + cv = CIMValue(val.toUInt16()); + } + catch (Exception& e) + { + String v = getParameterMappedValue(m_inParamsDesc[i],val); + cv = CIMValue(v.toUInt16()); + } + break; + case CIMDataType::SINT16: + try + { + cv = CIMValue(val.toInt16()); + } + catch (Exception& e) + { + String v = getParameterMappedValue(m_inParamsDesc[i],val); + cv = CIMValue(v.toInt16()); + } + break; + case CIMDataType::UINT32: + try + { + cv = CIMValue(val.toUInt32()); + } + catch (Exception& e) + { + String v = getParameterMappedValue(m_inParamsDesc[i],val); + cv = CIMValue(v.toUInt32()); + } + break; + case CIMDataType::SINT32: + try + { + cv = CIMValue(val.toInt32()); + } + catch (Exception& e) + { + String v = getParameterMappedValue(m_inParamsDesc[i],val); + cv = CIMValue(v.toInt32()); + } + break; + case CIMDataType::UINT64: + try + { + cv = CIMValue(val.toUInt64()); + } + catch (Exception& e) + { + String v = getParameterMappedValue(m_inParamsDesc[i],val); + cv = CIMValue(v.toUInt64()); + } + break; + case CIMDataType::SINT64: + try + { + cv = CIMValue(val.toInt64()); + } + catch (Exception& e) + { + String v = getParameterMappedValue(m_inParamsDesc[i],val); + cv = CIMValue(v.toInt64()); + } + break; + case CIMDataType::BOOLEAN: + cv = CIMValue(val.toBool()); + break; + case CIMDataType::REAL32: + cv = CIMValue(val.toReal32()); + break; + case CIMDataType::REAL64: + cv = CIMValue(val.toReal64()); + break; // case CIMDataType::DATETIME: // cv = CIMValue(val.toDateTime()); // break; // case CIMDataType::CHAR16: // cv = CIMValue(val.toChar16()); // break; - } + } - setInParamValue(CIMParamValue(paramName, cv)); - break; - } - } - } - catch (const CIMException& ce) - { - cerr << ce << CLPENDL; - m_returnValue = CIMValue((UInt32)-1); - m_errorMsg = String("Invalid parameter for method ") + paramName; - ret = false; - } - catch (Exception& e) - { - cerr << e << CLPENDL; - ret = false; - } - return ret; + setInParamValue(CIMParamValue(paramName, cv)); + break; + } + } + } + catch (const CIMException& ce) + { + cerr << ce << CLPENDL; + m_returnValue = CIMValue((UInt32)-1); + m_errorMsg = String("Invalid parameter for method ") + paramName; + ret = false; + } + catch (Exception& e) + { + cerr << e << CLPENDL; + ret = false; + } + return ret; } /** @@ -389,58 +528,58 @@ */ bool SMCmdMapping::setMethodToCall(String cmd) { - String params; - bool ret = true; + String params; + bool ret = true; - /* Parse the method invocation string for the class name, - method name and parameters. */ - try - { - Int32 idxStart = 0; - Int32 idxEnd = cmd.indexOf('.'); - m_methodClassName = cmd.substring(idxStart, idxEnd); + /* Parse the method invocation string for the class name, + method name and parameters. */ + try + { + Int32 idxStart = 0; + Int32 idxEnd = cmd.indexOf('.'); + m_methodClassName = cmd.substring(idxStart, idxEnd); - idxStart = idxStart+idxEnd+1; - idxEnd = cmd.indexOf('(', idxStart) - idxStart; - m_methodToCall = cmd.substring(idxStart, idxEnd); + idxStart = idxStart+idxEnd+1; + idxEnd = cmd.indexOf('(', idxStart) - idxStart; + m_methodToCall = cmd.substring(idxStart, idxEnd); - idxStart = idxStart+idxEnd+1; - idxEnd = cmd.indexOf(')', idxStart) - idxStart; - params = cmd.substring(idxStart, idxEnd); - } - catch (const CIMException& ce) - { - cerr << ce << CLPENDL; - m_returnValue = CIMValue((UInt32)-1); - m_errorMsg = String("Invalid method invocation string"); - ret = false; - } - catch (Exception& e) - { - cerr << e << CLPENDL; - ret = false; - } + idxStart = idxStart+idxEnd+1; + idxEnd = cmd.indexOf(')', idxStart) - idxStart; + params = cmd.substring(idxStart, idxEnd); + } + catch (const CIMException& ce) + { + cerr << ce << CLPENDL; + m_returnValue = CIMValue((UInt32)-1); + m_errorMsg = String("Invalid method invocation string"); + ret = false; + } + catch (Exception& e) + { + cerr << e << CLPENDL; + ret = false; + } - /* Get the method description from the CIMOM so that it can - be matched with the actual parameter list. This will - tell us if everything lines up for the method call. */ - CIMClass cimCls = m_cimClient->getClass(m_methodClassName, E_NOT_LOCAL_ONLY, - E_INCLUDE_QUALIFIERS, E_INCLUDE_CLASS_ORIGIN); - CIMMethod cimMthd = cimCls.getMethod(m_methodToCall); + /* Get the method description from the CIMOM so that it can + be matched with the actual parameter list. This will + tell us if everything lines up for the method call. */ + CIMClass cimCls = m_cimClient->getClass(m_methodClassName, E_NOT_LOCAL_ONLY, + E_INCLUDE_QUALIFIERS, E_INCLUDE_CLASS_ORIGIN); + CIMMethod cimMthd = cimCls.getMethod(m_methodToCall); - if (cimMthd) - { - m_inParamsDesc = cimMthd.getINParameters(); - m_outParamsDesc = cimMthd.getOUTParameters(); - } - else - { - m_returnValue = CIMValue((UInt32)-1); - m_errorMsg = String("Method: ") + m_methodToCall + - String("doesn't exist for class ") + m_methodClassName; - ret = false; - } - return ret; + if (cimMthd) + { + m_inParamsDesc = cimMthd.getINParameters(); + m_outParamsDesc = cimMthd.getOUTParameters(); + } + else + { + m_returnValue = CIMValue((UInt32)-1); + m_errorMsg = String("Method: ") + m_methodToCall + + String("doesn't exist for class ") + m_methodClassName; + ret = false; + } + return ret; } /** @@ -448,43 +587,43 @@ */ String SMCmdMapping::getReturnValueText() { - /* Initialize the return value */ - String msg(""); + /* Initialize the return value */ + String msg(""); - /* If we don't have a contained object then bail out */ - if (!m_cimObjectPath) - return msg; + /* If we don't have a contained object then bail out */ + if (!m_cimObjectPath) + return msg; - /* Get the CIMMethod object for the called method */ - String clsName = m_cimObjectPath.getClassName(); - CIMClass cimCls = m_cimClient->getClass(clsName, E_NOT_LOCAL_ONLY, E_INCLUDE_QUALIFIERS, E_INCLUDE_CLASS_ORIGIN); - CIMMethod cimMeth = cimCls.getMethod(m_methodCalled); + /* Get the CIMMethod object for the called method */ + String clsName = m_cimObjectPath.getClassName(); + CIMClass cimCls = m_cimClient->getClass(clsName, E_NOT_LOCAL_ONLY, E_INCLUDE_QUALIFIERS, E_INCLUDE_CLASS_ORIGIN); + CIMMethod cimMeth = cimCls.getMethod(m_methodCalled); - if (cimMeth) - { - /* Get the valueMap and values for the called method */ - String retValue = m_returnValue.toString(); - CIMQualifier returnsMap = cimMeth.getQualifier("ValueMap"); - CIMQualifier returnsMsgs = cimMeth.getQualifier("Values"); - if (returnsMap && returnsMsgs) - { - /* Tokenize the string array so that we can match up the return - value with the value map */ - StringArray returnsMapSA = returnsMap.getValue().toStringArray(); - StringArray returnsMsgsSA = returnsMsgs.getValue().toStringArray(); + if (cimMeth) + { + /* Get the valueMap and values for the called method */ + String retValue = m_returnValue.toString(); + CIMQualifier returnsMap = cimMeth.getQualifier("ValueMap"); + CIMQualifier returnsMsgs = cimMeth.getQualifier("Values"); + if (returnsMap && returnsMsgs) + { + /* Tokenize the string array so that we can match up the return + value with the value map */ + StringArray returnsMapSA = returnsMap.getValue().toStringArray(); + StringArray returnsMsgsSA = returnsMsgs.getValue().toStringArray(); - for (int i=0;i<returnsMapSA.size();i++) - { - if (retValue.equals(returnsMapSA[i])) - { - msg = returnsMsgsSA[i]; - break; - } - } - } - } + for (int i=0;i<returnsMapSA.size();i++) + { + if (retValue.equals(returnsMapSA[i])) + { + msg = returnsMsgsSA[i]; + break; + } + } + } + } - return msg; + return msg; } /** @@ -492,34 +631,67 @@ */ String SMCmdMapping::getParameterMappedValue(CIMParameter param, String val) { - /* Initialize the return value */ - String retVal(""); + /* Initialize the return value */ + String retVal(""); - /* Get the valueMap and values for the parameter */ - CIMQualifier paramMap = param.getQualifier(CIMName("ValueMap")); - CIMQualifier paramValues = param.getQualifier(CIMName("Values")); + /* Get the valueMap and values for the parameter */ + CIMQualifier paramMap = param.getQualifier(CIMName("ValueMap")); + CIMQualifier paramValues = param.getQualifier(CIMName("Values")); - if (paramMap && paramValues) - { - /* Tokenize the string array so that we can match up the command - line value with the the value map */ - StringArray paramMapSA = paramMap.getValue().toStringArray(); - StringArray paramValuesSA = paramValues.getValue().toStringArray(); - STRIP_QUOTES(val); + if (paramMap && paramValues) + { + /* Tokenize the string array so that we can match up the command + line value with the the value map */ + StringArray paramMapSA = paramMap.getValue().toStringArray(); + StringArray paramValuesSA = paramValues.getValue().toStringArray(); + STRIP_QUOTES(val); - for (int i=0; i<paramValuesSA.size(); i++) - { - if (val.equalsIgnoreCase(paramValuesSA[i])) - { - retVal = paramMapSA[i]; - break; - } - } - } + for (int i=0; i<paramValuesSA.size(); i++) + { + if (val.equalsIgnoreCase(paramValuesSA[i])) + { + retVal = paramMapSA[i]; + break; + } + } + } - return retVal; + return retVal; } +/** +* Get the mapped value for a property +*/ +String SMCmdMapping::getPropertyMappedValue(CIMProperty prop, String val) +{ + /* Initialize the return value */ + String retVal(""); + /* Get the valueMap and values for the parameter */ + CIMQualifier qualMap = prop.getQualifier(CIMName("ValueMap")); + CIMQualifier qualValues = prop.getQualifier(CIMName("Values")); + + if (qualMap && qualValues) + { + /* Tokenize the string array so that we can match up the command + line value with the the value map */ + StringArray qualMapSA = qualMap.getValue().toStringArray(); + StringArray qualValuesSA = qualValues.getValue().toStringArray(); + STRIP_QUOTES(val); + + for (int i=0; i<qualValuesSA.size(); i++) + { + if (val.equalsIgnoreCase(qualValuesSA[i])) + { + retVal = qualMapSA[i]; + break; + } + } + } + + return retVal; } + +} + Modified: clp/trunk/src/omcclpcmdmapping.h =================================================================== --- clp/trunk/src/omcclpcmdmapping.h 2006-12-08 22:43:44 UTC (rev 417) +++ clp/trunk/src/omcclpcmdmapping.h 2006-12-08 22:45:14 UTC (rev 418) @@ -36,6 +36,7 @@ #include <openwbem/OW_CIMValue.hpp> #include <openwbem/OW_CIMParamValue.hpp> #include <openwbem/OW_CIMParameter.hpp> +#include <openwbem/OW_CIMProperty.hpp> namespace OMCCLP { @@ -84,6 +85,7 @@ String getReturnValueText(); String getParameterMappedValue(CIMParameter param, String val); + String getPropertyMappedValue(CIMProperty prop, String val); String getErrorMsgText() const {return m_errorMsg;} CIMValue getReturnValue() const {return m_returnValue;} CIMParamValueArray getInParamValues () {return m_inParams;} @@ -101,6 +103,7 @@ bool setMethodToCall(String cmd); void setProperty (const String name, const CIMValue value); + CIMValue resolveMappedValue (const CIMProperty prop, const String val); protected: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bni...@us...> - 2006-12-08 22:43:44
|
Revision: 417 http://svn.sourceforge.net/omc/?rev=417&view=rev Author: bnicholes Date: 2006-12-08 14:43:44 -0800 (Fri, 08 Dec 2006) Log Message: ----------- Make sure that the command terminator is recognized as a LF, CR or CRLF Modified Paths: -------------- clp/trunk/src/omcclpdsvrconnection.cpp clp/trunk/src/omcclpdsvrconnection.h Modified: clp/trunk/src/omcclpdsvrconnection.cpp =================================================================== --- clp/trunk/src/omcclpdsvrconnection.cpp 2006-12-08 22:41:31 UTC (rev 416) +++ clp/trunk/src/omcclpdsvrconnection.cpp 2006-12-08 22:43:44 UTC (rev 417) @@ -36,6 +36,7 @@ #include <openwbem/OW_SortedVectorMap.hpp> #include <openwbem/OW_StringBuffer.hpp> #include <openwbem/OW_ThreadCancelledException.hpp> +#include <iostream> #if defined(BAD) #undef BAD @@ -92,7 +93,44 @@ OW_LOG_DEBUG(m_pServer->getEnv()->getLogger(COMPONENT_NAME), "OMCClpdSvrConnection object destroyed"); } + ////////////////////////////////////////////////////////////////////////////// +// Get one line from an input stream. This StringBuffer object will be +// reset (cleared) before an attempt is made to retrieve the line. +const String OMCClpdSvrConnection::getLine(std::istream& is) +{ + String bfr; + + if (is) + { + size_t count = 0; + std::streambuf *sb = is.rdbuf(); + + while (1) + { + int ch = sb->sbumpc(); + if (ch == EOF) + { + is.setstate(count == 0 + ? (std::ios::failbit | std::ios::eofbit) : std::ios::eofbit); + break; + } + + ++count; + + if ((ch == '\n') || (ch == '\r')) + { + break; + } + + bfr += String((char)ch); + } + } + + return bfr; +} + +////////////////////////////////////////////////////////////////////////////// void OMCClpdSvrConnection::run() { @@ -128,7 +166,7 @@ { if (!firstLine) { - String line = String::getLine(sistr); + String line = getLine(sistr); OW_LOG_DEBUG(logger, Format("OMCClpdSvrConnection received line: %1", line)); Modified: clp/trunk/src/omcclpdsvrconnection.h =================================================================== --- clp/trunk/src/omcclpdsvrconnection.h 2006-12-08 22:41:31 UTC (rev 416) +++ clp/trunk/src/omcclpdsvrconnection.h 2006-12-08 22:43:44 UTC (rev 417) @@ -76,6 +76,8 @@ protected: + const String getLine(std::istream& is); + private: OMCClpdServer* m_pServer; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bni...@us...> - 2006-12-08 22:41:32
|
Revision: 416 http://svn.sourceforge.net/omc/?rev=416&view=rev Author: bnicholes Date: 2006-12-08 14:41:31 -0800 (Fri, 08 Dec 2006) Log Message: ----------- The search for the token in the lexer, should be case insensitive Modified Paths: -------------- clp/trunk/src/clpcmdgram/clpcmdlexer.ll Modified: clp/trunk/src/clpcmdgram/clpcmdlexer.ll =================================================================== --- clp/trunk/src/clpcmdgram/clpcmdlexer.ll 2006-12-06 18:28:33 UTC (rev 415) +++ clp/trunk/src/clpcmdgram/clpcmdlexer.ll 2006-12-08 22:41:31 UTC (rev 416) @@ -131,7 +131,7 @@ //printf("\ncheck token %s\n", token); for (i=0; keywords[i].word; i++) { - if (strcmp(keywords[i].word, token) == 0) { + if (strcasecmp(keywords[i].word, token) == 0) { return keywords[i].token; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2006-12-06 18:28:52
|
Revision: 415 http://svn.sourceforge.net/omc/?rev=415&view=rev Author: brieske Date: 2006-12-06 10:28:33 -0800 (Wed, 06 Dec 2006) Log Message: ----------- Handled error condition in IpmiIfcFruInstantiateAll Modified Paths: -------------- smash/trunk/src/lib/omc-ipmi/IpmiIfcFru.cpp Modified: smash/trunk/src/lib/omc-ipmi/IpmiIfcFru.cpp =================================================================== --- smash/trunk/src/lib/omc-ipmi/IpmiIfcFru.cpp 2006-12-05 00:09:31 UTC (rev 414) +++ smash/trunk/src/lib/omc-ipmi/IpmiIfcFru.cpp 2006-12-06 18:28:33 UTC (rev 415) @@ -286,7 +286,8 @@ IpmiIfcFruInstantiateAll(ipmi_drv *drv) { ipmiifc_sdr_list *sdr; - + int cc = 0; + UInt32 saveAddress = drv->target_addr; UInt8 saveLun = drv->target_lun; UInt8 saveChannel = drv->target_channel; @@ -311,7 +312,6 @@ for (int retries=5;retries;retries-- ) { - int cc; cc=IpmiIfcFruGetInv(drv, sdr->record.fruloc->device_id); if (cc==0xc3) // retry if timeout { @@ -320,16 +320,20 @@ } break; } - IpmiFruOptionalRefArray optRefArray = IpmiIfcFruParseOptional(); + + if(cc == 0) + { + IpmiFruOptionalRefArray optRefArray = IpmiIfcFruParseOptional(); - IpmiFruRef sref; - sref = new IpmiFru((int)sdr->length, - (unsigned char *)sdr->record.full); - sref->setOptionalRefArray(optRefArray); - IpmiFruOptionalRefArray tmpRefArray; - tmpRefArray = sref->getOptionalRefArray(); + IpmiFruRef sref; + sref = new IpmiFru((int)sdr->length, + (unsigned char *)sdr->record.full); + sref->setOptionalRefArray(optRefArray); + IpmiFruOptionalRefArray tmpRefArray; + tmpRefArray = sref->getOptionalRefArray(); - g_fruArray.append(sref); + g_fruArray.append(sref); + } } drv->target_addr = saveAddress; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bni...@us...> - 2006-12-05 00:09:51
|
Revision: 414 http://svn.sourceforge.net/omc/?rev=414&view=rev Author: bnicholes Date: 2006-12-04 16:09:31 -0800 (Mon, 04 Dec 2006) Log Message: ----------- replace endl with \r\n to fix the output formatting on a telnet session Modified Paths: -------------- clp/trunk/src/omcclp.cpp clp/trunk/src/omcclpcmdalias.cpp clp/trunk/src/omcclpcmdcreate.cpp clp/trunk/src/omcclpcmddelete.cpp clp/trunk/src/omcclpcmdhelp.cpp clp/trunk/src/omcclpcmdmapping.cpp clp/trunk/src/omcclpcmdreset.cpp clp/trunk/src/omcclpcmdshow.cpp clp/trunk/src/omcclpcmdstart.cpp clp/trunk/src/omcclpcmdstop.cpp clp/trunk/src/omcclpcommand.cpp clp/trunk/src/omcclpcommandline.cpp clp/trunk/src/omcclpcommandstatus.cpp clp/trunk/src/omcclpcommon.cpp clp/trunk/src/omcclpcommon.h clp/trunk/src/omcclpconf.cpp clp/trunk/src/omcclpd.cpp clp/trunk/src/omcclpprint.cpp clp/trunk/src/omcclpprint.h clp/trunk/src/omcclpprogram.cpp clp/trunk/src/omcclptargetpath.cpp Modified: clp/trunk/src/omcclp.cpp =================================================================== --- clp/trunk/src/omcclp.cpp 2006-12-04 23:15:57 UTC (rev 413) +++ clp/trunk/src/omcclp.cpp 2006-12-05 00:09:31 UTC (rev 414) @@ -82,11 +82,11 @@ void usage() { cerr << PROG_NAME << " " << PROG_VERSION - << " Server Management Command Line Protocol" << endl; - cerr << "Copyright (C) 2006 by Novell Inc." << endl; - cerr << "Usage: " << PROG_NAME << " [OPTIONS]" << endl; + << " Server Management Command Line Protocol" << CLPENDL; + cerr << "Copyright (C) 2006 by Novell Inc." << CLPENDL; + cerr << "Usage: " << PROG_NAME << " [OPTIONS]" << CLPENDL; - cout << endl << CmdLineParser::getUsage(g_options) << endl; + cout << CLPENDL << CmdLineParser::getUsage(g_options) << CLPENDL; } void printCmdLineParserExceptionMessage(CmdLineParserException& e) @@ -94,19 +94,19 @@ switch (e.getErrorCode()) { case CmdLineParser::E_INVALID_OPTION: - cerr << "unknown option: " << e.getMessage() << endl; + cerr << "unknown option: " << e.getMessage() << CLPENDL; break; case CmdLineParser::E_MISSING_ARGUMENT: - cerr << "missing argument for option: " << e.getMessage() << endl; + cerr << "missing argument for option: " << e.getMessage() << CLPENDL; break; case CmdLineParser::E_INVALID_NON_OPTION_ARG: - cerr << "invalid non-option argument: " << e.getMessage() << endl; + cerr << "invalid non-option argument: " << e.getMessage() << CLPENDL; break; case CmdLineParser::E_MISSING_OPTION: - cerr << "missing required option: " << e.getMessage() << endl; + cerr << "missing required option: " << e.getMessage() << CLPENDL; break; default: - cerr << "failed parsing command line options: " << e << endl; + cerr << "failed parsing command line options: " << e << CLPENDL; break; } } @@ -162,17 +162,17 @@ } catch (Exception& e) { - cerr << "* EXCEPTION CAUGHT IN clp server startup!" << endl; - cerr << Format("* %1", e) << endl; + cerr << "* EXCEPTION CAUGHT IN clp server startup!" << CLPENDL; + cerr << Format("* %1", e) << CLPENDL; } catch (std::exception& e) { - cerr << "* EXCEPTION CAUGHT IN clp server startup!" << endl; - cerr << Format("* Message: %1", e.what()) << endl; + cerr << "* EXCEPTION CAUGHT IN clp server startup!" << CLPENDL; + cerr << Format("* Message: %1", e.what()) << CLPENDL; } catch (...) { - cerr << "* UNKNOWN EXCEPTION CAUGHT IN clpd MAIN!" << endl; + cerr << "* UNKNOWN EXCEPTION CAUGHT IN clpd MAIN!" << CLPENDL; } if (initialized) @@ -224,7 +224,7 @@ } else { - cerr << "Exiting CLP server thread" << endl; + cerr << "Exiting CLP server thread" << CLPENDL; m_condition.notifyAll(); return -1; } @@ -261,7 +261,7 @@ // it can be referenced by other objects. gclp = &clp; - cout << "hello world" << endl; + cout << "hello world" << CLPENDL; /* Initialize the readline library */ init_rl(); @@ -287,16 +287,16 @@ } catch (AssertionException& a) { - cerr << "Caught Assertion: " << a << endl; + cerr << "Caught Assertion: " << a << CLPENDL; ret = 1; } catch (Exception& e) { - cerr << e << endl; + cerr << e << CLPENDL; ret = 1; } - //cerr << "Exit recieved. Client returning" << endl; + //cerr << "Exit recieved. Client returning" << CLPENDL; /* Signal a shutdown */ sigPipe->writeInt(0); return ret; @@ -360,7 +360,7 @@ OMCCLPServerThread clpsvrt(cond, lock); int cc, c; - cout << "hello world" << endl; + cout << "hello world" << CLPENDL; try { @@ -454,23 +454,23 @@ } catch (AssertionException& a) { - cerr << "Caught Assertion: " << a << endl; + cerr << "Caught Assertion: " << a << CLPENDL; } catch (CIMException& e) { - cerr << "ERROR: CIMException:" << e.getMessage() << endl; + cerr << "ERROR: CIMException:" << e.getMessage() << CLPENDL; } catch (Exception& e) { - cerr << "ERROR: Exception:" << e.getMessage() << endl; + cerr << "ERROR: Exception:" << e.getMessage() << CLPENDL; } catch (std::exception& e) { - cerr << "ERROR: sdtException:" << e.what() << endl; + cerr << "ERROR: sdtException:" << e.what() << CLPENDL; } catch (...) { - cerr << "ERROR: UnknownException." << endl; + cerr << "ERROR: UnknownException." << CLPENDL; } return 1; Modified: clp/trunk/src/omcclpcmdalias.cpp =================================================================== --- clp/trunk/src/omcclpcmdalias.cpp 2006-12-04 23:15:57 UTC (rev 413) +++ clp/trunk/src/omcclpcmdalias.cpp 2006-12-05 00:09:31 UTC (rev 414) @@ -157,7 +157,7 @@ for (size_t i = 0; (i < m_aliasDisplayList.size()); ++i) { - clpout << m_aliasDisplayList[i] << endl; + clpout << m_aliasDisplayList[i] << CLPENDL; } } if (optArg == OUTPUT_DISPLAY_KEYWORD) Modified: clp/trunk/src/omcclpcmdcreate.cpp =================================================================== --- clp/trunk/src/omcclpcmdcreate.cpp 2006-12-04 23:15:57 UTC (rev 413) +++ clp/trunk/src/omcclpcmdcreate.cpp 2006-12-05 00:09:31 UTC (rev 414) @@ -129,7 +129,7 @@ } catch ( CIMException& ce ) { - cerr << ce << endl; + cerr << ce << CLPENDL; getCmdStatusRef()->setStatus(COMMAND_EXECUTION_FAILED); getCmdStatusRef()->setProcessingError (INVALID_TARGET); return false; @@ -177,7 +177,7 @@ } catch ( CIMException& ce ) { - cerr << ce << endl; + cerr << ce << CLPENDL; getCmdStatusRef()->setStatus(COMMAND_EXECUTION_FAILED); getCmdStatusRef()->setProcessingError (INVALID_TARGET); return false; Modified: clp/trunk/src/omcclpcmddelete.cpp =================================================================== --- clp/trunk/src/omcclpcmddelete.cpp 2006-12-04 23:15:57 UTC (rev 413) +++ clp/trunk/src/omcclpcmddelete.cpp 2006-12-05 00:09:31 UTC (rev 414) @@ -116,14 +116,14 @@ } catch (const CIMException& ce) { - cerr << ce << endl; + cerr << ce << CLPENDL; getCmdStatusRef()->setStatus(COMMAND_EXECUTION_FAILED); getCmdStatusRef()->setProcessingError (INVALID_TARGET); getCmdStatusRef()->setCIMStatus(CIM_ERR_METHOD_NOT_FOUND); } catch (Exception& e) { - cerr << e << endl; + cerr << e << CLPENDL; } } else @@ -219,7 +219,7 @@ for (int x=0; x < m_deleteInfoArray.size(); x++) { clpout << m_deleteInfoArray[x]->getUFiP() << " "; - clpout << m_deleteInfoArray[x]->getErrorMessage() << endl; + clpout << m_deleteInfoArray[x]->getErrorMessage() << CLPENDL; } } } @@ -230,7 +230,7 @@ for (int x=0; x < m_deleteInfoArray.size(); x++) { clpout << m_deleteInfoArray[x]->getUFiP() << " "; - clpout << m_deleteInfoArray[x]->getErrorMessage() << endl; + clpout << m_deleteInfoArray[x]->getErrorMessage() << CLPENDL; } clpout << "endoutput\n"; } @@ -248,10 +248,10 @@ clpout << "<ufit ufct=\"" << UFcT; clpout << "\" instance=\"" << x << "\"> "; - clpout << UFcT << ufis << "</ufit>" << endl; - clpout << "<ufip>" << UFiP << "</ufip>" << endl; + clpout << UFcT << ufis << "</ufit>" << CLPENDL; + clpout << "<ufip>" << UFiP << "</ufip>" << CLPENDL; clpout << "<result>" << m_deleteInfoArray[x]->getErrorMessage() << "</result>"; - clpout << endl; + clpout << CLPENDL; } clpout << "</instance>\n"; clpout << "</target>\n"; Modified: clp/trunk/src/omcclpcmdhelp.cpp =================================================================== --- clp/trunk/src/omcclpcmdhelp.cpp 2006-12-04 23:15:57 UTC (rev 413) +++ clp/trunk/src/omcclpcmdhelp.cpp 2006-12-05 00:09:31 UTC (rev 414) @@ -96,29 +96,29 @@ for (size_t i = 0; (i < topics.size()); ++i) { String topicHelp = conf->GetIniSetting(String("help-Commands"), topics[i]); - clpout << topicHelp << endl; + clpout << topicHelp << CLPENDL; } } if (optArg == OUTPUT_DISPLAY_KEYWORD) { - clpout << "command=help" << endl; + clpout << "command=help" << CLPENDL; for (size_t i = 0; (i < topics.size()); ++i) { String topicHelp = conf->GetIniSetting(String("help-Commands"), topics[i]); - clpout << "help=" << topicHelp << endl; + clpout << "help=" << topicHelp << CLPENDL; } - clpout << "endoutput" << endl; + clpout << "endoutput" << CLPENDL; } if (optArg == OUTPUT_DISPLAY_CLPXML) { - clpout << "<help>" << endl; + clpout << "<help>" << CLPENDL; for (size_t i = 0; (i < topics.size()); ++i) { String topicHelp = conf->GetIniSetting(String("help-Commands"), topics[i]); - clpout << "<text>" << topicHelp << "</text>" << endl; + clpout << "<text>" << topicHelp << "</text>" << CLPENDL; } - clpout << "</help>" << endl; - clpout << "</response>" << endl; + clpout << "</help>" << CLPENDL; + clpout << "</response>" << CLPENDL; } } Modified: clp/trunk/src/omcclpcmdmapping.cpp =================================================================== --- clp/trunk/src/omcclpcmdmapping.cpp 2006-12-04 23:15:57 UTC (rev 413) +++ clp/trunk/src/omcclpcmdmapping.cpp 2006-12-05 00:09:31 UTC (rev 414) @@ -65,13 +65,13 @@ } catch (const CIMException& ce) { - cerr << ce << endl; + cerr << ce << CLPENDL; m_returnValue = CIMValue(2u); m_errorMsg = String(ce.getDescription()); } catch (Exception& e) { - cerr << e << endl; + cerr << e << CLPENDL; } return m_returnValue; @@ -174,7 +174,7 @@ } catch (const CIMException& ce) { - cerr << ce << endl; + cerr << ce << CLPENDL; /*XXX Need to specify a real error value here */ m_returnValue = CIMValue(2u); } @@ -213,13 +213,13 @@ } catch (const CIMException& ce) { - cerr << ce << endl; + cerr << ce << CLPENDL; m_returnValue = CIMValue((UInt32)-1); m_errorMsg = String(ce.getDescription()); } catch (Exception& e) { - cerr << e << endl; + cerr << e << CLPENDL; } return m_returnValue; @@ -368,14 +368,14 @@ } catch (const CIMException& ce) { - cerr << ce << endl; + cerr << ce << CLPENDL; m_returnValue = CIMValue((UInt32)-1); m_errorMsg = String("Invalid parameter for method ") + paramName; ret = false; } catch (Exception& e) { - cerr << e << endl; + cerr << e << CLPENDL; ret = false; } return ret; @@ -410,14 +410,14 @@ } catch (const CIMException& ce) { - cerr << ce << endl; + cerr << ce << CLPENDL; m_returnValue = CIMValue((UInt32)-1); m_errorMsg = String("Invalid method invocation string"); ret = false; } catch (Exception& e) { - cerr << e << endl; + cerr << e << CLPENDL; ret = false; } Modified: clp/trunk/src/omcclpcmdreset.cpp =================================================================== --- clp/trunk/src/omcclpcmdreset.cpp 2006-12-04 23:15:57 UTC (rev 413) +++ clp/trunk/src/omcclpcmdreset.cpp 2006-12-05 00:09:31 UTC (rev 414) @@ -118,14 +118,14 @@ { getCmdStatusRef()->setStatus(COMMAND_EXECUTION_FAILED); getCmdStatusRef()->setCIMStatus (CIM_ERR_UNEXPECTED_RESPONSE); - cerr << "reset command general error: " << ce << endl; + cerr << "reset command general error: " << ce << CLPENDL; return false; } catch (Exception& e) { getCmdStatusRef()->setStatus(COMMAND_EXECUTION_FAILED); getCmdStatusRef()->setCIMStatus (CIM_ERR_UNEXPECTED_RESPONSE); - cerr << "reset command general error: " << e << endl; + cerr << "reset command general error: " << e << CLPENDL; return false; } } Modified: clp/trunk/src/omcclpcmdshow.cpp =================================================================== --- clp/trunk/src/omcclpcmdshow.cpp 2006-12-04 23:15:57 UTC (rev 413) +++ clp/trunk/src/omcclpcmdshow.cpp 2006-12-05 00:09:31 UTC (rev 414) @@ -76,11 +76,11 @@ } catch (const CIMException& ce) { - cerr << ce << endl; + cerr << ce << CLPENDL; } catch (Exception& e) { - cerr << e << endl; + cerr << e << CLPENDL; } /* If a specific traversal level was specified on the command line @@ -210,11 +210,11 @@ } catch (const CIMException& ce) { - cerr << ce << endl; + cerr << ce << CLPENDL; } catch (Exception& e) { - cerr << e << endl; + cerr << e << CLPENDL; } /* If a specific traversal level was specified on the command line @@ -475,7 +475,7 @@ } catch (const Exception& e) { - clpout << e.getMessage() << endl; + clpout << e.getMessage() << CLPENDL; } handler->outputTail(clpSession->clpout()); delete handler; Modified: clp/trunk/src/omcclpcmdstart.cpp =================================================================== --- clp/trunk/src/omcclpcmdstart.cpp 2006-12-04 23:15:57 UTC (rev 413) +++ clp/trunk/src/omcclpcmdstart.cpp 2006-12-05 00:09:31 UTC (rev 414) @@ -118,14 +118,14 @@ { getCmdStatusRef()->setStatus(COMMAND_EXECUTION_FAILED); getCmdStatusRef()->setCIMStatus (CIM_ERR_UNEXPECTED_RESPONSE); - cerr << "start command general error: " << ce << endl; + cerr << "start command general error: " << ce << CLPENDL; return false; } catch (Exception& e) { getCmdStatusRef()->setStatus(COMMAND_EXECUTION_FAILED); getCmdStatusRef()->setCIMStatus (CIM_ERR_UNEXPECTED_RESPONSE); - cerr << "start command general error: " << e << endl; + cerr << "start command general error: " << e << CLPENDL; return false; } } Modified: clp/trunk/src/omcclpcmdstop.cpp =================================================================== --- clp/trunk/src/omcclpcmdstop.cpp 2006-12-04 23:15:57 UTC (rev 413) +++ clp/trunk/src/omcclpcmdstop.cpp 2006-12-05 00:09:31 UTC (rev 414) @@ -120,14 +120,14 @@ { getCmdStatusRef()->setStatus(COMMAND_EXECUTION_FAILED); getCmdStatusRef()->setCIMStatus (CIM_ERR_UNEXPECTED_RESPONSE); - cerr << "stop command general error: " << ce << endl; + cerr << "stop command general error: " << ce << CLPENDL; return false; } catch (Exception& e) { getCmdStatusRef()->setStatus(COMMAND_EXECUTION_FAILED); getCmdStatusRef()->setCIMStatus (CIM_ERR_UNEXPECTED_RESPONSE); - cerr << "stop command general error: " << e << endl; + cerr << "stop command general error: " << e << CLPENDL; return false; } } Modified: clp/trunk/src/omcclpcommand.cpp =================================================================== --- clp/trunk/src/omcclpcommand.cpp 2006-12-04 23:15:57 UTC (rev 413) +++ clp/trunk/src/omcclpcommand.cpp 2006-12-05 00:09:31 UTC (rev 414) @@ -335,11 +335,11 @@ } catch (const CIMException& ce) { - cerr << ce << endl; + cerr << ce << CLPENDL; } catch (Exception& e) { - cerr << e << endl; + cerr << e << CLPENDL; } catch (...) { @@ -382,11 +382,11 @@ } catch (const CIMException& ce) { - cerr << ce << endl; + cerr << ce << CLPENDL; } catch (Exception& e) { - cerr << e << endl; + cerr << e << CLPENDL; } catch (...) { @@ -550,7 +550,7 @@ /* If there was a general message or message error, then display it */ if (getCmdStatusRef()->getMessageData()->getMessageID() != 0) { - clpout << getCmdStatusRef()->getMessageData()->getMessage() << endl; + clpout << getCmdStatusRef()->getMessageData()->getMessage() << CLPENDL; } break; case OUTPUT_DISPLAY_KEYWORD: Modified: clp/trunk/src/omcclpcommandline.cpp =================================================================== --- clp/trunk/src/omcclpcommandline.cpp 2006-12-04 23:15:57 UTC (rev 413) +++ clp/trunk/src/omcclpcommandline.cpp 2006-12-05 00:09:31 UTC (rev 414) @@ -52,7 +52,7 @@ */ static void display_message (const char *msg) { - cout << endl << msg << endl; + cout << CLPENDL << msg << CLPENDL; rl_on_new_line(); } Modified: clp/trunk/src/omcclpcommandstatus.cpp =================================================================== --- clp/trunk/src/omcclpcommandstatus.cpp 2006-12-04 23:15:57 UTC (rev 413) +++ clp/trunk/src/omcclpcommandstatus.cpp 2006-12-05 00:09:31 UTC (rev 414) @@ -299,13 +299,13 @@ switch (displayArg) { case OUTPUT_DISPLAY_TEXT: - str_msg += "\n"; + str_msg += "\r\n"; break; case OUTPUT_DISPLAY_KEYWORD: - str_msg = "status=" + str_msg + "\n"; + str_msg = "status=" + str_msg + "\r\n"; break; case OUTPUT_DISPLAY_CLPXML: - str_msg = "<status>" + str_msg + "</status>" + "\n"; + str_msg = "<status>" + str_msg + "</status>" + "\r\n"; break; } @@ -343,13 +343,13 @@ switch (displayArg) { case OUTPUT_DISPLAY_TEXT: - str_msg += "\n"; + str_msg += "\r\n"; break; case OUTPUT_DISPLAY_KEYWORD: - str_msg = "status_tag=" + str_msg + "\n"; + str_msg = "status_tag=" + str_msg + "\r\n"; break; case OUTPUT_DISPLAY_CLPXML: - str_msg = "<status_tag>" + str_msg + "</status_tag>" + "\n"; + str_msg = "<status_tag>" + str_msg + "</status_tag>" + "\r\n"; break; } @@ -380,13 +380,13 @@ switch (displayArg) { case OUTPUT_DISPLAY_TEXT: - str_msg += "\n"; + str_msg += "\r\n"; break; case OUTPUT_DISPLAY_KEYWORD: - str_msg = "error=" + str_msg + "\n"; + str_msg = "error=" + str_msg + "\r\n"; break; case OUTPUT_DISPLAY_CLPXML: - str_msg = "<error>" + str_msg + "</error>" + "\n"; + str_msg = "<error>" + str_msg + "</error>" + "\r\n"; break; } @@ -419,13 +419,13 @@ switch (displayArg) { case OUTPUT_DISPLAY_TEXT: - str_msg += "\n"; + str_msg += "\r\n"; break; case OUTPUT_DISPLAY_KEYWORD: - str_msg = "error_tag=" + str_msg + "\n"; + str_msg = "error_tag=" + str_msg + "\r\n"; break; case OUTPUT_DISPLAY_CLPXML: - str_msg = "<error_tag>" + str_msg + "</error_tag>" + "\n"; + str_msg = "<error_tag>" + str_msg + "</error_tag>" + "\r\n"; break; } @@ -473,13 +473,13 @@ switch (displayArg) { case OUTPUT_DISPLAY_TEXT: - str_msg += "\n"; + str_msg += "\r\n"; break; case OUTPUT_DISPLAY_KEYWORD: - str_msg = "errtype=" + str_msg + "\n"; + str_msg = "errtype=" + str_msg + "\r\n"; break; case OUTPUT_DISPLAY_CLPXML: - str_msg = "<errtype>" + str_msg + "</errtype>" + "\n"; + str_msg = "<errtype>" + str_msg + "</errtype>" + "\r\n"; break; } @@ -512,13 +512,13 @@ switch (displayArg) { case OUTPUT_DISPLAY_TEXT: - str_msg += "\n"; + str_msg += "\r\n"; break; case OUTPUT_DISPLAY_KEYWORD: - str_msg = "errtype_desc=" + str_msg + "\n"; + str_msg = "errtype_desc=" + str_msg + "\r\n"; break; case OUTPUT_DISPLAY_CLPXML: - str_msg = "<errtype_desc>" + str_msg + "</errtype_desc>" + "\n"; + str_msg = "<errtype_desc>" + str_msg + "</errtype_desc>" + "\r\n"; break; } @@ -552,10 +552,10 @@ str_msg += "\n"; break; case OUTPUT_DISPLAY_KEYWORD: - str_msg = "cimstat=" + str_msg + "\n"; + str_msg = "cimstat=" + str_msg + "\r\n"; break; case OUTPUT_DISPLAY_CLPXML: - str_msg = "<cimstat>" + str_msg + "</cimstat>" + "\n"; + str_msg = "<cimstat>" + str_msg + "</cimstat>" + "\r\n"; break; } @@ -588,13 +588,13 @@ switch (displayArg) { case OUTPUT_DISPLAY_TEXT: - str_msg += "\n"; + str_msg += "\r\n"; break; case OUTPUT_DISPLAY_KEYWORD: - str_msg = "cimstat_desc=" + str_msg + "\n"; + str_msg = "cimstat_desc=" + str_msg + "\r\n"; break; case OUTPUT_DISPLAY_CLPXML: - str_msg = "<cimstat_desc>" + str_msg + "</cimstat_desc>" + "\n"; + str_msg = "<cimstat_desc>" + str_msg + "</cimstat_desc>" + "\r\n"; break; } @@ -625,13 +625,13 @@ switch (displayArg) { case OUTPUT_DISPLAY_TEXT: - str_msg += "\n"; + str_msg += "\r\n"; break; case OUTPUT_DISPLAY_KEYWORD: - str_msg = "severity=" + str_msg + "\n"; + str_msg = "severity=" + str_msg + "\r\n"; break; case OUTPUT_DISPLAY_CLPXML: - str_msg = "<severity>" + str_msg + "</severity>" + "\n"; + str_msg = "<severity>" + str_msg + "</severity>" + "\r\n"; break; } @@ -664,13 +664,13 @@ switch (displayArg) { case OUTPUT_DISPLAY_TEXT: - str_msg += "\n"; + str_msg += "\r\n"; break; case OUTPUT_DISPLAY_KEYWORD: - str_msg = "severity_desc=" + str_msg + "\n"; + str_msg = "severity_desc=" + str_msg + "\r\n"; break; case OUTPUT_DISPLAY_CLPXML: - str_msg = "<severity_desc>" + str_msg + "</severity_desc>" + "\n"; + str_msg = "<severity_desc>" + str_msg + "</severity_desc>" + "\r\n"; break; } @@ -701,13 +701,13 @@ switch (displayArg) { case OUTPUT_DISPLAY_TEXT: - str_msg += "\n"; + str_msg += "\r\n"; break; case OUTPUT_DISPLAY_KEYWORD: - str_msg = "probcause=" + str_msg + "\n"; + str_msg = "probcause=" + str_msg + "\r\n"; break; case OUTPUT_DISPLAY_CLPXML: - str_msg = "<probcause>" + str_msg + "</probcause>" + "\n"; + str_msg = "<probcause>" + str_msg + "</probcause>" + "\r\n"; break; } @@ -740,13 +740,13 @@ switch (displayArg) { case OUTPUT_DISPLAY_TEXT: - str_msg += "\n"; + str_msg += "\r\n"; break; case OUTPUT_DISPLAY_KEYWORD: - str_msg = "probcause_desc=" + str_msg + "\n"; + str_msg = "probcause_desc=" + str_msg + "\r\n"; break; case OUTPUT_DISPLAY_CLPXML: - str_msg = "<probcause_desc>" + str_msg + "</probcause_desc>" + "\n"; + str_msg = "<probcause_desc>" + str_msg + "</probcause_desc>" + "\r\n"; break; } Modified: clp/trunk/src/omcclpcommon.cpp =================================================================== --- clp/trunk/src/omcclpcommon.cpp 2006-12-04 23:15:57 UTC (rev 413) +++ clp/trunk/src/omcclpcommon.cpp 2006-12-05 00:09:31 UTC (rev 414) @@ -309,14 +309,14 @@ catch (const CIMException& ce) { #ifdef DEBUG1 - cerr << ce << endl; + cerr << ce << CLPENDL; #endif result = false; } catch (Exception& e) { #ifdef DEBUG1 - cerr << e << endl; + cerr << e << CLPENDL; #endif result = false; } @@ -474,7 +474,7 @@ CIMObjectPath cop = enu.nextElement(); #ifdef DEBUG1 - cout << ufit << " " << getUFiSFromObjectPath(cop) << endl; + cout << ufit << " " << getUFiSFromObjectPath(cop) << CLPENDL; #endif /* Match the specifed UFiS with the derived UFiS from the @@ -717,9 +717,9 @@ try { #ifdef DEBUG1 - cout << endl << baseCop.toString(); - cout << endl << assocCT; - cout << endl << subUFcT; + cout << CLPENDL << baseCop.toString(); + cout << CLPENDL << assocCT; + cout << CLPENDL << subUFcT; #endif /* Enumerate through all of the selected CIMObjects looking for the one that matches the specified UFiS */ @@ -765,7 +765,7 @@ } catch (Exception& e) { - cerr << e << endl; + cerr << e << CLPENDL; } } } @@ -917,9 +917,9 @@ try { #ifdef DEBUG1 - cout << endl << baseCop.toString(); - cout << endl << assocCT; - cout << endl << subUFcT; + cout << CLPENDL << baseCop.toString(); + cout << CLPENDL << assocCT; + cout << CLPENDL << subUFcT; #endif /* Enumerate through all of the selected CIMObjects looking for the one that matches the specified UFiS */ @@ -952,11 +952,11 @@ } catch (const CIMException& ce) { - cerr << ce << endl; + cerr << ce << CLPENDL; } catch (Exception& e) { - cerr << e << endl; + cerr << e << CLPENDL; } } } Modified: clp/trunk/src/omcclpcommon.h =================================================================== --- clp/trunk/src/omcclpcommon.h 2006-12-04 23:15:57 UTC (rev 413) +++ clp/trunk/src/omcclpcommon.h 2006-12-05 00:09:31 UTC (rev 414) @@ -46,20 +46,22 @@ using std::cerr; using std::cin; using std::cout; -using std::endl; +//using std::endl; extern void* addrgram__set_scan_string( const char *yy_str ); extern int addrgram_doparse (void *omcclp); #define DISPLAY_ARRAY1(disparray,meth) \ for (int aaa=0; aaa<disparray.size(); aaa++) { \ - cout << disparray[aaa].meth() << endl; } + cout << disparray[aaa].meth() << CLPENDL; } #define STRIP_QUOTES(s) \ if (s.startsWith('"') && s.endsWith('"')) { \ s = s.substring(1); \ s = s.substring(0,s.length()-1); } +#define CLPENDL "\r\n" + namespace OMCCLP { class OMCCLPProgram; Modified: clp/trunk/src/omcclpconf.cpp =================================================================== --- clp/trunk/src/omcclpconf.cpp 2006-12-04 23:15:57 UTC (rev 413) +++ clp/trunk/src/omcclpconf.cpp 2006-12-05 00:09:31 UTC (rev 414) @@ -25,6 +25,7 @@ #include "omcclpconf.h" +#include "omcclpcommon.h" namespace OMCCLP { @@ -90,7 +91,7 @@ { if (m_filename.empty()) { - cout << "No configuration file specified" << endl; + cout << "No configuration file specified" << CLPENDL; return; } Modified: clp/trunk/src/omcclpd.cpp =================================================================== --- clp/trunk/src/omcclpd.cpp 2006-12-04 23:15:57 UTC (rev 413) +++ clp/trunk/src/omcclpd.cpp 2006-12-05 00:09:31 UTC (rev 414) @@ -72,8 +72,8 @@ /*XXX will be enabled with job tracking exists if (!createCLPJobInfo(m_cimClient)) { - cerr << "Could not create a CLP job instance" << endl; - cerr << "Running without CLP job data" << endl; + cerr << "Could not create a CLP job instance" << CLPENDL; + cerr << "Running without CLP job data" << CLPENDL; } */ @@ -95,11 +95,11 @@ } catch (const CIMException& ce) { - cerr << "execute general error: " << ce << endl; + cerr << "execute general error: " << ce << CLPENDL; } catch (Exception& e) { - cerr << "execute general error: " << e << endl; + cerr << "execute general error: " << e << CLPENDL; } try @@ -109,12 +109,12 @@ catch (const CIMException& ce) { rnclpCommand->display(); - cerr << "display general error: " << ce << endl; + cerr << "display general error: " << ce << CLPENDL; } catch (Exception& e) { rnclpCommand->display(); - cerr << "display general error: " << e << endl; + cerr << "display general error: " << e << CLPENDL; } } else Modified: clp/trunk/src/omcclpprint.cpp =================================================================== --- clp/trunk/src/omcclpprint.cpp 2006-12-04 23:15:57 UTC (rev 413) +++ clp/trunk/src/omcclpprint.cpp 2006-12-05 00:09:31 UTC (rev 414) @@ -413,7 +413,7 @@ { for (size_t i = 0; i < verbs.size(); ++i) { - clpout << outputIndent() << verbs[i] << endl; + clpout << outputIndent() << verbs[i] << CLPENDL; } } @@ -424,7 +424,7 @@ { OMCCLPProgram* clpSession = m_showCmd->getCLPSession(); String cpName = cpa.getName(); - clpout << outputIndent() << "Role = " << cpName << endl; + clpout << outputIndent() << "Role = " << cpName << CLPENDL; CIMValue cv = cpa.getValue();; if (cv && cv.getType() == CIMDataType::REFERENCE) @@ -438,8 +438,8 @@ String UFcT = getUFcTFromCIMObjectPath (clpSession, ov); increaseIndent(); - clpout << outputIndent() << "UFiT: " << UFcT << UFiS << endl; - clpout << outputIndent() << "UFiP: " << UFiP << endl; + clpout << outputIndent() << "UFiT: " << UFcT << UFiS << CLPENDL; + clpout << outputIndent() << "UFiP: " << UFiP << CLPENDL; decreaseIndent(); } } @@ -452,7 +452,7 @@ { String UFiP = copi->getTargetPathRef()->getUFiP(); StringArray sa = UFiP.tokenize("/"); - clpout << outputIndent() << safeBack(sa) << endl; + clpout << outputIndent() << safeBack(sa) << CLPENDL; } /** @@ -460,11 +460,11 @@ */ void InstanceKeywordPrinter::outputProperty(std::ostream& clpout, const CIMObjectPath& cop, CIMProperty& prop) { - clpout << "begingroup=property" << endl; - clpout << "property_name=" << prop.getName()<< endl; + clpout << "begingroup=property" << CLPENDL; + clpout << "property_name=" << prop.getName()<< CLPENDL; // TODO this should get the value and type output that data - clpout << "property_value=" << prop.toString() << endl; - clpout << "endgroup" << endl; + clpout << "property_value=" << prop.toString() << CLPENDL; + clpout << "endgroup" << CLPENDL; } /** @@ -475,7 +475,7 @@ { for (size_t i = 0; i < verbs.size(); ++i) { - clpout << "verb=" << verbs[i] << endl; + clpout << "verb=" << verbs[i] << CLPENDL; } } @@ -486,8 +486,8 @@ { OMCCLPProgram* clpSession = m_showCmd->getCLPSession(); String cpName = cpa.getName(); - clpout << "begingroup=reference" << endl; - clpout << "role=" << cpName << endl; + clpout << "begingroup=reference" << CLPENDL; + clpout << "role=" << cpName << CLPENDL; CIMValue cv = cpa.getValue();; if (cv && cv.getType() == CIMDataType::REFERENCE) @@ -500,13 +500,13 @@ Int32 UFiS = getUFiSFromObjectPath (ov); String UFcT = getUFcTFromCIMObjectPath (clpSession, ov); - clpout << "begingroup=instance" << endl; - clpout << "ufit=" << UFcT << UFiS << endl; - clpout << "ufip=" << UFiP << endl; - clpout << "endgroup" << endl; + clpout << "begingroup=instance" << CLPENDL; + clpout << "ufit=" << UFcT << UFiS << CLPENDL; + clpout << "ufip=" << UFiP << CLPENDL; + clpout << "endgroup" << CLPENDL; } } - clpout << "endgroup" << endl; + clpout << "endgroup" << CLPENDL; } /** @@ -514,7 +514,7 @@ */ void InstanceKeywordPrinter::outputTarget(std::ostream& clpout, const OMCCLPCimObjectPathInfoRef& copi) { - clpout << "ufip=" << copi->getTargetPathRef()->getUFiP() << endl; + clpout << "ufip=" << copi->getTargetPathRef()->getUFiP() << CLPENDL; } /** @@ -537,12 +537,12 @@ */ void InstanceXMLPrinter::outputStandardVerbs(std::ostream& clpout, StringArray verbs) { - clpout << "<standardverbs>" << endl; + clpout << "<standardverbs>" << CLPENDL; for (size_t i = 0; i < verbs.size(); ++i) { clpout << verbs[i] << " "; } - clpout << endl << "</standardverbs>"; + clpout << CLPENDL << "</standardverbs>"; } /** @@ -552,8 +552,8 @@ { OMCCLPProgram* clpSession = m_showCmd->getCLPSession(); String cpName = cpa.getName(); - clpout << "<reference>" << endl; - clpout << "<role>" << cpName << "</role>" << endl; + clpout << "<reference>" << CLPENDL; + clpout << "<role>" << cpName << "</role>" << CLPENDL; CIMValue cv = cpa.getValue();; if (cv && cv.getType() == CIMDataType::REFERENCE) @@ -566,15 +566,15 @@ Int32 UFiS = getUFiSFromObjectPath (ov); String UFcT = getUFcTFromCIMObjectPath (clpSession, ov); - clpout << "<instance>" << endl; + clpout << "<instance>" << CLPENDL; clpout << "<ufit ufct=\"" << UFcT << "\" instance=\"" << UFiS << "\">" << - UFcT << UFiS << "</ufit>" << endl; - clpout << "<ufip>" << UFiP << "</ufip>" << endl; - clpout << "</instance>" << endl; + UFcT << UFiS << "</ufit>" << CLPENDL; + clpout << "<ufip>" << UFiP << "</ufip>" << CLPENDL; + clpout << "</instance>" << CLPENDL; } } - clpout << "</reference>" << endl; + clpout << "</reference>" << CLPENDL; } /** @@ -582,7 +582,7 @@ */ void InstanceXMLPrinter::outputTarget(std::ostream& clpout, const OMCCLPCimObjectPathInfoRef& copi) { - clpout << "<ufip>" << copi->getTargetPathRef()->getUFiP() << "</ufip>" << endl; + clpout << "<ufip>" << copi->getTargetPathRef()->getUFiP() << "</ufip>" << CLPENDL; } Modified: clp/trunk/src/omcclpprint.h =================================================================== --- clp/trunk/src/omcclpprint.h 2006-12-04 23:15:57 UTC (rev 413) +++ clp/trunk/src/omcclpprint.h 2006-12-05 00:09:31 UTC (rev 414) @@ -54,38 +54,38 @@ void virtual outputInstanceHead(std::ostream& clpout){} void virtual outputUFiP(std::ostream& clpout, const String& ufip) { - clpout << outputIndent() << "UFiP:" << endl; + clpout << outputIndent() << "UFiP:" << CLPENDL; increaseIndent(); - clpout << outputIndent() << ufip << endl; + clpout << outputIndent() << ufip << CLPENDL; decreaseIndent(); } void virtual outputUFcT(std::ostream& clpout, String ufct){} void virtual outputTargetHead(std::ostream& clpout){ - clpout << outputIndent() << "Targets:" << endl; + clpout << outputIndent() << "Targets:" << CLPENDL; } void virtual outputTarget(std::ostream& clpout, const OMCCLPCimObjectPathInfoRef& t); void virtual outputTargetTail(std::ostream& clpout){} void virtual outputPropertiesHead(std::ostream& clpout) { - clpout << outputIndent() << "Properties:" << endl; + clpout << outputIndent() << "Properties:" << CLPENDL; } void virtual outputProperty(std::ostream& clpout, const CIMInstance& ci, CIMProperty& prop) { String cpName = prop.getName(); - clpout << outputIndent() << cpName << " = " << getPropertyValue(ci, cpName) << endl; + clpout << outputIndent() << cpName << " = " << getPropertyValue(ci, cpName) << CLPENDL; } void virtual outputPropertiesTail(std::ostream& clpout){} void virtual outputAssociationsHead(std::ostream& clpout){ - clpout << outputIndent() << "Associations:" << endl; + clpout << outputIndent() << "Associations:" << CLPENDL; } void virtual outputAssociationHead(std::ostream& clpout, CIMInstance cia){ /*XXX This should print out the user friend name not a CIM class name */ - clpout << outputIndent() << "Association = " << cia.getName() << endl; + clpout << outputIndent() << "Association = " << cia.getName() << CLPENDL; } void virtual outputAssociation(std::ostream& clpout, CIMProperty cpa); void virtual outputAssociationTail(std::ostream& clpout){} void virtual outputAssociationsTail(std::ostream& clpout){} void virtual outputVerbsHead(std::ostream& clpout) { - clpout << outputIndent() << "Verbs:" << endl; + clpout << outputIndent() << "Verbs:" << CLPENDL; } void virtual outputStandardVerbs(std::ostream& clpout, StringArray verbs); void virtual outputOEMVerbs(std::ostream& clpout, StringArray verbs){} @@ -134,36 +134,36 @@ virtual ~InstanceKeywordPrinter() {}; void outputHead(std::ostream& clpout) {} - void outputTail(std::ostream& clpout) {clpout << "endoutput" << endl;} - void outputInstanceHead(std::ostream& clpout){clpout << "begingroup=instance" << endl;} + void outputTail(std::ostream& clpout) {clpout << "endoutput" << CLPENDL;} + void outputInstanceHead(std::ostream& clpout){clpout << "begingroup=instance" << CLPENDL;} void outputUFiP(std::ostream& clpout, const String& ufip) { - clpout << "ufip=" << ufip << endl; + clpout << "ufip=" << ufip << CLPENDL; } - void outputUFcT(std::ostream& clpout, String ufct) {clpout << "ufip=" << ufct << endl;} - void outputTargetHead(std::ostream& clpout){clpout << "begingroup=targets" << endl;} + void outputUFcT(std::ostream& clpout, String ufct) {clpout << "ufip=" << ufct << CLPENDL;} + void outputTargetHead(std::ostream& clpout){clpout << "begingroup=targets" << CLPENDL;} void outputTarget(std::ostream& clpout, const OMCCLPCimObjectPathInfoRef& t); - void outputTargetTail(std::ostream& clpout){clpout << "endgroup" << endl;} + void outputTargetTail(std::ostream& clpout){clpout << "endgroup" << CLPENDL;} void outputPropertiesHead(std::ostream& clpout) {} // TODO what should the type be for propValue? void outputProperty(std::ostream& clpout, const CIMObjectPath& cop, CIMProperty& prop); void outputPropertiesTail(std::ostream& clpout){} - void outputAssociationsHead(std::ostream& clpout) {clpout << "begingroup=associations" << endl;} + void outputAssociationsHead(std::ostream& clpout) {clpout << "begingroup=associations" << CLPENDL;} void outputAssociationHead(std::ostream& clpout, CIMInstance cia){ - clpout << "begingroup=association" << endl; - clpout << "name=" << cia.getName() << endl; + clpout << "begingroup=association" << CLPENDL; + clpout << "name=" << cia.getName() << CLPENDL; } void outputAssociation(std::ostream& clpout, CIMProperty cpa); - void outputAssociationTail(std::ostream& clpout){clpout << "endgroup" << endl;} - void outputAssociationsTail(std::ostream& clpout){clpout << "endgroup" << endl;} + void outputAssociationTail(std::ostream& clpout){clpout << "endgroup" << CLPENDL;} + void outputAssociationsTail(std::ostream& clpout){clpout << "endgroup" << CLPENDL;} void outputVerbsHead(std::ostream& clpout) { - clpout << "begingroup=verbs" << endl; + clpout << "begingroup=verbs" << CLPENDL; } void outputStandardVerbs(std::ostream& clpout, StringArray verbs); void outputOEMVerbs(std::ostream& clpout, StringArray verbs){} void outputVerbsTail(std::ostream& clpout) { - clpout << "endgroup" << endl; + clpout << "endgroup" << CLPENDL; } - void outputInstanceTail(std::ostream& clpout){clpout << "endgroup" << endl;} + void outputInstanceTail(std::ostream& clpout){clpout << "endgroup" << CLPENDL;} }; class InstanceXMLPrinter : public InstancePrinter { @@ -173,26 +173,26 @@ virtual ~InstanceXMLPrinter() {}; void outputHead(std::ostream& clpout) {} - void outputTail(std::ostream& clpout) {clpout << "</show></response>" << endl;} + void outputTail(std::ostream& clpout) {clpout << "</show></response>" << CLPENDL;} void outputInstanceHead(std::ostream& clpout){clpout << "<instance>";} void outputUFiP(std::ostream& clpout, const String& ufip){ - clpout << "<ufip>" << ufip <<"</ufip>" << endl; + clpout << "<ufip>" << ufip <<"</ufip>" << CLPENDL; } - void outputUFcT(std::ostream& clpout, String ufct) {clpout << "<ufip>" << ufct <<"</ufip>" << endl;} - void outputTargetHead(std::ostream& clpout){clpout << "<targets>" << endl;} + void outputUFcT(std::ostream& clpout, String ufct) {clpout << "<ufip>" << ufct <<"</ufip>" << CLPENDL;} + void outputTargetHead(std::ostream& clpout){clpout << "<targets>" << CLPENDL;} void outputTarget(std::ostream& clpout, const OMCCLPCimObjectPathInfoRef& t); - void outputTargetTail(std::ostream& clpout){clpout << "</targets>" << endl;} + void outputTargetTail(std::ostream& clpout){clpout << "</targets>" << CLPENDL;} void outputPropertiesHead(std::ostream& clpout) {clpout << "<properties>";} void outputProperty(std::ostream& clpout, const CIMObjectPath& cop, CIMProperty& prop); - void outputPropertiesTail(std::ostream& clpout){clpout <<"</properties>" << endl;} + void outputPropertiesTail(std::ostream& clpout){clpout <<"</properties>" << CLPENDL;} void outputAssociationsHead(std::ostream& clpout) {clpout << "<associations>";} void outputAssociationHead(std::ostream& clpout, CIMInstance cia) { clpout << "<association>"; - clpout << "<ufct>" << cia.getName() << "</ufct>" << endl; + clpout << "<ufct>" << cia.getName() << "</ufct>" << CLPENDL; } void outputAssociation(std::ostream& clpout, CIMProperty cpa); - void outputAssociationTail(std::ostream& clpout) {clpout << "</association>" << endl;} - void outputAssociationsTail(std::ostream& clpout) {clpout << "</associations>" << endl;} + void outputAssociationTail(std::ostream& clpout) {clpout << "</association>" << CLPENDL;} + void outputAssociationsTail(std::ostream& clpout) {clpout << "</associations>" << CLPENDL;} void outputVerbsHead(std::ostream& clpout) { clpout << "<verbs>"; } @@ -201,7 +201,7 @@ void outputVerbsTail(std::ostream& clpout) { clpout << "</verbs>"; } - void outputInstanceTail(std::ostream& clpout){clpout << "</instance>" << endl;} + void outputInstanceTail(std::ostream& clpout){clpout << "</instance>" << CLPENDL;} }; } Modified: clp/trunk/src/omcclpprogram.cpp =================================================================== --- clp/trunk/src/omcclpprogram.cpp 2006-12-04 23:15:57 UTC (rev 413) +++ clp/trunk/src/omcclpprogram.cpp 2006-12-05 00:09:31 UTC (rev 414) @@ -47,7 +47,7 @@ bool getCredentials(const String& realm, String& name, String& passwd, const String& details) { - cout << "Authentication required for " << realm << endl; + cout << "Authentication required for " << realm << CLPENDL; cout << "Enter the user name: "; name = String::getLine(cin); passwd = GetPass::getPass("Enter the password for " + @@ -58,7 +58,7 @@ static void display_message (const char *msg) { - cout << endl << msg << endl; + cout << CLPENDL << msg << CLPENDL; } namespace OMCCLP { @@ -113,7 +113,7 @@ #ifdef OMCCLPDAEMON OW_LOG_DEBUG(m_logger, msg); #else - cout << msg << endl; + cout << msg << CLPENDL; #endif } @@ -122,7 +122,7 @@ #ifdef OMCCLPDAEMON OW_LOG_INFO(m_logger, msg); #else - cout << msg << endl; + cout << msg << CLPENDL; #endif } @@ -245,7 +245,7 @@ //#else // display_message (se.c_str()); //#endif -cout << se << endl; +cout << se << CLPENDL; } catch (Exception& e) { @@ -254,7 +254,7 @@ //#else // display_message (e.getMessage()); //#endif -cout << e << endl; +cout << e << CLPENDL; } return false; } Modified: clp/trunk/src/omcclptargetpath.cpp =================================================================== --- clp/trunk/src/omcclptargetpath.cpp 2006-12-04 23:15:57 UTC (rev 413) +++ clp/trunk/src/omcclptargetpath.cpp 2006-12-05 00:09:31 UTC (rev 414) @@ -421,9 +421,9 @@ try { #ifdef DEBUG1 - cout << endl << baseCop.toString(); - cout << endl << assocCT; - cout << endl << subUFcT; + cout << CLPENDL << baseCop.toString(); + cout << CLPENDL << assocCT; + cout << CLPENDL << subUFcT; #endif /* Enumerate through all of the selected CIMObjects looking for the one @@ -477,7 +477,7 @@ } catch (Exception& e) { - cerr << e << endl; + cerr << e << CLPENDL; } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bni...@us...> - 2006-12-04 23:15:57
|
Revision: 413 http://svn.sourceforge.net/omc/?rev=413&view=rev Author: bnicholes Date: 2006-12-04 15:15:57 -0800 (Mon, 04 Dec 2006) Log Message: ----------- On the initial connection, set the clp prompt immediately Modified Paths: -------------- clp/trunk/src/omcclpdsvrconnection.cpp Modified: clp/trunk/src/omcclpdsvrconnection.cpp =================================================================== --- clp/trunk/src/omcclpdsvrconnection.cpp 2006-12-01 18:16:28 UTC (rev 412) +++ clp/trunk/src/omcclpdsvrconnection.cpp 2006-12-04 23:15:57 UTC (rev 413) @@ -122,26 +122,32 @@ try { + bool firstLine = true; + while (sistr.good()) { - String line = String::getLine(sistr); - - OW_LOG_DEBUG(logger, - Format("OMCClpdSvrConnection received line: %1", line)); + if (!firstLine) + { + String line = String::getLine(sistr); + OW_LOG_DEBUG(logger, + Format("OMCClpdSvrConnection received line: %1", line)); - if (!line.empty()) { - clpref->runCommand(line); - sostr.flush(); + if (!line.empty()) { + clpref->runCommand(line); + sostr.flush(); + } + + if (clpref->shouldExit()) + { + line = "Good-bye :-)"; + sostr << line << "\r\n"; + sostr.flush(); + break; + } } - - if (clpref->shouldExit()) - { - line = "Good-bye :-)"; - sostr << line << "\r\n"; - sostr.flush(); - break; - } - + else + firstLine = false; + /* Send the prompt to the client */ sostr << "\r\nCLP-->"; sostr.flush(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jc...@us...> - 2006-12-01 18:16:32
|
Revision: 412 http://svn.sourceforge.net/omc/?rev=412&view=rev Author: jcarey Date: 2006-12-01 10:16:28 -0800 (Fri, 01 Dec 2006) Log Message: ----------- Adjustments and additions for autobuild process Modified Paths: -------------- contrib/xml-service-provider/trunk/configure.ac Added Paths: ----------- contrib/xml-service-provider/trunk/openwbem-xmlservice-providers.changes contrib/xml-service-provider/trunk/openwbem-xmlservice-providers.spec Removed Paths: ------------- contrib/xml-service-provider/trunk/xmlservice.spec Property Changed: ---------------- contrib/xml-service-provider/trunk/ contrib/xml-service-provider/trunk/example-services/ contrib/xml-service-provider/trunk/example-services/apache/ contrib/xml-service-provider/trunk/mof/ contrib/xml-service-provider/trunk/src/ contrib/xml-service-provider/trunk/src/servicexml/ contrib/xml-service-provider/trunk/xmlschema/ Property changes on: contrib/xml-service-provider/trunk ___________________________________________________________________ Name: svn:ignore + Makefile.in configure aclocal.m4 Makefile autom4te.cache config.guess config.log config.status config.sub config.h.in libtool ltmain.sh mybuild *.vpj config depcomp missing *.vpw *.vpwhistu *.vtg *.swp Modified: contrib/xml-service-provider/trunk/configure.ac =================================================================== --- contrib/xml-service-provider/trunk/configure.ac 2006-11-30 18:07:12 UTC (rev 411) +++ contrib/xml-service-provider/trunk/configure.ac 2006-12-01 18:16:28 UTC (rev 412) @@ -121,7 +121,7 @@ AC_HEADER_DIRENT AC_HEADER_STDC AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS([openwbem/OW_config.h 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([openwbem/OW_config.h fcntl.h stdlib.h string.h unistd.h sys/time.h ],,[AC_MSG_ERROR(Missing headers: likely won't compile)]) # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL Property changes on: contrib/xml-service-provider/trunk/example-services ___________________________________________________________________ Name: svn:ignore + Makefile.in Property changes on: contrib/xml-service-provider/trunk/example-services/apache ___________________________________________________________________ Name: svn:ignore + Makefile.in Property changes on: contrib/xml-service-provider/trunk/mof ___________________________________________________________________ Name: svn:ignore + Makefile.in Added: contrib/xml-service-provider/trunk/openwbem-xmlservice-providers.changes =================================================================== --- contrib/xml-service-provider/trunk/openwbem-xmlservice-providers.changes (rev 0) +++ contrib/xml-service-provider/trunk/openwbem-xmlservice-providers.changes 2006-12-01 18:16:28 UTC (rev 412) @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +Fri Dec 1 08:48:40 MST 2006 - jc...@no... + +- First Release + Added: contrib/xml-service-provider/trunk/openwbem-xmlservice-providers.spec =================================================================== --- contrib/xml-service-provider/trunk/openwbem-xmlservice-providers.spec (rev 0) +++ contrib/xml-service-provider/trunk/openwbem-xmlservice-providers.spec 2006-12-01 18:16:28 UTC (rev 412) @@ -0,0 +1,109 @@ +# +# spec file for package openwbem-xmlservice-providers (Version 1.0.0) +# + +# norootforbuild + +Name: openwbem-xmlservice-providers +BuildRequires: gcc-c++ openwbem-devel openwbem-base-providers-devel +URL: http://sourceforge.net/projects/omc +%define xmlsvcprefix /usr +%define xmlsvcsysconfdir /etc +# Increment the version every time the source code changes. +Version: 1.0.0 +Release: 1 +Group: System/Management +Summary: A set of CIM providers that allow system services to be instrumented through a service desciption XML document. +PreReq: /usr/bin/loadmof.sh +License: BSD +# This is necessary to build the RPM as a non-root user. +BuildRoot: %{_tmppath}/%{name}-%{version}-build +# "yes" is the default, but we put it here explicitly to avoid someone +# setting it to "no" +AutoReqProv: yes +Requires: openwbem openwbem-base-providers +Requires: cim-schema >= 2.11 +Source0: %{name}-%{version}.tar.gz + +%description +A set of CIM providers that allow system services to be instrumented through a service desciption XML document. + + +Authors: +-------- + Jon Carey + + +%prep +# Untar the sources. +%setup + +%build +# If the LD_RUN_PATH environment variable is set at link time, +# it's value is embedded in the resulting binary. At run time, +# The binary will look here first for shared libraries. This way +# we link against the libraries we want at run-time even if libs +# by the same name are in /usr/lib or some other path in /etc/ld.so.conf +autoreconf --force --install +CFLAGS="$RPM_OPT_FLAGS -fstack-protector" \ +CXXFLAGS="$RPM_OPT_FLAGS -fstack-protector" ./configure \ + --prefix=%{xmlsvcprefix} \ + --libdir=%_libdir \ + --sysconfdir=%{xmlsvcsysconfdir} +make %{?jobs:-j%jobs} + +%install +%{__rm} -rf $RPM_BUILD_ROOT +%{__mkdir} -p $RPM_BUILD_ROOT +# Tell 'make install' to install into the BuildRoot +make DESTDIR=$RPM_BUILD_ROOT install +mkdir -p $RPM_BUILD_ROOT/%{xmlsvcsysconfdir}/omc/svcinfo.d +MOFDIR=$RPM_BUILD_ROOT/%{xmlsvcprefix}/share/mof/%{name} +install -d $MOFDIR +install mof/*.mof $MOFDIR/ +%{__rm} -f $RPM_BUILD_ROOT%{xmlsvcprefix}/%_lib/openwbem/c++providers/*.{a,la} +%{__rm} -f $RPM_BUILD_ROOT%{xmlsvcprefix}/%_lib/*.{a,la} +%{__rm} -f example-services/Makefile* +%{__rm} -f example-services/apache/Makefile* +%{__rm} -f xmlschema/Makefile* + +%clean +%{__rm} -rf $RPM_BUILD_ROOT + +%post +# Any RPM that installs a shared library into any directory +# listed in /etc/ld.so.conf (or into /usr/lib if it hasn't been +# fixed yet to install into the correct FHS compliant paths) +# must run ldconfig in its post install script. +%run_ldconfig +# load MOF +MOFDIR=%{xmlsvcprefix}/share/mof/cim-current/Event +loadmof.sh -n root/cimv2 $MOFDIR/CIM_IndicationHandlerCIMXML.mof +loadmof.sh -n root/cimv2 $MOFDIR/CIM_IndicationFilter.mof +loadmof.sh -n root/cimv2 $MOFDIR/CIM_IndicationSubscription.mof +MOFDIR=%{xmlsvcprefix}/share/mof/%{name} +loadmof.sh -n root/cimv2 $MOFDIR/xml-service.mof || /bin/true + +%preun +# if -e operation, not -U +#if [ "x$1" = "x0" ] +#then +#fi + +%postun +%run_ldconfig + +%files +%defattr(-,root,root) +%doc README +%doc example-services +%doc xmlschema +%{xmlsvcprefix}/%_lib/openwbem/c++providers/*.so* +%{xmlsvcprefix}/%_lib/lib*.so* +%dir %{xmlsvcprefix}/share/mof/%{name} +%{xmlsvcprefix}/share/mof/%{name}/* +%dir %{xmlsvcsysconfdir}/omc +%dir %{xmlsvcsysconfdir}/omc/svcinfo.d + +%changelog -n openwbem-xmlservice-providers + Property changes on: contrib/xml-service-provider/trunk/src ___________________________________________________________________ Name: svn:ignore + Makefile.in Property changes on: contrib/xml-service-provider/trunk/src/servicexml ___________________________________________________________________ Name: svn:ignore + Makefile.in Property changes on: contrib/xml-service-provider/trunk/xmlschema ___________________________________________________________________ Name: svn:ignore + Makefile.in Deleted: contrib/xml-service-provider/trunk/xmlservice.spec =================================================================== --- contrib/xml-service-provider/trunk/xmlservice.spec 2006-11-30 18:07:12 UTC (rev 411) +++ contrib/xml-service-provider/trunk/xmlservice.spec 2006-12-01 18:16:28 UTC (rev 412) @@ -1,108 +0,0 @@ -# -# spec file for package openwbem-xmlservice-providers (Version 1.0.0) -# - -# norootforbuild - -Name: openwbem-xmlservice-providers -BuildRequires: gcc-c++ -URL: http://developer.novell.com/wiki/index.php/OMC/ -%define xmlsvcprefix /usr -%define xmlsvcsysconfdir /etc -# Increment the version every time the source code changes. -Version: 1.0.0 -Release: 1 -Group: System/Management -Summary: A set of CIM providers that allow system services to be instrumented through a service desciption XML document. -PreReq: /usr/bin/loadmof.sh -License: BSD -# This is necessary to build the RPM as a non-root user. -BuildRoot: %{_tmppath}/%{name}-%{version}-build -# "yes" is the default, but we put it here explicitly to avoid someone -# setting it to "no" -AutoReqProv: yes -Requires: openwbem -Requires: cim-schema >= 2.11 -Source0: %{name}-%{version}.tar.gz - -%description -A set of CIM providers that allow system services to be instrumented through a service desciption XML document. - - -Authors: --------- - Jon Carey - - -%prep -# Untar the sources. -%setup - -%build -# If the LD_RUN_PATH environment variable is set at link time, -# it's value is embedded in the resulting binary. At run time, -# The binary will look here first for shared libraries. This way -# we link against the libraries we want at run-time even if libs -# by the same name are in /usr/lib or some other path in /etc/ld.so.conf -autoreconf --force --install -CFLAGS="$RPM_OPT_FLAGS -fstack-protector" \ -CXXFLAGS="$RPM_OPT_FLAGS -fstack-protector" ./configure \ - --prefix=%{xmlsvcprefix} \ - --libdir=%_libdir \ - --sysconfdir=%{xmlsvcsysconfdir} -make %{?jobs:-j%jobs} - -%install -%{__rm} -rf $RPM_BUILD_ROOT -%{__mkdir} -p $RPM_BUILD_ROOT -# Tell 'make install' to install into the BuildRoot -make DESTDIR=$RPM_BUILD_ROOT install -mkdir -p $RPM_BUILD_ROOT/%{xmlsvcsysconfdir}/omc/svcinfo.d -MOFDIR=$RPM_BUILD_ROOT/%{xmlsvcprefix}/share/mof/%{name} -install -d $MOFDIR -install mof/*.mof $MOFDIR/ -%{__rm} -f $RPM_BUILD_ROOT%{xmlsvcprefix}/%_lib/openwbem/c++providers/*.{a,la} -%{__rm} -f $RPM_BUILD_ROOT%{xmlsvcprefix}/%_lib/*.{a,la} -%{__rm} -f example-services/Makefile* -%{__rm} -f example-services/apache/Makefile* -%{__rm} -f xmlschema/Makefile* - -%clean -%{__rm} -rf $RPM_BUILD_ROOT - -%post -# Any RPM that installs a shared library into any directory -# listed in /etc/ld.so.conf (or into /usr/lib if it hasn't been -# fixed yet to install into the correct FHS compliant paths) -# must run ldconfig in its post install script. -%run_ldconfig -# load MOF -MOFDIR=%{xmlsvcprefix}/share/mof/cim-current/Event -loadmof.sh -n root/cimv2 $MOFDIR/CIM_IndicationHandlerCIMXML.mof -loadmof.sh -n root/cimv2 $MOFDIR/CIM_IndicationFilter.mof -loadmof.sh -n root/cimv2 $MOFDIR/CIM_IndicationSubscription.mof -MOFDIR=%{xmlsvcprefix}/share/mof/%{name} -loadmof.sh -n root/cimv2 $MOFDIR/xml-service.mof || /bin/true - -%preun -# if -e operation, not -U -#if [ "x$1" = "x0" ] -#then -#fi - -%postun -%run_ldconfig - -%files -%defattr(-,root,root) -%doc README -%doc example-services -%doc xmlschema -%{xmlsvcprefix}/%_lib/openwbem/c++providers/*.so* -%{xmlsvcprefix}/%_lib/lib*.so* -%dir %{xmlsvcprefix}/share/mof/%{name} -%{xmlsvcprefix}/share/mof/%{name}/* -%dir %{xmlsvcsysconfdir}/omc/svcinfo.d - -%changelog -n openwbem-xmlservice-providers - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bni...@us...> - 2006-11-30 18:07:12
|
Revision: 411 http://svn.sourceforge.net/omc/?rev=411&view=rev Author: bnicholes Date: 2006-11-30 10:07:12 -0800 (Thu, 30 Nov 2006) Log Message: ----------- allow the show command to recognize the default display option value in the clp setting data instance Modified Paths: -------------- clp/trunk/src/omcclpcmdshow.cpp clp/trunk/src/omcclpcommand.cpp clp/trunk/src/omcclpprint.cpp Modified: clp/trunk/src/omcclpcmdshow.cpp =================================================================== --- clp/trunk/src/omcclpcmdshow.cpp 2006-11-30 16:23:14 UTC (rev 410) +++ clp/trunk/src/omcclpcmdshow.cpp 2006-11-30 18:07:12 UTC (rev 411) @@ -368,12 +368,21 @@ } } + String defaultDisplayType; + + /* Only get the default display type if one was not specified + on the command line. */ + if (!hasOption(E_OPT_DISPLAY)) + { + defaultDisplayType = getOptionValueString(E_OPT_DISPLAY); + defaultDisplayType.toLowerCase(); + } + Int32 targetLevel = getOptionValueInt(E_OPT_LEVEL); /* Get the targets display option if it was specified on the command line.*/ - displaySubOption = hasOption(E_OPT_DISPLAY, E_SUBOPT_TARGETS); - - if (displaySubOption || (targetLevel != 1)) + displaySubOption = (hasOption(E_OPT_DISPLAY, E_SUBOPT_TARGETS) || hasOption(E_OPT_DISPLAY, E_SUBOPT_ALL)); + if ((displaySubOption || defaultDisplayType.startsWith("t")) || (targetLevel != 1)) { setTargetsForTargets(m_cimObjectPathInfoArray, targetLevel); } @@ -387,9 +396,8 @@ /* Get the verbs display option if it was specified on the command line. If we are to display valid verbs, then look up the verbs in the address data file */ - displaySubOption = hasOption(E_OPT_DISPLAY, E_SUBOPT_VERBS); - - if (displaySubOption) + displaySubOption = (hasOption(E_OPT_DISPLAY, E_SUBOPT_VERBS) || hasOption(E_OPT_DISPLAY, E_SUBOPT_ALL)); + if (displaySubOption || defaultDisplayType.startsWith("v")) { setValidCmdsForTargets(m_cimObjectPathInfoArray, targetLevel); } @@ -397,9 +405,8 @@ /* Get the associations display option if it was specified on the command line. If we are to display the associations, then look up the verbs in the address data file */ - displaySubOption = hasOption(E_OPT_DISPLAY, E_SUBOPT_ASSOCIATIONS); - - if (displaySubOption) + displaySubOption = (hasOption(E_OPT_DISPLAY, E_SUBOPT_ASSOCIATIONS) || hasOption(E_OPT_DISPLAY, E_SUBOPT_ALL)); + if (displaySubOption || defaultDisplayType.startsWith("as")) { setAssociationsForTargets(m_cimObjectPathInfoArray, targetLevel); } Modified: clp/trunk/src/omcclpcommand.cpp =================================================================== --- clp/trunk/src/omcclpcommand.cpp 2006-11-30 16:23:14 UTC (rev 410) +++ clp/trunk/src/omcclpcommand.cpp 2006-11-30 18:07:12 UTC (rev 411) @@ -304,7 +304,8 @@ one that machines the specified criteria */ for (int i=0; i<m_options.size(); i++) { - if (m_options[i]->getOptionType() == o && m_options[i]->getOptionSubtype() == so) + if ((m_options[i]->getOptionType() == o) && + ((m_options[i]->getOptionSubtype() == so) || (so == E_SUBOPT_NONE))) { opt = m_options[i]; break; Modified: clp/trunk/src/omcclpprint.cpp =================================================================== --- clp/trunk/src/omcclpprint.cpp 2006-11-30 16:23:14 UTC (rev 410) +++ clp/trunk/src/omcclpprint.cpp 2006-11-30 18:07:12 UTC (rev 411) @@ -197,18 +197,68 @@ CIMClient *cc = clpSession->getCIMClient(); std::ostream& clpout(clpSession->clpout()); StringArray displayProp; - bool displayTargets, displayAssociations, displayProperties, displayVerbs; + bool displayTargets(false), displayAssociations(false); + bool displayProperties(false), displayVerbs(false); const StringArray verbs = copi->getCmdVerbs(); const CIMObjectPath cop = copi->getCimObjectPath(); String indent; if (copi->getIsDisplayible()) { - displayTargets = m_showCmd->hasOption(E_OPT_DISPLAY, E_SUBOPT_TARGETS); - displayAssociations = m_showCmd->hasOption(E_OPT_DISPLAY, E_SUBOPT_ASSOCIATIONS); - displayProperties = m_showCmd->hasOption(E_OPT_DISPLAY, E_SUBOPT_PROPERTIES); - displayVerbs = m_showCmd->hasOption(E_OPT_DISPLAY, E_SUBOPT_VERBS); + /* If a display option was specified, the use it. Otherwise use + the default option from the CLP session object.*/ + if (m_showCmd->hasOption(E_OPT_DISPLAY)) + { + if (m_showCmd->hasOption(E_OPT_DISPLAY, E_SUBOPT_ALL)) + { + displayAssociations = true; + displayProperties = true; + displayTargets = true; + displayVerbs = true; + } + else + { + displayTargets = m_showCmd->hasOption(E_OPT_DISPLAY, E_SUBOPT_TARGETS); + displayAssociations = m_showCmd->hasOption(E_OPT_DISPLAY, E_SUBOPT_ASSOCIATIONS); + displayProperties = m_showCmd->hasOption(E_OPT_DISPLAY, E_SUBOPT_PROPERTIES); + displayVerbs = m_showCmd->hasOption(E_OPT_DISPLAY, E_SUBOPT_VERBS); + } + } + else + { + String displayType = m_showCmd->getOptionValueString(E_OPT_DISPLAY); + if (displayType.length()) + { + displayType.toLowerCase(); + char token = displayType.charAt(0); + switch (token) { + case 'p': + displayProperties = true; + break; + case 't': + displayTargets = true; + break; + case 'v': + displayVerbs = true; + break; + case 'a': + if (displayType.startsWith("al")) + { + displayAssociations = true; + displayProperties = true; + displayTargets = true; + displayVerbs = true; + } + else if (displayType.startsWith("as")) + { + displayAssociations = true; + } + break; + } + } + } + // When getting the instance, get just the properties that were specified in the command // If no properties were specified, then get all properties. displayProp = m_showCmd->getOptionValueArray(E_OPT_DISPLAY, E_SUBOPT_PROPERTIES); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bni...@us...> - 2006-11-30 16:23:22
|
Revision: 410 http://svn.sourceforge.net/omc/?rev=410&view=rev Author: bnicholes Date: 2006-11-30 08:23:14 -0800 (Thu, 30 Nov 2006) Log Message: ----------- Using the wrong subopt when querying for the properties during the print phase. Modified Paths: -------------- clp/trunk/src/omcclpprint.cpp Modified: clp/trunk/src/omcclpprint.cpp =================================================================== --- clp/trunk/src/omcclpprint.cpp 2006-11-30 00:04:41 UTC (rev 409) +++ clp/trunk/src/omcclpprint.cpp 2006-11-30 16:23:14 UTC (rev 410) @@ -211,7 +211,7 @@ // When getting the instance, get just the properties that were specified in the command // If no properties were specified, then get all properties. - displayProp = m_showCmd->getOptionValueArray(E_OPT_DISPLAY, E_SUBOPT_TARGETS); + displayProp = m_showCmd->getOptionValueArray(E_OPT_DISPLAY, E_SUBOPT_PROPERTIES); CIMInstance t = cc->getInstance (cop, WBEMFlags::E_NOT_LOCAL_ONLY, WBEMFlags::E_INCLUDE_QUALIFIERS, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jc...@us...> - 2006-11-30 00:04:41
|
Revision: 409 http://svn.sourceforge.net/omc/?rev=409&view=rev Author: jcarey Date: 2006-11-29 16:04:41 -0800 (Wed, 29 Nov 2006) Log Message: ----------- Added some descriptive text to the README Modified Paths: -------------- contrib/xml-service-provider/trunk/README Modified: contrib/xml-service-provider/trunk/README =================================================================== --- contrib/xml-service-provider/trunk/README 2006-11-29 23:32:16 UTC (rev 408) +++ contrib/xml-service-provider/trunk/README 2006-11-30 00:04:41 UTC (rev 409) @@ -0,0 +1,16 @@ +XML Service Providers +------------------------------------------------------------------------------- +The XML Service providers is essentially an XML driven framework that provides +CIM instrumentation for system services. The providers that provide this +framework run within the OpenWBEM CIMOM environment. +This XML Service provider is a CIM Provider that runs within the OpenWBEM +CIMOM environment. It provides objects that represent services through the +CIM interface based on XML documents that describe the services. It also +provides health information for the services by consuming the output of a +command line that is specified in the service description XML document +Cypress will make use of this Service provider. The UI that we build for +Cypress will show any Service that has the XML file. Because this is a very +simple way for Services to integrate with CIM the SUSE team might consider +adding additional services. + + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jc...@us...> - 2006-11-29 23:32:16
|
Revision: 408 http://svn.sourceforge.net/omc/?rev=408&view=rev Author: jcarey Date: 2006-11-29 15:32:16 -0800 (Wed, 29 Nov 2006) Log Message: ----------- Moved the xml service provider to its own project in the new contrib area Modified Paths: -------------- base/trunk/configure.ac base/trunk/src/providers/Makefile.am Removed Paths: ------------- base/trunk/src/providers/xml-service/ Modified: base/trunk/configure.ac =================================================================== --- base/trunk/configure.ac 2006-11-29 23:25:03 UTC (rev 407) +++ base/trunk/configure.ac 2006-11-29 23:32:16 UTC (rev 408) @@ -186,7 +186,6 @@ src/providers/time-service/Makefile src/providers/initd/Makefile src/providers/syslog/Makefile - src/providers/xml-service/Makefile test/Makefile test/unit/Makefile ]) Modified: base/trunk/src/providers/Makefile.am =================================================================== --- base/trunk/src/providers/Makefile.am 2006-11-29 23:25:03 UTC (rev 407) +++ base/trunk/src/providers/Makefile.am 2006-11-29 23:32:16 UTC (rev 408) @@ -10,8 +10,7 @@ operating-system \ posix-file-elements \ processes \ -syslog \ -xml-service +syslog if DO_INITD_PROVIDER SUBDIRS += initd This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |