API Guide
Table Of Contents
- OpenManage Integration for VMware vCenter Version 5.3 API Guide
- Overview
- Get started
- Security
- Use cases
- Session management
- License management
- Console management
- Repository profile management
- Cluster profile management
- Firmware repository inventory management
- Firmware inventory management
- Firmware update management
- System profile management
- Host management
- Get subsystem health report (OMIVV Host Health)
- Host management
- Request body
- Response body
- OMIVV-Specific error codes
The sum of maxHosts of all active licenses during the time of API invocation gives the maximum number of hosts that can be
managed using the OMIVV instance in context.
Compute server drift from baseline
Prerequisites
Ensure that you have verified all the pre-requisites mentioned in the Prerequisites on page 9.
About this task
Configuration drift deals with calculating drift from the baseline (hardware configuration, firmware, or driver versions). This
article describes about identifying the drift between hardware configuration, firmware, and driver versions, run the drift
detection job, and then viewing the drift report using OMIVV APIs.
Steps
1. Start an OMIVV session using OMIVV user credentials. OMIVV credentials are required to authenticate a client of the
RESTful API.
For more information, see OMIVV authentication on page 11.
2. Once you log in to OMIVV, select or identify a vCenter on which you want to perform operation. This is done by setting
operational context.
For more information, see OMIVV authentication on page 11.
Before setting the vCenter Context, get the list of registered vCenter.
Sample code to get the list of registered vCenters:
```json
def getRegisteredVcenterList(omivvIP,bearerToken):
url ="https://" + omivvIP + "/Spectre/api/rest/v1/Services/ConsoleService/
Consoles"
head = {'Authorization': 'Bearer ' + bearerToken}
jsonReponse = requests.get(url, verify=False, headers=head)
if(jsonReponse.status_code == 200):
return Response
else:
print("Get registered vCenter list failed")
```
After you get the list of registered vCenters, set the vCenter context.
Sample code to set the vCenter context:
```json
def setOperationalContext(omivvIP, bearerToken, vcenterId,
vcenterUsername,vCenterDomain, vCenterPassword):
url ="https://" + omivvIP + "/Spectre/api/rest/v1/Services/ConsoleService/
OperationalContext"
postBodyData={"consoleId" : vcenterId, "consoleUserCredential":
{"username":vcenterUsername,"domain" : vCenterDomain,"password" : vCenterPassword}}
head = {'Authorization': 'Bearer ' + bearerToken}
jsonReponse = requests.post(url, json=postBodyData, verify=False,headers=head)
if(jsonReponse.status_code == 204):
return pass;
else:
print("setOperationalContext failed.")
pass
```
3. Create repository profile.
Repository Profile enables to create or maintain multiple driver or firmware repository profiles.
These driver or firmware repository profiles can be used to create cluster profile for baselining the clusters.
Use cases
31