Objective 8.2 – Describe NSX Automation

Knowledge

  • Identify API-only functionality
    • Integration with Cloud Management Platforms
    • Updating the MoId of the resource pool, datastore, or dvPortGroup using a REST API call, when an NSX Edge needs to be redeployed and one of the original resource pool, datastore or dvPortGroup is no longer valid.
  • Explain how REST APIs work
    • REST, an acronym for REpresentational State Transfer, is a term that has been widely employed to describe an architectural style characteristic of programs that rely on the inherent properties of hypermedia to create and modify the state of an object that is accessible at a URL.
    • Once a URL of such an object is known to a client, the client can use an HTTP GET request to discover the properties of the object. These properties are typically communicated in a structured document with an HTTP Content-Type of XML that provides a representation of the state of the object. In a RESTful workflow, documents (representations of object state) are passed back and forth (transferred) between a client and a service with the explicit assumption that neither party need know anything about an entity other than what is presented in a single request or response. The URLs at which these documents are available are often “sticky,” in that they persist beyond the lifetime of the request or response that includes them. The other content of the documents is nominally valid until the expiration date noted in the HTTP Expires header.
  • Describe how to use the NSX API in a supported browser
    • To use the REST API in Firefox
      • Locate the RESTClient Mozilla add-on, and add it to Firefox.
      • Click Tools > REST Client to start the add-on.
      • Click Login and enter the NSX login credentials, which then appear encoded in the Request Header.
      • Select a method such as GET, POST, or PUT, and type the URL of a REST API. You might be asked to accept or ignore the lack of SSL certificate. Click Send. Response Header, Response Body, and Rendered HTML appear in the bottom window.
    • To use the REST API in Chrome
      • Search the Web to find the Simple REST Client, and add it to Chrome.
      • Click its globe-like icon to start it in a tab.
      • The Simple REST Client provides no certificate-checking interface, so use another Chrome tab to accept or ignore the lack of SSL certificate.
      • Type the URL of a REST API, and select a method such as GET, POST, or PUT.
      • In the Headers field, type the basic authorization line, as in the Important note above. Click Send. Status, Headers, and Data appear in the Response window.
  • Identify port requirements for the NSX API
    • The NSX Manager requires port 443/TCP for REST API requests.
  • Describe common use cases for VMware NSX API
    • Integration with Cloud Management Platforms:
      • Creating new Logical Switches
      • Creating new Logical Routers
      • Attaching VMs to Logical Switches
      • Configuring Load Balancers
      • Updating Firewall rules
  • Explain how to access the VMware NSX API
    • You have several choices for programming the NSX REST API: using Firefox, Chrome, or cURL. To make XML responses more legible, you can copy and paste them into an XML friendly editor such as xmlcopyeditor or pspad.
  • Modify an existing API workflow

Tools

  • NSX vSphere API Guide
  • NSX API
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s