Automating Maintenance Mode for vCenter VMs in DX NetOps Spectrum via REST API
search cancel

Automating Maintenance Mode for vCenter VMs in DX NetOps Spectrum via REST API

book

Article ID: 451533

calendar_today

Updated On:

Products

Network Observability Virtual Network Assurance Spectrum

Issue/Introduction

DX NetOps VNA integration does not automatically synchronize Maintenance Mode status from vCenter to DX NetOps Spectrum. When vCenter VMs are placed into Maintenance Mode, the corresponding models in Spectrum remain in their current state. To achieve automated maintenance state management, the vCenter automation team must push the state change to Spectrum using the REST API. This article outlines the procedure for automating this workflow.

Environment

  • DX NetOps Spectrum (All supported releases)
  • DX NetOps VNA (All supported releases)
  • VMware vCenter (vSphere Plugin)

Cause

Product Limitation: VNA does not currently support the automatic synchronization of Maintenance Mode status from vCenter to Spectrum SDN_VM models.

Resolution

To automate the maintenance mode transition, integrate the following REST API call into your vCenter orchestration or bridge script:

 

  1. Identify the MODEL_HANDLE of the target VM in Spectrum.
  2. Use the isManaged attribute (ID: 0x1295d) to toggle the state.

 

To place a model into Maintenance Mode: Send a PUT request to the following endpoint:

PUT http://<OC_HOST>:<PORT>/spectrum/restful/model/<MODEL_HANDLE>?attr=0x1295d&val=0

 

 

To remove a model from Maintenance Mode: Send a PUT request to the following endpoint:

PUT http://<OC_HOST>:<PORT>/spectrum/restful/model/<MODEL_HANDLE>?attr=0x1295d&val=1

 

Note: Replace <OC_HOST><PORT>, and <MODEL_HANDLE> with the specific values for your environment.

Additional Information

For additional information, please see the following KB article Using the REST API to put models into Maintenance mode in CA Spectrum