You are viewing a plain text version of this content. The canonical link for it is here.
Posted to imperius-user@incubator.apache.org by Christian Rupert <ch...@web.de> on 2010/08/11 08:20:27 UTC
Executing Policies - Missing CIM_SPLPolicyRule?
Hi there,
I´m trying to execute some policies and following errors occurs while
executing:
root@rupchr-laptop:/opt/imperius/trunk/cimspl-samples/resources#
./cimsplcmdline.sh -x ./samples/policies/testElement1Policy.spl
CIMSPL Client
Established Connection
exec policy./samples/policies/testElement1Policy.spl
cimObjectPath : root/cimv2:CIM_SPLPolicyRule
Error: CIM_ERR_FAILED
When executing the cimsplclientsideprovider this error occurs:
root@rupchr-laptop:/opt/imperius/trunk/imperius-cimsplclientsideprovider/res
ources# ./cimsplcmdline.sh -x ./policies/testElement1Policy.spl
CIMSPL Client Side
got new cim client
Established Connection
exec policy./policies/testElement1Policy.spl
executePolicy client SPL policy ./policies/testElement1Policy.spl
no instances passed in , evaluating against all instances
Error: policy does not exist in the Repository
Do I have to create a class CIM_SPLPolicyRule and an instance of it?
How can I extend my CIM with CIM_SPL? Manually by adding classes?
Thank you in advance,
Christian Rupert
Appendix:
- CIM Server (OpenPegasus 2.11.0) is running:
root@rupchr-laptop:/opt/imperius/trunk/cimspl-samples/resources# cimserver
CIM Server 2.11.0 Development
Listening on HTTP port 5988.
Listening on local connection socket.
Started.
-I registered the testElement.mof and there´s an instance of it:
root@rupchr-laptop:/opt/imperius/trunk/cimspl-samples/resources# cimcli gi
testElement1
1: testElement1.ElementName="element10"
2: testElement1.ElementName="element11"
3: testElement1.ElementName="element12"
4: testElement1.ElementName=""
Select an Instance (1..4)? 1
path= testElement1
//Instance of testElement1
instance of testElement1
{
ElementName = "element10";
s = "string5";
c = d;
n64 = 54;
n32 = 54;
n16 = 54;
n8 = 54;
r64 = 5.4000000000000000e+01;
r32 = 5.4000000000000000e+01;
d = "20071129071628.000000-480";
s64 = -530;
s32 = -530;
s16 = -50;
s8 = -10;
b = FALSE;
childProperty = "child property5";
};
- The testElement1Policy.spl looks like:
Import Qualifier root/cimv2 Class testElement1;
Strategy Execute_All_Applicable;
Policy
{
Declaration
{
evenArray = [2,4,6,8];
oddArray = [1,3,5,7,9];
mixedArray = [1,3,4,5,8];
}
Condition
{
SubCollection(mixedArray,Union(evenArray,oddArray))
}
Decision
{
Set(testElement1.s = "xyzs")
}
}:1;
- Testing my CIMServer:
root@rupchr-laptop:/opt/imperius/trunk/imperius-cimsplclientsideprovider/res
ources# TestClient
Config file from //cimserver.conf
Namespace = root/cimv2
Connecting to localhost:5988
Client Connected
++++ Begin tests... ++++
++++ Test NameSpace Operations ++++
6 namespaces returned.
root
root/PG_InterOp
root/SampleProvider
root/benchmark
root/PG_Internal
root/cimv2
In 0.016126 Seconds
++++ Test Qualifier Operations ++++
71 Qualifiers
In 0.010503 Seconds
++++ Test EnumerateClassNames ++++
1401 ClassNames
In 0.008621 Seconds
++++ Test Class Operations ++++
In 0.585187 Seconds
++++ Test Instance Get Operations ++++
1401 Classes found
Class testElement 8 Instances
Class CIM_StatisticalData 25 Instances
Class CIM_ComputerSystem 1 Instances
Class PG_ComputerSystem 1 Instances
Class CIM_PolicySet 1 Instances
Class CIM_CIMOMStatisticalData 25 Instances
Class PG_UnixProcess 162 Instances
Class testElementAssociation2 2 Instances
Class CIM_OperatingSystem 1 Instances
Class CIM_Capabilities 1 Instances
Class CIM_UnitaryComputerSystem 1 Instances
Class testElement1 4 Instances
Class testElement2 2 Instances
Class CIM_EnabledLogicalElement 164 Instances
Class CIM_ManagedSystemElement 164 Instances
Class PG_UnixProcessStatisticalInformation 162 Instances
Class CIM_PolicyRule 1 Instances
Class testElementAssociation 2 Instances
Class CIM_Process 162 Instances
Class CIM_Policy 1 Instances
Class CIM_LogicalElement 164 Instances
Class PG_OperatingSystem 1 Instances
Class CIM_System 1 Instances
Class CIM_QueryCapabilities 1 Instances
Class CIM_StatisticalInformation 162 Instances
Class CIM_ManagedElement 353 Instances
In 8.07605 Seconds
++++ Test Instance Modification Operations ++++
InstanceModify bypassed because it modifies repository. Set active to
execute.
In 3.3e-05 Seconds
++++ Test Associations ++++
In 0.210524 Seconds
++++ Test Invoke Method Execution ++++
Executed 10 methods
Executed 10 methods
Executed 10 methods
In 0.118207 Seconds
++++ Test Enumerate Instances Execution ++++
Found 3 Instances of Sample_InstanceProviderClass
Found 3 Instances of Sample_InstanceProviderClass
Found 3 Instances of Sample_InstanceProviderClass
Found 3 Instances of Sample_InstanceProviderClass
Found 3 Instances of Sample_InstanceProviderClass
Found 3 Instances of Sample_InstanceProviderClass
Found 3 Instances of Sample_InstanceProviderClass
Found 3 Instances of Sample_InstanceProviderClass
Found 3 Instances of Sample_InstanceProviderClass
Found 3 Instances of Sample_InstanceProviderClass
Enumerate 3 instances 10 times
In 0.035202 Seconds
+++++ Overall time taken for the operation +++++
In 10.0625 Seconds
+++++ TestClient Terminated Normally