53-1003160-01 11 July 2014 Brocade Network Advisor REST API Guide Supporting Network Advisor 12.3.
Copyright © 2014 Brocade Communications Systems, Inc. All Rights Reserved. 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.
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 . . . . . . . .
Logging in and out. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Logging in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Logging out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Specifying content type. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Accept HTTP request header. . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter 5 API Reference Topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 ResourceGroups. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 Fabrics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 FC Switch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 PhysicalSwitch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Historical performance data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .134 Authentication and session management. . . . . . . . . . . . . . . . . . . .144 Login . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .145 Logout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .146 Appendix A Request and Response Schemas Topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Zoning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 ZoneDbsResponse. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 ZonesResponse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .172 ZoneAliasesResponse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .172 ZoneSetsResponse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .172 ZoneTransactionResponse . . . . . . . . . . . . .
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 . .
Document conventions This section describes text formatting conventions and important notice formats used in this document.
Nesting square brackets and curly braces 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.
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.
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.
xiv Brocade Network Advisor REST API Guide 53-1003160-01
Chapter 1 Overview of the Network Advisor REST API In this chapter • Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . • Network Advisor URIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . • Protocol support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . • Edition support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1 Network Advisor URIs 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).
Edition support 1 Edition support The following table lists the REST API support for the Network Advisor editions.
1 4 Edition support Brocade Network Advisor REST API Guide 53-1003160-01
Chapter Getting Started 2 In this chapter • Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 • Before you begin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 • Logging in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 • Retrieving resource groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2 Logging in 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:///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.
Retrieving resource groups 2 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. NOTE 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.
2 Retrieving FC fabrics 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:///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.
Retrieving a specific FC fabric 2 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 key parameter. You can use it to retrieve information about a specific fabric. To retrieve information about the fabric with the 10:00:00:05:1E:A7:1F:EB key, complete the following steps. 1.
2 Retrieving switches in the context of a fabric Use the same request headers as the ones used in the previous section (“Retrieving a specific FC fabric”).
Retrieving switches and ports 2 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.
2 Creating a sample Python client 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 npivCapab
Creating a sample Python client 2 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.
2 Creating a sample Python client 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.
Creating a sample Python client 2 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.
2 Creating a sample Python client "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.
Creating a sample Python client 2 "adEnvironment": false, "description": null, "location": null } ] } ----------------------------------------------------------------------------Get the list of switches under fabric 10:00:00:05:33:A6:B6:17...
2 Creating a sample Python client "cryptoCapable": false, "fmsMode": false, "name": "fcr_fd_160", "defaultLogicalSwitch": false, "fcipCircuitCapable": false, "baseSwitch": false, "virtualFabricId": -1, "adCapable": false, "key": "50:00:51:ED:B1:E1:EE:14", "operationalStatus": "UNKNOWN", "role": "SUBORDINATE", "domainId": 160, "inOrderDeliveryCapable": false, "dynamicLoadSharingCapable": false }, { "statusReason": null, "fcipLicensed": false, "autoSnmpEnabled": true, "state": "UNKNOWN", "persistentDidEnabl
Creating a sample Python client 2 "portBasedRoutingPresent": false, "cryptoCapable": false, "fmsMode": false, "name": "REST_6520_33_189", "defaultLogicalSwitch": true, "fcipCircuitCapable": false, "baseSwitch": false, "virtualFabricId": -1, "adCapable": true, "key": "10:00:00:14:C9:E5:56:AB", "operationalStatus": "MARGINAL", "role": "SUBORDINATE", "domainId": 2, "inOrderDeliveryCapable": false, "dynamicLoadSharingCapable": true }, { "statusReason": "Switch Status is HEALTHY.
2 20 Creating a sample Python client Brocade Network Advisor REST API Guide 53-1003160-01
Chapter 3 Using the Brocade Network Advisor REST API In this chapter • Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . • Logging in and out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . • Specifying content type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . • Versioning (backward compatibility). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3 Logging in and out The following are the header names and values. The password must be passed in as clear text. TABLE 5 Login request headers Request header name Request header value Accept The content type WSusername The valid Network Advisor user name WSpassword The password Login response header Upon successful authentication, a new client session is created and a token is returned through the HTTP response header.
Logging in and out 3 } } catch (IOException ie) { System.out.println(ie.toString()); } finally { if (null != con) { con.disconnect(); } } Sample JSON response The following is a sample JSON response to a login request. CALLING POST http://10.24.41.138/rest/login Response code is 200 GOT TOKEN FROM RS RESPONSE = Yh8veQHgxR6v6KgNR9Eioeg7168= {"serverName":"W2K8R2-41-138","serverIp":"10.24.41.138"} Sample XML response The following is a sample XML response to a login request. CALLING POST http://10.24.48.
3 Logging in and out org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatch er.java:264) org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousD ispatcher.java:209) org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.j ava:557) org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:5 24) org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:1 26) org.jboss.resteasy.plugins.
Specifying content type 3 Logout request headers A valid token is required for logout and this is sent through the HTTP request header. You must add the header while forming the HTTP POST request. TABLE 7 Logout request headers Request header name Request header value WStoken The token obtained from login Sample logout request (Python) The following is an example of an HTTP POST request for logout sent using Python. HttpClient hc = new HttpClient(); method = new PostMethod("http://10.24.48.
3 Versioning (backward compatibility) Accept HTTP request header In the case of GET requests, your client must specify the format of the data of the responses. You do this by providing the HTTP header information. The content type for the response data is specified through the HTTP request header named “Accept”. The value for the content type has the following format: MEDIA type/MIME subtype;Version Identifier For example: application/vnd.brocade.networkadvisor+xml;version=v1 application/vnd.brocade.
Using the Topology API 3 Using the Topology API The Topology API provides GET URIs for retrieving information about the network resource shown in the following figure. FIGURE 1 Topology API URI hierarchy Using the SAN Fabric Discovery API The SAN Fabric Discovery API provides POST URIs for discovering, updating, and deleting SAN fabrics. Notes about the SAN Fabric Discovery API URIs • All SAN Fabric Discovery API URIs are POST requests.
3 Using the Traffic Flow API • In the case of SNMP V3, if the privacy protocol is specified, the authorization protocol is required; it cannot be null. • The default user name is “admin”. • The default password is “password”. Limitations for the SAN Fabric Discovery API • There is no support for monitoring or unmonitoring a discovered fabric. • There is no provision to change the seed switch. • There is no support for discovering M model switches.
Using the Events API 3 Using the Events API The Events API provides URIs that you can use to retrieve Network Advisor events. The URIs provide query parameters that allow you to filter the results.
3 Using the Historical Performance Data API Using the Historical Performance Data API You can use the URIs provided by the Historical Performance Data API to retrieve historical performance data for ports, switches, and flows based on a measure. Fibre Channel Routing This section describes important aspects of Fibre Channel Routing (FCR) setup. All the URIs related to fabrics, switches, ports, end devices, connections, and connected ports are applicable.
Handling errors 3 For successful operations the status code is usually 200 (OK) or 204 (No Content). In the case of an error, depending on the reason for failure, any of the HTTP status codes may be returned. However, in the case of an API error, the HTTP status code is 500 (Internal Server Error). More details on the server error can be obtained from the RSException embedded in the HTTP response. Table 10 describes the RSException error codes.
3 Handling errors TABLE 10 32 Error codes (Continued) Error code Error message 3003 Target is null or empty 3004 Initiator is an invalid wwn 3005 Target is an invalid wwn 3006 Only inactive zoneset can be activated 3007 Only active zoneset can be deactivated 3008 Invalid lsan zone name 3009 Zoning object name is null or empty 3010 Update action is invalid 3011 EdgeFabricWwns is null or empty 3012 Cannot create empty lsan zone 3013 Operation supported on backbone fabric only.
Handling errors TABLE 10 3 Error codes (Continued) Error code Error message 16121 Deactivate failed 16122 Clear zone database failed 16123 Unable to retrieve zone database 16124 Online member does not exist 16125 Invalid backbone fabric 16126 Activation failed 16301 Database error 20301 Dao exception while getting managed BB fabrics 20101 Unknown exception while getting managed BB fabrics 4001 Token in header is null or empty 4002 User name in header is null or empty 4003 Passwo
3 Handling errors TABLE 10 34 Error codes (Continued) Error code Error message 6014 Switch user name is null or empty. 6015 Switch password is null or empty. 6016 Set switch credentials failed. 6017 Set switch snmp credentials failed. 6018 Unsupported edition. 6019 All virtual fabrics already discovered. 6020 Discovery failed. 6021 DNS error. 6022 Fabric unstable. 6023 Discovery redundant. 6024 Seed switch not in fabric. 6025 Duplicate fabric name.
Handling errors TABLE 10 3 Error codes (Continued) Error code Error message 6050 Session limit reached. 6051 Account locked. 6052 Account disabled. 6053 Connection timeout. 6054 FCoE not supported. 6055 Switch unmanageable. 6056 Seed switch not supported. 6057 Snmp survey failed. 6058 Mixed fabric. 6059 M model not supported. 6060 Invalid product type. 6061 Switch initializing. 6062 Invalid network address. 6063 No available trap registrations. 6064 Product deleted.
3 Handling errors TABLE 10 Error codes (Continued) Error code Error message 8006 Range from start date to end date exceeds limit for given granularity. 8007 Start date is beyond end date. 99010 Opaque key value not found URI error return behavior This section explains the error a user can expect when a URI fails. Parsing of the URI follows a pattern and returns an error in the following order. 1. The server checks the URI, including the path parameters, for correctness.
Chapter 4 Use Cases In this chapter • Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . • Zoning. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . • Getting Traffic Flow Performance Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . • Getting the Top N CRC errors port summary . . . . . . . . . . . . . . . . . . . . . . . . . • SAN fabric discovery . . . . . . . . . . .
4 Zoning 3. Perform the attach operation by calling the following POST URI. /resourcegroups/All/fcfabrics/fcfkey/attach 4. To detach the initiator from the same targets, the payload is the same, but the POST URI is different. /resourcegroups/All/fcfabrics/fcfkey/detach Sample request payload The following is an example request payload. PAGE 53Zoning 4 PRINT_ERROR(con); assert false : "Fabric Discovery FAILED, responseCode = " + responseCode; } PRINT_RESPONSE(con); } catch (IOException ie) { System.out.println(ie.toString()); } finally { if (null != con) { con.disconnect(); } } Sample JSON responses The following are sample JSON responses showing zone databases before and after the attach operation. CALLING POST http://10.24.48.
4 Getting Traffic Flow Performance Data 51E530B93","type":"STANDARD","active":true,"aliasNames":null,"memberNames":[" 10:00:00:05:1E:53:0B:93","20:01:00:11:0D:C6:01:01","20:06:00:11:0D:C6:01:01"] }],"zonealiases":null,"zonesets":[{"key":"NARestZoneSet-true","name":"NARestZ oneSet","active":true,"zoneNames":["NARestZone_100000051E530B93"]}]}]} CALLING POST http://10.24.48.
Getting Traffic Flow Performance Data 4 System.out.println("CALLING GET http://10.24.48.103/rest/resourcegroups/All/fcswitches/10:00:00:05:1E:40:40:00/fl ows"); /** * Make the HTTP call */ int responseCode = con.getResponseCode(); System.out.println("Response code is " + responseCode); if (HttpURLConnection.HTTP_SUCCESS != responseCode) { PRINT_ERROR(con); assert false : "REST FAILED, responseCode = " + responseCode; } } catch (IOException ie) { System.out.println(ie.
4 Getting Traffic Flow Performance Data ,"mirrorPort":""},{"key":"fldbid-10","flowDefinitionName":"traffic_flow","feature Type":"MONITOR","srcDevicePorts":["aa01ef"],"destDevicePorts":["031900"],"srcSwit chPort":"","destSwitchPort":"0/25","bidirectional":false,"sfid":"","dfid":"","lun Ids":[],"frameSize":0,"framePattern":"","subFlowMd5hash":"","mirrorPort":""},{"ke y":"fldbid-16","flowDefinitionName":"traffic_flow","featureType":"MONITOR","srcDe vicePorts":["032b01"],"destDevicePorts":["031900"],"srcSwitc
Getting Traffic Flow Performance Data 4 } catch (IOException ie) { System.out.println(ie.toString()); } finally { if (null != con) { con.disconnect(); } } Sample JSON response The following is the JSON response for retrieving performance data for the Transmit Frame Rate measure. CALLING GET http://10.24.48.
4 Getting the Top N CRC errors port summary InSeconds":1402019999,"value":0.005,"lo":0.0,"hi":0.012,"sum":0.0},{"timeInSecond s":1402018199,"value":0.008499999999999999,"lo":0.004,"hi":0.013,"sum":0.0},{"tim eInSeconds":1402016399,"value":0.007666666666666666,"lo":0.0,"hi":0.014,"sum":0.0 },{"timeInSeconds":1402014599,"value":0.006833333333333333,"lo":0.0,"hi":0.013,"s um":0.0}]},{"targetKey":"fldbid-12","targetType":"FLOW","timeSeriesDatas":[{"time InSeconds":1402023599,"value":0.0,"lo":0.0,"hi":0.
SAN fabric discovery 4 • XML file (DiscoverFabricRequest.xml) containing the payload DiscoverFabricRequest object. The payload object specifies the parameters that are needed for FC fabric discovery (for example, user name, password, and the seed switch IP address. For more information about the parameters defined by the DiscoverFabricRequest object, refer to DiscoverFabricRequest.
4 SAN fabric discovery Marshaller m = jaxbContext.createMarshaller(); m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); m.marshal(element, con.getOutputStream()); System.out.println("CALLING POST http://10.24.48.103/rest/resourcegroups/All/discoverfabric"); /** * Make the HTTP call */ int responseCode = con.getResponseCode(); System.out.println("Response code is " + responseCode); if (responseCode != HttpURLConnection.HTTP_OK && responseCode != HttpURLConnection.
SAN fabric discovery 4 REQUEST HTTPSTATUS = 200 {"virtualFabricIds":[]} /** * Getting FC fabrics list AFTER discoverfabric operation, fabrics exist */ CALLING GET http://10.24.48.
4 Binding the schema System.out.println("CALLING POST http://10.24.48.103/rest/resourcegroups/All/fcfabrics/10:00:00:05:1E:40:40:00/del etefabric"); /** * Make the HTTP call */ int responseCode = con.getResponseCode(); System.out.println("Response code is " + responseCode); if (HttpURLConnection.HTTP_NO_CONTENT != responseCode) { PRINT_ERROR(con); assert false : "Delete Fabric FAILED, responseCode = " + responseCode; } } catch (IOException ie) { System.out.println(ie.
Binding the schema 4 PAGE 644 50 Binding the schema Brocade Network Advisor REST API Guide 53-1003160-01
Chapter API Reference 5 In this chapter • Topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 • SAN fabric discovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 • Summary data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 • Events. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5 Topology ResourceGroups Network Advisor supports “network scopes.” A network scope is a grouping of resources, a sort of a convenience mechanism to enable you to retrieve data for any grouping of your choice. In the Network Advisor REST API, a “resource group” is the equivalent of a “network scope.” Resource groups can be predefined system groups or they can be user-defined groups. They are keyed by unique names.
Topology 5 Fabrics Retrieves information about FC fabrics. GET URIs URI Description /resourcegroups/rgkey/fcfabrics Retrieves FC fabrics for the given resource group. /resourcegroups/rgkey/fcfabrics/fcfkey Retrieves the details of the specified FC fabric. Path parameters Name Description rgkey Resource group identifier. fcfkey FC fabric identifier. Response parameters Property Description key Unique identifier for the fabric. The key is the principal switch WWN.
5 Topology FC Switch Retrieves information about FC switches. GET URIs URI Description /resourcegroups/rgkey/fcswitches Retrieves the FC switches of the given resource group. /resourcegroups/rgkey/fcswitches/fcskey Retrieves information about the specified FC switch. /resourcegroups/rgkey/fcfabrics/fcfkey/fcs witches Retrieves the FC switches of the given FC fabric.
Topology Property Description dynamicLoadSharingCapable Indicates the switch’s capability for dynamic load sharing. portBasedRoutingPresent Indicates the switch’s capability for port-based routing. inOrderDeliveryCapable Indicates whether in order delivery is enabled. persistentDidEnabled Indicates whether persistent domain ID is enabled. autoSnmpEnabled Indicates if automatic SNMP configuration is enabled.
5 Topology PhysicalSwitch Retrieves information about physical switches. This includes properties such as IP address, switch serial number, model, and so on. GET URIs URI Description /resourcegroups/rgkey/fcswitches/fcskey/p hysicalswitches Retrieves the PhysicalSwitch for a given FC switch. /resourcegroups/rgkey/fcfabrics/fcfkey/fcs witches/fcskey/physicalswitches Retrieves the physical switch of the given FC switch.
Topology 5 Notes • • • • The physical switch is keyed by the physical switch WWN. This resource contains the properties that depict the physical nature of a logical FC switch. The response schema is PhysicalSwitchesResponse. There is no physical switch for Front and Xlate phantom switches.
5 Topology AccessGateway Retrieves Access Gateway information. GET URIs URI Description /resourcegroups/ALL/accessgateways Returns a list of Access Gateways. /resourcegroups/ALL/accessgateways/agke y Returns the details of the given gateway. Path parameters Name Description agkey Access gateway identifier. Response parameters Property Description key The unique identifier for the access gateway, which is the WWN. name The AG name. wwn The AG WWN.
Topology 5 FCPorts Retrieves information about FC ports. GET URIs URI Description /resourcegroups/rgkey/fcports Returns a list of FC ports for the given resource group. /resourcegroups/rgkey/fcports/fcpkey Returns details of the given port. /resourcegroups/rgkey/fcswitches/fcskey/f cports Returns a list of FC ports for the given FC switch. /resourcegroups/rgkey/fcswitches/fcskey/f cports/fcpkey Returns details of the given port.
5 60 Topology Property Description portId The port ID. portIndex The port index, number used in identifying port in zoning. areaId The area number of the port. type The port type. The specific mode currently enabled for the port. status The status of the port. Refer to PortStatusType. statusMessage Any additional port level status similar to what is seen in CLI, like Segmented, Speed Mismatch, Trunk master, and so on. lockedPortType Indicates the locked port type.
Topology 5 Property Description state The state of the port. The state type is in the schema. occupied Indicates if the port is occupied. masterPortNumber The trunk’s master port number for the trunk member ports. For trunk master port, it will be its own port number. For non-trunk ports, it will have the default value -1. Notes • This release supports only FC and GigE ports. • The ports can be retrieved in the context of a resource group, a switch, or an access gateway.
5 Topology GigePorts Retrieves information about GigE ports. GET URIs URI Description /resourcegroups/rgkey/gigeports Returns a list of GigE ports for the given resource group. /resourcegroups/rgkey/gigeports/gpkey Returns details of the given GigE port. /resourcegroups/rgkey/fcswitches/fcskey/g igeports Returns a list of GigE ports for the given FC switch. /resourcegroups/rgkey/fcswitches/fcskey/g igeports/gpkey Returns details of the given GigE port.
Topology Property Description persistentlyDisabled Indicates whether the port is persistently disabled. remoteMacAddress The MAC address of the port attached to the 10 GigE port. userPortNumber The user port number. This is a unique port number within a chassis. portIndex The port index, number used in identifying port in zoning.
5 Topology Connected-switch ports Retrieves information about connected-switch ports. GET URIs URI Description /resourcegroups/rgkey/fcports/fcpkey/con nectedswitchports Returns the details of the connected-switch ports connected to the port specified by fcpkey. /resourcegroups/rgkey/fcswitches/fcskey/f cports/fcpkey/connectedswitchports Returns a list of connected-switch ports for the given FC port of the given FC switch.
Topology 5 Notes • Connected-switch ports are connected ports (switch port to switch port and access gateway port to switch port). • The port is keyed by its unique WWN. • The connected-switch ports response schema is FcPortsResponse.
5 Topology End-device ports Retrieves information about end-device ports. GET URIs URI Description /resourcegroups/rgkey/fcports/fcpkey/end deviceports Returns the details of the end-device ports connected to the port specified by fcpkey. /resourcegroups/rgkey/fcswitches/fcskey/f cports/fcpkey/enddeviceports Returns a list of end-device ports for the given FC port of the given FC switch.
Topology 5 Notes • End-device ports are the ports with end devices connected to them like initiators, targets, or N_Ports from an access gateway (switch port to node port and access gateway port to node port). • The end-device ports response schema is EndDevicePortsReponse. • The port is keyed by its unique WWN.
5 Topology Trunks Retrieves information about ISL trunks. GET URIs URI Description /resourcegroups/rgkey/fcswitches/fcskey/tr Returns a list of ISL trunks for the given FC switch. unks /resourcegroups/rgkey/fcfabrics/fcfkey/fcs witches/fcskey/trunks Returns a list of ISL trunks for the given FC switch of the given FC fabric. Path parameters Name Description rgkey Resource group identifier. fcfkey FC fabric identifier. fcskey FC switch identifier.
Topology 5 ISL Connections Retrieves information about inter-switch links (ISL) connections. These are connections between switches within a fabric. GET URIs URI Description /resourcegroups/rgkey/fcfabrics/fcfkey/isls Returns list of ISL connections for the given FC fabric. Path parameters Name Description rgkey Resource group identifier. fcfkey FC fabric identifier.
5 Topology IFL connections Returns information about inter-fabric links (IFL) connections (connections between fabrics in an FCR setup). GET URIs URI Description /resourcegroups/All/ifls Returns list of IFL connections for all resource groups. /resourcegroups/rgkey/fcfabrics/fcfkey/ifls Returns list of IFL connections for the given backbone FC fabric. Path parameters Name Description rgkey Resource group identifier. fcfkey FC fabric identifier.
Topology 5 Notes • The response schema is IflResponse.
5 Topology EndDeviceConnection Retrieves information about end-device connections (from switch to end device including those from access gateway to end device). GET URIs URI Description /resourcegroups/rgkey/fcfabrics/fcfkey/en ddeviceconnections Returns a list of connections of end-device directly connected to the given fabric.
Topology 5 Access Gateway connection Retrieves information about access gateway connections (connections between an access gateway and an FC switch). GET URIs URI Description /resourcegroups/All/agconnections Retrieves a list of the access gateway connections for all of the resource groups. /resourcegroups/All/accessgateways/agkey /agconnections Retrieves a list of the access gateway connections for the given access gateway.
5 Topology End devices Retrieves information about end devices. These are initiators and targets discovered during fabric discovery. GET URIs URI Description /resourcegroups/rgkey/fcfabrics/fcfkey/en ddevices Returns a list of end devices for the given FC fabric. /resourcegroups/rgkey/accessgateways/ag key/enddevices Returns a list of end devices for the given access gateway. Path parameters Name Description rgkey Resource group identifier. fcfkey FC fabric identifier.
Topology Property Description fdmiDriverVersion The driver version available via FDMI, ex: 2.1.0.2. fdmiManufacturer The manufacturer available via FDMI, ex: Brocade. fdmiModel The model available via FDMI, ex: Brocade-825. fdmiHardwareVersion The hardware version available via FDMI, ex: Rev-C. fdmiModelDescription The model description available via FDMI, ex: Brocade-825. fdmiNodeName The node name available via FDMI, ex: 20:00:00:05:1e:7c:64:94.
5 SAN fabric discovery SAN fabric discovery This section lists the SAN fabric discovery URIs. These URIs are provided in the context of the system-defined resource group “All.
SAN fabric discovery 5 Fabric discovery Discovers fabrics. POST URIs URI Description /resourcegroups/All/discoverfabric Initiates fabric discovery. Returns a list of the fabric VFIDs that failed discovery, if any. The XML payload associated with this request is the Discoverfabricrequest schema. Request parameters Property Description switchIpAddress The IP address of the seed switch used for discovering the fabric. userName The user name required for discovering the fabric.
5 SAN fabric discovery Fabric deletion Remove fabrics from Network Advisor. POST URIs URI Description /resourcegroups/All/fcfabrics/fcfkey/delete fabric Removes fabrics of the specified FC fabrics. Path parameters Name Description fcfkey Identifier of the fabric to be deleted. Notes • There is no request or response payload for this operation.
SAN fabric discovery 5 Switch credentials update Updates switch credentials and SNMP configurations after fabric discovery using a request XML payload (an UpdateCredentialsRequest object). POST URIs URI Description /resourcegroups/All/fcswitches/fcskey/ updatecredentials Updates switch credentials and SNMP configurations for the specified FC switch. Path parameters Name Description fcfkey FC fabric identifier.
5 Summary data Summary data You can use the URIs in this section to retrieve summary data. They can be obtained in the context of a resource group, fabric, switch, or port. Depending on the scope of the context, the relevant summary data is returned. There are various query parameters such as timeline, timescope, limit, and so on, that can be used to further filter the summary data as shown in the following table.
Summary data 5 Status summary Retrieves status summary data for all the discovered products. The returned summary is StatusSummary. This contains a list of entries, one for each status. Each entry shows the number of products for that particular status. GET URIs URI Description /resourcegroups/rgkey/statussummary Retrieves status summary data for the specified resource group.
5 Summary data Asset classification summary Retrieves asset classification summary data. The returned summary is AssetClassificationSummary. This contains a list of entries, one for each ClassificationCategory. Each entry shows the AssetClassification for that particular ClassificationCategory. GET URIs URI Description /resourcegroups/rgkey/assetclassifications ummary Retrieves asset classification summary data for the specified resource group.
Summary data 5 {"category":"Brocade 6505", "count":{"statusCounts":{"HEALTHY":2}}}, "Brocade 5100": {"category":"Brocade 5100", "count":{"statusCounts":{"MARGINAL":7,"HEALTHY":5}}}, "Brocade DCX 8510-4": {"category":"Brocade DCX 8510-4", "count":{"statusCounts":{"HEALTHY":2}}}, "Brocade 6520": {"category":"Brocade 6520", "count":{"statusCounts":{"MARGINAL":1}}}, "Brocade 7600": {"category":"Brocade 7600", "count":{"statusCounts":{"MARGINAL":1}}}, "Brocade 6510": {"category":"Brocade 6510", "count":{"statu
5 Summary data "summaryName":"AssetClassificationSummary", "timeLine":null, "timeScope":null, "limit":null, "portScope":null, "descending":null} 84 Brocade Network Advisor REST API Guide 53-1003160-01
Summary data 5 Network object count summary Retrieves network object count summary data. The returned summary is NetworkObjectCountSummary. GET URIs URI Description /resourcegroups/rgkey/networkobjectcount summary Retrieves network object count summary data for the specified resource group. /resourcegroups/rgkey/fcfabrics/fcfkey/net workobjectcountsummary Retrieves network object count summary data for the specified FC fabric.
5 Summary data Events summary Specifies the count of events of a particular type for a particular severity. The returned summary is EventsSummary. GET URIs URI Description /resourcegroups/rgkey/eventssummary?tim Retrieves event count summary data for the specified escope= resource group. /resourcegroups/rgkey/fcfabrics/fcfkey/eve ntssummary?timescope= Retrieves event count summary data for the specified FC fabric.
Summary data 5 Bottleneck violations summary Retrieves bottleneck violations summary data. GET URIs URI Description /resourcegroups/rgkey/bottleneckviolations summary?timeline=×cope=&ports cope= Retrieves bottleneck violations summary data for the specified resource group.
5 Summary data Out-of-range violations summary Retrieves OutOfRange violations summary data. GET URIs URI Description /resourcegroups/rgkey/outofrangeviolation ssummary?timeline=×cope=&port scope= Retrieves OutOfRange violations summary data for the specified resource group.
Summary data 5 Port health violations summary Retrieves port health violations summary data. GET URIs URI Description /resourcegroups/rgkey/porthealthviolations summary?timeline=×cope=&ports cope= Retrieves PortHealth violations summary data for the specified resource group.
5 Summary data VM violations summary Retrieves VM violations summary data. GET URIs URI Description /resourcegroups/rgkey/vmviolationssumma ry?timeline=×cope=&portscope=< value> Retrieves VM violations summary data for the specified resource group. /resourcegroups/rgkey/fcfabrics/fcfkey/vm violationssummary?timeline=×cope=&portscope= Retrieves VM violations summary data for the specified FC fabric.
Summary data 5 Port summaries Retrieves port summary data. Depending on monitor and measure characteristics, there are various port summaries. The URIs in the following table return a list of URIs for the possible port summaries in the specific context. You can then use the returned URIs to get specific port-related summaries, such as Top N, Bottom N, or Distribution data for a specific port measure.
5 Summary data TABLE 3 Mapping of Top N and Bottom N port summary URIs to specific measures Measure Type URI Units Link Failures FC linkfailures Sequence Errors FC sequenceerrors Invalid Transmissions FC invalidtransmissions C3 Discards FC c3discards C3 Discards TX TO FC c3discardstxto C3 Discards RX TO FC c3discardsrxto C3 Discards Unreachable FC c3discardsunreachable C3 Discards Other FC c3discardsother Encode Error Out FC encodeerrorout SFP Power FC sfppower SFP Volt
Summary data 5 /resourcegroups/rgkey/fcfabrics/fcfkey/traffic?timeline=×cope=&limit=&portscope=&descending= /resourcegroups/rgkey/fcfabrics/fcfkey/fcswitches/fcskey/traffic?timeline=×cope=&limit=&portscope=&descending= /resourcegroups/rgkey/fcswitches/fcskey/traffic?timeline=×cope=&limit=&portscope=&descending= /resourcegroups/rgkey/crcerrors?ti
5 Summary data /resourcegroups/rgkey/fcfabrics/fcfkey/invalidtransmissions?timeline=×cope= &limit=&portscope=&descending= /resourcegroups/rgkey/fcfabrics/fcfkey/fcswitches/fcskey/invalidtransmissions?timeline=&ti mescope=&limit=&portscope=&descending= /resourcegroups/rgkey/fcswitches/fcskey/invalidtransmissions?timeline=×cope=&limit=&portscope=&descending=
Summary data 5 /resourcegroups/rgkey/fcfabrics/fcfkey/sfppower?timeline=×cope=&limit=&portscope=&descending= /resourcegroups/rgkey/fcfabrics/fcfkey/fcswitches/fcskey/sfppower?timeline=×cope= &limit=&portscope=&descending= /resourcegroups/rgkey/fcswitches/fcskey/sfppower?timeline=×cope=&limit=< value>&portscope=&descending= /resourcegroups/rgkey/sfpvoltag
5 Summary data URIs for FCIP measures /resourcegroups/rgkey/compressionratio?timeline=×cope=&limit=&po rtscope=&descending= /resourcegroups/rgkey/fcfabrics/fcfkey/compressionratio?timeline=×cope=&li mit=&portscope=&descending= /resourcegroups/rgkey/fcfabrics/fcfkey/fcswitches/fcskey/compressionratio?timeline=&time scope=&limit=&portscope=&descending= /r
Summary data 5 /resourcegroups/rgkey/windowsizertt?timeline=×cope=&limit=&portsc ope=&descending= /resourcegroups/rgkey/fcfabrics/fcfkey/windowsizertt?timeline=×cope=&limit= &portscope=&descending= /resourcegroups/rgkey/fcfabrics/fcfkey/fcswitches/fcskey/windowsizertt?timeline=×co pe=&limit=&portscope=&descending= /resourcegroups/rgkey/fcswitches/f
5 Summary data TABLE 4 Measure-to-URI mapping (Continued) Measure Type URI Units SFP Current FC distributionsfpcurrent SFP Temperature FC distributionsfptemperature Invalid Ordered Sets FC distributioninvalidorderedsets count BB Credit Zero FC distributionbbcreditzero count Truncated Frames FC distributiontruncatedframes count Cumulative Compression Ratio FCIP distributioncompressionratio Latency FCIP distributionlatency Dropped Packets FCIP distributiondroppedpackets coun
Summary data 5 /resourcegroups/rgkey/fcfabrics/fcfkey/distributionlinkresets?timeline=×cope=&portscope= /resourcegroups/rgkey/fcfabrics/fcfkey/fcswitches/fcskey/distributionlinkresets?timeline=&t imescope=&portscope= /resourcegroups/rgkey/fcswitches/fcskey/distributionlinkresets?timeline=×cope=&portscope= /resourcegroups/rgkey/distributionsignallosses?timeline=×cope=&portsc
5 Summary data /resourcegroups/rgkey/fcfabrics/fcfkey/distributionc3discardstxto?timeline=×cope=&portscope= /resourcegroups/rgkey/fcfabrics/fcfkey/fcswitches/fcskey/distributionc3discardstxto?timeline=×cope=&portscope= /resourcegroups/rgkey/fcswitches/fcskey/distributionc3discardstxto?timeline=×cope= &portscope= /resourcegroups/rgkey/distributionc3discardsrxto?timeline=×cope=
Summary data 5 /resourcegroups/rgkey/fcfabrics/fcfkey/distributionsfpcurrent?timeline=×cope=&portscope= /resourcegroups/rgkey/fcfabrics/fcfkey/fcswitches/fcskey/distributionsfpcurrent?timeline=& timescope=&portscope= /resourcegroups/rgkey/fcswitches/fcskey/distributionsfpcurrent?timeline=×cope=&portscope= /resourcegroups/rgkey/distributionsfptemperature?timeline=×cope=&port
5 Summary data /resourcegroups/rgkey/distributiondroppedpackets?timeline=×cope=&portsco pe= /resourcegroups/rgkey/fcfabrics/fcfkey/distributiondroppedpackets?timeline=×cope=< value>&portscope= /resourcegroups/rgkey/fcfabrics/fcfkey/fcswitches/fcskey/distributiondroppedpackets?timeline=×cope=&portscope= /resourcegroups/rgkey/fcswitches/fcskey/distributiondroppedpackets?timeline=×cope
Summary data 5 /resourcegroups/rgkey/distributionslowstartstatuserrors?timeline=×cope=&por tscope= /resourcegroups/rgkey/fcfabrics/fcfkey/distributionslowstartstatuserrors?timeline=×co pe=&portscope= /resourcegroups/rgkey/fcfabrics/fcfkey/fcswitches/fcskey/distributionslowstartstatuserrors?timeline =×cope=&portscope= /resourcegroups/rgkey/fcswitches/fcskey/distributionslowstartstatuserrors
5 Summary data Product summaries Retrieves URIs for retrieving product summary data. Depending on monitor and measure charateristics, there are various product summaries. The URIs in the following table return a list of URIs for the possible product summaries in the specified context. You can use the returned URIs to get specific product-related summary data, such as Top N, Bottom N, or Distribution data for a specific product measure.
Summary data TABLE 5 5 Mapping (Continued)of Top N and Bottom N product summary URIs to specific measures Measure URI Units Ports Not In Use portsnotinuse integer Ping Packet Loss Percentage pingpktlosspercentage %tage Product summary URIs /resourcegroups/rgkey/memoryutilpercentage?timeline=×cope=&limit=&descending= /resourcegroups/rgkey/fcfabrics/fcfkey/memoryutilpercentage?timeline=×cope=&limit=&descending=
5 Summary data /resourcegroups/rgkey/portsnotinuse?timeline=×cope=&limit=&desce nding= /resourcegroups/rgkey/fcfabrics/fcfkey/portsnotinuse?timeline=×cope=&limit =&descending= /resourcegroups/rgkey/fcfabrics/fcfkey/fcswitches/fcskey/portsnotinuse?timeline=×co pe=&limit=&descending= /resourcegroups/rgkey/fcswitches/fcskey/portsnotinuse?timeline=×cope=
Summary data 5 Distribution product summary The following table shows the mapping of the URIs to the specific measures.
5 Summary data /resourcegroups/rgkey/fcfabrics/fcfkey/distributionsystemuptime?timeline=×cope= /resourcegroups/rgkey/fcfabrics/fcfkey/fcswitches/fcskey/distributionsystemuptime?timeline=×cope= /resourcegroups/rgkey/fcswitches/fcskey/distributionsystemuptime?timeline=×cope=< value> /resourcegroups/rgkey/distributionportsnotinuse?timeline=×cope= /resourcegroups/rgkey/fcfabrics/fcfkey/dist
Summary data 5 Traffic flow summaries Retrieves URIs that retrieve traffic flow summary data. Depending on monitor and measure charateristics, there are various traffic flow summaries. The URIs in the following table return a list of URIs for the possible traffic flow summaries in the specific context. You can use these URIs to get specific traffic flow-related summary data, such as Top N or Bottom N data for a specific traffic measure.
5 Summary data TABLE 7 Mapping of the Top N and Bottom N traffic flow summary URIs to the specific measures Measure Type URI Units SCSI Read Data Rate (mbps) SCSI scsireaddatarate SCSI Write Data Rate (mbps) SCSI scsiwritedatarate Transmit Frame Count (frames) Frame txframecount count Receive Frame Count (frames) Frame rxframecount count Transmit Frame Rate (f/s) Frame txframerate Receive Frame Rate (f/s) Frame rxframerate Transmit Word Count (bytes) Frame txwordcount count R
Summary data 5 /resourcegroups/rgkey/scsiwriteframerate?timeline=×cope=&limit=&d escending= /resourcegroups/rgkey/fcfabrics/fcfkey/scsiwriteframerate?timeline=×cope=&l imit=&descending= /resourcegroups/rgkey/fcfabrics/fcfkey/fcswitches/fcskey/scsiwriteframerate?timeline=&tim escope=&limit=&descending= /resourcegroups/rgkey/fcswitches/fcskey/scsiwriteframerate?timeline=
5 Summary data /resourcegroups/rgkey/fcswitches/fcskey/rxframecount?timeline=×cope=&limi t=&descending= /resourcegroups/rgkey/txframerate?timeline=×cope=&limit=&descend ing= /resourcegroups/rgkey/fcfabrics/fcfkey/txframerate?timeline=×cope=&limit=< value>&descending= /resourcegroups/rgkey/fcfabrics/fcfkey/fcswitches/fcskey/txframerate?timeline=×cope =&limit
Summary data 5 /resourcegroups/rgkey/fcswitches/fcskey/avgtxframesize?timeline=×cope=&li mit=&descending= /resourcegroups/rgkey/avgrxframesize?timeline=×cope=&limit=&desc ending= /resourcegroups/rgkey/fcfabrics/fcfkey/avgrxframesize?timeline=×cope=&limit =&descending= /resourcegroups/rgkey/fcfabrics/fcfkey/fcswitches/fcskey/avgrxframesize?timeline=×c ope=
5 Events Events The Events API provides GET and POST URIs for retrieving and acknowledging and unacknowledging events. The HTTP request header “Accept” must be specified to indicate the content type of the response payload. For POST requests, the header “Content-type” must also be specified.
Events 5 Event retrieval Returns events. You can filter the events based on the properties stated in the URI. GET URIs URI Description /resourcegroups/All/events?startindex=valu Returns events. e&count=value&sourceaddr=value&origin=value&severit y=value&module=value&specialevent=value Example Multiple filters are supported. For example, to retrieve the first 100 special trap events, use the following URI: http://10.24.48.
5 Events Property Description operationalStatus The operational status of the product associated with the event. firstOccurrenceSwitchTime The first occurrence switch timestamp of the event. lastOccurrenceSwitchTime The last occurrence switch timestamp of the event. virtualFabricId The virtual fabric ID of the switch which triggered the event. macAddress The MAC address of the access point from which this event is received.
Events 5 Event count Returns the number of events. GET URIs URI Description /resourcegroups/All/events/count?sourcea ddr=value&origin=value&severity=value&module=value &specialevent=value Returns the number of events for all resource groups. By specifying the filter values, you can get the number of events in that category without having to actually get the events. This call merely returns the count. Notes • The response schema is CountResponse.
5 Events Event acknowledgement Acknowledges or unacknowledges an event. POST URIs URI Description /resourcegroups/All/events/ekey/acknow ledge Acknowledges a specific event. /resourcegroups/All/events/ekey/unackn owledge Unacknowledges a specific event. Path parameters Name Description ekey Event identifier. Pagination support Brocade Network Advisor supports up to 10 million events. So, retrieval of events is by pages.
Zoning 5 Zoning The Zoning API provides GET and POST requests for zone monitoring and administration. When using this API, you must specify the HTTP request header “Accept” to indicate the content type of the response payload. For POST requests, you must also specify the header “Content-type” (for more information, refer to “Specifying content type”).
5 Zoning Zone DBs Retrieves active and defined zone database information on any specific fabric. GET URIs URI Description /resourcegroups/rgkey/fcfabrics/fcfkey/zon edbs?active=value Returns the active and defined zone configuration in the given fabric. Path parameters Name Description rgkey Resource group identifier. fcfkey FC fabric identifier. Query parameters Name active Description Optional The zone database of interest.
Zoning 5 Zones Returns the active and defined zones of a fabric. The query parameter “active” is optional and if not specified, both the active and defined zones are returned in a ZonesResponse. In order to retrieve the active zones, “active” should be set to “true”. If a value other than true is specified, then that value will be mapped to Boolean (false) and defined zones will be returned. Zones may also be retrieved based on ZoneType.
5 Zoning Name Description aliasNames List of zone alias names. memberNames List of members. These can be WWNs or D,P. Notes • The response schema is ZonesResponse.
Zoning 5 Zone aliases Returns the zone aliases in the given zone. GET URIs URI Description /resourcegroups/rgkey/fcfabrics/fcfkey/zon es/zkey/zonealiases Returns the zone aliases in the given zone. /resourcegroups/rgkey/fcfabrics/fcfkey/zon ealiases Returns the zone aliases in the given fabric. /resourcegroups/rgkey/fcfabrics/fcfkey/zon ealiases/zakey Returns the details of the given zone alias. Path parameters Name Description rgkey Resource group identifier.
5 Zoning Zone sets Returns the active and defined zone sets in the given fabric. The query parameter “active” is optional and if not specified, both the active and defined zone sets are returned in a ZoneSetsResponse. In order to retrieve the active zone set, “active” should be set to “true”. GET URIs URI Description /resourcegroups/rgkey/fcfabrics/fcfkey/zon esets?active= Returns the active and defined zone sets in the given fabric.
Zoning 5 Zone transactions Returns the details of a zone transaction on a specific FC fabric. GET URIs URI Description /resourcegroups/rgkey/fcfabrics/fcfkey/zon etransaction Returns the details of zone transactions on a given fabric in a ZoneTransactionResponse. The returned parameters specify whether the zone transaction is a regular or LSAN. Path parameters Name Description rgkey Resource group identifier. fcfkey FC fabric identifier.
5 Zoning Zone transaction management To carry out zoning or LSAN zoning operations, the operations must be performed in the context of a zoning transaction. The following URI provides support for starting, committing, and aborting a zone transaction on a specific fabric. POST URIs URI Description /resourcegroups/rgkey/fcfabrics/fcfkey/con trolzonetransaction Starts, commits, or aborts a zone transaction on a specific fabric.
Zoning 5 Zoning object creation Creates zoning objects. POST URIs URI Description /resourcegroups/rgkey/fcfabrics/fcfkey/cre atezoningobject Creates defined zoning objects as specified in the CreateZoningObjectRequest. Path parameters Name Description rgkey Resource group identifier. fcfkey FC fabric identifier. Request parameters Name Description zones The zones to be created. Only name, type, aliasNames, and memberNames within the zone are considered.
5 Zoning Zoning object deletion Deletes zoning objects. GET URIs URI Description /resourcegroups/rgkey/fcfabrics/fcfkey/del etezoningobject Deletes the defined zoning objects as specified in the DeleteZoningObjectRequest. Path parameters Name Description rgkey Resource group identifier. fcfkey FC fabric identifier. Request parameters Name Description zoneNames The zone names to be deleted. zoneAliasNames The zonealias names to be deleted.
Zoning 5 Zoning object updating Updates zoning objects. The URI in the following table provides support for updating zoning objects. This includes LSAN zones. Only defined zoning objects can be created, updated, or deleted. The active parameter is ignored in the objects in the input requests. Only the zoning object name, type, and member names are considered. The name of the object in the input is mandatory.
5 Zoning • The request schema is UpdateZoningObjectRequest.
Zoning 5 Zone set activation Activates or deactivates a zone set. POST URIs URI Description /resourcegroups/rgkey/fcfabrics/fcfkey/zon esets/zskey/activate Activates a given zone set. /resourcegroups/rgkey/fcfabrics/fcfkey/zon esets/zskey/deactivate Deactivates a given zone set. Path parameters Name Description rgkey Resource group identifier. fcfkey FC fabric identifier. zskey Zone set identifier.
5 Zoning Initiator target zoning Carries out initiator-to-target attach and detach operations. POST URIs URI Description /resourcegroups/rgkey/fcfabrics/fcfkey/att ach Carries out initiator-to-target attach operations. /resourcegroups/rgkey/fcfabrics/fcfkey/det ach Carries out initiator-to-target detach operations. Path parameters Name Description rgkey Resource group identifier. fcfkey FC fabric identifier.
Zoning 5 • You can control whether to activate the zone set using the activate property (applicable for Standard zoning only). • LSAN zoning is supported only in the context of a backbone fabric. • The Boolean properties in the input are case-sensitive. Only a value of “true” in the input converts to a Boolean true. All else is Boolean false. • Attach means engaging an initiator with targets by activating the zone. Attach is meaningful when the activate flag is true.
5 Historical performance data Historical performance data This section lists the URIs for retrieving historical performance data for ports, switches, and flows based on a measure: • Port performance data can be retrieved in the context of a resource group or switch. • Switch performance data can be retrieved in the context of a resource group or fabric. • Traffic flow performance data can be retrieved in the context of a specific switch only.
Historical performance data TABLE 9 5 Mapping of the port-related performance data URIs to the specific measures Measure Type URI C3 Discards RX TO FC timeseriesc3discardsrxto C3 Discards Unreachable FC timeseriesc3discardsunreachable C3 Discards Other FC timeseriesc3discardsother Encode Error Out FC timeseriesencodeerrorout SFP Power FC timeseriessfppower SFP Voltage FC timeseriessfpvoltage SFP Current FC timeseriessfpcurrent SFP Temperature FC timeseriessfptemperature Invali
5 Historical performance data URIs for FC measures The following URIs are applicable for FC ports only.
Historical performance data 5 /resourcegroups/rgkey/timeseriesc3discards?granularity=&startdate=&enddate=&duration= /resourcegroups/rgkey/fcfabrics/fcfkey/fcswitches/fcskey/timeseriesc3discards?granularity=&startdate=&enddate=&duration= /resourcegroups/rgkey/fcswitches/fcskey/timeseriesc3discards?granularity=&startdate=&enddate=&duration= /resourcegroups/rgkey/timeseriesc3discards
5 Historical performance data /resourcegroups/rgkey/fcfabrics/fcfkey/fcswitches/fcskey/timeseriessfptemperature?granularity=&startdate=&enddate=&duration= /resourcegroups/rgkey/fcswitches/fcskey/timeseriessfptemperature?granularity=&startdate =&enddate=&duration= /resourcegroups/rgkey/timeseriesinvalidorderedsets?granularity=&startdate=&endd ate=&duration= /resourcegroups/rgkey/fcfa
Historical performance data 5 /resourcegroups/rgkey/timeseriesfastretransmits?granularity=&startdate=&enddate =&duration= /resourcegroups/rgkey/fcfabrics/fcfkey/fcswitches/fcskey/timeseriesfastretransmits?granularity=&startdate=&enddate=&duration= /resourcegroups/rgkey/fcswitches/fcskey/timeseriesfastretransmits?granularity=&startdate =&enddate=&duration= /resourcegroups/rgkey/times
5 Historical performance data Limitations • There is an imposed limit of 100 switches. The number of switches within the chosen scope must not exceed 100. • For GRANULARITY_MINIMUM, the duration or the start-to-end date range cannot exceed 1 day. • For GRANULARITY_30MIN, the duration or the start-to-end date range cannot exceed 5 days. • For GRANULARITY_2HOUR, the duration or the start-to-end date range cannot exceed 20 days.
Historical performance data TABLE 11 5 Mapping of the traffic flow-related performance data URIs to the specific measures Measure Type URI SCSI Read Data (bytes) SCSI timeseriesscsireaddata SCSI Write Data (bytes) SCSI timeseriesscsiwritedata SCSI Read Data Rate (mbps) SCSI timeseriesscsireaddatarate SCSI Write Data Rate (mbps) SCSI timeseriesscsiwritedatarate Transmit Frame Count (frames) Frame timeseriestxframecount Receive Frame Count (frames) Frame timeseriesrxframecount Transmi
5 Historical performance data /resourcegroups/rgkey/fcswitches/fcskey/timeseriesscsiwriteframecount?granularity=&start date=&enddate=&duration= /resourcegroups/rgkey/fcfabrics/fcfkey/fcswitches/fcskey/timeseriesscsireadframerate?granularity= &startdate=&enddate=&duration= /resourcegroups/rgkey/fcswitches/fcskey/timeseriesscsireadframerate?granularity=&startda te=&enddate=&duration= /
Historical performance data 5 /resourcegroups/rgkey/fcfabrics/fcfkey/fcswitches/fcskey/timeseriesrxthroughput?granularity=&startdate=&enddate=&duration= /resourcegroups/rgkey/fcswitches/fcskey/timeseriesrxthroughput?granularity=&startdate=< value>&enddate=&duration= /resourcegroups/rgkey/fcfabrics/fcfkey/fcswitches/fcskey/timeseriesavgtxframesize?granularity=&startdate=&enddate=&duration=
5 Authentication and session management Authentication and session management Only a valid Brocade Network Advisor user can access its web services. This means that a login is required and you must have a valid non-empty password to log in. The REST interface provides two operations: login and logout of a client session.
Authentication and session management 5 Login Logs in to a Network Advisor Server REST API session. POST URIs URI Description /login Returns, if successful, the Network Advisor Server credentials in a LoginResponse. HTTP request headers A valid user name and password (non-empty) is required for login and this is sent through the HTTP request headers. You must add the headers while forming the POST request. The following are the header names and values. The password is passed as plain text.
5 Authentication and session management Logout Logs out from the Network Advisor server. POST URIs URI Description /logout Ends the current session and logs you out. HTTP request headers A valid token is required for logout and this is sent through the HTTP request header. The user adds the header while forming the POST request. Request header name Request header value WStoken The token obtained from login.
Appendix A Request and Response Schemas In this chapter • Topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . • SAN fabric discovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . • Summary data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . • Events. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A Topology FcFabricsResponse
Topology A
A Topology AccessGatewaysResponse
Topology A
A Topology value="UNKNOWN"/> value="ONLINE"/> value="IN_SYNC"/> value="NO_SYNC"/> value="NO_MODULE"/> value="NO_LIGHT"/> value="ENABLED"/> value="DISABLED"/> <
Topology A PAGE 168A Topology IflsResponse
Topology A AgConnectionsResponse PAGE 170A SAN fabric discovery
<
SAN fabric discovery A DiscoverFabricResponse
A SAN fabric discovery FlowDefinitionsResponse
Summary data A FlowsResponse ' the format is fldbid- PAGE 174A Summary data
PAGE 175Summary data A AssetClassificationSummary PAGE 176A Summary data
Summary data A
A Summary data value="FC_SWITH_PORT_HOST"/> value="FC_SWITH_PORT_STORAGE"/> value="FC_DEVICE_HOST"/> value="FC_DEVICE_STORAGE"/> value="IPPORT"/> value="FC_SWITH_PORT_UNOCCUPIED"/> value="UNKNOWN"/> OutOfRangeViolationsSummary <
Summary data A
A Summary data
Summary data A PAGE 182A Events FlowMonitorSummaryData PAGE 183Events A
' the format is edbid-
A Events
Zoning A value="PERFORMANCE_MONITOR"/> value="FIRMWARE_MANAGEMENT"/> value="SCOM_PLUGIN"/> value="VIRTUAL_FABRICS"/> value="SFLOW_MONITORING"/> value="PROPERTIES"/> value="POWER_CENTER"/> value="VIRTUAL_PORT_WWN"/> value="VLAN_MANAGEMENT"/> value="LOOPBACK_TEST"/> CountResponse PAGE 186A Zoning ZonesResponse ZoneAliasesResponse
Zoning A ControlZoneTransactionRequest ' case sensitive, use either true or false
A Historical performance data InitiatorTargetsRequest <
Authentication and session management A PAGE 190A 176 Authentication and session management Brocade Network Advisor REST API Guide 53-1003160-01