Brocade Network Advisor REST API User Manual

53-1003160-01
®
11 July 2014
Brocade Network Advisor
REST API Guide
Supporting Network Advisor 12.3.0
Brocade, the B-wing symbol, Brocade Assurance, ADX, AnyIO, DCX, Fabric OS, FastIron, HyperEdge, ICX, MLX, MyBrocade, NetIron, OpenScript, VCS, VDX, and Vyatta are registered trademarks, and The Effortless Network and the On-Demand Data Center are trademarks of Brocade Communications Systems, Inc., in the United States and in other countries. Other brands and product names mentioned may be trademarks of others.
Notice: This document is for informational purposes only and does not set forth any warranty, expressed or implied, concerning any equipment, equipment feature, or service offered or to be offered by Brocade. Brocade reserves the right to make changes to this document at any time, without notice, and assumes no responsibility for its use. This informational document describes features that may not be currently available. Contact a Brocade sales office for information on feature and product availability. Export of technical data contained in this document may require an export license from the United States government.
The authors and Brocade Communications Systems, Inc. assume no liability or responsibility to any person or entity with respect to the accuracy of this document or any loss, cost, liability, or damages arising from the information contained herein or the computer programs that accompany it.
The product described by this document may contain open source software covered by the GNU General Public License or other open source license agreements. To find out which open source software is included in Brocade products, view the licensing terms applicable to the open source software, and obtain a copy of the programming source code, please visit
http://www.brocade.com/support/oscd.
Brocade Communications Systems, Incorporated
Corporate and Latin American Headquarters Brocade Communications Systems, Inc. 130 Holger Way San Jose, CA 95134 Tel: 1-408-333-8000 Fax: 1-408-333-8101 E-mail: info@brocade.com
European Headquarters Brocade Communications Switzerland Sàrl Centre Swissair Tour B - 4ème étage 29, Route de l'Aéroport Case Postale 105 CH-1215 Genève 15 Switzerland Tel: +41 22 799 5640 Fax: +41 22 799 5641 E-mail: emea-info@brocade.com
Asia-Pacific Headquarters Brocade Communications Systems China HK, Ltd. No. 1 Guanghua Road Chao Yang District Units 2718 and 2818 Beijing 100020, China Tel: +8610 6588 8888 Fax: +8610 6588 9999 E-mail: china-info@brocade.com
Asia-Pacific Headquarters Brocade Communications Systems Co., Ltd. (Shenzhen WFOE) Citic Plaza No. 233 Tian He Road North Unit 1308 – 13th Floor Guangzhou, China Tel: +8620 3891 2000 Fax: +8620 3891 2111 E-mail: china-info@brocade.com
Document History
Title Publication number Summary of changes Date
Brocade Network Advisor REST API Guide
53-1003160-01 New document July 2014

Contents

About This Document
How this document is organized . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
Document conventions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x
Text formatting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x
Command syntax conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . x
Notes, cautions, and warnings . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
Key terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xi
Notice to the reader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii
Additional information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii
Brocade resources. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii
Other industry resources. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii
Getting technical help. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
Document feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
Chapter 1 Overview of the Network Advisor REST API
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Network Advisor URIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Protocol support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Default HTTPS port (443) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Non-Default HTTPS port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Edition support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Chapter 2 Getting Started
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Before you begin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Logging in. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Retrieving resource groups. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Retrieving FC fabrics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Retrieving a specific FC fabric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Retrieving switches in the context of a fabric . . . . . . . . . . . . . . . . . . . 9
Retrieving switches and ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Creating a sample Python client . . . . . . . . . . . . . . . . . . . . . . . . . . . .12
Chapter 3 Using the Brocade Network Advisor REST API
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21
Brocade Network Advisor REST API Guide iii 53-1003160-01
Logging in and out. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21
Logging in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21
Logging out. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24
Specifying content type. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Accept HTTP request header. . . . . . . . . . . . . . . . . . . . . . . . . . . .26
Content-type HTTP request header. . . . . . . . . . . . . . . . . . . . . . . 26
Versioning (backward compatibility) . . . . . . . . . . . . . . . . . . . . . . . . .26
Using the Topology API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Using the SAN Fabric Discovery API . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Notes about the SAN Fabric Discovery API URIs . . . . . . . . . . . .27
Limitations for the SAN Fabric Discovery API . . . . . . . . . . . . . . .28
Using the Traffic Flow API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .28
Using the Summary Data API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Using the Events API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29
Using the Zoning API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29
Zoning URIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29
Zoning operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Using the Historical Performance Data API. . . . . . . . . . . . . . . . . . . . 30
Fibre Channel Routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Handling errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .30
URI error return behavior. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36
Chapter 4 Use Cases
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .37
Zoning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Sample request payload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .38
Sample Java code for performing the attach operation . . . . . .38
Sample JSON responses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .39
Getting Traffic Flow Performance Data . . . . . . . . . . . . . . . . . . . . . . .40
Sample Java code for retrieving flow information . . . . . . . . . . .40
Sample JSON response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Retrieving performance data for the Transmit Frame Rate measure 42
Getting the Top N CRC errors port summary. . . . . . . . . . . . . . . . . . .44
SAN fabric discovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .44
Discovering an FC fabric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .44
Deleting an FC fabric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Binding the schema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .48
iv Brocade Network Advisor REST API Guide
53-1003160-01
Chapter 5 API Reference
Topology. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
ResourceGroups. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .52
Fabrics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .53
FC Switch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .54
PhysicalSwitch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .56
AccessGateway. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .58
FCPorts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .59
GigePorts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .62
Connected-switch ports. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .64
End-device ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .66
Trunks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .68
ISL Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .69
IFL connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .70
EndDeviceConnection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .72
Access Gateway connection . . . . . . . . . . . . . . . . . . . . . . . . . . . .73
End devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
SAN fabric discovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Fabric discovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .77
Fabric deletion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .78
Switch credentials update. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Summary data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .80
Status summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .81
Asset classification summary . . . . . . . . . . . . . . . . . . . . . . . . . . .82
Network object count summary . . . . . . . . . . . . . . . . . . . . . . . . . 85
Events summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Bottleneck violations summary. . . . . . . . . . . . . . . . . . . . . . . . . . 87
Out-of-range violations summary . . . . . . . . . . . . . . . . . . . . . . . .88
Port health violations summary . . . . . . . . . . . . . . . . . . . . . . . . .89
VM violations summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Port summaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Product summaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .104
Traffic flow summaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .109
Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .114
Event retrieval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .115
Event count. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Event acknowledgement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .118
Zoning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .119
Zone DBs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .120
Zones . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .121
Zone aliases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .123
Zone sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .124
Zone transactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .125
Zone transaction management. . . . . . . . . . . . . . . . . . . . . . . . .126
Zoning object creation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .127
Zoning object deletion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .128
Zoning object updating . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .129
Zone set activation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .131
Initiator target zoning. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .132
Brocade Network Advisor REST API Guide v 53-1003160-01
Historical performance data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .134
Authentication and session management. . . . . . . . . . . . . . . . . . . .144
Login . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .145
Logout. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .146
Appendix A Request and Response Schemas
Topology. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .147
ResourceGroupsResponse . . . . . . . . . . . . . . . . . . . . . . . . . . . .147
FcFabricsResponse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .148
FcSwitchesResponse. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .148
PhysicalSwitchesResponse. . . . . . . . . . . . . . . . . . . . . . . . . . . .149
AccessGatewaysResponse . . . . . . . . . . . . . . . . . . . . . . . . . . . .150
FcPortsResponse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .150
EndDevicePortsResponse . . . . . . . . . . . . . . . . . . . . . . . . . . . . .152
TrunksResponse. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .153
IslsResponse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .153
IflsResponse. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .154
EndDeviceConnectionsResponse. . . . . . . . . . . . . . . . . . . . . . .154
AgConnectionsResponse. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .155
EndDevicesResponse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .155
SAN fabric discovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .156
DiscoverFabricRequest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .156
DiscoverFabricResponse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .157
UpdateCredentialsRequest . . . . . . . . . . . . . . . . . . . . . . . . . . . .157
FlowDefinitionsResponse . . . . . . . . . . . . . . . . . . . . . . . . . . . . .158
FlowsResponse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .159
Summary data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .159
SummaryResponse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .159
StatusSummary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .160
AssetClassificationSummary. . . . . . . . . . . . . . . . . . . . . . . . . . .161
NetworkObjectCountSummary . . . . . . . . . . . . . . . . . . . . . . . . .162
EventsSummary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .162
BottleneckViolationsSummary . . . . . . . . . . . . . . . . . . . . . . . . .163
OutOfRangeViolationsSummary . . . . . . . . . . . . . . . . . . . . . . . .164
PortHealthViolationsSummary . . . . . . . . . . . . . . . . . . . . . . . . .164
VmViolationsSummary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .165
SummariesResponse. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .166
PortsMonitorSummaryData . . . . . . . . . . . . . . . . . . . . . . . . . . .166
MonitorDistributionData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .167
ProductsMonitorSummaryData . . . . . . . . . . . . . . . . . . . . . . . .167
FlowMonitorSummaryData . . . . . . . . . . . . . . . . . . . . . . . . . . . .168
Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .168
EventsResponse. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .168
CountResponse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
vi Brocade Network Advisor REST API Guide
53-1003160-01
Zoning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
ZoneDbsResponse. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
ZonesResponse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .172
ZoneAliasesResponse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .172
ZoneSetsResponse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .172
ZoneTransactionResponse . . . . . . . . . . . . . . . . . . . . . . . . . . . .172
ControlZoneTransactionRequest. . . . . . . . . . . . . . . . . . . . . . . .173
CreateZoningObjectRequest . . . . . . . . . . . . . . . . . . . . . . . . . . .173
DeleteZoningObjectRequest . . . . . . . . . . . . . . . . . . . . . . . . . . .173
UpdateZoningObjectRequest . . . . . . . . . . . . . . . . . . . . . . . . . .173
InitiatorTargetsRequest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
Historical performance data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
PerformanceDataResponse . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
Authentication and session management. . . . . . . . . . . . . . . . . . . .175
LoginResponse. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .175
Brocade Network Advisor REST API Guide vii 53-1003160-01
viii Brocade Network Advisor REST API Guide
53-1003160-01

About This Document

In this chapter
How this document is organized . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
Document conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x
Notice to the reader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii
Additional information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii
Getting technical help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
Document feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii

How this document is organized

This document is organized to help you find the information that you want as quickly and easily as possible.
The document contains the following components:
Chapter 1, “Overview of the Network Advisor REST API,” provides a high-level overview of the
API.
Chapter 2, “Getting Started,” provides steps for getting started using the API in a tutorial
format.
Chapter 3, “Using the Brocade Network Advisor REST API,” explains how to use the API.
Chapter 5, “API Reference,” describes the calls supported by the API.
Appendix A, “Request and Response Schemas,” lists the request and response schemas used
by the API calls.
Brocade Network Advisor REST API Guide ix 53-1003160-01

Document conventions

NOTE
This section describes text formatting conventions and important notice formats used in this document.

Text formatting

The narrative-text formatting conventions that are used are as follows:
bold text Identifies command names
italic text Provides emphasis
code text Identifies CLI output
For readability, command names in the narrative portions of this guide are presented in mixed lettercase: for example, switchShow. In actual examples, command lettercase is all lowercase.
Identifies the names of user-manipulated GUI elements Identifies keywords and operands Identifies text to enter at the GUI or CLI
Identifies variables Identifies paths and Internet addresses Identifies document titles
Identifies command syntax examples

Command syntax conventions

Command syntax in this manual follows these conventions:
Convention Description
[ ] Keywords or arguments that appear within square brackets are optional. For example:
command [active | standby | disabled] = One (and only one) of this set of keywords may be used.
command [active] [standby] [disabled] = Three independent options, and one or more may be used on the same command line.
{ x | y | z } A choice of required keywords appears in braces separated by vertical bars. You must
select one. For example: command {active | standby | disabled} = One (and only one) of this set of keywords must be used.
screen font Examples of information displayed on the screen.
< > Nonprinting characters, for example, passwords, appear in angle brackets.
[ ] Default responses to system prompts appear in square brackets.
italic text Identifies variables.
bold text Identifies literal command options and keywords.
In standalone mode, interfaces are identified using slot/port notation. In Brocade VCS Fabric technology® mode, interfaces are identified using switch/slot/port notation.
x Brocade Network Advisor REST API Guide
53-1003160-01
Nesting square brackets and curly braces
NOTE
ATTENTION
CAUTION
DANGER
When reading a command entry, optional keywords are surrounded by square brackets and mandatory keywords are surrounded by curly braces. Refer to “Command syntax conventions” on page x for complete details.
In some cases, these brackets can be nested. In the following example, rbridge-id is optional as denoted by the square brackets, but if you use it, then you must follow it with either a specific rbridge-id or the word “all.”
command [rbridge-id {rbridge-id | all}]
However, square brackets can appear within curly braces, showing that while a keyword is mandatory, supporting operands may be optional, as shown in the following example:
command {security [active] [standby] [disabled]}
command {security [active | standby | disabled]
}

Notes, cautions, and warnings

The following notices and statements are used in this manual. They are listed below in order of increasing severity of potential hazards.
A note provides a tip, guidance, or advice, emphasizes important information, or provides a reference to related information.
An Attention statement indicates potential damage to hardware or data.
A Caution statement alerts you to situations that can be potentially hazardous to you or cause damage to hardware, firmware, software, or data.
A Danger statement indicates conditions or situations that can be potentially lethal or extremely hazardous to you. Safety labels are also attached directly to products to warn of these conditions or situations.

Key terms

For definitions specific to Brocade and Fibre Channel, see the technical glossaries on MyBrocade. Refer to “Brocade resources” on page xii for instructions on accessing MyBrocade.
For definitions of SAN-specific terms, visit the Storage Networking Industry Association online dictionary at:
http://www.snia.org/education/dictionary
Brocade Network Advisor REST API Guide xi 53-1003160-01

Notice to the reader

This document may contain references to the trademarks of the following corporations. These trademarks are the properties of their respective companies and corporations.
These references are made for informational purposes only.
Corporation Referenced Trademarks and Products
Microsoft Corporation Windows, Windows NT, Internet Explorer
Oracle Corporation Oracle, Java
Netscape Communications Corporation Netscape
Red Hat, Inc. Red Hat, Red Hat Network, Maximum RPM, Linux Undercover

Additional information

This section lists additional Brocade and industry-specific documentation that you might find helpful.

Brocade resources

To get up-to-the-minute information, go to http://my.brocade.com to register at no cost for a user ID and password.
White papers, online demonstrations, and data sheets are available through the Brocade website at:
http://www.brocade.com/products-solutions/products/index.page
For additional Brocade documentation, visit the Brocade website:
http://www.brocade.com
Release notes are available on the MyBrocade website.

Other industry resources

For additional resource information, visit the Technical Committee T11 website. This website provides interface standards for high-performance and mass storage applications for Fibre Channel, storage management, and other applications:
http://www.t11.org
For information about the Fibre Channel industry, visit the Fibre Channel Industry Association website:
http://www.fibrechannel.org
xii Brocade Network Advisor REST API Guide
53-1003160-01

Getting technical help

Contact your switch support supplier for hardware, firmware, and software support, including product repairs and part ordering. To expedite your call, have the following information available:
1. General Information
Switch model
Switch operating system version
Software name and software version, if applicable
Error numbers and messages received
Detailed description of the problem, including the switch or fabric behavior immediately
following the problem, and specific questions
Description of any troubleshooting steps already performed and the results
Serial console and Telnet session logs
syslog message logs
2. Switch Serial Number
The switch serial number and corresponding bar code are provided on the serial number label, as illustrated below:
The serial number label is located on the switch ID pull-out tab located on the bottom of the port side of the switch.
3. World Wide Name (WWN)
Use the show license id command to display the WWN of the chassis.
If you cannot use the show license id command because the switch is inoperable, you can get the WWN from the same place as the serial number, except for the Brocade DCX. For the Brocade DCX, access the numbers on the WWN cards by removing the Brocade logo plate at the top of the nonport side of the chassis.

Document feedback

Quality is our first concern at Brocade and we have made every effort to ensure the accuracy and completeness of this document. However, if you find an error or an omission, or you think that a topic needs further development, we want to hear from you. Forward your feedback to:
documentation@brocade.com
Provide the title and version number of the document and as much detail as possible about your comment, including the topic heading and page number and your suggestions for improvement.
Brocade Network Advisor REST API Guide xiii 53-1003160-01
xiv Brocade Network Advisor REST API Guide
53-1003160-01
Chapter
NOTE

Overview of the Network Advisor REST API

In this chapter
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Network Advisor URIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Protocol support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Edition support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

Introduction

The Network Advisor REST API provides you with a Web services interface for configuring and monitoring Brocade switches. Brocade Network Advisor 12.3.0 has been updated to provide a REST API for storage area network (SAN) provisioning. The REST APIs are organized into various services such as Topology, Authentication, and Zoning.
1
You can use the Network Advisor REST API to build your own Network Advisor clients. You can also use third-party REST API clients to interact with Network Advisor.
FIGURE 1 Architectural overview
The Network Advisor REST API provides GET and POST uniform resource identifiers (URIs) that you can use to retrieve information and perform certain management and configuration tasks.
This release of the Network Advisor REST API supports only SAN fabrics.
Brocade Network Advisor REST API Guide 1 53-1003160-01

Network Advisor URIs

NOTE
1
Network Advisor URIs
Network Advisor URIs consists of two parts:
Base URI: The base URI is specific to the Network Advisor server. All URIs accessing the same
server use the same base URI.
Request URI: The request URI is the URI that you use to perform a GET or POST request. This
part of the URI is the same across all Network Advisor servers.
The following are examples of Network Advisor URIs (the text in bold is the base URI part and the rest is the request part).
POST URI examples:
http://10.24.48.103/rest/fcfabrics/10:00:00:05:1E:90:52:07/createzoningobject
http://10.24.48.103/rest/fcfabrics/10:00:00:05:1E:90:52:07/deletezoningobject
http://10.24.48.103/rest/fcfabrics/10:00:00:05:1E:90:52:07/updatezoningobject
http://10.24.48.103/rest/fcfabrics/10:00:00:05:1E:90:52:07/activatezoneset
GET URI examples:
http://10.24.48.103/rest/resourcegroups
http://10.24.48.103/rest/fcfabrics
URIs are case-sensitive.

Protocol support

The Network Advisor REST API supports HTTP and HTTPS, unlike Network Advisor which only supports HTTPS.
All REST HTTP requests are redirected to the HTTPS port. By default, the HTTPS port number is
443. However, this port can be changed during the installation of Network Advisor or after installation through the server management console.

Default HTTPS port (443)

If the HTTPS port is 443 (default), you can use the HTTP and HTTPS protocols as show in the following two example URIs. In the HTTP case, the request is redirected to HTTPS.
http://<server_IP>/rest/resourcegroups
https://<server_IP>/rest/resourcegroups

Non-Default HTTPS port

If the HTTPS port is changed to a non-default value, the REST URI must specify HTTPS as the protocol and must also specify the port number to send the requests to, as shown in the following example. If not, Network Advisor refuses connection requests.
https://<server_IP>:<non-default_port_number>/rest/resourcegroups
2 Brocade Network Advisor REST API Guide
53-1003160-01

Edition support

The following table lists the REST API support for the Network Advisor editions.l
TABLE 1 Edition support
Network Advisor edition REST API availability
Enterprise YES
Professional Plus YES
Professional NO
Headless YES
Edition support
1
Brocade Network Advisor REST API Guide 3 53-1003160-01
Edition support
1
4 Brocade Network Advisor REST API Guide
53-1003160-01
Chapter

Getting Started

In this chapter
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Before you begin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Logging in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Retrieving resource groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Retrieving FC fabrics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Retrieving a specific FC fabric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Retrieving switches in the context of a fabric . . . . . . . . . . . . . . . . . . . . . . . . . 9
Retrieving switches and ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Creating a sample Python client. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

Introduction

2
This chapter describes how to log in to Network Advisor using its REST API and perform a few basic information retrieval operations. In addition, this chapter shows you how to build a sample client application using the Python programming language.

Before you begin

This chapter assumes that you are familiar with the concept of REST APIs.
Before you can use the Network Advisor REST API:
Make sure that Network Advisor 12.3.0 or later is installed on your network.
Obtain a username and password for accessing Network Advisor through the REST API.
Make sure that you have a tool for interacting with REST APIs.
The Advanced Rest Console application is used in this chapter, but you can use any other REST API tool.
Brocade Network Advisor REST API Guide 5 53-1003160-01

Logging in

2
Logging in
To log in to Network Advisor, complete the following steps.
1. Enter the following URI in the URL field of your REST client tool.
http://<ip_address>/rest/login
2. Define the following HTTP request headers.
TABLE 1 Request headers
Header name Value
WSUsername The user name supplied by your Network Advisor administrator.
WSPassword The password supplied by your Network Advisor administrator.
Accept The content type of the returned data.
Specify the following content type to receive the response data in the JSON format:
application/vnd.brocade.networkadvisor+json;version=v1
If you prefer the XML format, enter the following value:
application/vnd.brocade.networkadvisor+xml;version=v1
3. Set the HTTP request method to POST.
4. Send the request.
The following is an example of login request headers sent to Network Advisor:
Request headers
Accept: application/vnd.brocade.networkadvisor+json;version=v1 WSUsername: Administrator Origin: chrome-extension://hgmloofddffdnphfgcellkdfbfbjeloo User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.102 Safari/537.36 WSPassword: password Content-Type: application/x-www-form-urlencoded Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8
If the request is successful, Network Advisor creates a new client session and returns, in the response headers, the token
WStoken, which identifies the session.
The following is an example of the output of a successful request:
Status
200 OK Show explanation Loading time: 5592
Response headers
Via: 1.1 Secure Proxy Connection: Keep-Alive Proxy-Connection: Keep-Alive Transfer-Encoding: chunked Date: Mon, 03 Feb 2014 06:01:39 GMT Content-Type: application/vnd.brocade.networkadvisor+json;version="v1" Server: Apache-Coyote/1.1 WStoken: ghe/4Q//I0EJcxD6UPdO9/fvI94= Raw JSON
6 Brocade Network Advisor REST API Guide
53-1003160-01

Retrieving resource groups

NOTE
NOTE
The JSON content of the response should look like the following:
{
serverName: "DCM-x3650-103" serverIp: "10.24.48.103"
}
This response returns the name of the Network Advisor and its IP address.
Different tools may display the JSON or XML responses differently.
5. Record the value of the WStoken response header.
In this example, the value of the WStoken field is ghe/4Q//I0EJcxD6UPdO9/fvI94=. You need this token for all subsequent Network Advisor REST API requests.
A client session has a default idle timeout of 10 minutes after which the token is no longer valid. If you try to use an invalid token, an error message is returned:
errorCode=4009, errorMsg=Invalid token in header.
2
Retrieving resource groups
To retrieve resource groups defined in Network Advisor, complete the following steps.
1. Enter the following URI in the URL field:
http://<ip_address>/rest/resourcegroups
2. Define the following HTTP request headers.
TABLE 2 Request headers
Header name Value
WStoken The session token header returned after a successful login.
Accept application/vnd.brocade.networkadvisor+json;version=v1
3. Set the HTTP request method to GET.
4. Send the request.
The following is an example of resource groups returned by Network Advisor:
{
resourceGroups: [16]
0: {
key: "10:00:00:05:33:A6:B6:17" name: "10:00:00:05:33:A6:B6:17"
type: "FC_FABRIC" } 1: {
key: "10:00:00:05:1E:DB:1E:1E"
name: "10:00:00:05:1E:DB:1E:1E"
type: "FC_FABRIC" ... }
Brocade Network Advisor REST API Guide 7 53-1003160-01

Retrieving FC fabrics

2
Retrieving FC fabrics
You can use the REST API to retrieve FC fabrics in the context of a resource group. The resource group “All” encompasses all fabrics.
To retrieve all fabrics, complete the following steps.
1. Enter the following URI in the URL field:
http://<ip_address>/rest/resourcegroups/All/fcfabrics
2. Define the following HTTP request headers.
TABLE 3 Request headers
Header name Value
WStoken The session token header returned after a successful login.
Accept application/vnd.brocade.networkadvisor+json;version=v1
3. Set the HTTP request method to GET.
4. Send the request.
The following is an example of fabrics returned by Network Advisor:
{
fcFabrics: [3]
0: {
}
1: {
} ... }
key: "10:00:00:05:1E:A7:1F:EB" seedSwitchWwn: "10:00:00:05:1E:A7:1F:EB" name: "10:00:00:05:1E:A7:1F:EB" secure: false adEnvironment: false contact: null location: null description: null principalSwitchWwn: "10:00:00:05:1E:A7:1F:EB" fabricName: "" virtualFabricId: -1 seedSwitchIpAddress: "10.24.33.195"
key: "10:00:00:05:1E:DB:1E:1E" seedSwitchWwn: "10:00:00:05:1E:DB:1E:1E" name: "10:00:00:05:1E:DB:1E:1E" secure: false adEnvironment: false contact: null location: null description: null principalSwitchWwn: "10:00:00:05:1E:DB:1E:1E" fabricName: "" virtualFabricId: -1 seedSwitchIpAddress: "10.24.33.193"
8 Brocade Network Advisor REST API Guide
53-1003160-01

Retrieving a specific FC fabric

In the previous section, you retrieved a list of all FC fabrics. Every fabric in the list has a unique identifier specified by the fabric.
To retrieve information about the fabric with the 10:00:00:05:1E:A7:1F:EB key, complete the following steps.
1. Enter the following URI in the URL field:
http://<ip_address>/rest/resourcegroups/All/fcfabrics/10:00:00:05:1E:A7:1F:EB
2. Define the following HTTP request headers.
TABLE 4 Request headers
Header name Value
WStoken The session token header returned after a successful login.
Accept application/vnd.brocade.networkadvisor+json;version=v1
3. Set the HTTP request method to GET.
key parameter. You can use it to retrieve information about a specific
Retrieving a specific FC fabric
2
4. Send the request.
The following is an example of the response returned by Network Advisor:
{
fcFabrics: [1]
0: {
key: "10:00:00:05:1E:A7:1F:EB" seedSwitchWwn: "10:00:00:05:1E:A7:1F:EB" name: "10:00:00:05:1E:A7:1F:EB" secure: false adEnvironment: false contact: null location: null description: null principalSwitchWwn: "10:00:00:05:1E:A7:1F:EB" fabricName: "" virtualFabricId: -1 seedSwitchIpAddress: "10.24.33.195"
} }

Retrieving switches in the context of a fabric

To retrieve the switches under a fabric, send a GET request with the following URI:
http://<ip_address>/rest/resourcegroups/All/fcfabrics/fcfkey/fcswitches
For example, to retrieve the switches in the context of the fabric with key 10:00:00:05:1E:A7:1F:EB, use the following URI:
http://<ip_address>/rest/resourcegroups/All/fcfabrics/10:00:00:05:1E:A7:1F:EB/fcs witches
Brocade Network Advisor REST API Guide 9 53-1003160-01
Retrieving switches in the context of a fabric
2
Use the same request headers as the ones used in the previous section (“Retrieving a specific FC
fabric”). The following is a sample response:
{
fcSwitches: [2]
0: {
key: "50:00:51:ED:B1:E5:EF:03" name: "fcr_xd_1_20" wwn: "50:00:51:ED:B1:E5:EF:03" virtualFabricId: -1 domainId: 1 baseSwitch: false role: "SUBORDINATE" fcsRole: "None" adCapable: false operationalStatus: "UNKNOWN" state: "UNKNOWN" statusReason: null cryptoCapable: false fcrCapable: false fcipCapable: false lfEnabled: false defaultLogicalSwitch: false fmsMode: false dynamicLoadSharingCapable: false portBasedRoutingPresent: false inOrderDeliveryCapable: false persistentDidEnabled: false fcipCircuitCapable: false maxFcipTunnels: -1 maxFcipCircuits: -1 fcipLicensed: false
autoSnmpEnabled: true } 1: {
key: "10:00:00:27:F8:A7:A1:25"
name: "REST_5100_33_194"
wwn: "10:00:00:27:F8:A7:A1:25"
virtualFabricId: -1
domainId: 28
baseSwitch: false
role: "SUBORDINATE"
fcsRole: "None"
adCapable: true
operationalStatus: "UNKNOWN"
state: "ONLINE"
statusReason: "Switch Status is HEALTHY."
cryptoCapable: false
fcrCapable: false
fcipCapable: false
lfEnabled: false
defaultLogicalSwitch: true
fmsMode: false
...
maxFcipTunnels: 0
maxFcipCircuits: 0
fcipLicensed: false
autoSnmpEnabled: true }
}
10 Brocade Network Advisor REST API Guide
53-1003160-01

Retrieving switches and ports

Retrieving switches and ports in the context of a resource group is similar to retrieving fabrics (refer to“Retrieving FC fabrics”). The only difference is the URI that you use.
To retrieve all switches, use the following URI:
http://<ip_address>/rest/resourcegroups/All/fcswitches
The following is a sample response:
{ fcSwitches: [11]
0: {
key: "10:00:00:14:C9:E5:56:AB" name: "REST_6520_33_189" wwn: "10:00:00:14:C9:E5:56:AB" virtualFabricId: -1 domainId: 2 baseSwitch: false role: "SUBORDINATE" fcsRole: "None" adCapable: true operationalStatus: "MARGINAL" state: "ONLINE"
statusReason: "Switch Status is MARGINAL. Contributors: * Power Supply: 1 bad.
(MARGINAL). * Fan: 1 bad (MARGINAL)." cryptoCapable: false fcrCapable: false fcipCapable: false lfEnabled: false defaultLogicalSwitch: true fmsMode: false dynamicLoadSharingCapable: true portBasedRoutingPresent: false inOrderDeliveryCapable: false persistentDidEnabled: false fcipCircuitCapable: false maxFcipTunnels: 0 maxFcipCircuits: 0 fcipLicensed: false autoSnmpEnabled: true
}
...
Retrieving switches and ports
2
To retrieve all ports, use the following URI:
http://<ip_address>/rest/resourcegroups/All/fcports
The following is a sample response:
{
fcPorts: [325]
0: {
key: "20:22:00:27:F8:A7:A1:25"
wwn: "20:22:00:27:F8:A7:A1:25"
name: "port34"
slotNumber: 0
portNumber: 34
userPortNumber: 34
portId: "1c2200"
Brocade Network Advisor REST API Guide 11 53-1003160-01

Creating a sample Python client

2
...
portIndex: 34
areaId: 34
type: "U_PORT"
status: "DISABLED"
statusMessage: ""
lockedPortType: "U_PORT"
speed: "8"
speedsSupported: "1,2,4,8"
maxPortSpeed: 8
desiredCredits: 0
bufferAllocated: 0
estimatedDistance: 0
actualDistance: 0
longDistanceSetting: 0
remoteNodeWwn: ""
remotePortWwn: ""
licensed: false
swapped: false
trunked: false
trunkMaster: false
persistentlyDisabled: false
ficonSupported: true
blocked: false
prohibitPortNumbers: null
prohibitPortCount: 0
npivCapable: true
npivEnabled: true
fcFastWriteEnabled: false
islRrdyEnabled: false
rateLimitCapable: false
rateLimited: false
qosCapable: false
qosEnabled: false
fcrFabricId: 0
state: "OFFLINE"
occupied: false
masterPortNumber: -1 }
Creating a sample Python client
This section shows you how to create a sample Network Advisor REST API Python client. Python version 3.3.3 for Windows (MSC v.1600 64 bit (AMD64)) is used for creating the client.
This sample client logs in to Network Advisor and uses the returned session token to retrieve a list of all FC fabrics.
To create a sample client using the Python programming language, complete the following steps.
1. Create a new file using you favorite Python editor.
2. Add the following code to the file and replace the example IP address 10.24.41.138 with the IP address of your Network Advisor server.
import http.client import json
# Create HTTPConnection object and connect to the server.
12 Brocade Network Advisor REST API Guide
53-1003160-01
Creating a sample Python client
connection = http.client.HTTPConnection("10.24.41.138")
########################### # Log in to Network Advisor ###########################
# Send login requrest connection.request('POST', 'http://10.24.41.138/rest/login', headers={"WSUsername":"Administrator", "WSPassword":"password",
"Accept":"application/vnd.brocade.networkadvisor+json;version=v1"})
print() print("Sending login request to Network Advisor...")
# Get the response response = connection.getresponse()
# Display the response status print() print ("Status= ", response.status)
# If successful (status = 200), display the returned Network Advisor session token if response.status == 200: WStoken = response.getheader('WStoken') print() print("Login successful!") print("WStoken: ", WStoken) else: print() print (response.status, response.reason)
2
connection.close()
########################### # Retrieve fabrics ###########################
# Send GET requrest connection.connect() connection.request('GET', 'http://10.24.41.138/rest/resourcegroups/All/fcfabrics', headers={"WStoken":WStoken,
"Accept":"application/vnd.brocade.networkadvisor+json;version=v1"})
print() print("--------------------------------------------------------------------") print("Getting list of all fabrics...")
# Get the response response = connection.getresponse()
# Display the response status print() print ("Status= ", response.status)
# If successful (status = 200), display the returned list in JSON format
Brocade Network Advisor REST API Guide 13 53-1003160-01
Creating a sample Python client
2
if response.status == 200: print() print("List of fabrics:") json_response_bytes = response.read() json_response_string = str(json_response_bytes, encoding='utf8') list_of_fabrics_dict=json.loads(json_response_string) print(json.dumps(list_of_fabrics_dict, indent=4)) print("Number of FC fabrics: ", len(list_of_fabrics_dict["fcFabrics"])) else: print() print (response.status, response.reason)
connection.close()
############################## # Retrieve details of a fabric ##############################
# Get the key of the first fabric in the list fabric_key = list_of_fabrics_dict["fcFabrics"][0]["key"]
# Send GET requrest connection.connect() connection.request('GET', 'http://10.24.41.138/rest/resourcegroups/All/fcfabrics/'+fabric_key, headers={"WStoken":WStoken,
"Accept":"application/vnd.brocade.networkadvisor+json;version=v1"})
print() print("--------------------------------------------------------------------") print("Get fabric '+fabric_key+'details...")
# Get the response response = connection.getresponse()
# Display the response status print() print ("Status= ", response.status)
# If successful (status = 200), display the returned list in JSON format if response.status == 200: print() print("Fabric details:") json_response_bytes = response.read() json_response_string = str(json_response_bytes, encoding='utf8') fabric_details_dict=json.loads(json_response_string) print(json.dumps(fabric_details_dict, indent=4)) else: print() print (response.status, response.reason)
connection.close()
###################################################### # Retrieve list of switches in the context of a fabric ######################################################
# Send GET requrest
14 Brocade Network Advisor REST API Guide
53-1003160-01
Creating a sample Python client
connection.connect() connection.request('GET', 'http://10.24.41.138/rest/resourcegroups/All/fcfabrics/'+fabric_key+'/fcswitc hes', headers={"WStoken":WStoken,
"Accept":"application/vnd.brocade.networkadvisor+json;version=v1"})
print() print("--------------------------------------------------------------------") print("Get the list of switches under fabric "+fabric_key+" ...")
# Get the response response = connection.getresponse()
# Display the response status print() print ("Status= ", response.status)
# If successful (status = 200), display the returned list in JSON format if response.status == 200: print() print("List of switches:") json_response_bytes = response.read() json_response_string = str(json_response_bytes, encoding='utf8') list_of_fabric_switches_dict=json.loads(json_response_string) print(json.dumps(list_of_fabric_switches_dict, indent=4)) else: print() print (response.status, response.reason)
2
connection.close()
3. Save the file as my_na_client.py.
4. Run the program by entering the following command at the command prompt:
C:\Python33>python my_na_client.py
If successful, you should see output similar to the following:
Sending login request to Network Advisor...
Status= 200
Login successful! WStoken: RPTZz0z5ayVkvqIuy7quIEbjap8=
----------------------------------------------------------------------------­Getting list of all fabrics...
Status= 200
List of fabrics: { "fcFabrics": [ { "seedSwitchWwn": "10:00:00:05:33:A6:B6:17", "name": "10:00:00:05:33:A6:B6:17", "secure": false,
Brocade Network Advisor REST API Guide 15 53-1003160-01
Creating a sample Python client
2
"principalSwitchWwn": "10:00:00:05:33:A6:B6:17", "fabricName": "****8G FABRIC FOR REST******", "seedSwitchIpAddress": "10.24.33.191", "virtualFabricId": -1, "contact": null, "key": "10:00:00:05:33:A6:B6:17", "adEnvironment": false, "description": null, "location": null }, { "seedSwitchWwn": "10:00:00:05:1E:A7:1F:EB", "name": "10:00:00:05:1E:A7:1F:EB", "secure": false, "principalSwitchWwn": "10:00:00:05:1E:A7:1F:EB", "fabricName": "", "seedSwitchIpAddress": "10.24.33.195", "virtualFabricId": -1, "contact": null, "key": "10:00:00:05:1E:A7:1F:EB", "adEnvironment": false, "description": null, "location": null }, { "seedSwitchWwn": "10:00:00:05:1E:DB:1E:1E", "name": "10:00:00:05:1E:DB:1E:1E", "secure": false, "principalSwitchWwn": "10:00:00:05:1E:DB:1E:1E", "fabricName": "", "seedSwitchIpAddress": "10.24.33.193", "virtualFabricId": -1, "contact": null, "key": "10:00:00:05:1E:DB:1E:1E", "adEnvironment": false, "description": null, "location": null } ] } Number of FC fabrics: 3
----------------------------------------------------------------------------­Get fabric '+fabric_key+'details...
Status= 200
Fabric details: { "fcFabrics": [ { "seedSwitchWwn": "10:00:00:05:33:A6:B6:17", "name": "10:00:00:05:33:A6:B6:17", "secure": false, "principalSwitchWwn": "10:00:00:05:33:A6:B6:17", "fabricName": "****8G FABRIC FOR REST******", "seedSwitchIpAddress": "10.24.33.191", "virtualFabricId": -1, "contact": null, "key": "10:00:00:05:33:A6:B6:17",
16 Brocade Network Advisor REST API Guide
53-1003160-01
Loading...
+ 160 hidden pages