API Guide
Table Of Contents
- OpenManage Integration for VMware vCenter Version 5.3 API Guide
- Contents
- 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
- Drift management
- Get subsystem health report (OMIVV Host Health)
- Host management
- Request body
- Response body
- OMIVV-Specific error codes
else:
print("PostFirmwareInventoryReport API is failed.")
```
Update firmware using catalogs
Prerequisites
Before you create firmware update job, ensure that you have:
● Service Tag of the host
● Repository profile name
● Verified all the required pre-requisites mentioned in the Prerequisites on page 9.
● Verified the following for vSAN host and cluster:
○ DRS is enabled
○ Host is not already in maintenance mode
○ vSAN data objects are healthy
● Verified that DRS is enabled for vSphere host and cluster
About this task
This topic explains how you can use OMIVV APIs to update the host firmware components.
Steps
1. Log in to OMIVV. 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. Get firmware repository profile ID. You can get the firmware repository profile ID from the repository profile name.
Sample code to get the repository profile ID:
```json
def getRepoId(omivv_ip, bearer_token):
response = getAllRepositoryProfile(omivv_ip, bearer_token)
for repo in response:
if(repo_name == repo['profileName']):
return repo['id']
def getAllRepositoryProfile(omivvIP,bearerToken):
url ="https://" + omivvIP + "/Spectre/api/rest/v1/Services/PluginProfileService/
RepositoryProfiles"
print("url: " + url)
head = {'Authorization': 'Bearer ' + bearerToken}
jsonReponse = requests.get(url, verify=False, headers=head)
if(jsonReponse.status_code == 200):
return jsonReponse.json()
else:
print("Get getallRepositoryProfile failed")
```
3. Get Host ID and System ID. Get the host ID and system ID by using the host Service Tag.
Sample code to get the host ID and system ID:
```json
def get_vcenter_tree_from_omivv(OMIVV_ip, vcenter_ip, session_token
,host_service_Tag):
url ="https://" + OMIVV_ip + "/Spectre/api/rest/v1/Services/ConsoleService/
Consoles"
head = {'Authorization': 'Bearer ' + session_token}
response = requests.get(url, verify=False, headers=head)
if(response.status_code == 200):
json_response = json.dumps(response.json(), indent=4, sort_keys=True)
Use cases
27