Lenovo Network REST API Programming Guide For Cloud Network Operating System 10.1 Note: Before using this information and the product it supports, read the general information in the Safety information and Environmental Notices and User Guide documents on the Lenovo Documentation CD and the Warranty Information document that comes with the product. First Edition (June 2016) © Copyright Lenovo 2016 Portions © Copyright IBM Corporation 2014. LIMITED AND RESTRICTED RIGHTS NOTICE: If data or software is delivered pursuant a General Services Administration “GSA” contract, use, reproduction, or disclosure is subject to restrictions set forth in Contract No. GS-35F-05925. Lenovo and the Lenovo logo are trademarks of Lenovo in the United States, other countries, or both. Contents Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7 Who Should Use This Guide . . . . . . . . . . . . . . . . . . . . . . . 8 What You’ll Find in This Guide. . . . . . . . . . . . . . . . . . . . . . 9 Additional References. . . . . . . . . . . . . . . . . . . . . . . . . .10 Typographic Conventions . . . . . . . . . . . . . . . . . . . . . . . .11 How to Get Help . . . . . . . . . . . . . . . . . . . . . . . . . . . .12 Chapter1. Introduction . . . . . . . . . . . . . . . . . . . . . 13 REST API Components . . . . . . . . . . . . . . . . . . . . . . . . .14 Using the REST Server. . . . . . . . . . . . . . . . . . . . . . . . . .15 Starting and Stopping the REST Server. . . . . . . . . . . . . . . . .15 Communicating with the REST Server . . . . . . . . . . . . . . . . .15 REST Server Limitations. . . . . . . . . . . . . . . . . . . . . . . . .18 Chapter2. REST Server JSON Calls . . . . . . . . . . . . . . . . 19 System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20 Get System Properties . . . . . . . . . . . . . . . . . . . . . . . .20 Interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21 Get All Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . .22 Get Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . .23 Update Interface . . . . . . . . . . . . . . . . . . . . . . . . . .24 LACP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .26 Get LACP System Properties . . . . . . . . . . . . . . . . . . . . .27 Update LACP System Properties . . . . . . . . . . . . . . . . . . .28 LAG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29 Get All LAGs. . . . . . . . . . . . . . . . . . . . . . . . . . . .30 Create LAG . . . . . . . . . . . . . . . . . . . . . . . . . . . .31 Get LAG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33 Update LAG . . . . . . . . . . . . . . . . . . . . . . . . . . . .34 Delete LAG. . . . . . . . . . . . . . . . . . . . . . . . . . . . .36 VLAN. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .37 Get All VLANs . . . . . . . . . . . . . . . . . . . . . . . . . . .38 Create VLAN. . . . . . . . . . . . . . . . . . . . . . . . . . . .39 Get VLAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . .40 Update VLAN . . . . . . . . . . . . . . . . . . . . . . . . . . .41 Delete VLAN. . . . . . . . . . . . . . . . . . . . . . . . . . . .42 VLAN Interface Properties. . . . . . . . . . . . . . . . . . . . . . . .43 Get VLAN Properties of All Interfaces . . . . . . . . . . . . . . . . .44 Get VLAN Interface Properties . . . . . . . . . . . . . . . . . . . .45 Update VLAN Interface Properties . . . . . . . . . . . . . . . . . .46 STP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .47 Get STP Properties for All Interfaces. . . . . . . . . . . . . . . . . .48 Get STP Interface Properties . . . . . . . . . . . . . . . . . . . . .49 Update STP Interface Properties. . . . . . . . . . . . . . . . . . . .50 © Copyright Lenovo 2016 3 MSTP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .51 Get MSTP System Properties . . . . . . . . . . . . . . . . . . . . .52 Update MSTP System Properties . . . . . . . . . . . . . . . . . . .53 Get Properties of All MSTP Instances . . . . . . . . . . . . . . . . .54 Create MSTP Instance . . . . . . . . . . . . . . . . . . . . . . . .55 Get MSTP Instance . . . . . . . . . . . . . . . . . . . . . . . . .56 Update MSTP Instance . . . . . . . . . . . . . . . . . . . . . . .57 Delete MSTP Instance . . . . . . . . . . . . . . . . . . . . . . . .58 Get Interface Properties of an MSTP Instance . . . . . . . . . . . . . .59 Update Interface Properties of an MSTP Instance . . . . . . . . . . . .60 LLDP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .61 Get LLDP System Properties . . . . . . . . . . . . . . . . . . . . .62 Update LLDP System Properties . . . . . . . . . . . . . . . . . . .63 Get LLDP Properties for All Interfaces. . . . . . . . . . . . . . . . .64 Get LLDP Interface Properties . . . . . . . . . . . . . . . . . . . .65 Update LLDP Interface Properties. . . . . . . . . . . . . . . . . . .66 GET LLDP Interface Statistics . . . . . . . . . . . . . . . . . . . .67 GET LLDP Interface Neighbor information. . . . . . . . . . . . . . .68 GET LLDP Neighbor Information for All Interfaces . . . . . . . . . . .69 VRF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .70 Get All VRFs . . . . . . . . . . . . . . . . . . . . . . . . . . . .71 Get VRF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .72 IP Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .73 Get IP Properties of All Interfaces. . . . . . . . . . . . . . . . . . .74 Get IP Interface Properties . . . . . . . . . . . . . . . . . . . . . .75 Update IP Interface Properties . . . . . . . . . . . . . . . . . . . .76 ARP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .77 Get ARP System Properties . . . . . . . . . . . . . . . . . . . . .78 Update ARP System Properties . . . . . . . . . . . . . . . . . . . .79 Get ARP Properties of All Interfaces. . . . . . . . . . . . . . . . . .80 Get ARP Interface Properties . . . . . . . . . . . . . . . . . . . . .81 Update ARP Interface Properties . . . . . . . . . . . . . . . . . . .82 Static ARP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .83 Get Static ARP Entries of All Interfaces . . . . . . . . . . . . . . . .84 Get Static ARP Entries of One Interface . . . . . . . . . . . . . . . .85 Create Static ARP Entry . . . . . . . . . . . . . . . . . . . . . . .86 Get Static ARP Entry . . . . . . . . . . . . . . . . . . . . . . . .87 Update Static ARP Entry. . . . . . . . . . . . . . . . . . . . . . .88 Delete Static ARP Entry . . . . . . . . . . . . . . . . . . . . . . .89 Static Routes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .90 Get All Static Routes . . . . . . . . . . . . . . . . . . . . . . . .91 Create Static Route . . . . . . . . . . . . . . . . . . . . . . . . .92 Get Static Route . . . . . . . . . . . . . . . . . . . . . . . . . .93 Update Static Route . . . . . . . . . . . . . . . . . . . . . . . . .94 Delete Static Route . . . . . . . . . . . . . . . . . . . . . . . . .95 4 REST Programming Guide for Lenovo CNOS 10.1 VRRP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .96 Get VRRP VRs of All Interfaces . . . . . . . . . . . . . . . . . . . .97 Get VRRP VRs of One Interface . . . . . . . . . . . . . . . . . . . .99 Create VRRP VR . . . . . . . . . . . . . . . . . . . . . . . . . 101 Get VRRP VR. . . . . . . . . . . . . . . . . . . . . . . . . . . 104 Update VRRP VR . . . . . . . . . . . . . . . . . . . . . . . . . 106 Delete VRRP VR . . . . . . . . . . . . . . . . . . . . . . . . . 109 IGMP Snooping . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 Get IGMP Snooping System Properties. . . . . . . . . . . . . . . . 111 Update IGMP Snooping System Properties . . . . . . . . . . . . . . 112 Get IGMP Snooping Properties of All VLANs. . . . . . . . . . . . . 113 Get IGMP Snooping VLAN Properties . . . . . . . . . . . . . . . . 114 Update IGMP Snooping VLAN Properties . . . . . . . . . . . . . . 115 Appendix A. Getting Help and Technical Assistance . . . . . . . . .117 Appendix B. Notices. . . . . . . . . . . . . . . . . . . . . . .119 Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 Important Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 Recycling Information. . . . . . . . . . . . . . . . . . . . . . . . . 123 Particulate Contamination . . . . . . . . . . . . . . . . . . . . . . . 124 Telecommunication Regulatory Statement . . . . . . . . . . . . . . . . 125 Electronic Emission Notices . . . . . . . . . . . . . . . . . . . . . . 126 Federal Communications Commission (FCC) Statement . . . . . . . . 126 Industry Canada Class A Emission Compliance Statement . . . . . . . 126 Avis de Conformité à la Réglementation d'Industrie Canada . . . . . . 126 Australia and New Zealand Class A Statement . . . . . . . . . . . . 126 European Union EMC Directive Conformance Statement. . . . . . . . 126 Germany Class A Statement . . . . . . . . . . . . . . . . . . . . 127 Japan VCCI Class A Statement . . . . . . . . . . . . . . . . . . . 128 Japan Electronics and Information Technology Industries Association (JEITA)Statement. . . . . . . . . . . . . . . . . . . . . . . . . 129 Korea Communications Commission (KCC) Statement. . . . . . . . . 129 Russia Electromagnetic Interference (EMI) Class A statement. . . . . . . . 130 People’s Republic of China Class A electronic emission statement. . . . . . 131 Taiwan Class A compliance statement. . . . . . . . . . . . . . . . . . 132 © Copyright Lenovo 2016 Contents 5 6 REST Programming Guide for Lenovo CNOS 10.1 Preface The REST Programming Guide for Lenovo CNOS 10.1 describes how to configure and use the Cloud Network Operating System10.1 software on the RackSwitch G8272 (referred to as G8272 throughout this document). For documentation on installing the switch physically, see the Installation Guide for your G8272. © Copyright Lenovo 2016 7 Who Should Use This Guide This guide is intended for network installers and system administrators engaged in configuring and maintaining a network. The administrator should be familiar with Ethernet concepts, IP addressing, Spanning Tree Protocol, and SNMP configuration parameters. 8 REST Programming Guide for Lenovo CNOS 10.1 What You’ll Find in This Guide This guide will help you plan, implement, and administer Cloud NOS software. Where possible, each section provides feature overviews, usage examples, and configuration instructions. The following material is included: This book contains the following chapters: Chapter1, “Introduction,” gives an overview of the Lenovo REST API and how to start the server. Chapter2, “REST Server JSON Calls,” describes the URIs and functions available in the REST API. Appendix A, “Getting Help and Technical Assistance,” describes where to get help with your product. Appendix B, “Notices,” contains legal notices. © Copyright Lenovo 2016 : Preface 9 Additional References Additional information about installing and configuring the G8272 is available in the following guides: Lenovo RackSwitch G8272 Installation Guide Lenovo Network Application Guide for Lenovo Cloud Network Operating System10.1 Lenovo Network Command Reference for Lenovo Cloud Network Operating System10.1 10 REST Programming Guide for Lenovo CNOS 10.1
Description: