Section 8 - Utilize API Commands to Manage a VMware NSX Deployment

Objective 8.1 - Administer and Execute calls using the VMware NSX vSphere API
  • Construct and execute an API call using correct syntax and formatting
  • Programmatically configure system parameters including:
    • NSX controller syslog
    • Modify DLR declared dead time
  • Analyze, modify, and successfully retrieve configuration data using an existing API call
Using PostMan:

- Select Basic Authentication

NSX controller syslog:

GET request:

- https://nsxserver.lab.local/api/2.0/vdn/controller/controllerId/syslog
Identify ControllerID:
- https://nsxserver.lab.local/api/2.0/vdn/controller

<?xml version="1.0" encoding="UTF-8"?>
<error>    
<details>Syslog server is not configured for controller controller-5.</details>    
<errorCode>1255402</errorCode>    
<moduleName>core-services</moduleName>
</error>

 

POST request:

Use RAW and XML settings.

Template:

<controllerSyslogServer>
<syslogServer></syslogServer>
<port></port>
<protocol></protocol>
<level></level>
</controllerSyslogServer>

 Example:

<controllerSyslogServer>
<syslogServer>10.3.58.177</syslogServer>
<port>514</port>
<protocol>UDP</protocol>
<level>INFO</level>
</controllerSyslogServer>

Modify DLR declared dead time:

Identify Edge:
- GET https://nsxserver.lab.local/api/4.0/edge
- GET https://nsxserver.lab.local/api/4.0/edges/edge-42/highavailability/config

Result:

<?xml version="1.0" encoding="UTF-8"?>
<highAvailability>    
<version>12</version>    
<enabled>true</enabled>    
<declareDeadTime>14</declareDeadTime>    
<logging>        
<enable>false</enable>        
<logLevel>info</logLevel>  
</logging>    
<security>        
<enabled>false</enabled>    
</security>
</highAvailability>

PUT request:  (Make sure you are using PUT this time)

<highAvailability>    
<declareDeadTime>15</declareDeadTime>
</highAvailability>

 

 


Google AdSence

AUST IT - Computer help out of hours, when you need it most.

Find out why we do it for less.

About

AUST IT will help you resolve any technical support issues you are facing onsite or remotely via remote desktop 24/7. More...

Contacts

Reservoir, Melbourne,
3073, VIC, Australia

Phone: 0422 348 882

This email address is being protected from spambots. You need JavaScript enabled to view it.

Sydney: 0481 837 077

Connect

Join us in social networks to be in touch.

Newsletter

Complete the form below, and we'll send you our emails with all the latest AUST IT news.