Integrate > Integrating with OO

Integrating with OO

Overview

This section describes how system integrators and flow managers can use Server Automation (SA) to set up and run flows using SA. It also describes how users can run flows. Flows are operations that perform some of the most common automated tasks. SA-Operations Orchestration (OO) integration allows flow authors to build OO flows that are integrated with SA and users to run flows from SA. See OO documentation for more information about flows.

Before Integrating SA with OO, you must be familiar with SA, OO, OO flows, and OO jobs to implement the procedures described in the following section.

The section includes the following topics:

For more information about flows, refer OO documentation on SSO (https://softwaresupport.hpe.com/).

Supplementary information

This section contains supplementary information (such as tables and lists) related to SA-OO flows and jobs.

SA-OO integration flows

This section lists flow inputs. Flow authors can define the input name, input type, and template in OO. After these inputs are defined and flows are run, SA automatically populates their values into the OO-SA Library SACoreInputs table - you do not have to input these values manually.

For these inputs:

  • If the input has a text, encrypted field, or free form list field, and OO provides a default value, the field will be filled with the default value. If there is no default value, then, if you followed the guidelines in the following table, SA will fill the text field with one of the known inputs, which you can modify.
  • If the input has a single-select list field or multi-select list field, OO provides the values - you cannot modify these values.

For more information on defining flow inputs, see the OO documentation.

Flow inputs

Flow Inputs

Related to

Automatically assigned values (by SA)

coreHost and coreIPAddress

SA Core

Host and IP address of the SA core associated with the SA user who is logged in to the SA Client

coreUsername or coreUser

SA Core

User name associated with the SA user who is logged in to the SA Client

corePassword

SA Core

Password associated with the SA user who is logged in to the SA Client. SA will provide the password value only if the password is obfuscated in OO.

The contents of the field are encrypted.

coreVersion

SA Core

Current SA core version

SA provides these values

saServerIdentifier

SA Managed Server

Selected server identifiers:

You can set two possible values (in OO):

  • Not Assigned (for one value)
  • List of Values (for multiple values) - Define the input as a freeFormList type in OO.

saServerScriptName

SA Managed Server

Name of the server script that is available in the SA core for that particular server’s operating system

Automatically assigned values: None

Instead, the SA Client provides a widget that enables users to select a server script (excluding the OGFS script).

saServerName/hostName

SA Managed Server

DNS name of the selected server

This value is filled in only if one server is selected.

You can set two possible values (in OO):

  • Not Assigned (for one value)
  • List of Values (for multiple values)

Define the input as a freeFormList type in OO.

platformName

SA Managed Server

Operating system name of the selected server

This value is filled in only if one server is selected.

customerName

SA Managed Server

Customer name of the selected server selected

This value is filled in only if one server is selected.

facilityName

SA Managed Server

Name of the facility where the selected server is located

This value is filled in only if one server is selected.

saJobId

OO

Job ID of the SA job that was used to run the OO flow (tracked in OO using the reports feature)

This input is not displayed.

SA-OO jobs

Java methods for handling blocked jobs

The JobService Java interface in the SA API provides Java methods for handling blocked jobs. These methods are the callbacks into SA that enable job approval integration.

Users who invoke these methods must have the following required permissions: Edit or Cancel Any Job and View All Jobs.

What SA job types can be blocked?

The following table describes the SA job types that can be blocked.

Blockable SA job types

Job Type

Function

Add Host to Virtualization Service

Adds a host to the virtualization service.

Add Virtualization Service

Adds a virtualization service (to what is this added?).

Clone Virtual Machine

Clones a virtual machine on a VMware server.

Convert Virtual Machine to VM Template

Converts a virtual machine to a VM template.

Create Snapshot

Creates a snapshot that captures the configuration of a managed server at a particular point in time.

Create Virtual Machine

Creates a virtual machine.

Create Virtual Zone

Provisions a Solaris virtual machine (non-global zone) on a global zone (Hypervisor).

Delete Virtual Machine

Deletes a virtual machine.

Delete VM Template

Deletes the VM template.

Deploy Virtual Machine from VM Template

Deploys a virtual machine from a VM template.

Edit Virtualization Service

Edit the virtualization service.

Install Patch

Installs a patch on a managed server.

Install SA Agent

Install the SA Agent.

Install Software

Installs software on a managed server.

Migrate Virtual Machine

Migrate a virtual machine.

Modify Virtual Machine

Modify a virtual machine.

Modify Virtual Zone

Modifies the properties of a Solaris virtual machine.

Power Control Virtual Machine

Power control a virtual machine.

Push Configurations

Modifies configuration files on a managed server.

Reboot Servers

Reboots servers.

Reload Virtualization Data

Reloads the virtualization data.

Remediate Audit Results

Remediates servers based on the findings of an audit operation.

Remediate Policies

Remediates servers based on a software policy or a patch policy.

Remediate Snapshot Results

Remediates servers based on a snapshot. A snapshot captures the configuration of a managed server at a particular point in time.

Remove Virtual Zone

Removes a Solaris virtual machine (non-global zone) from a global zone (Hypervisor).

Remove Virtualization Service

Remove the virtualization service.

Restore Configurations

Restores a previous version of configuration files on a server.

Every time you push configurations to a server, the previous configurations are saved and can be restored.

Rollback Software

Rolls back the software.

Run Agent Upgrade

Launches the SA Agent upgrade process.

Run Audit

Runs an audit.

Run Chef Recipe

Runs Chef recipes on a server.

Run Custom Extension

Runs a custom extension.

Run ISM Control

Runs an ISM (Intelligent Software Module) control.

An ISM is an installable software package created with the ISM Development Kit (IDK). An ISM can contain control scripts that perform day-to-day, application-specific tasks, such as starting software servers.

Run OGFS Script

Runs an OGFS (Global File System) script on a server.

The OGFS scripts allows you to execute scripts in the Global Shell from the SA Client.

Run OS Build Plan

Runs an OS builds plan.

Run OS Sequence

Provisions a server and installs an operating system using an OS sequence.

An OS sequence defines what to install on an unprovisioned server, including OS build information from the OS installation profile, software and patch policies, and remediation settings.

Run Program Extension

Runs a custom feature added to SA.

HPE can extend the functionality of SA by creating custom extensions to provide for specific customer needs.

Run Server Script

Runs a script on a server.

Uninstall Patch

Uninstalls a patch on a server.

Uninstall Software

Uninstalls software on a server.

The following table describes the SA JobService Java methods that you can use to handle blocked jobs.

SA JobService Java methods

Java method

Method description

SA CLI method examples

JobService.
approveBlockedJob

Authorizes the job and unblocks it, allowing it to execute.

Within a Global Shell session:

cd /opsw/api/com/opsware/job/JobService/method./approveBlockedJob self:i=$job_id

JobService.
updateBlockedJob

Changes the value of the Ticket ID field (corresponding to the userTag parameter) and Reason field (corresponding to the blockReason parameter) of the blocked job in the Job Status window of the SA Client.

Note You cannot change these fields using the SA interface.

cd /opsw/api/com/opsware/job/JobService/
method./updateBlockedJob self:i=$job_id
userTag=$ticket_id \blockReason=
"This type of job requires approval of CMB.
"

JobService.
cancelScheduledJob

Cancels a blocked job and prevents it from executing.

Changes the status of the blocked job from Awaiting Approval to Cancelled.

(Note that the ID parameter is jobRef, not self)

cd /opsw/api/com/opsware/job/JobService/method./cancelScheduledJob jobRef:i=$job_id \reason="Job was scheduled to run outside of change window."

A job that is currently running (job_status = "ACTIVE") cannot be canceled.

JobService.
findJobRefs

Searches all existing jobs and returns the IDs of all blocked jobs or jobs in other states, such as jobs in progress, expired jobs, and scheduled jobs.

Can view jobs launched by other users.

Specify the job_status string in the filter, not the JobInfoVO.status integer.

cd /opsw/api/com/opsware/job/JobService/method./.findJobRefs:i filter=’job:{job_status = "BLOCKED" }’

The job_id attribute is required when a flow must come back to SA and interact with the job. Job blocking requires this attribute to be sent from SA to OO.

Job status values

This section describes the job-status values, which you can use in the job_status searchable attribute, as well as the corresponding integer values for the JobInfoVO.status, which you can examine if your client code has already retrieved the value object (VO).

Job-Status Values lists allowed job-status values.

In a Java client, you can compare JobInfoVO.status with field constants such as STATUS_ACTIVE, instead of using the integers listed in this table.

Job-Status Values

Value of the job_status searchable attribute

Value of JobInfoVO.status

Job status displayed in the SA Client

Job status description

ABORTED

0

Command Engine Script Failure

Job has finished running.

A Command Engine failure has been detected.

ACTIVE

1

In Progress

Job is currently running.

BLOCKED

11

Pending Approval

Job has been launched, but requires approval before it can run.

CANCELLED

2

N/A

Schedule has been deleted.

DELETED

3

Canceled

Job was scheduled but was later canceled.

EXPIRED

13

Expired

Current date is later than the job schedule's end date, so the job schedule is no longer in effect.

FAILURE

4

Completed with Errors

Job has finished running and an error has been detected.

PENDING

5

SCHEDULED

Job is scheduled to run once in the future.

RECURRING

12

RECURRING

Job is scheduled to run repeatedly in the future.

STALE

10

STALE

Opportunity for the blocked job to run has expired because it did not receive approval.

STATUS

15

TERMINATING

Job is in the process of shutting down in response to a user request to end the job.

STATUS

16

TERMINATED

Job ended early in response to a user request.

SUCCESS

6

COMPLETED

Job has finished running successfully.

TAMPERED

9

TAMPERED

Job has been tampered with.

UNKNOWN

7

Unknown

An unknown error occurred.

WARNING

8

Completed With Warnings

Job has finished running and a warning has been detected.

ZOMBIE

14

Orphaned

Job became orphaned.

Inputs Not Defined or Server Only Accepts One Device

When you try to run a flow, you might receive the following error:

SA will not pass the selected Device(s) to this flow. Either the flow does not have the required ServerIdentifier input defined or the input only accepts a single device.

If you receive this error, ask your administrator to check the ServerIdentifier input.