Cisco Nexus 1000V for KVM REST API Configuration Guide, Release 5.x

Similar documents
Cisco Nexus 1000V for KVM OpenStack REST API Configuration Guide, Release 5.x

Software Configuration Guide, Cisco IOS XE Everest 16.6.x (Catalyst 9300 Switches)

Cisco Nexus 9000 Series NX-OS Virtual Machine Tracker Configuration Guide, Release 9.x

Cisco UCS Director API Integration and Customization Guide, Release 5.4

Cisco Connected Mobile Experiences REST API Getting Started Guide, Release 10.2

Cisco Nexus 7000 Series NX-OS Virtual Device Context Command Reference

Cisco Nexus 9000 Series NX-OS IP Fabric for Media Solution Guide, Release 7.0(3)I4(2)

Host Upgrade Utility User Guide for Cisco UCS E-Series Servers and the Cisco UCS E-Series Network Compute Engine

Cisco Nexus 7000 Series Switches Configuration Guide: The Catena Solution

Cisco TEO Adapter Guide for Microsoft System Center Operations Manager 2007

Cisco TEO Adapter Guide for Microsoft Windows

Cisco TEO Adapter Guide for

Cisco TEO Adapter Guide for SAP Java

Videoscape Distribution Suite Software Installation Guide

Cisco Connected Grid Design Suite (CGDS) - Substation Workbench Designer User Guide

Installation and Configuration Guide for Visual Voic Release 8.5

Cisco TEO Adapter Guide for SAP ABAP

Cisco UCS Director PowerShell Agent Installation and Configuration Guide, Release 5.4

Cisco UCS Performance Manager Release Notes

Application Launcher User Guide

CPS UDC MoP for Session Migration, Release

OpenStack Group-Based Policy User Guide

Enterprise Chat and Supervisor s Guide, Release 11.5(1)

Cisco ACI with OpenStack OpFlex Architectural Overview

Cisco Unified Communications Self Care Portal User Guide, Release

Cisco FindIT Plugin for Kaseya Quick Start Guide

Cisco Nexus 1000V for KVM Interface Configuration Guide, Release 5.x

Cisco Unified Communications Manager Device Package 8.6(2)( ) Release Notes

Cisco Nexus 1000V License Configuration Guide, Release 4.2(1)SV2(1.1)

Cisco UCS Virtual Interface Card Drivers for Windows Installation Guide

Enterprise Chat and Upgrade Guide, Release 11.6(1)

Migration and Upgrade: Frequently Asked Questions

Cisco UCS Performance Manager Release Notes

Cisco Jabber IM for iphone Frequently Asked Questions

Smart Software Manager satellite Installation Guide

Cisco CIMC Firmware Update Utility User Guide

Cisco Host Upgrade Utility 1.5(1) User Guide

SAML SSO Okta Identity Provider 2

Cisco Nexus 7000 Series NX-OS Quality of Service Command Reference

Cisco TelePresence FindMe Cisco TMSPE version 1.2

Cisco UCS Performance Manager Release Notes

Recovery Guide for Cisco Digital Media Suite 5.4 Appliances

TechNote on Handling TLS Support with UCCX

Cisco UC Integration for Microsoft Lync 9.7(4) User Guide

Hypervisor API Functions

Cisco Nexus 3500 Series NX-OS Software Upgrade and Downgrade Guide, Release 7.x

Cisco Unified Contact Center Express Historical Reporting Guide, Release 10.6(1)

Cisco Unified Contact Center Express Historical Reporting Guide, Release 10.5(1)

Cisco Jabber for Android 10.5 Quick Start Guide

Cisco Nexus 6000 Series NX-OS Fabric Extender Command Reference

Release Notes for Cisco Virtualization Experience Client 2111/2211 PCoIP Firmware Release 4.0.2

Media Services Proxy Command Reference

IP Routing: ODR Configuration Guide, Cisco IOS Release 15M&T

Cisco Terminal Services (TS) Agent Guide, Version 1.1

Cisco ACI Simulator Installation Guide

VCS BSS/OSS Adaptor (BOA) 17.2 Release Notes

Cisco UCS Performance Manager Release Notes

Embedded Packet Capture Configuration Guide

Prime Service Catalog: UCS Director Integration Best Practices Importing Advanced Catalogs

Cisco Terminal Services (TS) Agent Guide, Version 1.1

Cisco TelePresence Management Suite Extension for Microsoft Exchange Software version 3.1

Process Automation Guide for Automation for SAP BOBJ Enterprise

Cisco CSPC 2.7x. Configure CSPC Appliance via CLI. Feb 2018

Enterprise Chat and Administrator s Guide to System Console, Release 11.6(1)

Cisco Evolved Programmable Network System Test Topology Reference Guide, Release 5.0

Cisco Unified Communications Self Care Portal User Guide, Release 11.5(1)

NetFlow Configuration Guide

Cisco TelePresence Management Suite Provisioning Extension 1.6

Flow Sensor and Load Balancer Integration Guide. (for Stealthwatch System v6.9.2)

Cisco StadiumVision Management Dashboard Monitored Services Guide

Cisco IOS Flexible NetFlow Command Reference

Cisco TelePresence TelePresence Server MSE 8710

Cisco Monitor Manager Application Configuration Guide, Release 1.6

Cisco IOS XR Carrier Grade NAT Command Reference for the Cisco CRS Router, Release 5.2.x

IP Addressing: Fragmentation and Reassembly Configuration Guide, Cisco IOS XE Release 3S (Cisco ASR 1000)

Cisco TelePresence MCU MSE 8510

Method of Procedure for HNB Gateway Configuration on Redundant Serving Nodes

Quick Start Guide for Cisco Prime Network Registrar IPAM 8.0

Cisco Jabber Video for ipad Frequently Asked Questions

Cisco UCS Integrated Management Controller Faults Reference Guide

Cisco Terminal Services (TS) Agent Guide, Version 1.0

IP Addressing: Fragmentation and Reassembly Configuration Guide

Cisco Unified Communications Manager Device Package 10.5(1)( ) Release Notes

Cisco ASR 9000 Series Aggregation Services Router Netflow Command Reference, Release 4.3.x

Cisco Proximity Desktop

Cisco Nexus 7000 Series Virtual Device Context Configuration Guide

Cisco Instant Connect MIDlet Reference Guide

NNMi Integration User Guide for CiscoWorks Network Compliance Manager 1.6

Cisco TelePresence Management Suite 15.5

Release Notes for Cisco Unified Intelligence Center, Release 10.0(1)

AsyncOS 11.0 API - Getting Started Guide for Security Appliances

Backup and Restore Guide for Cisco Unified Communications Domain Manager 8.1.3

IP Addressing: IPv4 Addressing Configuration Guide, Cisco IOS Release 12.4

Installation and Configuration Guide for Cisco Services Ready Engine Virtualization

Cisco Nexus 3000 Series NX-OS Verified Scalability Guide, Release 7.0(3)I7(2)

Embedded Packet Capture Configuration Guide

Cisco IOS Shell Command Reference

Cisco Prime Network Registrar IPAM 8.3 Quick Start Guide

Cisco UCS C-Series IMC Emulator Quick Start Guide. Cisco IMC Emulator 2 Overview 2 Setting up Cisco IMC Emulator 3 Using Cisco IMC Emulator 9

Cisco TelePresence Management Suite Extension for Microsoft Exchange Software version 5.7. User Guide July 2018

Transcription:

Cisco Nexus 1000V for KVM REST API Configuration Guide, Release 5.x First Published: August 01, 2014 Americas Headquarters Cisco Systems, Inc. 170 West Tasman Drive San Jose, CA 95134-1706 USA http://www.cisco.com Tel: 408 526-4000 800 553-NETS (6387) Fax: 408 527-0883

THE SPECIFICATIONS AND INFORMATION REGARDING THE PRODUCTS IN THIS MANUAL ARE SUBJECT TO CHANGE WITHOUT NOTICE. ALL STATEMENTS, INFORMATION, AND RECOMMENDATIONS IN THIS MANUAL ARE BELIEVED TO BE ACCURATE BUT ARE PRESENTED WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. USERS MUST TAKE FULL RESPONSIBILITY FOR THEIR APPLICATION OF ANY PRODUCTS. THE SOFTWARE LICENSE AND LIMITED WARRANTY FOR THE ACCOMPANYING PRODUCT ARE SET FORTH IN THE INFORMATION PACKET THAT SHIPPED WITH THE PRODUCT AND ARE INCORPORATED HEREIN BY THIS REFERENCE. IF YOU ARE UNABLE TO LOCATE THE SOFTWARE LICENSE OR LIMITED WARRANTY, CONTACT YOUR CISCO REPRESENTATIVE FOR A COPY. The Cisco implementation of TCP header compression is an adaptation of a program developed by the University of California, Berkeley (UCB) as part of UCB's public domain version of the UNIX operating system. All rights reserved. Copyright 1981, Regents of the University of California. NOTWITHSTANDING ANY OTHER WARRANTY HEREIN, ALL DOCUMENT FILES AND SOFTWARE OF THESE SUPPLIERS ARE PROVIDED AS IS" WITH ALL FAULTS. CISCO AND THE ABOVE-NAMED SUPPLIERS DISCLAIM ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THOSE OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OR ARISING FROM A COURSE OF DEALING, USAGE, OR TRADE PRACTICE. IN NO EVENT SHALL CISCO OR ITS SUPPLIERS BE LIABLE FOR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, OR INCIDENTAL DAMAGES, INCLUDING, WITHOUT LIMITATION, LOST PROFITS OR LOSS OR DAMAGE TO DATA ARISING OUT OF THE USE OR INABILITY TO USE THIS MANUAL, EVEN IF CISCO OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to be actual addresses and phone numbers. Any examples, command display output, network topology diagrams, and other figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses or phone numbers in illustrative content is unintentional and coincidental. Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S. and other countries. To view a list of Cisco trademarks, go to this URL: http:// www.cisco.com/go/trademarks. Third-party trademarks mentioned are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (1110R) 2014 Cisco Systems, Inc. All rights reserved.

CONTENTS Preface Preface v Audience v Document Conventions v Related Documentation for Cisco Nexus 1000V for KVM Software vii Documentation Feedback vii Obtaining Documentation and Submitting a Service Request viii CHAPTER 1 Overview 1 Information About the Cisco Nexus 1000V REST API 1 Finding Supported Resource Names 2 List of Available Resource Names for the Cisco Nexus 1000V 2 CHAPTER 2 Cisco Nexus 1000V API Functions 5 Get Information About the Uplink Ports Configured on the VSM 5 Get the Cisco Nexus 1000V Licensing Status 6 Get a List of Port Profiles Configured on the VSM 7 Get Information About the Virtual Ethernet Ports Connected to the Cisco Nexus 1000V Switch 8 Get a Summary of the Cisco Nexus 1000V Switch 9 iii

Contents iv

Preface This preface contains the following sections: Audience, page v Document Conventions, page v Related Documentation for Cisco Nexus 1000V for KVM Software, page vii Documentation Feedback, page vii Obtaining Documentation and Submitting a Service Request, page viii Audience This publication is for network administrators who configure and maintain Cisco Nexus devices. This guide is for network and server administrators with the following experience and knowledge: An understanding of virtualization An understanding of the corresponding hypervisor management software for your switch, such as VMware vswitch, Microsoft System Center Virtual Machine Manager (SCVMM), or OpenStack. Document Conventions Command descriptions use the following conventions: Convention bold Bold text indicates the commands and keywords that you enter literally as shown. Italic Italic text indicates arguments for which the user supplies the values. [x] Square brackets enclose an optional element (keyword or argument). v

Document Conventions Preface Convention [x y] {x y} [x {y z}] variable string Square brackets enclosing keywords or arguments separated by a vertical bar indicate an optional choice. Braces enclosing keywords or arguments separated by a vertical bar indicate a required choice. Nested set of square brackets or braces indicate optional or required choices within optional or required elements. Braces and a vertical bar within square brackets indicate a required choice within an optional element. Indicates a variable for which you supply values, in context where italics cannot be used. A nonquoted set of characters. Do not use quotation marks around the string or the string will include the quotation marks. Examples use the following conventions: Convention screen font boldface screen font italic screen font < > [ ]!, # Terminal sessions and information the switch displays are in screen font. Information you must enter is in boldface screen font. Arguments for which you supply values are in italic screen font. Nonprinting characters, such as passwords, are in angle brackets. Default responses to system prompts are in square brackets. An exclamation point (!) or a pound sign (#) at the beginning of a line of code indicates a comment line. This document uses the following conventions: Note Means reader take note. Notes contain helpful suggestions or references to material not covered in the manual. Caution Means reader be careful. In this situation, you might do something that could result in equipment damage or loss of data. vi

Preface Related Documentation for Cisco Nexus 1000V for KVM Software Related Documentation for Cisco Nexus 1000V for KVM Software This section lists the documents used with the Cisco Nexus 1000V for KVM software: General Information Cisco Nexus 1000V for KVM Release Notes Install and Upgrade Cisco Nexus 1000V for KVM Software Installation Guide Configuration Guides Cisco Nexus 1000V for KVM High-Availability Configuration Guide Cisco Nexus 1000V for KVM Interface Configuration Guide Cisco Nexus 1000V for KVM Layer 2 Configuration Guide Cisco Nexus 1000V for KVM License Configuration Guide Cisco Nexus 1000V for KVM Virtual Network Configuration Guide Cisco Nexus 1000V for KVM Port Profile Configuration Guide Cisco Nexus 1000V for KVM REST API Configuration Guide Cisco Nexus 1000V for KVM Security Configuration Guide Cisco Nexus 1000V for KVM System Management Configuration Guide Cisco Nexus 1000V for KVM Verified Scalability Guide Cisco Nexus 1000V for KVM VXLAN Configuration Guide Reference Guides Cisco Nexus 1000V for KVM Command Reference Cisco Nexus 1000V for KVM OpenStack REST API Reference Troubleshooting and Alerts Cisco Nexus 1000V for KVM Troubleshooting Guide Documentation Feedback To provide technical feedback on this document, or to report an error or omission, please send your comments to: nexus1k-docfeedback@cisco.com We appreciate your feedback. vii

Obtaining Documentation and Submitting a Service Request Preface Obtaining Documentation and Submitting a Service Request For information on obtaining documentation, using the Cisco Bug Search Tool (BST), submitting a service request, and gathering additional information, see What's New in Cisco Product Documentation, at: http:// www.cisco.com/c/en/us/td/docs/general/whatsnew/whatsnew.html. Subscribe to What's New in Cisco Product Documentation, which lists all new and revised Cisco technical documentation, as an RSS feed and deliver content directly to your desktop using a reader application. The RSS feeds are a free service. viii

CHAPTER 1 Overview This chapter contains the following sections: Information About the Cisco Nexus 1000V REST API, page 1 Finding Supported Resource Names, page 2 List of Available Resource Names for the Cisco Nexus 1000V, page 2 Information About the Cisco Nexus 1000V REST API The REST API supports retrieving system information from the Cisco Nexus 1000V. You can read an object on the Cisco Nexus 1000V Virtual Supervisor Module (VSM) using the Representational State Transfer (REST) web services API. In order to call any REST function, you can use tools such as a web browser, the curl tool, and Windows PowerShell. The following is the basic construct of a REST URL: http[s]://<ip_address>/api/<resource locator> The resource locator consists of two parts: <resource locator> := <name space>/<resource name> <name space> indicates the broader class of functions and <resource name> refers to the specific object. For example, in the following URL: http://10.10.10.2/api/n1k/license n1k is the namespace and license is the resource name. If you are using a browser, type in the URL. For example, if you want to get the license information of your VSM that has an IP address of 10.10.10.2, you type the URL as follows: https://10.10.10.2/api/n1k/license The browser prompts you for a username and a password and returns the HTML output. To access the same through curl, you use the following format: curl http://username:password@10.10.10.2/api/n1k/license You get the following XML output: <set name="license_set"> 1

Finding Supported Resource Names Overview <instance name="nexus_vsg_services_pkg" url="/api/n1k/license"> <properties> <expires>04 May 2013</expires> <type>nexus_vsg_services_pkg</type> <available>512</available> <status>unused</status> <used>0</used> </properties> </instance> <instance name="nexus_asa1000v_services_pkg" url="/api/n1k/license"> <properties> <expires>04 May 2013</expires> <type>nexus_asa1000v_services_pkg</type> <available>16</available> <status>unused</status> <used>0</used> </properties> </instance> <instance name="nexus1000v_lan_services_pkg" url="/api/n1k/license"> <properties> <expires>04 May 2013</expires> <type>nexus1000v_lan_services_pkg</type> <available>1024</available> <status>unused</status> <used>0</used> </properties> </instance> </set> Finding Supported Resource Names Every REST API function is associated with a resource name To find the list of Cisco Nexus 1000V resource names, construct the URL as follows: https://10.10.10.2/api/n1k You get the following output: <set name="api_set"> <instance url="/api/n1k"> <children> <child name="uplink" url="/api/n1k/uplink"/> <child name="vnic" url="/api/n1k/vnic"/> <child name="port-profile" url="/api/n1k/port-profile"/> <child name="summary" url="/api/n1k/summary"/> <child name="license" url="/api/n1k/license"/> </children> </instance> </set> List of Available Resource Names for the Cisco Nexus 1000V Table 1: Available Resource Names Namespace /api/n1k /api/n1k/uplink Lists the available elements that can be queried through the interface. Lists the details of the uplink interfaces configured on the VSM. 2

Overview List of Available Resource Names for the Cisco Nexus 1000V Namespace /api/n1k/vnic /api/n1k/port-profile /api/n1k/summary /api/n1k/license Lists the details of the virtual Ethernet ports connected to the Nexus 1000V switch. Lists the details of the port profiles configured on the VSM. Lists a summary of the Cisco Nexus 1000V switch. Lists the licensing status of the Cisco Nexus 1000V switch. 3

List of Available Resource Names for the Cisco Nexus 1000V Overview 4

CHAPTER 2 Cisco Nexus 1000V API Functions This chapter provides information about the Cisco Nexus 1000V application programming interface (API) functions. The Cisco Nexus 1000V resource name is generic across all hypervisors. The functions that support write (create, update, and delete) operations are explicitly marked as writeable. All others are read-only functions. The chapter contains the following topics: Get Information About the Uplink Ports Configured on the VSM, page 5 Get the Cisco Nexus 1000V Licensing Status, page 6 Get a List of Port Profiles Configured on the VSM, page 7 Get Information About the Virtual Ethernet Ports Connected to the Cisco Nexus 1000V Switch, page 8 Get a Summary of the Cisco Nexus 1000V Switch, page 9 Get Information About the Uplink Ports Configured on the VSM Object Locator ["/api/n1k/uplink"] [Read-only] Retrieves information about the uplink ports configured on the VSM. Response Sample <set name="uplink_set"> <instance name="ethernet5/2" url="/api/n1k/uplink/ethernet5%2f2"> <properties> <module>5</module> <packetstx>3801</packetstx> <mtu>1500</mtu> <cdpport>ethernet101/1/5</cdpport> <cdpswitch>sf-n5k-14(ssi134306n1)</cdpswitch> <cdpnativevlan>231</cdpnativevlan> <packetsrx>16114898</packetsrx> <vlans>250-350</vlans> 5

Get the Cisco Nexus 1000V Licensing Status Cisco Nexus 1000V API Functions <name>ethernet5/2</name> <ethernet>ethernet</ethernet> <speed>1000 Mb/s</speed> <mode>trunk</mode> <portprofile>sys-uplink</portprofile> <status>up</status> </properties> </instance> </set> Response Property module portchanneltype packetstx mtu cdpport port status mode vlans portchannel cdpnativevlan portchannelmembers packetsrx cdpswitch portprofile speed Writeable or Get the Cisco Nexus 1000V Licensing Status Object Locator ["/api/n1k/license"] [Read-only] 6

Cisco Nexus 1000V API Functions Get a List of Port Profiles Configured on the VSM Retrieves information about the licensing details of the Cisco Nexus 1000V switch. Response Sample <set name="license_set"> <instance name="nexus1000v_lan_services_pkg" url="/api/n1k/license/nexus1000v_lan_services_pkg"> <properties> <expires>n/a</expires> <type>nexus1000v_lan_services_pkg</type> <available>0</available> <status>unused</status> <used>0</used> </properties> </instance> </set> Response Property expires type available status used Writeable or Get a List of Port Profiles Configured on the VSM Object Locator ["/api/n1k/port-profile"] [Read-only] Retrieves a list of all of the port profiles that are configured on the VSM. Response Sample <set name="portprofile_set"> <instance name="policy-1" url="/api/n1k/port-profile/policy-1"> <properties> <maxports>32</maxports> <type>vethernet</type> <name>policy-1</name> <systemvlans>none</systemvlans> <status>1</status> <minports>1</minports> <vlans></vlans> <usedports>0</usedports> </properties> 7

Get Information About the Virtual Ethernet Ports Connected to the Cisco Nexus 1000V Switch Cisco Nexus 1000V API Functions </instance> </set> Response Property maxports type systemvlans status minports vlans usedports Writeable or Get Information About the Virtual Ethernet Ports Connected to the Cisco Nexus 1000V Switch Object Locator ["/api/n1k/vnic"] [Read-only] Retrieves information about the virtual Ethernet ports that are connected to the Cisco Nexus 1000V switch. Response Sample <set name="vnic_set"> <instance name="vethernet5" uri="/api/vc/vnic/vethernet5"> <properties> <mac>0050.56ba.58bc</mac> <dvport>dvport65</dvport> <adapter>net Adapter 1</adapter> <hostip>172.23.231.192</hostip> <vlans>231</vlans> <portgroup>n1kv-system-control</portgroup> <status>up</status> <module>3</module> <vm>vsm-vcplugin-1-2</vm> <vnic>vethernet5</vnic> </properties> </instance> </set> Response Property mac Writeable or 8

Cisco Nexus 1000V API Functions Get a Summary of the Cisco Nexus 1000V Switch Property dvport adapter vlans portgroup status module vm vnic Writeable or Get a Summary of the Cisco Nexus 1000V Switch Object Locator ["/api/n1k/summary"] [Read-only] Retrieves a summary of the Cisco Nexus 1000V switch. Response Sample <set name="summary_set"> <instance url="/api/n1k/summary"> <properties> <hastatus>false</hastatus> <name>switch</name> <switchmode>essential</switchmode> <mode>l3</mode> <version>version 5.2(1)SK1(2.1) [gdb]</version> <ip>172.23.231.45</ip> </properties> </instance> </set> Response Property hastatus name Writeable or 9

Get a Summary of the Cisco Nexus 1000V Switch Cisco Nexus 1000V API Functions Property switchmode mode version ip Writeable or 10