HP Operations Manager for Windows

 

IOvPmdLogicalPolicy Interface Reference

Policy handling interface. More...

import "pmad.idl";

Inheritance diagram for IOvPmdLogicalPolicy:

IOvPmdVersion IOvPmdLogicalPolicy2 IOvPmdLogicalPolicy3 IOvPmdLogicalPolicy4 IOvPmdLogicalPolicy80 List of all members.

Public Member Functions

HRESULT  GetName ([out, retval]BSTR *psName)
HRESULT  GetUser ([out, retval]BSTR *psUser)
HRESULT  GetLogicalId ([out, retval]BSTR *psLogicalID)
HRESULT  GetInstanceId ([out, retval]BSTR *psInstanceID)
HRESULT  GetCreationDate ([out, retval]double *dDate)
HRESULT  GetRegisterDate ([out, retval]double *dDate)
HRESULT  GetDescription ([out, retval]BSTR *psDescription)
HRESULT  GetContents ([out, retval]IOvPmdStream **ppStream)
HRESULT  GetPolicyType ([out, retval]IOvPmdLogicalPolicyType **ppType)
HRESULT  GetInstalledNodeList ([out, retval]SAFEARRAY(IDispatch *)*ppNodes)
HRESULT  GetInstalledNodeListForAllVersions ([out, retval]SAFEARRAY(IDispatch *)*ppNodes)
HRESULT  GetPolicyGroupList ([out, retval]SAFEARRAY(IDispatch *)*ppGroups)
HRESULT  GetLatestVersionString ([out, retval]BSTR *psVersion)
HRESULT  ExportToFile ([in]BSTR sPathName)
HRESULT  Remove ()
HRESULT  SetDescription ([in]BSTR sDescription)
HRESULT  DeployOnNodes ([in]VARIANT vNodeIDs,[in]VARIANT_BOOL bCheckVersion,[in]VARIANT_BOOL bEnable)
HRESULT  DeployOnNodeGroup ([in]BSTR sNodeGroup,[in]VARIANT_BOOL bCheckVersion,[in]VARIANT_BOOL bEnable)
HRESULT  EnableOnNodes ([in]VARIANT vNodeIDs)
HRESULT  DisableOnNodes ([in]VARIANT vNodeIDs)
HRESULT  IsEnabled ([in]IOvPmdNode *pNode,[out, retval]VARIANT_BOOL *bIsEnabled)

Detailed Description

A IOvPmdLogicalPolicy interface pointer always references one particular version of a policy. This policy version (or instance) is identified by a globally unique ID (GUID without brackets) that is called a policy version ID or a policy instance ID. Note that a policy version cannot be identified unambiguously if only a policy name and version string are specified because two distinct policies of two different policy types may have the same name.

To distinguish a particular policy version from the policy in general, the term "logical policy" is often used. This term describes the concept of a container that consists of all versions of the same policy. All versions of the same policy have a common ID (GUID without brackets) that is called a (logical) policy ID. When specified in the PMAD API, it can refer to all versions of the same policy, or only to the latest version of the policy. It depends on what makes more sense for a particular method.

Since:
6.x

Member Function Documentation

HRESULT IOvPmdLogicalPolicy::DisableOnNodes [in] VARIANT  vNodeIDs  ) 
 
Semantics:
This method schedules the operation to disable this policy on all nodes whose ID is contained in parameter 'vNodeIDs'.
This is an asynchronous operation. The method does not perform validation before job execution. The method simply adds the job to the queue and returns immediately. The deployment job itself may fail during execution. An error description is available for the failed deployment job (see IOvPmdJobEntry::GetErrorDescription(...) ).
Parameters:
vNodeIDs  - This VARIANT wraps a SAFEARRAY with the IDs of the nodes where the policy should be enabled as element.
Possible errors:
Version of policy is not installed on a node
Database communication errors
Since:
6.x
HRESULT IOvPmdLogicalPolicy::EnableOnNodes [in] VARIANT  vNodeIDs  ) 
 
Semantics:
This method schedules the operation to enable this policy on all nodes whose ID is contained in parameter 'vNodeIDs'.
This is an asynchronous operation. The method does not perform validation before job execution. The method simply adds the job to the queue and returns immediately. The deployment job itself may fail during execution. An error description is available for the failed deployment job (see IOvPmdJobEntry::GetErrorDescription(...) ).
Parameters:
vNodeIDs  - This VARIANT wraps a SAFEARRAY with the IDs of the nodes where the policy should be enabled as element.
Possible errors:
Version of policy is not installed on a node
Database communication errors
Since:
6.x
HRESULT IOvPmdLogicalPolicy::ExportToFile [in] BSTR  sPathName  ) 
 
Semantics:
Exports the contents of the policy and its attributes to an external file, which can be used to upload this policy version on another PMAD server. The external file is a structured storage containing two streams. One is called data. It contains the data content of the policy. The second one contains the attributes and their values in UNICODE character set. The name of the external file is the name of the policy followed by an underscore and then the instance ID of the policy. If a file with this name already exists and is writable, it is overwritten.
Parameters:
sPathName  - Name of the directory where the external file should be saved.
Possible errors:
Not enough disk space or unable to create file
Database communication errors
Since:
6.x
HRESULT IOvPmdLogicalPolicy::GetContents [out, retval] IOvPmdStream **  ppStream  ) 
 
Semantics:
Returns the data contents of the policy as it was registered with PMAD. The data does not include the modification, which can be performed by the policy type's processor COM component (if present) at registration time.
Parameters:
ppStream  - Pointer to the policy data stream. IOvPmdStream is a scriptable extension of IStream.
Possible errors:
Since:
6.x
HRESULT IOvPmdLogicalPolicy::GetCreationDate [out, retval] double *  dDate  ) 
 
Semantics:
Returns the creation date/time of this policy version. It must be provided when the policy version is registered with PMAD.
The method returns the date/time in the form of the OLE automation data type 'DATE'. It is one of the possible types for the VARIANT data type of OLE automation. A DATE value represents an absolute date and time value. The class COleDateTime encapsulates the DATE data type (for more information see MSDN).
Parameters:
dDate  - Creation date/time of this policy version in the form of the OLE automation data type 'DATE'. The class COleDateTime encapsulates the DATE data type (for more information see MSDN).
Possible errors:
Since:
6.x
HRESULT IOvPmdLogicalPolicy::GetDescription [out, retval] BSTR *  psDescription  ) 
 
Semantics:
Description string of the policy. It can contain at most 256 characters.
Parameters:
psDescription  - Description of the policy version.
Possible errors:
Since:
6.x
HRESULT IOvPmdLogicalPolicy::GetInstalledNodeList [out, retval] SAFEARRAY(IDispatch *)*  ppNodes  ) 
 
Semantics:
Returns an array of nodes where this policy version is installed.
Parameters:
ppNodes  - SAFEARRAY of IDispatch interface pointers to the managed node objects.
Use the method "IOvPmdPolicyManager::CVar(...)" to access the elements of the array within a VB script.
Possible errors:
Database communication errors
Since:
6.x
HRESULT IOvPmdLogicalPolicy::GetInstalledNodeListForAllVersions [out, retval] SAFEARRAY(IDispatch *)*  ppNodes  ) 
 
Semantics:
Returns an array of nodes where at least one version of this policy is installed.
Parameters:
ppNodes  - SAFEARRAY of IDispatch interface pointers to the managed node objects. Use the method "IOvPmdPolicyManager::CVar(...)" to access the elements of the array within a VB script.
Possible errors:
Database communication errors
Since:
6.x
HRESULT IOvPmdLogicalPolicy::GetInstanceId [out, retval] BSTR *  psInstanceID  ) 
 
Semantics:
Policy instance ID that identifies one policy version unambiguously.
Parameters:
psInstanceID  - Policy instance ID (GUID as a string without brackets).
Possible errors:
Since:
6.x
HRESULT IOvPmdLogicalPolicy::GetLatestVersionString [out, retval] BSTR *  psVersion  ) 
 
Semantics:
Returns the highest (latest) version string of this logical policy.
Parameters:
psVersion  - Version string of the latest version of this policy.
Possible errors:
Since:
6.x
HRESULT IOvPmdLogicalPolicy::GetLogicalId [out, retval] BSTR *  psLogicalID  ) 
 
Semantics:
Logical policy ID. It refers to all versions of the same policy. All policy versions with the same logical ID must have the same name but different versions.
Parameters:
psLogicalID  - Logical policy ID (GUID as a string without brackets).
Possible errors:
Since:
6.x
HRESULT IOvPmdLogicalPolicy::GetName [out, retval] BSTR *  psName  ) 
 
Semantics:
Returns the name of the policy. If two policy versions have the same logical ID, they must have the same name, but different versions.
Parameters:
psName  - Name of the policy.
Possible errors:
Since:
6.x
HRESULT IOvPmdLogicalPolicy::GetPolicyType [out, retval] IOvPmdLogicalPolicyType **  ppType  ) 
 
Semantics:
Returns an interface pointer to the policy type of this policy.
Parameters:
ppType  - IOvPmdLogicalPolicyType interface pointer to the policy type.
Possible errors:
Database communication errors
Since:
6.x
HRESULT IOvPmdLogicalPolicy::GetRegisterDate [out, retval] double *  dDate  ) 
 
Semantics:
Returns the registration date/time of this policy version. PMAD adds it to the policy version during registration.
The method returns the date/time in the form of the OLE automation data type 'DATE'. It is one of the possible types for the VARIANT data type of OLE automation. A DATE value represents an absolute date and time value. The class COleDateTime encapsulates the DATE data type (for more information see MSDN).
Parameters:
dDate  - Registration date/time of this policy version in the form of the OLE automation data type 'DATE'. The class COleDateTime encapsulates the DATE data type (for more information see MSDN).
Possible errors:
Since:
6.x
HRESULT IOvPmdLogicalPolicy::GetUser [out, retval] BSTR *  psUser  ) 
 
Semantics:
Returns the user who created this policy. The information must be provided when the policy is registered with PMAD.
Parameters:
psUser  - User that created the policy version.
Possible errors:
Since:
6.x
HRESULT IOvPmdLogicalPolicy::IsEnabled [in] IOvPmdNode pNode,
[out, retval] VARIANT_BOOL *  bIsEnabled
 
Semantics:
This method checks the policy inventory of the specified node, regardless of whether this policy version is currently enabled or disabled on the managed node. However, it does not ask the remote managed node whether the policy is really enabled or disabled. Instead, it returns only the value that is currently cached in the sever DB.
Note that the method returns an error if this policy version is not installed on the specified node.
Parameters:
pNode  - Node to check whether the policy is enabled or disabled.
bIsEnabled  - TRUE if this policy version is enabled; otherwise FALSE.
Possible errors:
Database communication errors
This policy version is not installed on the specified managed node.
Since:
6.x
HRESULT IOvPmdLogicalPolicy::Remove  ) 
 
Semantics:
Removes this policy instance from PMAD. This is only possible if it is not installed on at least one managed node.
Possible errors:
There are still nodes where this policy is installed
Database communication errors
Since:
6.x
HRESULT IOvPmdLogicalPolicy::SetDescription [in] BSTR  sDescription  ) 
 
Semantics:
Changes the value of the description attribute of this policy version. Note that this attribute is not under version control. It can be changed at any time for a given policy version.
Parameters:
sDescription  - Description of this policy version.
Possible errors:
Database communication errors
Since:
6.x