HP Operations Manager for Windows

IOvReqCheckSrv


The IOvReqCheckSrv interface provides the following methods.

Method declaration HRESULT CheckNode(
[in]BSTR Node,
   [out]VARIANT* Report, 
   [out]VARIANT* ResultDescription, 
   [in]BSTR Platform,
   [in,optional,defaultvalue(RP_TXT)]ReportFormat rpFormat,
   [in,optional,defaultvalue(RP_REQ_FAILED)]ReportType rpType, 
   [in,optional,defaultvalue("")]BSTR User, 
   [in,optional,defaultvalue("")]BSTR Password,
   [out,retval]long* Result)

Method CheckNode
Description It checks prerequisites for a node specified with the Node parameter (primary node name or IP address).

With Platform parameter we can define the platform of the checked node. Valid values: "UNIX", "WINDOWS".

rpType parameter specifies how detailed report should be:

  • RP_REQ_REC_INF: all prerequisites (requirements, recommendations) together with information data are returned. Each prerequisite has associated state (PASS,FAIL,UNCHECK). Each failed prerequisite has additional error description.
  • RP_REQ_REC: all prerequisites (requirements, recommendations) are returned. Each prerequisite has associated state (PASS,FAIL,UNCHECK). Each failed prerequisite has additional error description.
  • RP_REQ_REC_FAILED: only prerequisites (requirements, recommendations) that have failed are returned. Each prerequisite has associated state (FAIL,UNCHECK). Each failed prerequisite has additional error description.
  • RP_REQ: all requirements are returned. Each requirement has associated state (PASS,FAIL,UNCHECK). Each failed requirement has additional error description.
  • RP_REQ_FAILED: only requirements that have failed are returned. Each requirement has associated state (FAIL,UNCHECK). Each failed requirement has additional error description.

rpFormat parameter specifies format of report:

  • RP_XML: report is generated in XML format (appropriate for further processing)
  • RP_TXT: report is generated in text format (appropriate for directly displaying to the user)

Prerequisite check report (list of requirements/recommendations with the status) is returned as string with Report parameter. A content/format of report is determined with rpFormat and rpType parameters.

 

If User and Password parameters are provided prerequisite check is performed in context of provided user otherwise OvOWReqCheck component impersonates the client and contacts node directly.

 

Status of prerequisite checking is returned in Result parameter:

PREREQUISITES CHECKED:

  • ovrcResAllPrereqOK (0) – All checked prerequisites are OK
  • ovrcResReqOKRecFailed (1) - All requirements are OK; at least one recommendation has failed
  • ovrcResReqOKRecNotCheked (2) -  All requirements are OK; at least one recommendation could not be checked
  • ovrcResReqFailed (3) – At least one requirement has failed
  • ovrcResNoPrerequisitesSpecified (55) – No prerequisites specified for <system> system.

PREREQUISITES WERE NOT CHECKED:

  • ovrcResReqCheckFailed (100) – not real return code; it is just a code to compare against to check whether check completed of failed; Result < ovrcResReqCheckFailed à prerequisite check completed; Result > ovrcResReqCheckFailed à prerequisite check failed
  • ovrcResNoAdminRight (101) – Client does not have administrative privileges on the node. Prerequisites can be checked only with administrative rights.
  • ovrcResOneReqNotChecked (102) – At least one requirement could not be checked (it is unknown whether requirement is OK or not); all other successfully checked requirements are OK
  • ovrcResNodeNotAvailable (103) – Checked node is not available; either there is no network connection or firewall ports are not opened
  • ovrcResNodeNotExists (104) - Node (name) cannot be resolved
  • ovrcResPlatformNotSupported (105) - Platform not supported  (Desc for the user: The platform/OS version on node xxx may not yet be supported - consult the latest support matrix ; if platform is supported ignore prerequisite check and check prerequisites manually)
  • ovrcResPlatformNotDefined (106) – Node’s platform properties (System Type, Operating System, Version) are not set.
  • ovrcResPlatformNotDiscovered (107) – Cannot discover platform.

 

Textual description of Result code is returned in ResultDescription parameter.

 

Note: Returned status is 2 if at least one requirement fails and if any other requirement could not be checked.

 

HRESULT:

ovrcNoError (S_OK) – success

ovrcErrConfigFileSyntaxError – “Syntax error in line <line>:  <err_descr>”

 

Method CheckNodeOv
Method declaration HRESULT CheckNodeOv(
[in]BSTR Node,
   [in]long SystemType,
   [in]long OsType,
   [in]BSTR OS Version,
   [out]VARAINT* Report,
   [out]VARIANT* ResultDescription,
   [in,optional,defaultvalue(RP_TXT)]ReportFormat rpFormat,
   [in,optional,defaultvalue(RP_REQ_FAILED)]ReportType rpType, 
   [in,optional,defaultvalue("")]BSTR User, 
   [in,optional,defaultvalue("")]BSTR Password,
   [out,retval]long* Result)
   
Description It checks prerequisites for node specified with Node parameter (primary node name or IP address). Prerequisites are checked according to provided HPOM for Windows node properties (SystemType, OSType,OSVersion). HPOM for Windows node properties directly relate to the [OVM] tag in the config file.

For a description of parameters and return codes, see the CheckNode method.

Method CheckNodeOv2
Method declaration HRESULT CheckNodeOv2(
[in]BSTR NodeID,
   [in]long SystemType,
   [out]VARAINT* Report,
   [out]VARIANT* ResultDescription,
   [in,optional,defaultvalue(RP_TXT)]ReportFormat rpFormat,
   [in,optional,defaultvalue(RP_REQ_FAILED)]ReportType rpType, 
   [in,optional,defaultvalue("")]BSTR User, 
   [in,optional,defaultvalue("")]BSTR Password,
   [out,retval]long* Result)
   
Description It checks prerequisites for node specified with NodeID parameter. Prerequisites are checked according to provided HPOM for Windows node properties (SystemType, OSType,OSVersion). HPOM for Windows node properties directly relate to the [OVM] tag in the config file.

If all requirements are all right (recommendations are not important) the method sets the node's PrerequisitesOkay property to TRUE.

For a description of parameters, see the CheckNode method.
Property CheckingEnabled
Property declaration

Propget - CheckingEnabled([out, retval] VARIANT_BOOL *pVal);

propput - CheckingEnabled([in] VARIANT_BOOL newVal);

Description With this property you can check whether prerequisite checking is enabled for GUI and PMAD operations.

Prerequisite checking can also be enabled and disabled by setting it to VARIANT_TRUE/VARIANT_FALSE.

Internal:

Prerequisite setting is enabled and disabled by setting the registry key value:

HKLM\SOFTWARE\Hewlett-Packard\OVEnterprise\Management Server\PrereqCheck\PrereqCheckingEnabled to 0 – disabled and 1 – enabled.

If the username and password are not provided (when calling CheckNode, CheckNodeOv, and CheckNodeOv2) COM impersonation is used and therefore the client must set the impersonation level at least to "Impersonate:"

CoInitializeSecurity (NULL, -1, NULL, NULL, RPC_CAUTHN_LEVEL_NONE
RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOCA_NONE,0);