HP Operations Manager for Windows

IOvReqCheck


The IOvReqCheck interface provides the following methods.

Method UseManagementServer
Method declaration
HRESULT UseManagementServer(
[in]BSTR Server)
	
Description This method must be called before any other method provided by the IOvReqCheck interface. It sets the management server that should be used.

NOTE: The console can connect to a different management server, so it is necessary to specify which management server should be used.

Internal:

Sets the management server name to be used by all other methods. It also transfers the prereq.check config file from the management server to the console if a different (newer or older) version exists on the management server. The config file is located here on the console:

<HPOM for Windows data dir>\tmp

Access to the config file on the console must be protected with global mutex(
CreateMutex(lpMutexAttributes,FALSE,"Global\PrereqCheckConfigFile") ). The file can be updated only when it is not used by the OvOWReqCheck component.

Method CheckNode
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,reval]long* Result)
	
Description It checks prerequisites for the node specified with the Node parameter (primary node name or IP address).

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

The rpType parameter specifies how detailed the 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)

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

If User and Password parameters are provided, the prerequisite check is performed in the context of the provided user. The call is routed to the OvOWReqCheckSrv component on server which actually checks requirements.

If the user and Password are not provided, theOvOWReqCheck component impersonates the client and contacts the node directly.

The status of prerequisite checking is returned in the 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
  • ovrcReqFailed (3) – At least one requirement has failed
  • ovrcResNoPrerequisitesSpecified (55) – No prerequisites specified for <system> system.

PREREQUISTES 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 is 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 the 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
ovrcErrMgmtServerNotSet-SetManagementServer method was not called
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 OSVersion,
  [in, out]BSTR* 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 the node specified with the 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,
  [out]VARIANT* Report,
  [out]VARIANT* ResultDescription,
  [in,optional,defaultvalue(RP_TXT)] ReportFormat rpFormat
  [in,optional,defaultvalue(RP_REQ_FAILED)] rpType,
  [in,optional,defaultvalue(“”)]BSTR User,
  [in,optional,defaultvalue(“”)]BSTR Password,
  [out,retval]long* Result)
  
Description It checks prerequisites for a node specified with the NodeID parameter. Prerequisites are checked according to HPOM for Windows node properties (StystemType, OSType, OSVersion). HPOM for Windows node properties directly relate to the [OVM] tag in the config file.

If all requirements are OK (recommendations are not important), the method sets the node’s PrerequisitesOkay property to TRUE.

For a description of parameters, see the CheckNode method.

Method GetRequirements
Method declaration
HRESULT GetRequirements(
  [in]BSTR System,
  [in,optional,defaultvalue (RP_TXT)] ReportFormat rp Format,
  [out, retval]BSTR* Requirements)
  
Description It returns the list of prerequisites for a specified system as a string formatted (XML/TXT) according to the rpFormat parameter. (System parameter directly relates to the [VER] tag in the config file.

ERROR CODES:

ovrcErrMgmtServerNotSet – SetManagementServer method was not called

ovrcErrSystemNotSupported – Specified system is not supported (not found in config file – VER tag)

Method GetAllRequirements
Method declaration
HRESULT GetAllRequirements(
  [in,optional,defaultvalue(RP_TXT)] Report Format rpFormat,
  [out, retval ]BSTR* Requirements)
  
Description It returns the list of prerequisites for all supported systems. Format (XML/TXT) of the report is defined with the fpFormat parameter.

HRESULT:

ovrcErrMgmtServerNotSet - SetManagementServer method was not called
ovrcErrSystemNotSupported – Specified system is not supported (not found in config file – VER tag)

Method GetSupportedSystems
Method declaration
HRESULT GetSupportedSystems(
  [out,retval] VARIANT* SupportedSystems)
  
Description It returns the list of supported OS versions in an array of strings. The list of supported OS versions is retrieved from the OvReqCheck config file ([VER] tag)

HRESULT:

ovrcErrMgmtServerNotSet - SetManagementServr method was not called

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.

HRESULT:

ovrcErrMgmtServerNotSet - SetManagementServr method was not called

Internal:

Call is just forwarded to OvOWReqCheckSrv component on the management server, where the registry key is read and set.