+ All Categories
Home > Documents > Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the...

Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the...

Date post: 21-Apr-2018
Category:
Upload: duongtuong
View: 221 times
Download: 8 times
Share this document with a friend
233
Supporting Fabric OS 8.2.0 Supporting Fabric OS 8.2.0a API REFERENCE GUIDE Brocade Fabric OS REST API Reference, 8.2.0a 53-1005246-03 10 April 2018
Transcript
Page 1: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Supporting Fabric OS 8.2.0Supporting Fabric OS 8.2.0a

API REFERENCE GUIDE

Brocade Fabric OS REST API Reference,8.2.0a

53-1005246-0310 April 2018

Page 2: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Copyright © 2018 Brocade Communications Systems LLC. All Rights Reserved. Brocade and the stylized B logo are among the trademarks of BrocadeCommunications Systems LLC. Broadcom, the pulse logo, and Connecting everything are among the trademarks of Broadcom. The term "Broadcom"refers to Broadcom Inc. and/or its subsidiaries.

Brocade, a Broadcom Inc. Company, reserves the right to make changes without further notice to any products or data herein to improve reliability,function, or design. Information furnished by Brocade is believed to be accurate and reliable. However, Brocade does not assume any liability arising out ofthe application or use of this information, nor the application or use of any product or circuit described herein, neither does it convey any license under itspatent rights nor the rights of others.

The product described by this document may contain open source software covered by the GNU General Public License or other open source licenseagreements. To find out which open source software is included in Brocade products, view the licensing terms applicable to the open source software, andobtain a copy of the programming source code, please visit https://www.broadcom.com/support/fibre-channel-networking/tools/oscd.

Brocade Fabric OS REST API Reference, 8.2.0a2 53-1005246-03

Page 3: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

ContentsAbout this document..........................................................................................................................................................................................................5

Supported hardware and software...................................................................................................................................................................................................... 5Brocade Gen 5 (16-Gbps) fixed-port switches...................................................................................................................................................................5Brocade Gen 5 (16-Gbps) directors........................................................................................................................................................................................ 5Brocade Gen 6 (32-Gbps) fixed-port switches...................................................................................................................................................................5Brocade Gen 6 (32-Gbps) directors........................................................................................................................................................................................ 6

REST terminology..................................................................................................................................................................................................................................... 6Terms used in YANG files............................................................................................................................................................................................................. 7

Standards and related references........................................................................................................................................................................................................ 8Document conventions............................................................................................................................................................................................................................8

Notes, cautions, and warnings.....................................................................................................................................................................................................8Text formatting conventions......................................................................................................................................................................................................... 9Command syntax conventions....................................................................................................................................................................................................9

Document feedback.............................................................................................................................................................................................................................. 10

REST API Overview......................................................................................................................................................................................................... 11Overview of the Fabric OS REST API............................................................................................................................................................................................11

FOS REST API described......................................................................................................................................................................................................... 11Software support............................................................................................................................................................................................................................11Hardware support.......................................................................................................................................................................................................................... 12Functionality.....................................................................................................................................................................................................................................12FOS REST API and Brocade Extension..............................................................................................................................................................................15

Using the Brocade FOS REST API ............................................................................................................................................................................................... 16Before you begin............................................................................................................................................................................................................................16Logging in and out........................................................................................................................................................................................................................ 16Supported user types...................................................................................................................................................................................................................17REST session count limit........................................................................................................................................................................................................... 17REST session count limit........................................................................................................................................................................................................... 18Character restrictions....................................................................................................................................................................................................................18Keyword support............................................................................................................................................................................................................................18Configuration upload and download......................................................................................................................................................................................18HTTP header...................................................................................................................................................................................................................................18Request headers............................................................................................................................................................................................................................ 18Media types......................................................................................................................................................................................................................................19HTTP status codes and messages........................................................................................................................................................................................19Supported methods......................................................................................................................................................................................................................20

FOS REST API and Brocade Virtual Fabrics..............................................................................................................................................................................23Fabric OS REST session configuration......................................................................................................................................................................................... 24

Enabling and disabling the Fabric OS REST interface...................................................................................................................................................25Fabric OS REST interface session value configuration.................................................................................................................................................25Fabric OS REST session identification and termination............................................................................................................................................... 25

YANG module overview.......................................................................................................................................................................................................................26Supported data types...................................................................................................................................................................................................................26Additional FOS REST API data types...................................................................................................................................................................................27

FOS REST API YANG modules.......................................................................................................................................................................................................33

FOS REST API modules for Fibre Channel features................................................................................................................................................35

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 3

Page 4: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

brocade-access-gateway.................................................................................................................................................................................................................... 36brocade-fabric..........................................................................................................................................................................................................................................55brocade-fdmi............................................................................................................................................................................................................................................ 60brocade-fibrechannel............................................................................................................................................................................................................................ 75brocade-fibrechannel-diagnostics................................................................................................................................................................................................102brocade-fibrechannel-logical-switch...........................................................................................................................................................................................117brocade-fibrechannel-switch.......................................................................................................................................................................................................... 128brocade-name-server........................................................................................................................................................................................................................134brocade-zone.........................................................................................................................................................................................................................................143

FOS REST API modules for Extension features.....................................................................................................................................................155brocade-extension-ip-interface..................................................................................................................................................................................................... 156brocade-extension-ip-route............................................................................................................................................................................................................ 160brocade-extension-ipsec-policy....................................................................................................................................................................................................164brocade-extension-tunnel................................................................................................................................................................................................................168brocade-gigabitethernet....................................................................................................................................................................................................................194

Sample Use Cases.........................................................................................................................................................................................................203Logging in, retrieving switch information, and logging out.................................................................................................................................................203Using PATCH to disable and enable a port.............................................................................................................................................................................. 205Creating an up state tunnel using multiple URIs.....................................................................................................................................................................206Running a diagnostic port test........................................................................................................................................................................................................208Creating, modifying, and deleting a zone using REST.........................................................................................................................................................210

Creating a zone using REST..................................................................................................................................................................................................211Modifying a zone........................................................................................................................................................................................................................ 215Aborting a zone transaction................................................................................................................................................................................................... 218Deleting a zone............................................................................................................................................................................................................................219

Concurrent zoning transactions on a local switch...................................................................................................................................................................221Multi-switch concurrent transaction cancellation....................................................................................................................................................................222Simultaneous multi-switch zone transaction commitments..............................................................................................................................................222REST Zone Transaction Timer timeout .....................................................................................................................................................................................223

References ......................................................................................................................................................................................................................225REST API description........................................................................................................................................................................................................................ 225

Resources...................................................................................................................................................................................................................................... 225Base resources............................................................................................................................................................................................................................ 226Resources and the YANG model ........................................................................................................................................................................................226Relationship of YANG and resource data models........................................................................................................................................................ 226Uniform resource identifiers...................................................................................................................................................................................................227

XML resource representation..........................................................................................................................................................................................................228Error Reporting......................................................................................................................................................................................................................................229

Error returned due to invalid POST request....................................................................................................................................................................230Existing IP address error..........................................................................................................................................................................................................231Unsupported platform error................................................................................................................................................................................................... 232Login errors ..................................................................................................................................................................................................................................232

Brocade Fabric OS REST API Reference, 8.2.0a4 53-1005246-03

Page 5: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

About this document• Supported hardware and software.................................................................................................................................................................5• REST terminology................................................................................................................................................................................................6• Standards and related references...................................................................................................................................................................8• Document conventions...................................................................................................................................................................................... 8• Document feedback.........................................................................................................................................................................................10

Supported hardware and softwareThe following hardware platforms are supported by Fabric OS 8.2.0.

Although many different software and hardware configurations are tested and supported by Brocade for Fabric OS 8.2.0, documentingall possible configurations and scenarios is beyond the scope of this document.

Fabric OS support for the Brocade Analytics Monitoring Platform (AMP) device depends on the specific version of the software runningon that platform. For more information, refer to the Brocade Analytics Monitoring Platform documentation and release notes.

Brocade Gen 5 (16-Gbps) fixed-port switches• Brocade 6505 Switch

• Brocade 6510 Switch

• Brocade 6520 Switch

• Brocade M6505 blade server SAN I/O module

• Brocade 6542 blade server SAN I/O module

• Brocade 6543 blade server SAN I/O module

• Brocade 6545 blade server SAN I/O module

• Brocade 6546 blade server SAN I/O module

• Brocade 6547 blade server SAN I/O module

• Brocade 6548 blade server SAN I/O module

• Brocade 6558 blade server SAN I/O module

• Brocade 7840 Extension Switch

Brocade Gen 5 (16-Gbps) directorsFor ease of reference, Brocade chassis-based storage systems are standardizing on the term “director.” The legacy term “backbone” canbe used interchangeably with the term “director.”

• Brocade DCX 8510-4 Director

• Brocade DCX 8510-8 Director

Brocade Gen 6 (32-Gbps) fixed-port switches• Brocade G610 Switch

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 5

Page 6: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

• Brocade G620 Switch

• Brocade G630 Switch

Brocade Gen 6 (32-Gbps) directors• Brocade X6-4 Director

• Brocade X6-8 Director

REST terminologyThe following terms are used in this manual to describe REST and REST functionality contained in the Brocade FOS REST API.

Base URI A base URI is specific to the Fabric OS server. All URIs accessing the same server use the same base URI.For example, in the request “POST http://10.10.10.10/rest/login”, “http://10.10.10.10/rest/” is the base URI.

Device Any host or target device with a distinct WWN. Devices may be physical or virtual.D_Port A port configured as a diagnostic port on a switch or connected fabric switch, used to run diagnostic tests between

ports to test the link.E_Port An interswitch link (ISL) port. A switch port that connects switches together to form a fabric.F_Port A fabric port. A switch port that connects a host, host bus adapter (HBA), or storage device to a SAN.Fabric A fabric consists of interconnected nodes that look like a single logical unit when viewed collectively. This refers to a

consolidated high-performance network system consisting of coupled storage devices, networking devices, andparallel processing high bandwidth interconnects such as 8-Gbps, 10-Gbps, 16-Gbps, or 32-Gbps Fibre Channelports.

FCID A Fibre Channel ID (FCID) is a 24-bit (3 byte) field used to route frames through a Fibre Channel (FC) network. TheFOS REST API shows this as a decimal value, such as “14776283”.

FCIP Fiber Channel over IP. This functionality allows connectivity between two remote fabrics that are separated by an IPnetwork. FCIP is different from “IP over FC”. Refer to RFC 3821.

HTTP HyperText Transfer Protocol. An application protocol for distributed, collaborative, and hypermedia informationsystems. Refer to RFC 7230.

Internet Protocol(IP)

The principal communications protocol in the Internet Protocol suite. It conveys packets from a source host to adestination host based on the IP addresses contained in the packet headers. Refer to RFC 791.

IPsec Internet Protocol security. A network protocol suite that authenticates and encrypts the packets of data sent over anetwork, protecting data flows between a pair of hosts (host-to-host), a pair of security gateways (network-to-network), or between a security gateway and a host (network-to-host). Refer to RFC 4301, RFC 4303, andRFC 4309.

N_Port A node port. A N_Port presents a host or storage device to the fabric.NETCONF NETwork CONFiguration protocol. A network management protocol developed and standardized by the IETF.

Refer to RFC 6241.NPIV N_Port ID Virtualization. This is a Fibre Channel facility allowing multiple F_Port IDs to share a single physical

N_Port. Multiple F_Ports can be mapped to a single N_Port. This allows multiple Fibre Channel initiators to occupya single physical port, easing hardware requirements in storage area network design, especially for virtual SANs.

REST REpresentational State Transfer is a way of providing interoperability between computer systems in a network.RESTCONF REST CONFiguration protocol. A RESTful protocol used to access data defined using the YANG language. Refer to

RFC 8040.Request URI A request URI is the URI used to perform a REST HTTP request such as GET, POST, PUT, DELETE, HEAD or

OPTIONS.

REST terminology

Brocade Fabric OS REST API Reference, 8.2.0a6 53-1005246-03

Page 7: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

TCP Transmission Control Protocol. One of the main protocols of the Internet Protocol (IP) suite. TCP provides reliable,ordered, and error-checked delivery of a stream of data in octets between applications running on hostscommunicating by an IP network. Refer to RFC 1122 and RFC 7323.

VE_Port Virtual E_Port. Software mechanism for creating a logical E_Port connection to allow the Fibre Channel fabricprotocols to communicate over this virtual interface. Typically used for FCIP products.

YANG Yet Another Next Generation. A data modeling language for the definition of data sent over the NETCONF networkconfiguration protocol. Refer to RFC 7950.

XML eXtensible Markup Language. A markup language that defines a set of rules for encoding documents in a formatthat is both human-readable and machine-readable through use of tags that can be created and defined by users.Refer to the W3C XML standard.

NOTEDefinitions are based on information extracted from either the specific standard or the Wikipedia entry for that term.

For definitions of additional Storage Area Network (SAN)-specific terms, visit the Storage Networking Industry Association onlinedictionary at:

http://www.snia.org/education/dictionary

Terms used in YANG filesThe following list provides definitions and explanations for terms commonly used when discussing YANG files. Refer to RFC 6020 forcomplete details on YANG language features.

augmentation The module hierarchy can be augmented, allowing one module to add data nodes to the hierarchy defined inanother module (without changing the augmented module). Augmentation can be conditional, using whenstatements, with new nodes appearing only if certain conditions are met.

case node YANG allows the data model to segregate incompatible nodes into distinct choices using “choice” and “case”statements. A “choice” statement contains a set of “case” statements that define sets of schema nodes that cannotappear together. Each “case” may contain multiple nodes, but each node may appear in only one “case” under a“choice”. When an element from one case is created, all elements from all other cases are implicitly deleted.The device handles the enforcement of the constraint, preventing incompatibilities from existing in the configuration.

The choice and case nodes appear only in the schema tree, not in the data tree or in NETCONF messages. Theadditional levels of hierarchy are not needed beyond the conceptual schema. Refer to section 4.2.7 of RFC 6020.

choice node This defines a set of alternatives, only one of which may exist at any one time. A choice consists of a number ofbranches, defined with case substatements. The nodes from one of the choice's branches (limited to one) exist in thedata tree, and the choice node itself does not exist in the data tree.

container A container node has at most one instance in a module.data model A data model describes how data is represented and accessed. In YANG, data models are represented by definition

hierarchies called schema trees. Instances of schema trees are called data trees and are encoded in XML.data node Data nodes can represent either configuration data or state data. The config statement specifies whether the

definition it occurs in represents configuration data (config=true) or status data (config=false). If config is notspecified, the default is the same as the parent schema node’s config value. If the top node does not specify a configstatement, the default is config=true.

grouping A grouping defines a reusable collection of nodes.if An “if” statement in a .yang file indicates that the leaf or container has conditional support. Refer to section 7.18.2 of

RFC 6020.key A key provides a unique identifier for an entry in a list. A key may be composed of a single leaf, such as “name”, or

by a combination of leaves such as “name” plus “address”.leaf A leaf node has at most one instance in a container or list.

REST terminology

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 7

Page 8: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

leaf-list A leaf-list node may have multiple instances.leafref A leafref is used to reference a particular leaf instance in the data tree, as specified by a path. This path is specified

using the XML Path Language (XPath), in a notation that is similar to the syntax for directory paths in UNIX/Linux.list A list defines a sequence of list entries. Each entry is like a structure or a record instance, and the individual entry is

uniquely identified by the values of its key leafs. A list can define multiple key leafs and may contain any number ofchild nodes of any type (including leafs, lists, containers).

mandatory A mandatory statement indicates that a node must exist in the data tree. This applies only to POST requests.module YANG organizes data models into modules and submodules. A module can import data from other modules, and

include data from submodules. Besides schema definitions, a module contains header statements (yang-version,namespace, prefix), linkage statements (import and include), meta-information (organization, contact), and a revisionhistory.

presence A presence statement provides a description of what the model designer intends the node’s presence to signify.schema tree A schema tree defines the data structure for validation, documentation, and interaction control.when A “when” statement in a .yang file makes the node's parent data definition statement conditional. The node defined

by the parent data definition statement is only valid when the condition specified by the “when” statement is satisfied.Refer to section 7.19.5 of RFC 6020.

Standards and related referencesThe following list identifies the IETF RFCs that apply to the FOS REST API.

• Structure of Management Information Version 2 (SMIv2) (RFC 2578)

• YANG – A Data Modeling Language for the Network Configuration Protocol RFC 6020

• Guidelines for Authors and Reviewers of YANG Data Model Documents (RFC 6087)

• Common YANG Data Types (RFC 6991)

• A YANG Data Model for Interface Management (RFC 7223)

• IANA Interface Type YANG Module (RFC 7224)

• A YANG Data Model for IP Management (RFC 7227)

• YANG System Management (RFC 7317)

• YANG Module Library (RFC 7895)

• The YANG 1.1 Data Modeling Language (RFC 7950)

• RESTCONF Protocol (RFC 8040)

• Fibre Channel Over TCP/IP (FCIP) (RFC 3821)

Document conventionsThe document conventions describe text formatting conventions, command syntax conventions, and important notice formats used inBroadcom technical documentation.

Notes, cautions, and warningsNotes, cautions, and warning statements may be used in this document. They are listed in the order of increasing severity of potential

hazards.

Standards and related references

Brocade Fabric OS REST API Reference, 8.2.0a8 53-1005246-03

Page 9: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

NOTEA Note provides a tip, guidance, or advice, emphasizes important information, or provides a reference to related information.

ATTENTIONAn Attention statement indicates a stronger note, for example, to alert you when traffic might be interrupted or the device mightreboot.

CAUTIONA Caution statement alerts you to situations that can be potentially hazardous to you or cause damage to hardware,firmware, software, or data.

DANGERA Danger statement indicates conditions or situations that can be potentially lethal or extremely hazardous to you. Safetylabels are also attached directly to products to warn of these conditions or situations.

Text formatting conventionsText formatting conventions such as boldface, italic, or Courier font may be used to highlight specific words or phrases.

Format Description

bold text Identifies command names.

Identifies keywords and operands.

Identifies the names of GUI elements.

Identifies text to enter in the GUI.

italic text Identifies emphasis.

Identifies variables.

Identifies document titles.

Courier font Identifies CLI output.

Identifies command syntax examples.

Command syntax conventionsBold and italic text identify command syntax components. Delimiters and operators define groupings of parameters and their logicalrelationships.

Convention Description

bold text Identifies command names, keywords, and command options.

italic text Identifies a variable.

value In Fibre Channel products, a fixed value provided as input to a command option is printed in plain text, forexample, --show WWN.

[ ] Syntax components displayed within square brackets are optional.

Default responses to system prompts are enclosed in square brackets.

{ x | y | z } A choice of required parameters is enclosed in curly brackets separated by vertical bars. You must selectone of the options.

In Fibre Channel products, square brackets may be used instead for this purpose.

x | y A vertical bar separates mutually exclusive elements.

< > Nonprinting characters, for example, passwords, are enclosed in angle brackets.

Document conventions

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 9

Page 10: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Convention Description

... Repeat the previous element, for example, member[member...].

\ Indicates a “soft” line break in command examples. If a backslash separates two lines of a commandinput, enter the entire command at the prompt without the backslash.

Document feedbackQuality is our first concern at Broadcom, 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.

Send your feedback to [email protected]

Provide the publication title, part number, and as much detail as possible, including the topic heading and page number if applicable, aswell as your suggestions for improvement.

Document feedback

Brocade Fabric OS REST API Reference, 8.2.0a10 53-1005246-03

Page 11: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

REST API Overview• Overview of the Fabric OS REST API...................................................................................................................................................... 11• Using the Brocade FOS REST API ..........................................................................................................................................................16• FOS REST API and Brocade Virtual Fabrics.........................................................................................................................................23• Fabric OS REST session configuration....................................................................................................................................................24• YANG module overview..................................................................................................................................................................................26• FOS REST API YANG modules................................................................................................................................................................. 33

Overview of the Fabric OS REST APIFabric OS 8.2.0 supports an application programming interface (API) for managing Brocade storage area network (SAN) switches. TheFOS REST API is not supported for releases of Fabric OS prior to 8.2.0.

This API is referred to as the FOS REST API, and is enabled by default in Fabric OS 8.2.0. It follows the RESTCONF protocol defined inIETF RFC 8040, and defines data using the YANG 1.1 (Yet Another Next Generation) data modeling language as defined inIETF RFC 7950.

NOTEAs the FOS REST API permits HTTP communications, it is not fully compliant with RFC 8040.

FOS REST API describedThe FOS REST API is a programmable web service interface for Brocade Fabric OS that can manage Brocade SAN switches across afabric. This API uses standard HTTP methods to perform Create, Read, Update, and Delete (CRUD) operations on the fabricconfiguration data, and provides an interface for provisioning, status, and validation operations using the YANG data model described inthe YANG 1.1 RFC, but not the datastore managed with NETCONF. An Apache web server embedded in Fabric OS is used to serve theAPI.

FIGURE 1 FOS REST API architecture

Software supportThe FOS REST API allows a user, application, or script to control certain aspects of a Brocade Gen 5 or Gen 6 Storage Area Network(SAN) device running Fabric OS 8.2.0. Fabric OS 8.2.0 includes a set of CLI commands that control the API functionality, includingREST session management and command throttling.

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 11

Page 12: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Hardware supportThe FOS REST API supports all Brocade Gen 5 and Gen 6 Fibre Channel devices that are supported by Fabric OS 8.2.0. For acomplete list of these platforms, refer to Supported hardware and software on page 5. The FOS REST API is not supported on theBrocade Analytics Monitoring Platform or the Brocade FX8-24 blade. There are some additional restrictions applicable to BrocadeExtension platforms; these are noted in FOS REST API and Brocade Extension on page 15.

FunctionalityThe FOS REST API supports the following set of REST operations used for switch interaction: GET, POST, PATCH, DELETE, HEAD,and OPTIONS. REST sessions can be established through all supported management IP addresses. Attempting to use an unsupportedmethod will return the HTTP status code 405, “Method Not Allowed”. No RASLog entry is made for this error.

The modules in Fabric OS 8.2.0 include support for fabric and switch discovery, zoning operations, port configuration, performing portdiagnostics (D_Port operations), extension configuration and retrieving interface statistics. Fabric OS 8.2.0 added support for access-gateway, fdmi, name-server, and logical-switch.

The FOS REST API can also:

• Restart Fabric OS Extension Internet Key Exchange (IKE) sessions.

• Reset interface statistics.

• Perform parallel REST virtual fabric operations across multiple REST sessions with multiple virtual fabrics.

• Operate in conjunction with Brocade Network Advisor and Web Tools activity.

NOTEThe REST API for Brocade Network Advisor is not the same as the FOS REST API, although there may be some overlaps. ForREST operations using Brocade Network Advisor, refer to the Brocade Network Advisor REST API Reference.

FOS REST API URI restrictionsThe following restrictions apply to FOS REST API URI requests.

• A FOS REST API request URI cannot be longer than 255 characters.

• A FOS REST API request URI cannot have more than 20 resource segments. A resource segment is the content between twoslashes, and the count starts after the switch address.

Examples: The request POST http://10.10.10.10/rest/running/brocade-extension-ip-route/extension-ip-route has 4 segments. The request GET http://10.10.10.10/rest/running/brocade-zone/zoning/defined-configuration has 5 segments.

The FOS REST API will reject requests and return a descriptive error for any of the following:

• Any REST operations that use unsupported HTTP methods (COPY, LINK, UNLINK, PUT, PURGE, LOCK, UNLOCK,PROPFIND, VIEW).

• Any URIs that do not meet length or part count requirements.

• Any URIs that do not contain all required keys at the same container level. However the FOS REST API will accept URIs havingmultiple keys at the same container level in different orders.

For additional information on URI request structures, refer to URI structure on page 227.

Overview of the Fabric OS REST API

Brocade Fabric OS REST API Reference, 8.2.0a12 53-1005246-03

Page 13: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Security and the FOS REST APIFOS REST API function calls are permitted or denied based on user privilege configurations determined by the role-based accesscontrol (RBAC) functionality in Fabric OS. Only accounts with “admin” or “user” RBAC role permissions can log in using REST. There isno support for any of the following default switch roles: root, switchadmin, operator, zoneadmin, fabricadmin, basicswitchadmin, orsecurityadmin.

The following restrictions and constraints apply to using REST operations with Fabric OS:

• FOS REST API operations have the following restrictions:

– REST operations are not permitted after the session timeout period expires. The default REST session timeout is 2 hours.This is updated if there is any change in the global http session timeout in configure command.

– REST operations cannot be executed on a standby CP.

• FOS REST API logins have the following restrictions:

– While the HTTP protocol is supported, Brocade strongly recommends using the HTTPS protocol for greatercommunication security before making REST calls.

– HTTPS logins require a valid switch certificate. The login will fail if the switch certificate is not valid. A valid client certificateis not required, but is supported. Refer to the Brocade Fabric OS Administration Guide for instructions on installingcertificates.

– Neither HTTP and HTTPS logins are subject to time-of-day limits on account access.– A FOS REST API logout operation invalidates the session authorization key. After a REST logout, subsequent REST

commands using the invalidated authorization key are not permitted.– FOS REST API logins are not persistent across switch reboots or HA failovers.

Only FOS REST API configuration activity is recorded Fabric OS as audit logs and RASLogs, these can be viewed using theauditdump -show command. Read activity is not audited.

FOS REST API sessions are maintained if an Ethernet management interface cable is disconnected and reconnected.

Zoning operationsThe FOS REST API supports discovery and configuration of zone aliases, standard zones (both WWN and domain/port), QoS zones,LSAN zones, and peer zones.

You can use FOS REST API operations to perform the following zone operations:

• Zone creation

• Zone deletion

• Zone alias creation

• Zone alias deletion

• Zone configuration actions:

– Zone configuration creation– Zone configuration deletion– Zone configuration enablement– Zone configuration disablement– Zone configuration addition– Zone configuration removal– Zone object member addition– Zone object member removal– Zone alias object member addition– Zone alias object member removal

Overview of the Fabric OS REST API

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 13

Page 14: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

• Zone database clear

• Zone database saving

• Zone transaction abort

• Zone database contents retrieval

• Default Zone mode modification to “NoAccess” or “AllAccess”

Zoning restrictions

The following restrictions apply to zoning actions using the FOS REST API:

• Only zone discovery is supported for boot LUN zones, redirect and multi-service frame redirect (MSFR) zones, and trafficisolation (TI) zones.

• The maximum zone database transaction size that FOS API REST operations can handle is 2 MB, which is the largest zonedatabase size supported on Director-only fabrics.

• REST operations fail on zone operations using an incorrect zone database checksum.

All REST clients are expected to store and provide the MD5 (128-bit) ZoneDB checksum in their zoning commit operations. Ifthe provided checksum does not match the checksum stored in zoning, the commit operation will not be allowed. The intent ofthis requirement is to avoid management interfaces operating off of a zoneDB cache to push in stale data and thus potentiallyoverwrite zone updates that were made after the zoneDB copy was synced.

Zoning transaction timer restrictions

FOS API REST zoning transactions are assumed to be short-lived. However, there is no way to enforce this and clients can potentiallyopen a zone transaction and leave it open indefinitely. This would lock out other zoning users from making changes on the local switch.

To prevent an indefinite lockout condition, zoning maintains a FOS API REST zone transaction timer that applies only to RESTtransactions. The timer is started the first time a FOS API REST zone transaction is opened and on each successive zoning operation,the timer is restarted. The timer is tied to the specific REST session ID. A client cannot start a zoning operation in one session, log out,login again under a different session ID and continue the zone transaction from the prior session. The switch treats the new login sessionas a different client and the previous dangling zone transaction is cancelled. Pending FOS API REST zoning operations time out after 5minutes. After 5 minutes a zoning transaction can be recommenced by the original REST client, provided that neither of the followinghas happened:

• No other zone user on the local switch has tried to start another zone transaction.

• The transaction has not been aborted via a zone merge or remote zone commit operation.

NOTEThe 5-minute timeout restriction applies only to REST zoning transactions, and is not user-configurable.

RESTCONF transactions follow legacy zone transaction rules and are therefore susceptible to being discontinued by the followingconditions:

• Zone merges (when the merge results in a zoneDB change)

• Zone updates from remote switches

• Forceful transaction aborts by CLI users (that is, cfgtransabort transaction-token operations)

Overview of the Fabric OS REST API

Brocade Fabric OS REST API Reference, 8.2.0a14 53-1005246-03

Page 15: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Zoning checksums

All FOS API REST clients will be expected to store and provide the MD5 (128-bit) ZoneDB checksum in their zoning commitoperations. If the provided checksum does not match the checksum stored in zoning, the commit operation will not be allowed. Theintent of this requirement is to avoid management interfaces operating off of a zoneDB cache to push in stale data and thus potentiallyoverwrite zone updates that were made after the zoneDB copy was synced.

Diagnostic operationsYou can use REST operations to perform the following Fabric OS ClearLink Diagnostics (D_Port) operations:

• D_Port test start

• D_Port test restart

• D_Port test stop

Protocol supportThe Fabric OS REST API supports both the HTTP and HTTPS protocols. The default HTTP port number is 80, and the default HTTPSport number is 443.

IMPORTANTAlthough the HTTP protocol is supported, Brocade strongly recommends using the HTTPS protocol for greatercommunication security. To use HTTPS, a valid security certificate must be installed on the switch and the HTTPS protocolmust be enabled on the switch before beginning REST operations. Refer to the Brocade Fabric OS Administration Guide forinstructions on both these actions.

Command throttlingFabric OS provides a throttling feature that sets limits on how often a FOS REST API session can invoke Fabric OS subsystems; thisprevents a REST session from consuming excessive memory or CPU resources.

The three attributes used to configure throttling are:

• Idle time

• Sampling time

• Number of REST requests allowed within the sampling time

Refer to Fabric OS REST session configuration on page 24 for the default attribute values and information on configuring theseattributes.

FOS REST API and Brocade ExtensionFOS REST API supports the Brocade Extension product as implemented in Fabric OS 8.2.0.

Brocade Extension product support includes:

• Port configuration and statistics monitoring for Gigabit Ethernet ports

• IP interface configuration

• Route configuration

• IPSec configuration

• Tunnel configuration

Overview of the Fabric OS REST API

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 15

Page 16: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

• Tunnel statistics monitoring

• Circuit configuration

• Circuit statistics monitoring

Extension-specific limitations• FOS REST API support for Fabric OS Extension products is limited to Brocade 7840 Extension switches and Brocade SX6

Extension blades.

• FOS REST API is not supported on Brocade 7800 switches or Brocade FX8-24 blades.

Restrictions on FOS REST API configuration attributes and statisticsNot all configuration attributes and statistics that are part of the Fabric OS CLI may be exposed through the FOS REST API interface.This is either because of limitations in the Fabric OS FOS REST API or because their values may be obvious due to the way datamodeling is done in YANG files.

Examples of this include:

• The ability to set values for attributes (such as setting a Gigabit Ethernet port as a LAN or WAN port) is not exposed through theFOS REST API interface.

• Changing the APP or VE modes is not supported through the FOS REST API interface.

• In the CLI version of the portshow fciptunnel command output, the “Flags” section identifies the features that are enabled onthe tunnel. In the FOS REST API output this is not displayed, as these attributes are modeled individually in each YANG file.

Using the Brocade FOS REST APIThe following items should be kept in mind when using the Brocade FOS REST API.

Before you beginBefore you can use the FOS REST API, you must obtain a user name and password authorized to access Fabric OS through theFOS REST API. To use the recommended HTTPS protocol, a valid security certificate must be installed on the switch and the HTTPSprotocol must be enabled on the switch before beginning REST operations. Refer to the Brocade Fabric OS Administration Guide forinstructions on both these actions.

Logging in and outTo log in to a device, you must provide a valid Fabric OS user name and password through an authorization header in a POSThttps://<device_ID>/rest/login request. The device_ID can be in the form of either an IPv4 or IPv6 address or a host:port ID. If

the authentication is successful, an authorization key is returned to the client in the response authorization header. SubsequentFOS REST API operations must include this authorization key in the request authorization header. The client applications use this tokento obtain further access to the server using the persistent connection.

Examples

Here are two forms of login statements.

POST https://10.10.10.10/rest/login

POST https://[10:10:10:eb:1a:b7:77:bc]:443/rest/login

Using the Brocade FOS REST API

Brocade Fabric OS REST API Reference, 8.2.0a16 53-1005246-03

Page 17: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

URI request

POST https://10.10.10.10/rest/login

Request body

There is no request body; however, you must provide a valid Fabric OS user name and password (such as, administrator / password)through an authorization header.

Request response

There is no request response. When the operation is successful, the response body contains an empty message body and a “200 OK”status in the header.

If authentication is successful, a session authorization key (for example, Authorization →Custom_BasicTk0ZmY2Zjg3NTY2ZDYwYjhmNj5NGQ0NTkzZjM0M2ZlMWM=) is returned to the client in the response headers. SubsequentFOS REST API operations must include this authorization key in the request authorization header. The client applications use this tokento obtain further access to the server using the persistent connection.

To log out from a device, close the session using a POST https://<device_ID>/rest/logout request. You must include the

session authorization key in the request authorization header. The device_ID can be in the form of either an IPv4 or IPv6 address or ahost:port ID.

Examples

Here are two forms of logout statements.

POST https://10.10.10.10/rest/logout

POST https://[10:10:10:eb:1a:b7:77:bc]:443/rest/logout

URI request

POST https://10.10.10.10/rest/logout

Request body

There is no request body; however, you must include the session authorization key in the request authorization header.

Request response

There is no request response. When the operation is successful, the response contains an empty message body and a “204 No Content”status in the header.

Supported user typesFOS REST API supports the following user types:

• Local command interface (CLI) user

• Web Tools user

REST session count limitThe default limit for FOS REST API sessions is 3 sessions, but the maximum number of sessions is configurable from 1 to 10. Beaware that significantly increasing the number of FOS REST API sessions or the number of requests within a session may negativelyaffect latency in a fabric. Refer to Fabric OS REST session configuration on page 24 for details on setting the session count limit.

Using the Brocade FOS REST API

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 17

Page 18: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

REST session count limitThe default limit for FOS REST API sessions is 3 sessions, but the maximum number of sessions is configurable from 1 to 10. Beaware that significantly increasing the number of FOS REST API sessions or the number of requests within a session may negativelyaffect latency in a fabric. Refer to Fabric OS REST session configuration on page 24 for details on setting the session count limit.

Character restrictionsThe following character restrictions apply when making FOS REST API requests:

• Key values containing the “forward slash” reserved character (/) in the URI must be percent-encoded per RFC 8040 andRFC 3986 as “%2f”.

• Key values containing a comma (,), which is used when there is more than one key, must be encoded as “%2c”.

Keyword supportThe FOS REST API supports standard YANG keywords such as if, when, and mandatory. Refer to the individual module .yang files tosee where these keywords are supported; they are not identified in this document.

Configuration upload and downloadFabric OS REST configurations can be saved and restored using the standard configuration upload and download commands as well asduring a high availability (HA) failover operation. If you downgrade a device to a version of Fabric OS earlier than 8.2.0, FOS REST API isnot supported and will not function, and any mgmtapp configuration commands are discarded.

HTTP headerHTTP header fields are components of the message header of a request and response in HTTP. They define the operating parametersand are name-value pairs that appear in both request and response messages.

The following table contains the supported HTTP methods for the media types.

TABLE 1 Supported HTTP methods and media types

Method Supported media types

DELETE application/yang-data+xml

GET application/yang-data+xml

HEAD application/yang-data+xml

OPTIONS All media types for this method.

POST application/yang-data+xml

PATCH application/yang-data+xml

For more information about supported media types, refer to Media types on page 19.

Request headersThe FOS REST API supports only the following request headers. All requests using a body must have the body in XML format.

• Accept

Using the Brocade FOS REST API

Brocade Fabric OS REST API Reference, 8.2.0a18 53-1005246-03

Page 19: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

• Authorization

• Cache-Control

• Content-Length

• Date

• Host

• User-Agent

NOTEAll FOS REST API requests that return data return that data in XML format.

Media typesIn REST, “Media type” is an application-specific format with a well-defined name represented in the form of an identifier used to identifythe form of the data contained within a resource representation.

Media types are specified in the Accept header for requests and in the Content-Type header for responses. Media types are resource-specific, this allows them to change independently and support formats that other resources do not. The XML media type is the onlymedia type supported by the FOS REST API.

HTTP status codes and messagesBoth success and error status conditions are reported to the client by way of the HTTP status line, which contains the HTTP status code.These application-specific messages are similar to CLI responses.

The following table lists and describes the HTTP status codes supported by the Fabric OS REST API.

TABLE 2 Supported HTTP status codes

Status Line value Description

100 Continue POST is accepted, 201 should follow

200 OK Success with response body

201 Created Request successfully created a resource

202 Accepted Request to create a resource accepted

204 No Content Success without a response body

400 Bad Request Invalid request message

403 Forbidden Access to resource denied

404 Not Found Resource target or resource node not found

405 Method Not Allowed Method not allowed for target resource

413 Request Entity Too Large The request entity is too large

414 Request URI Too Large The request URI is too large

415 Unsupported Media Not a supported media type

500 Internal Server Error Operation failed. In this case, the response body will contain the application’s specific error message

501 Not Implemented Unknown operation

502 Server Busy Server busy error

503 Service Unavailable Recoverable server error

Using the Brocade FOS REST API

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 19

Page 20: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Supported methodsThe FOS REST API supports the following methods:

• DELETE method on page 20

• GET method on page 20

• HEAD method on page 21

• OPTIONS method on page 21

• PATCH method on page 22

• POST method on page 23

DELETE methodThe DELETE method is used to delete a specified resource.

The latest update to the HTTP 1.1 specification (RFC 7231) explicitly permits an entity body in a DELETE request: A payload within aDELETE request message has no defined semantics; sending a payload body on a DELETE request might cause some existingimplementations to reject the request.

The following example shows a DELETE operation to remove an existing IP interface.

Request URI

DELETE https://10.10.10.10/rest/running/brocade-interface/extension-ip-interface

Request body

<extension-ip-interface> <name>4/5</name> <dp-id>0</dp-id> <ip-address>10.10.10.05</ip-address> <ip-prefix-length>24</ip-prefix-length></extension-ip-interface>

Request response

When the operation is successful, the response contains an empty message body and a “204 No Content” status in the header.

Notes

• An authorization header is required to perform a DELETE operation.

• A request payload is required when any zone members are deleted. A request payload is not required for other DELETEoperations.

GET methodThe GET method is used to retrieve the representation of the resource (for example, base configuration) including the metadatainformation.

The following example shows a GET operation to display information about the switch you are logged in to.

Request URI

GET https://10.10.10.10/rest/running/switch/fibrechannel-switch/

Request body

No request body is required.

Using the Brocade FOS REST API

Brocade Fabric OS REST API Reference, 8.2.0a20 53-1005246-03

Page 21: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Response body

When the operation is successful, the response has a message body similar to the following, and a “200 OK” status appears in theheaders.

<?xml version="1.0"?><Response> <fibrechannel-switch> <name>10:10:10:eb:1a:b7:77:bc</name> <domain-id>1</domain-id> <fcid>16776144</fcid> <user-friendly-name>Rack_B-7_6510</user-friendly-name> <enabled-state>2</enabled-state> <up-time>24473</up-time> <domain-name/> <principal>1</principal> <ip-address> <ip-address>10.10.10.32</ip-address> </ip-address> <model>109.1</model> <firmware-version>v8.2.0</firmware-version> <vf-id>128</vf-id> <fabric-user-friendly-name/> <ag-mode>1</ag-mode> </fibrechannel-switch></Response>

NOTEA request payload is not required for a GET operation.

HEAD methodThe HEAD method retrieves the specified resource’s metadata.

Request URI

HEAD https://10.10.10.10/rest/running/switch/fibrechannel-switch/

Request body

No request body is required.

Request response

On successful retrieval of the metadata, the response contains an empty message body and a “200 OK” status in the headers.

NOTEA request payload is not required for a HEAD operation.

OPTIONS methodThe OPTIONS method is used to retrieve the allowed methods on the resource identified by the given request. The response to thisoperation contains the headers and an empty response body. The “Allow” header in the response contains the allowed operations on theresource.

For an OPTIONS request, the leaf elements within a second-level container return all the supported methods for the whole container.For example, in the brocade-fibrechannel-diagnostics module, “fec” is a container that has three leafs: “enable”, “options” and “active”.Only the “enable” leaf is read-write; the other two leafs are read-only. Nonetheless, when an OPTIONS request is made that includes the“active” or “options” leafs, the request response body will list read-write methods (such as PATCH), even though read-write methods arenot valid for those leafs.

Using the Brocade FOS REST API

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 21

Page 22: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Request URI

OPTIONS https://10.10.10.10/rest/running/zoning/defined-configuration

Request body

No request body is required.

Response body

The response contains an empty message body and a “Allow:” line in the header. This lists the supported operations for the specifiedmodule.

HTTP/1.1 200 OKAllow: DELETE, GET, HEAD, POST, PATCH <= Allowed operationsCache-Control: no-cacheConnection: closeContent-Secure-Policy: default-src 'self'Content-Type: application/yang-data+xmlDate: Wed, 18 Oct 2017 20:53:32 GMTServer: ApacheTransfer-Encoding: chunkedX-Content-Type-Options: nosniffX-Frame-Options: DENYX-XSS-Protection: 1; mode=block

Notes

• A request payload is not required for an OPTIONS operation.

• The OPTIONS method is supported at the container and list levels but is not supported at the leaf level.

PATCH methodThe PATCH method is used to edit or update the leaf attributes of the resource (List or Container), if the system supports themodification. For example, modifying the leaf or list child resource of an access control list (ACL) “sequence” command is not possible,as it is not allowed by the system.

The PATCH method (RFC 8072) has features not possible with the “plain-patch” mechanism defined in RESTCONF (RFC 8040).

• It allows multiple sub-resources to be edited within the same PATCH method.

• It allows a more precise editing operation than the “plain-patch” mechanism.

• It uses an “edit” list with an explicit processing order. These edits are processed in the client-specified order, and errorprocessing can be precise even when multiple errors occur in the same PATCH request.

• A request payload is required for a PATCH method request, except when the configuration value can be supplied in the URI, asshown in the “request in body” example below.

• Because a PATCH operation overwrites the entire object, all desired content must be included in the request, including anycontent that was already in the leaf, list, or container.

The following example shows two methods to make a PATCH request to update the switch user-friendly-name to “My_switch”.

Request URI (for a request in the URI)

PATCH https://10.10.10.10/rest/running/switch/fibrechannel-switch/name/10:10:14:f5:7c:46:3d:40/user-friendly-name/My_switch

Request URI (for a request in the body)

PATCH https://10.10.10.10/rest/running/switch/fibrechannel-switch/name/10:10:14:f5:7c:46:3d:40/

Using the Brocade FOS REST API

Brocade Fabric OS REST API Reference, 8.2.0a22 53-1005246-03

Page 23: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Request message body (for a request in the body)

<fibrechannel-switch> <user-friendly-name>My_switch</user-friendly-name></fibrechannel-switch>

Request response

When the operation is successful, the response contains an empty message body and a “204 No Content” status in the header.

POST methodThe POST method allows you to create a new resource in the resource location identified by the URI specified in the request.

The following example shows a POST method request to create a new zone.

Request header

POST https://10.10.10.10/rest/running/zoning/defined-configuration

Request message body

<defined-configuration> <zone> <zone-name>newZone1</zone-name> <zone-type>0</zone-type> <member-entry> <entry-name>10:10:20:21:f8:f0:3a:10</entry-name> <entry-name>10:10:20:21:f8:f0:38:01</entry-name> </member-entry> </zone></defined-configuration>

Request response

When the operation is successful, the response contains an empty message body and a “201 Created” status in the header.

NOTEA request payload is required for a POST request, except in those cases where the configuration value is supplied in the URI.

FOS REST API and Brocade Virtual FabricsFOS REST API operations can occur across virtual fabrics.

When you log into a switch as described in Logging in and out on page 16, by default the session is logged into the logical switch thatbelongs to your “Home” virtual fabric. If you want to execute a FOS REST API request on other logical switches, you must include thevirtual fabric ID (vf_id) as part of the request query parameter.

FOS REST API and Brocade Virtual Fabrics

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 23

Page 24: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

This example uses a GET request to retrieve the switch information for a switch in the virtual fabric with an VFID of 10.

Structure

GET <base_URI>/running/fabric/fabric-switch?vf-id=<vf-id#>

Request URI

GET https://10.10.10.10/rest/running/fabric/fabric-switch?vf-id=10

Request body

No request body is required.

Response body

When the operation is successful, the response has a message body similar to the following, and a “200 OK” status appears in theheaders.

<?xml version="1.0"?><Response> <fibrechannel-switch> <name>10:10:10:40:1a:b7:47:bc</name> <domain-id>1</domain-id> <fcid>16776144</fcid> <user-friendly-name>Rack_B-9_6510</user-friendly-name> <enabled-state>2</enabled-state> <up-time>24473</up-time> <domain-name/> <principal>1</principal> <ip-address> <ip-address>10.10.10.02</ip-address> </ip-address> <model>109.1</model> <firmware-version>v8.2.0</firmware-version> <vf-id>10</vf-id> <== Virtual fabric ID <fabric-user-friendly-name/> <ag-mode>1</ag-mode> </fibrechannel-switch></Response>

Fabric OS REST session configurationThe apploginhistory and mgmtapp Fabric OS CLI commands allow you to manage REST session-related operations.

The mgmtapp command allows you to perform REST session-related operations, including enabling, disabling, and terminating theREST session, as well as configuring the maximum number of REST sessions for an entire switch or chassis and setting throttling values.On chassis-based systems, this command is only supported on the active CP.

Entering mgmtapp --show displays the number of active REST sessions and the REST throttling configuration values (sample requestcounts, sample time (in seconds), and idle time (in seconds). The following example shows the output of the command when all valuesare at their defaults.

switch:admin> mgmtapp --showREST Interface State: EnabledREST Session Count: 3REST Throttling Configurations: Sample Requests : 30 Sample Time (in sec) : 30 Idle Time (in sec) : 3

Fabric OS REST session configuration

Brocade Fabric OS REST API Reference, 8.2.0a24 53-1005246-03

Page 25: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

NOTEREST operations are not permitted if the REST interface is disabled in CLI, and are denied after changes to a user account withan existing REST session.

Enabling and disabling the Fabric OS REST interfaceThe Fabric OS REST interface is enabled by default.

To disable the Fabric OS REST interface, enter mgmtapp --disable REST.

To reenable the Fabric OS REST interface, enter mgmtapp --enable REST.

Fabric OS REST interface session value configurationWhen the Fabric OS REST interface is enabled, it uses the -maxrestsession count to determine how many concurrent REST sessionsare permitted to an entire switch or chassis. There can be from 1 to 10 REST sessions configured, the default is 3. An error message isreturned if you attempt to establish more REST sessions than the permitted number.

In addition to the number of concurrent REST sessions permitted, you can configure the sampling time and idle time in seconds and thesample request count. These options are set using the mgmtapp --config configuration_parameters command.

The configuration parameters are: -maxrestsession rest session count, -sampletime, sampling_time_in_seconds,-samplerequest sampling_request_count, and -idletime throttling_time_in_seconds. Not all parameters are required in the command,as the following example shows:

switch:admin> mgmtapp --config -maxrestsession 4 -sampletime 120 -idletime 60

The minimum sampling time is 30 seconds (this is also the default) and the maximum is 2147483647 seconds (596,523 hours,14 minutes, 7 seconds). The minimum sampling request count allowed is 30 and the maximum is 2147483647. The minimum idletime is 3 seconds (this is also the default) and the maximum is 2147483647 seconds (596,523 hours, 14 minutes, 7 seconds).

Fabric OS REST session identification and terminationTo identify the rest sessions on a platform, enter apploginhistory --show to display the number of sessions from the externalapplications that are currently active. This example shows a typical output. In this example, the lines have been broken for clarity and theREST session line has been rendered in bold.

switch:admin> apploginhistory --showThe following are the sessions from the external applications that are active currently:2017/09/11-16:47:10.151901, 10.10.10.125, admin, Network_Advisor\14.3.0, 77d3af04955bb28172a44ed4c52d483ae9fb7c591b3c3f48c3f0a27dafe205e7, 1282017/09/11-16:47:10.436586, 10.10.10.1, admin, Network_Advisor\14.3.0, 365916859cc7bca4cffa57bce88bb2259645a6583ded6a8c6ab6ff87e7ef5261, 1282017/09/11-16:48:20.456304, 10.10.10.79, admin, PostmanRuntime/6.3.2, a25fb215731ba5af9f5519a0d4fec0e154b2e1fd2bfcec25fc1c5af2f34d6b19, 128

To terminate a REST session, enter mgmtapp --terminate session_id. You must provide the session ID. This example terminates theREST session identified above.

switch:admin> mgmtapp --terminate a25fb215731ba5af9f5519a0d4fec0e154b2e1fd2bfcec25fc1c5af2f34d6b19Rest session terminated successfully.

Refer to the entry for these commands in the Brocade Fabric OS Command Reference for more information and examples.

Fabric OS REST session configuration

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 25

Page 26: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

YANG module overviewThe Fabric OS REST API uses YANG 1.1 (Yet Another Next Generation) as the basis for its data structure.

YANG 1.1 is defined in IETF RFC 7950. It is a data modeling language used to model configuration data, state data, remote procedurecalls, and notifications for network management protocols. The Fabric OS REST API YANG files are part of distribution (/dist/yang.tar.gz).

The following figure shows how individual node fields are typically displayed in a .yang tree file.

FIGURE 2 YANG module node fields

In the tree view of a YANG module, the indents indicate leafs. An asterisk (*) indicates container for a leaf list, and a question mark (?)indicates an optional item. “ro” indicates a read-only item (that is, the node contains operational data), and “rw” indicates read-write. The“+--” element provides a visual marker for following the tree structure. Refer to YANG module overview for YANG node field definitionsand possible values, and Supported data types on page 26 for data type descriptions.

YANG node field definitions and possible values are listed in the following table.

TABLE 3 YANG node field definitions and values

Field Definition Values

status Status of the node. + Current

x Deprecated

o Obsolete

flags Type of information. rw Read-write—The node contains configuration data

ro Read-only—The node contains operational data

-x RPC statement

-n Notification (not supported)

name The name of the node. (name)—Choice node

*(name)—Case node

prefix:name—Augmented from the specified external module

options The node name can be modified by one of these optional values. The following optional values can be used:

• ?—Optional leaf or presence container

• *—Leaf-list

• [keys]—Keys for a list

type The leaf or leaf-list type. If the specified type is other than one of thebasic types, then the type is defined in a typedef statement inthe .yang file.

N/A

Supported data typesThe following tables describe the YANG built-in data types and the additional data types supported in the FOS REST API.

YANG module overview

Brocade Fabric OS REST API Reference, 8.2.0a26 53-1005246-03

Page 27: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

YANG built-in data typesThe following data types are inherent to the YANG architecture. Refer to RFC 6991 or RFC 2578 for additional details.

binary Any binary data.bits A set of bits or flags.boolean Either the value “true” or the value “false”.counter32 A non-negative integer that monotonically increases until it reaches a maximum value of 2^32-1 (4294967296 in

decimal), at which point it wraps around and starts increasing again from zero. It has no preset initial value.counter64 A non-negative integer that monotonically increases until it reaches a maximum value of 2^64-1

(18446744073709551615 in decimal), at which point it wraps around and starts increasing again from zero. Ithas no preset initial value.

empty A leaf that does not have any value.enumeration One of an enumerated (explicitly listed) set of strings.int8 An 8-bit signed integer.int16 A 16-bit signed integer.int32 A 32-bit signed integer.int64 A 64-bit signed integer.leafref A reference to a leaf instance.mac-address An IEEE 802.xx media access control address (MAC) address. The canonical representation uses lowercase

characters.string A series of alphanumeric and punctuation characters including spaces treated as a single unit. A string may also

include special characters. For a formal definition refer to http://www.w3.org/TR/2000/WD-xml-2e-20000814and section 3.2.1 of http://www.w3.org/TR/xmlschema-2/.

timetick The time (measured in hundredths of a second) between two epochs. When a schema node is defined that uses thistype, the description of the schema node identifies both of the reference epochs.

uint8 An 8-bit signed unsigned integer.uint16 A 16-bit signed unsigned integer.uint32 A 32-bit signed unsigned integer.uint64 A 64-bit signed unsigned integer.union A data type that is composed of multiple data types.zero-based-counter32

A counter32 that has zero as its defined initial value.

zero-based-counter64

A counter64 that has zero as its defined initial value.

Additional FOS REST API data typesThe following table describes additional data types supported by the FOS REST API. For additional details on names that start with“fibrechannel:” refer to the fibrechannel-yang-types.yang file; for names that start with “ietf:” refer to the ietf-yang-types.yang file; and fornames that start with “inet:” refer to the ietf-inet-types.yang file. These files are located in the same folder as the module .yang files.

TABLE 4 Additional FOS REST API data types

Name Type Range/pattern/length Description

authentication-data union “preshared-key” or “pki-key-pair” The authentication data format. The value depends onthe profile used, either “preshared-key” or “pki-key-pair”.

YANG module overview

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 27

Page 28: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

TABLE 4 Additional FOS REST API data types (continued)

Name Type Range/pattern/length Description

brocade-hex-string-type string 0[xX][0-9a-fA-F] Brocade hexadecimal string format. This type defines ageneric case-insensitive hexadecimal string thatrequires a '0x' prefix (also case-insensitive).

domain-port-type string ([1-9]|[1-9][0-9]|1[0-9][0-9]|2[0123][0-9]),(([0-9])|([1-9][0-9])|([1-9][0-9][0-9])|([1-9][0-9][0-9][0-9])| ([1-5][0-9][0-9][0-9][0-9])|(6[0-4][0-9][0-9][0-9])|(65[0-4][0-9][0-9])| (655[0-2][0-9])|(6553[0-5]))

Domain/port zone members appear as “domain,port”.The value for domain is from 1 through 239 and thevalue for port is from 0 through 65535.

extension-ipsec-profile-name enumeration “preshared” or “pki” An Extension IPsec policy name. This is either“preshared” or “pki”.

fibrechannel:class-of-service-type

string ( |bit-[4-9]|bit-[1-2][0-9]|bit-3[0-1]|class-f|class-1|class-2|class-3)*

A string representation of the Class of Service bit-field(see FC-SW).

• Bit 0 = class-f

• Bit 1 = class-1

• Bit 2 = class-2

• Bit 3 = class-3

• Bit 4 = bit-4

• Bit 5 = bit-5

• Bit 6 = bit-6

• Bits 7 to 31 = bit-7 though bit-31 (reserved)

fibrechannel:domain-id-type uint32 1–239 A Fibre Channel switch domain identifier.

fibrechannel:fcid-typeDeprecated: Use 'fcid-hex-string-type' instead.

uint32 [0-9A-F]{12} A Fibre Channel ID (FCID) in decimal format. This is a3-byte (24-bit) field used to route frames through aFC network.

fibrechannel:fcid-hex-string-type

string 0[xX][0-9a-fA-F] A Fibre Channel ID (FCID) for an Nx_Port (FCID),hexadecimal format. The format allows for sixhexadecimal digits prefixed by '0x' or '0X'. Forexample: 0x010200

fibrechannel:fc4-type-type string (0[xX][0-9a-fA-F]{2}| |IPFC|FCP|FCP-Features|SATA-Tunnel|SBCCS|SBCCS-Channel|SBCCS-Control-Unit|FC-CT|FC-SW|FC-IFR|FC-NVMe|HIPPI-FP|MIL-STD-1553|ASM|FC-VI|Application-Services|Generic-FC-Features|RNID-Topology-Discovery)

The FC4 type.

• Unknown/Reserved <hexadecimal value> =(0xnn)

• IPFC = (0x05)

• FCP = (0x08)

• FCP-Features = (0x0A)

• SATA-Tunnel = (0x14)

• SBCCS = (0x18)

• SBCCS-Channel = (0x1B)

• SBCCS-Control-Unit =(0x1C)

• FC-CT = (0x20)

• FC-SW = (0x22)

• FC-IFR = (0x25)

• FC-NVMe = (0x28)

• HIPPI-FP = (0x40)

• MIL-STD-1553 = (0x48)

• ASM = (0x49)

• FC-VI = (0x58)

• Application-Services = (0x60)

• Generic-FC-Features = (0xDE)

YANG module overview

Brocade Fabric OS REST API Reference, 8.2.0a28 53-1005246-03

Page 29: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

TABLE 4 Additional FOS REST API data types (continued)

Name Type Range/pattern/length Description

• RNID-Topology-Discovery = (0xDF)

fibrechannel:fc4-features-type string FCP-Initiator|FCP-Target|FC-NVMe-Discovery-Service|FC-NVMe-Initiator|FC-NVMe-Target

The registered FC-4 features in relation to a givenFC-4 type.

fibrechannel:port-type-string-type

string 0[xX][0-9a-fA-F]{2}|n-port|nl-port|f/nl-port|nx-port|f-port|fl-port|e-port|b-port|a-port

Fibre Channel port type identifier.

• Unknown/Reserved <hexadecimal value> =(0xnn)

• n-port = (0x01)

• nl-port = (0x02)

• f/nl-port = (0x03)

• nx-port = (0x7F)

• f-port = (0x81)

• fl-port = (0x82)

• e-port = (0x84)

• b-port = (0x85)

• a-port = (0x86)

fibrechannel:slot-port-name-type

string ([1-9]|1[0-9])/([1][0-9][0-9][0-9]|[1-9][1-9][0-9]|[1-9][1-9]|[1-9])

The slot and port number (slot/port) of the interface.

fibrechannel:speed-type string ( |bit-[0-9]{1,2}|speed-1-gfc|speed-2-gfc|speed-10-gfc|speed-4-gfc|speed-8-gfc|speed-16-gfc|speed-32-gfc|speed-20-gfc|speed-40-gfc|speed-128-gfc|speed-64-gfc|speed-256-gfc|speed-not-established|speed-10-ge|speed-40-ge|speed-100-ge|speed-25-ge|speed-50-ge|speed-400-ge)*

Fibre Channel transmission speeds.

• bit-n = (Unknown/Reserved <bit position>)

• speed-1-gfc = (Mask Value (hex): 00000001)

• speed-2-gfc = (Mask Value (hex): 00000002)

• speed-10-gfc = (Mask Value (hex): 00000004)

• speed-4-gfc = (Mask Value (hex): 00000008)

• speed-8-gfc = (Mask Value (hex): 00000010)

• speed-16-gfc = (Mask Value (hex): 00000020)

• speed-32-gfc = (Mask Value (hex): 00000040)

• speed-20-gfc = (Mask Value (hex): 00000080)

• speed-40-gfc = (Mask Value (hex): 00000100)

• speed-128-gfc = (Mask Value (hex): 00000200)

• speed-64-gfc = (Mask Value (hex): 00000400)

• speed-256-gfc = (Mask Value (hex): 00000800)

• speed-not-established = (Mask Value (hex):0000 8000)

• speed-10-ge = (Mask Value (hex): 00010000)

• speed-40-ge = (Mask Value (hex): 00020000)

YANG module overview

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 29

Page 30: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

TABLE 4 Additional FOS REST API data types (continued)

Name Type Range/pattern/length Description

• speed-100-ge = (Mask Value (hex): 00040000)

• speed-25-ge = (Mask Value (hex): 00080000)

• speed-50-ge = (Mask Value (hex): 00100000)

• speed-400-ge = (Mask Value (hex): 00200000)

fibrechannel:time-generated-type

uint32 1–2147483646 The time since the start of an epoch in seconds. Anepoch is an instant in time chosen as the origin of aparticular measurement block.

fibrechannel:user-port-number-type

int32 -1..3400 A Fibre Channel port user port number.

fibrechannel:wwn-type string ([0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){7}) A Fibre Channel WWN. This is a 64-bit identifier, with a60-bit value preceded by a 4-bitNetwork_Address_Authority Identifier, used to identifyentities in Fibre Channel (e.g., Nx_Port, node, F_Port,or Fabric). Typically shown as 16 uppercasehexadecimal characters with a colon separating eachtuple.

ge-interface-type string (([1][0-2]|[0-9])/(1[0-7]|[0-9])) GE interface of an Extension blade or system in theform of the slot and port number of the port (slot/port).

gigabitethernet:speed-type uint64 1000000000 | 10000000000 |40000000000

The Gigabit Ethernet port bandwidth.

• 1000000000 = 1 Gbps

• 10000000000 = 10 Gbps

• 40000000000 = 40 Gbps

ietf:date-and-time string \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?'+ '(Z|[\+\-]\d{2}:\d{2})

A profile using the ISO 8601 standard for representingdates and times using the Gregorian calendar. Refer toRFC 6991.

ietf:dscp uint8 0–63 A differentiated services code point (DSCP) that can beused for marking packets in a traffic stream. In thevalue set and its semantics, this type is equivalent tothe dscp textual convention of the SMIv2. Refer toRFC 3289, RFC 2474, and RFC 2780.

ietf:ipv6-flow-label uint32 0–1048575 The flow identifier or flow label in an IPv6 packetheader that can be used to discriminate traffic flows. Inthe value set and its semantics, this type is equivalentto the IPv6FlowLabel textual convention of the SMIv2.Refer to RFC 3595 and RFC 2460.

inet:ipv4-address uint16 N/A An IP address the IPv4 format. Refer to RFC 791.

inet:ipv6-address uint16 N/A An IP address the IPv6 format. Refer to RFC 2460.

inet:ip-address union N/A An IP address that is IP version neutral, where theformat of the address indicates the IP version. Thistype supports scoped addresses by allowing zoneidentifiers in the address format. Refer to RFC 4007.

inet:domain-name string 1–253 characters A domain name service (DNS) domain name. Refer toRFC 1123.

ip-prefix-length union IPv4: 0–32

IPv6: 0–128

Length of the IP address prefix.

YANG module overview

Brocade Fabric OS REST API Reference, 8.2.0a30 53-1005246-03

Page 31: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

TABLE 4 Additional FOS REST API data types (continued)

Name Type Range/pattern/length Description

operational-type uint16 0–40 Tunnel/Circuit operational status.

• 0 = NULL

• 1 = Offline

• 2 = Online

• 3 = Online Warning

• 4 = Disabled

• 5 = Degraded

• 6 = Initializing

• 7 = Delete Pending

• 8 = HA Online

• 9 = HA Offline

• 10 = HA Ready

• 11 = Empty

• 12 = In Progress

• 13 = MisConfig

• 14 = Failover

• 15 = Down Pending

• 16 = Circuit Disabled/Fenced/Testing

• 17 = Internal Error

• 18 = IPSec Error

• 19 = Network Error

• 20 = Authentication Error

• 21 = Timeout

• 22 = TCP-Timeout

• 23 = Remote Close Timeout

• 24 = Remote Close

• 25 = Rejected

• 26 = No Port

• 27 = No Route

• 28 = DP Offline

• 29 = HCL Inprogress

• 30 = Internal Error

• 31 = Configuration Incomplete

• 32 = Circuit Fenced

• 33 = Child Delete Complete

• 34 = Delete Failure

• 35 = Spill Over

• 36 = Running

• 37 = Testing

• 38 = Aborted

• 39 = Passed

• 40 = Failed

pki-key-pair string 1–32 characters, matching the followingpattern:

Excludes “/”. The modifier is “invert-match”.

This is a certificate name.

For a “pki” profile, this specifies the local key pair nameto use for IKE authentication. This operand is requiredfor logging in using a PKI profile.

YANG module overview

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 31

Page 32: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

TABLE 4 Additional FOS REST API data types (continued)

Name Type Range/pattern/length Description

preshared-key string 16–64 characters, matching the followingpattern:

'[a-zA-Z0-9~@%_+:\[\]][a-zA-Z0-9~@%_+:\[\]\-]{15,63}';

For a “preshared” profile, this specifies the preshared-key to be used for authentication. This operand isrequired with shared-key authentication.

speed-type uint64 0 | 1000000000 |2000000000 |4000000000 | 8000000000 |100000000000 | 160000000000 |320000000000 | 400000000000

The nominal port bandwidth.

• 0 = Auto-negotiated speed

• 1000000000 = 1 Gbps

• 2000000000 = 2 Gbps

• 4000000000 = 4 Gbps

• 8000000000 = 8 Gbps

• 10000000000 = 10 Gbps

• 16000000000 = 16 Gbps

• 32000000000 = 32 Gbps

• 40000000000 = 40 Gbps

tunnel-load-level enumeration default | failover | spillover The load balancing method for the extension tunnel.

ve-interface-type string ((([1][0-2]|[1-9])/(1[6-9]|2[0-9]|3[0-5]))|((0)/(2[4-9]|3[0-9]|4[0-3])))

VE interface of an Extension blade or system in theform of the slot and port number of the port (slot/port).

yang:counter32 uint32 0–4294967296 A non-negative integer that monotonically increasesuntil it reaches a maximum value of 2^32-1(4294967296 in decimal), at which point it wrapsaround and starts increasing again from zero. It has nopreset initial value.

yang:counter64 uint64 0–18446744073709551615 A non-negative integer that monotonically increasesuntil it reaches a maximum value of 2^64-1(18446744073709551615 in decimal), at whichpoint it wraps around and starts increasing again fromzero. It has no preset initial value.

yang:mac-address string Six groups of two hexadecimal digits,separated by hyphens, matching thefollowing pattern:

([0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5})

An IEEE 802.xx media access control address (MAC)address. The canonical representation uses lowercasecharacters.

yang:timeticks uint32 0–4294967296 The time (measured in hundredths of a second)between two epochs. When a schema node is definedthat uses this type, the description of the schema nodeidentifies both of the reference epochs.

yang:zero-based-counter32 uint32 0–4294967296 A counter32 that has zero as its defined initial value.

yang:zero-based-counter64 uint64 0–18446744073709551615 See zero-based-counter64 above.

zoning-name-type string 1–64 characters, matching the followingpattern:

([0-9a-zA-Z_\-^$]{1,64})

A counter64 that has zero as its defined initial value.

zone-type-type uint8 0 | 1 | 2 The zone type.

• 0 = Default

• 1 = User peer zone

• 2 = target

YANG module overview

Brocade Fabric OS REST API Reference, 8.2.0a32 53-1005246-03

Page 33: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

FOS REST API YANG modulesThe FOS REST API supports fourteen Brocade-specific YANG modules.

In the “modules-state/module” list, the server implements the ietf-yang-library module, which identifies all the YANG modules used bythe server. For example requests and responses, refer to the Sample Use Cases on page 203 section of this publication or theRESTCONF RFC (RFC 8040).

The FOS REST API modules supported in Fabric OS 8.2.0 are described in the following tables. All support the OPTIONS method.

TABLE 5 FOS REST API modules for Brocade Fibre Channel features

Module name Description Supported methods

brocade-access-gateway on page 36 Allows you to retrieve a detailed view of configuration and runtimeinformation of the Access Gateway.

OPTIONS, GET,PATCH, DELETE,HEAD, POST

brocade-fabric on page 55 Allows you to retrieve a list of switches and directors in the fabric. GET, HEAD

brocade-fdmi on page 60 Allows you to retrieve Fabric Device Management Interface (FDMI)information for the specified switch.

GET, OPTIONS, HEAD

brocade-fibrechannel on page 75 Allows you to configure ports and retrieve port configurations. GET, HEAD, PATCH

brocade-fibrechannel-diagnostics on page 102 Allows you to perform port diagnostics on a switch or director andretrieve diagnostic port test results.

GET, HEAD, PATCH

brocade-fibrechannel-logical-switch on page 117 Allows you to retrieve information of all logical switches in aoperational chassis.

GET, POST, PATCH,DELETE, OPTIONS,HEAD

brocade-fibrechannel-switch on page 128 Allows you to retrieve configuration information for a switch or director. GET, HEAD, PATCH

brocade-name-server on page 134 Allows you to monitor the operation of one or more instances ofName Server functionality.

GET

brocade-zone on page 143 A data model for configuring zones and retrieving operational zoninginformation.

DELETE, GET, HEAD,POST, PATCH

TABLE 6 FOS REST API modules for Brocade Extension features

Module name Description Supported methods

brocade-extension-ip-interface on page 156 Allows you to manage the Brocade Extension IP interface. DELETE, GET, HEAD,POST, PATCH

brocade-extension-ip-route on page 160 Allows you to retrieve or configure IP route information. DELETE, GET, HEAD,POST, PATCH

brocade-extension-ipsec-policy on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on aswitch or director.

DELETE, GET, HEAD,POST, PATCH

brocade-extension-tunnel on page 168 Allows you to manage Brocade extension tunnels. DELETE, GET, HEAD,POST, PATCH

brocade-gigabitethernet on page 194 Allows you to retrieve or configure Gigabit Ethernet interfaces orGigabit Ethernet interface statistics for a switch or director.

GET, HEAD, PATCH

NOTEThis document does not address specific pattern or keyword requirements for individual leafs. Refer to the individual .yang filesfor explicit details on these aspects of the modules.

FOS REST API YANG modules

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 33

Page 34: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Brocade Fabric OS REST API Reference, 8.2.0a34 53-1005246-03

Page 35: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

FOS REST API modules for Fibre Channelfeatures

• brocade-access-gateway...............................................................................................................................................................................36• brocade-fabric.....................................................................................................................................................................................................55• brocade-fdmi.......................................................................................................................................................................................................60• brocade-fibrechannel.......................................................................................................................................................................................75• brocade-fibrechannel-diagnostics.......................................................................................................................................................... 102• brocade-fibrechannel-logical-switch......................................................................................................................................................117• brocade-fibrechannel-switch.....................................................................................................................................................................128• brocade-name-server...................................................................................................................................................................................134• brocade-zone................................................................................................................................................................................................... 143

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 35

Page 36: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

brocade-access-gatewayThis module provides a detailed view of configuration and runtime information of the Access Gateway (AG).

It assumes a knowledge of Access Gateway as performed in Fabric OS. For information on that topic, refer to the BrocadeFabric OS Access Gateway Administrator's Guide.

NOTEAccess Gateway mode cannot be enabled or disabled using the REST API. You must enable or disable it using theFabric OS CLI.

NOTEThe brocade-access-gateway module is supported in Fabric OS 8.2.0a and later.

Module treeThis is the tree view of the module from the brocade-ag.yang-tree.txt file. See YANG module overview on page 26 for YANGnode field definitions and possible values, and see Supported data types on page 26 for data type descriptions.

module: brocade-access-gateway +--rw brocade-access-gateway +--rw port-group* [port-group-id] | +--rw port-group-id uint8 | +--rw port-group-name? string | +--rw port-group-n-ports | | +--rw n-port* fibrechannel:slot-port-name-type | +--rw port-group-f-ports | | +--rw f-port* fibrechannel:slot-port-name-type | +--rw port-group-mode | +--rw load-balancing-mode-enabled? uint8 | +--rw multiple-fabric-name-monitoring-mode-enabled? uint8 +--rw n-port-map* [n-port] | +--rw n-port fibrechannel:slot-port-name-type | +--rw failover-enabled? uint8 | +--rw failback-enabled? uint8 | +--ro online-status? uint8 | +--ro reliable-status? int8 | +--ro n-port-info | | +--ro attached-fabric-name? fibrechannel:wwn-type | | +--ro attached-port-wwn? fibrechannel:wwn-type | | +--ro n-port-fcid? fibrechannel:fcid-hex-string-type | | +--ro attached-switch-user-friendly-name? string | | +--ro attached-switch-f-port? fibrechannel:slot-port-name-type | | +--ro attached-switch-ip-address? inet:ip-address | +--rw configured-f-port-list | | +--rw f-port* fibrechannel:slot-port-name-type | +--rw static-f-port-list | +--rw f-port* fibrechannel:slot-port-name-type +--ro f-port-list* [f-port] | +--ro f-port fibrechannel:slot-port-name-type | +--ro online-status? uint8 | +--ro f-port-info | +--ro n-port? fibrechannel:slot-port-name-type | +--ro login-exceeded? uint8 +--rw policy | +--rw port-group-policy-enabled? uint8 | +--rw auto-policy-enabled? uint8 +--rw n-port-settings +--rw reliability-counter? yang:zero-based-counter64

brocade-access-gateway

Brocade Fabric OS REST API Reference, 8.2.0a36 53-1005246-03

Page 37: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

URI formatThe URI format for this module takes the following form:

• <base_URI>/running/brocade-access-gateway/ followed by the leafs as listed in the module tree.

• <base_URI>/running/brocade-access-gateway/n-port-map to configure N_Port mapping.

• <base_URI>/running/brocade-access-gateway/port-group to configure port groups.

• <base_URI>/running/brocade-access-gateway/f-port-list to view F_Port information.

• <base_URI>/running/brocade-access-gateway/policy to enable port grouping.

• <base_URI>/running/brocade-access-gateway/n-port-settings to configure the reliability counter.

• <base_URI>/running/brocade-interface/fibrechannel/name/fibre-channel-interface-name/n-port-enabled to configure a port to operate as an N_Port.

• <base_URI>/running/switch/fibrechannel-switch/name/fibre-channel-interface-name/ag-mode to

determine if the switch is in Access Gateway mode.

Parametersbrocade-access-gateway

Description: Configuration and runtime information of the Access Gateway.Flag: read-writeThis container has the following leafs:

port-groupDescription: The port group configuration. The port group defines a set of N_Ports to be included in the PortGroup Policy. The factory default port group is "0", which includes all N_Ports. The default port group cannotbe removed or renamed. Only available when the port group policy is enabled (port-group-policy-enabled =1).Flag: read-writeKey: port-group-idThis list has the following leafs:

port-group-idDescription: The port group ID. The maximum number of port-groups that can be created is equalto the total number of ports available on the given platform. For instance, on a 64-port platform,there can be 64 port-groups with the port-group ID ranging from 0 to 63.Flag: read-writeType: uint8Value: 0 to the maximum number of ports available on the given platform.Optional: Yes

port-group-nameDescription: The port group name.Flag: read-writeType: stringValue: 1 to 64 alphanumeric characters. The name must be alphanumeric. The default port groupname uses the format "pg<port-group-id>".Optional: Yes

brocade-access-gateway

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 37

Page 38: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

port-group-n-portsDescription: List of N_Ports that are in the port group.Flag: read-writeThis container has the following leaf:

n-portDescription: List of N_Ports that are in the port group. The port group must contain at leastone N_Port.Flag: read-writeType: fibrechannel:slot-port-name-typeValue: The slot and port number of the specified port in the format “slot/port”.Optional: Yes

port-group-f-portsDescription: List of F_Ports that are in the port group. Only available when load balancing mode isenabled (load-balancing-mode-enabled = 1) for the port group.Flag: read-writeThis container has the following leaf:

f-portDescription: List of F_Ports that are in the port group. To update the configuration, youmust enable load balancing mode for the port group.Flag: read-writeType: fibrechannel:slot-port-name-typeValue: The slot and port number of the specified port in the format “slot/port”.Optional: Yes

port-group-modeDescription: The mode configured for the port group.Flag: read-writeThis container has the following leafs:

load-balancing-mode-enabledDescription: Enable or disable load balancing mode for the specified port group.Flag: read-writeType: uint8Values: 0 = Load balancing mode disabled. 1 = Load balancing mode enabled. Default: 0Optional: Yes

multiple-fabric-name-monitoring-mode-enabledDescription: Enable or disable multiple fabric name monitor mode for the specified portgroup.Flag: read-writeType: uint8Values: 0 = Multiple fabric name monitor mode disabled. 1 = Multiple fabric name monitormode enabled. Default: 0.Optional: Yes

n-port-mapDescription: Defines the N_Port to F_Port mappings.Flag: read-writeKey: n-portThis container has the following leafs:

brocade-access-gateway

Brocade Fabric OS REST API Reference, 8.2.0a38 53-1005246-03

Page 39: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

n-portDescription: Enable mapping F_Ports to an N_Port.Flag: read-writeType: fibrechannel:slot-port-name-typeValue: The slot and port number of the specified port in the format “slot/port”.Optional: Yes

failover-enabledDescription: Enable or disable failover for an N_Port.Flag: read-writeType: uint8Values: 0 = Failover disabled. 1 = Failover enabled. Default: 1.Optional: Yes

failback-enabledDescription: Enable or disable failback for an N_Port.Flag: read-writeType: uint8Value: 0 = Failback disabled. 1 = Failback enabled. Default: 1.Optional: Yes

online-statusDescription: Whether the N_Port is online or offline.Flag: read-onlyType: uint8Config: falseValues: 0 = Offline. 1 = Online.Optional: Yes

reliable-statusDescription: The reliable status of the port. Only available when the reliablilty counter is disabled(reliability-counter = 0).Flag: read-onlyType: uint8Config: falseValues: 0 = Unreliable. 1 = Reliable. -1 = Not applicable.Optional: Yes

n-port-infoDescription: The N_Port login information and the attached switch details. Only available when the port isonline (online-status = 1).Config: falseThis container has the following leafs:

attached-fabric-nameDescription: The WWN of the fabric attached to the N_Port.Flag: read-onlyType: fibrechannel:wwn-typeValue: A valid WWN name.Optional: Yes

attached-port-wwnDescription: The WWN of the port attached to the N_Port.

brocade-access-gateway

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 39

Page 40: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Flag: read-onlyType: fibrechannel:wwn-typeValue: A valid WWN name.Optional: Yes

n-port-fcidDescription: The FCID of the N_Port.Flag: read-onlyType: fibrechannel:fcid-typeValue: A valid destination FCID value.Optional: Yes

attached-switch-user-friendly-nameDescription: The ASCII name assigned to the switch by the administrator.Flag: read-onlyType: stringValue: 1 to 30 alphanumeric characters plus hyphens, periods, and underscore characters. Spacesare not allowed. A switch name can begin with a letter or number, but a switch name that begins witha numeric character (0-9) must also have at least an underscore (_), hyphen (-), period (.), oralphabetic character (A-Z, a-z). A switch name with only numeric characters is not valid.Optional: Yes

attached-switch-f-portDescription: Fabric switch port number of the port attached to the N_Port.Flag: read-onlyType: fibrechannel:slot-port-name-typeValue: The slot and port number of the specified port in the format “slot/port”.Optional: Yes

attached-switch-ip-addressDescription: The attached switch out-of-band IP address.Flag: read-onlyType: inet:ip-addressValue: A valid IPv4 or IPv6 address.Optional: Yes

configured-f-port-listDescription: The F_Port to N_Port mappings.Flag: read-writeThis container has the following leaf:

f-portDescription: List of F_Ports that are mapped to the N_Port. There must be at least one F_Portmapped to an N_Port. Once you enable Access Gateway mode in the switch, F_Ports are mappedto the default N_Port. You must clear the existing mapping before you map an F_Port to anotherN_Port. Note that configured and static port mapping cannot overlap.Flag: read-writeType: fibrechannel:slot-port-name-typeValue: The slot and port number of the specified port in the format “slot/port”.Optional: Yes

static-f-port-listDescription: The static F_Port to N_Port mappings.

brocade-access-gateway

Brocade Fabric OS REST API Reference, 8.2.0a40 53-1005246-03

Page 41: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Flag: read-writeThis container has the following leaf:

f-portDescription: List of F_Ports that are statically mapped to the N_Port. There must be at least oneF_Port statically mapped to an N_Port. Note that configured and static port mapping cannot overlap.Flag: read-writeType: fibrechannel:slot-port-name-typeValue: The slot and port number of the specified port in the format “slot/port”.Optional: Yes

f-port-listDescription: List of all F_Ports present on the Access Gateway.Flag: read-onlyKey: f-portConfig: falseThis container has the following leafs:

f-portDescription: The F-Port for which information is being fetched.Flag: read-onlyType: fibrechannel:slot-port-name-typeValue: The slot and port number of the specified port in the format “slot/port”.Optional: Yes

online-statusDescription: Whether the F_Port is online or offline.Flag: read-onlyType: uint8Config: falseValues: 0 = Offline. 1 = Online.Optional: Yes

f-port-infoDescription: The F_Port login information and the attached switch details. Only available when the port isonline (online-status = 1).Flag: read-onlyConfig: falseThis container has the following leafs:

n-portDescription: The N_Port to which this F_Port is mapped.Flag: read-onlyType: fibrechannel:slot-port-name-typeValue: The slot and port number of the specified port in the format “slot/port”.Optional: Yes

login-exceededDescription: The login exceeded state of the F_Port.Flag: read-onlyType: uint8Values: 0 = Login limit not exceeded. 1 = Login limit exceeded.Optional: Yes

brocade-access-gateway

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 41

Page 42: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

policyDescription: The Access Gateway policy configuration. In order to enable or disable any of the AG policies,the switch must in a disabled state.Flag: read-writeThis container has the following leafs:

port-group-policy-enabledDescription: Enable or disable the port group policy. Note that the auto policy must be disabled(auto-policy-enabled = 0). To modify the policy the configuration, the switch must be in a disabledstate.Flag: read-writeType: uint8Values: 0 = Disabled. 1 = Enabled. Default = 1.Optional: Yes

auto-policy-enabledDescription: Enable or disable the auto policy. Note that the port group policy must be disabled(port-group-policy-enabled = 0). To modify the policy the configuration, the switch must be in adisabled state.Flag: read-writeType: uint8Values: 0 = Disabled. 1 = Enabled. Default = 0.Optional: Yes

n-port-settingsDescription: The N_Port related configuration parameters. Note that the port group policy must be enabled(port-group-policy-enabled = 1).Flag: read-writeThis container has the following leaf:

reliability-counterDescription: The reliability counter configuration for N_Ports.Flag: read-writeType: yang:zero-based-counter64Values: 0 = Disabled. 10- 100 Enabled. Default = 25.Optional: Yes

Supported methodsOnly the OPTIONS, GET, PATCH, DELETE, HEAD, and POST operations are supported in this module.

Examples

Viewing the Access Gateway mode

NOTEAccess Gateway mode cannot be enabled or disabled using the REST API. You must enable or disable it using theFabric OS CLI.

The following example uses the GET request to determine the Access Gateway mode of the switch.

brocade-access-gateway

Brocade Fabric OS REST API Reference, 8.2.0a42 53-1005246-03

Page 43: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

StructureGET <base_URI>/running/switch/fibrechannel-switch/name/fibre-channel-interface-name/ag-mode

URIGET https://10.10.10.10/rest/running/switch/fibrechannel-switch/name/10:10:10:eb:1a:b7:77:bc/ag-mode

Request BodyNo request body is required.

Response Body<?xml version="1.0"?><Response> <fibrechannel-switch> <name>10:10:10:eb:1a:b7:77:bc</name> <ag-mode>3</ag-mode> </fibrechannel-switch></Response>

Viewing all port groups on the Access GatewayThe following example uses the GET request to retrieve the details for all port groups on the Access Gateway (AG).

StructureGET <base_URI>/running/brocade-access-gateway/port-group

URIGET https://10.10.10.10/rest/running/brocade-access-gateway/port-group

Request BodyNo request body is required.

brocade-access-gateway

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 43

Page 44: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Response Body<?xml version="1.0"?><Response> <port-group> <port-group-id>0</port-group-id> <port-group-name>pg0</port-group-name> <port-group-n-ports> <n-port>0/16</n-port> <n-port>0/17</n-port> <n-port>0/18</n-port> <n-port>0/19</n-port> <n-port>0/20</n-port> <n-port>0/21</n-port> <n-port>0/22</n-port> <n-port>0/23</n-port> </port-group-n-ports> <port-group-f-ports> <f-port>0/0</f-port> <f-port>0/1</f-port> <f-port>0/2</f-port> <f-port>0/3</f-port> <f-port>0/4</f-port> <f-port>0/5</f-port> <f-port>0/6</f-port> <f-port>0/7</f-port> <f-port>0/8</f-port> <f-port>0/9</f-port> <f-port>0/10</f-port> <f-port>0/11</f-port> <f-port>0/12</f-port> <f-port>0/13</f-port> <f-port>0/14</f-port> <f-port>0/15</f-port> </port-group-f-ports> <port-group-mode> <load-balancing-mode-enabled>0</load-balancing-mode-enabled> <multiple-fabric-name-monitoring-mode-enabled>0</multiple-fabric-name-monitoring-mode-enabled> </port-group-mode> </port-group></Response>

Viewing port informationThe following example uses the GET request to retrieve the port information for N_Ports and F_Ports in the Access Gateway.

StructureGET <base_URI>/running/brocade-access-gateway/n-port-map

URIGET https://10.10.10.10/rest/running/brocade-access-gateway/n-port-map

Request BodyNo request body is required.

brocade-access-gateway

Brocade Fabric OS REST API Reference, 8.2.0a44 53-1005246-03

Page 45: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Response Body<Response> <n-port-map> <n-port>0/16</n-port> <failover-enabled>1</failover-enabled> <failback-enabled>1</failback-enabled> <online-status>1</online-status> <reliable-status>1</reliable-status> <n-port-info> <attached-fabric-name>10:10:10:05:1e:ab:47:00</attached-fabric-name> <attached-port-wwn>2f:03:c4:f5:7c:c4:da:25</attached-port-wwn> <n-port-fcid>0xec1300</n-port-fcid> <attached-switch-user-friendly-name>G610_066_236</attached-switch-user-friendly-name> <attached-switch-f-port>0/19</attached-switch-f-port> <attached-switch-ip-address>10.10.10.10</attached-switch-ip-address> </n-port-info> <configured-f-port-list/> <static-f-port-list/> </n-port-map> <n-port-map> <n-port>0/17</n-port> <failover-enabled>1</failover-enabled> <failback-enabled>1</failback-enabled> <online-status>1</online-status> <reliable-status>1</reliable-status> <n-port-info> <attached-fabric-name>10:10:10:05:1e:ab:47:00</attached-fabric-name> <attached-port-wwn>2f:03:c4:f5:7c:c4:da:25</attached-port-wwn> <n-port-fcid>0xec1300</n-port-fcid> <attached-switch-user-friendly-name>G610_066_236</attached-switch-user-friendly-name> <attached-switch-f-port>0/19</attached-switch-f-port> <attached-switch-ip-address>10.10.10.10</attached-switch-ip-address> </n-port-info> <configured-f-port-list/> <static-f-port-list/> </n-port-map> <n-port-map> <n-port>0/18</n-port> <failover-enabled>1</failover-enabled> <failback-enabled>1</failback-enabled> <online-status>1</online-status> <reliable-status>1</reliable-status> <n-port-info> <attached-fabric-name>10:10:10:05:1e:ab:47:00</attached-fabric-name> <attached-port-wwn>2f:03:c4:f5:7c:c4:da:25</attached-port-wwn> <n-port-fcid>0xec1300</n-port-fcid> <attached-switch-user-friendly-name>G610_066_236</attached-switch-user-friendly-name> <attached-switch-f-port>0/19</attached-switch-f-port> <attached-switch-ip-address>10.10.10.10</attached-switch-ip-address> </n-port-info> <configured-f-port-list> <f-port>0/0</f-port> <f-port>0/2</f-port> <f-port>0/3</f-port> </configured-f-port-list> <static-f-port-list/> </n-port-map></Response>

Creating a new port groupThe following example uses the POST request to create a new port group "pg1" with two N_Ports.

StructurePOST <base_URI>/running/brocade-access-gateway/port-group/port-group-id/port-group-id

brocade-access-gateway

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 45

Page 46: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

URIPOST https://10.10.10.10/rest/running/brocade-access-gateway/port-group/port-group-id/1

Request Body<port-group-n-ports> <n-port>0/40</n-port> <n-port>0/41</n-port></port-group-n-ports>

Response BodyWhen the operation is successful, the response contains an empty message body and a “201 Created” status appears in theheader.

Adding an N_Port to a port groupThe following example uses the POST request to add a new N_Port "0/42" to an existing port group "pg1".

StructurePOST <base_URI>/running/brocade-access-gateway/port-group/port-group-id/port-group-id

URIPOST https://10.10.10.10/rest/running/brocade-access-gateway/port-group/port-group-id/1

Request Body<port-group-n-ports> <n-port>0/42</n-port></port-group-n-ports>

Response BodyWhen the operation is successful, the response contains an empty message body and a “201 Created” status appears in theheader.

Adding an F_Port to a port groupThe following example uses the POST request to add two new F_Ports to an existing port group "pg1".

StructurePOST <base_URI>/running/brocade-access-gateway/port-group/port-group-id/port-group-id

URIPOST https://10.10.10.10/rest/running/brocade-access-gateway/port-group/port-group-id/1

brocade-access-gateway

Brocade Fabric OS REST API Reference, 8.2.0a46 53-1005246-03

Page 47: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Request Body<port-group-f-ports> <f-port>0/5</f-port> <f-port>0/6</f-port></port-group-f-ports>

Response BodyWhen the operation is successful, the response contains an empty message body and a “201 Created” status appears in theheader.

Enabling load balancing mode on a port groupThe following example uses the PATCH request to enable load balancing mode on port group "pg1".

StructurePATCH <base_URI>/running/brocade-access-gateway/port-group/port-group-id/port-group-id/port-group-mode/

URIPATCH https://10.10.10.10/rest/running/brocade-access-gateway/port-group/port-group-id/1/port-group-mode/

Request Body<port-group-mode> <load-balancing-mode-enabled>1</load-balancing-mode-enabled></port-group-mode>

Response BodyWhen the operation is successful, the response contains an empty message body and a “201 Created” status appears in theheader.

Enabling multiple fabric name monitor mode on a port groupThe following example uses the PATCH request to enable multiple fabric name monitor mode on port group "pg1".

StructurePATCH <base_URI>/running/brocade-access-gateway/port-group/port-group-id/port-group-id/port-group-mode/

URIPATCH https://10.10.10.10/rest/running/brocade-access-gateway/port-group/port-group-id/1/port-group-mode/

brocade-access-gateway

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 47

Page 48: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Request Body<port-group-mode> <multiple-fabric-name-monitoring-mode-enabled>1</multiple-fabric-name-monitoring-mode-enabled></port-group-mode>

Response BodyWhen the operation is successful, the response contains an empty message body and a “201 Created” status appears in theheader.

Deleting ports from a port groupThe following example uses the DELETE request to delete F_Port "0/5" and N_Port "0/42" from port group "pg1".

StructureDELETE <base_URI>/running/brocade-access-gateway/port-group/port-group-id/port-group-id

URIDELETE https://10.10.10.10/rest/running/brocade-access-gateway/port-group/port-group-id/1

Request Body<port-group-f-ports> <f-port>0/5</f-port></port-group-f-ports>

<port-group-n-ports> <n-port>0/42</n-port></port-group-n-ports>

Response BodyWhen the operation is successful, the response contains an empty message body and a “204 No Content" status appears inthe header.

Deleting a port groupThe following example uses the DELETE request to delete port group "pg1".

StructureDELETE <base_URI>/running/brocade-access-gateway/port-group/port-group-id/port-group-id

URIDELETE https://10.10.10.10/rest/running/brocade-access-gateway/port-group/port-group-id/1

brocade-access-gateway

Brocade Fabric OS REST API Reference, 8.2.0a48 53-1005246-03

Page 49: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Request BodyNo request body is required.

Response BodyWhen the operation is successful, the response contains an empty message body and a “204 No Content" status appears inthe header.

Mapping an F_Port to an N_PortThe following example uses the PATCH request to map F_Ports "0/5" and "0/6" to N_Port "0/42".

NOTEThe port group policy must be enabled (port-group-policy-enabled = 1) to map F_Ports to an N_Port.

StructurePATCH <base_URI>/running/brocade-access-gateway/n-port-map

URIPATCH https://10.10.10.10/rest/running/brocade-access-gateway/n-port-map

Request Body<n-port-map> <n-port>0/42</n-port> <configured-f-port-list> <f-port>0/5</f-port> <f-port>0/6</f-port> </configured-f-port-list></n-port-map>

Response BodyWhen the operation is successful, the response contains an empty message body and a “204 No Content" status appears inthe header.

Deleting an F_Port from an N_Port mappingThe following example uses the DELETE request to remove the F_Port "0/6" to N_Port "0/42" mapping.

StructureDELETE <base_URI>/running/brocade-access-gateway/n-port-map

URIDELETE https://10.10.10.10/rest/running/brocade-access-gateway/n-port-map

brocade-access-gateway

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 49

Page 50: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Request Body<n-port-map> <n-port>0/42</n-port> <configured-f-port-list> <f-port>0/6</f-port> </configured-f-port-list></n-port-map>

Response BodyWhen the operation is successful, the response contains an empty message body and a “204 No Content" status appears in the header.

Viewing end device informationThe following example uses the GET request to retrieve the N_port login information and the attached switch details.

StructureGET <base_URI>/running/brocade-access-gateway/n-port-map

URIGET https://10.10.10.10/rest/running/brocade-access-gateway/n-port-map

Request BodyNo request body is required.

brocade-access-gateway

Brocade Fabric OS REST API Reference, 8.2.0a50 53-1005246-03

Page 51: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Response Body<Response> <n-port-map> <n-port>0/17</n-port> <failover-enabled>1</failover-enabled> <failback-enabled>1</failback-enabled> <online-status>1</online-status> <reliable-status>1</reliable-status> <n-port-info> <attached-fabric-name>10:10:10:05:1e:ab:47:00</attached-fabric-name> <attached-port-wwn>2f:03:c4:f5:7c:c4:da:25</attached-port-wwn> <n-port-fcid>0xec1300</n-port-fcid> <attached-switch-user-friendly-name>G610_066_236</attached-switch-user-friendly-name> <attached-switch-f-port>0/19</attached-switch-f-port> <attached-switch-ip-address>10.10.10.10</attached-switch-ip-address> </n-port-info> <configured-f-port-list/> <static-f-port-list/> </n-port-map> <n-port-map> <n-port>0/18</n-port> <failover-enabled>1</failover-enabled> <failback-enabled>1</failback-enabled> <online-status>1</online-status> <reliable-status>1</reliable-status> <n-port-info> <attached-fabric-name>10:10:10:05:1e:ab:47:00</attached-fabric-name> <attached-port-wwn>2f:03:c4:f5:7c:c4:da:25</attached-port-wwn> <n-port-fcid>0xec1300</n-port-fcid> <attached-switch-user-friendly-name>G610_066_236</attached-switch-user-friendly-name> <attached-switch-f-port>0/19</attached-switch-f-port> <attached-switch-ip-address>10.10.10.10</attached-switch-ip-address> </n-port-info> <configured-f-port-list> <f-port>0/0</f-port> <f-port>0/2</f-port> <f-port>0/3</f-port> </configured-f-port-list> <static-f-port-list/> </n-port-map> <n-port-map> <n-port>0/19</n-port> <failover-enabled>1</failover-enabled> <failback-enabled>1</failback-enabled> <online-status>1</online-status> <reliable-status>1</reliable-status> <n-port-info> <attached-fabric-name>10:10:10:05:1e:ab:47:00</attached-fabric-name> <attached-port-wwn>2f:03:c4:f5:7c:c4:da:25</attached-port-wwn> <n-port-fcid>0xec1300</n-port-fcid> <attached-switch-user-friendly-name>G610_066_236</attached-switch-user-friendly-name> <attached-switch-f-port>0/19</attached-switch-f-port> <attached-switch-ip-address>10.10.10.10</attached-switch-ip-address> </n-port-info> <configured-f-port-list> <f-port>0/4</f-port> <f-port>0/5</f-port> <f-port>0/6</f-port> <f-port>0/7</f-port> </configured-f-port-list> <static-f-port-list/> </n-port-map> <n-port-map> <n-port>0/20</n-port> <failover-enabled>1</failover-enabled> <failback-enabled>1</failback-enabled> <online-status>1</online-status> <reliable-status>1</reliable-status> <n-port-info> <attached-fabric-name>10:10:10:05:1e:ab:47:00</attached-fabric-name>

brocade-access-gateway

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 51

Page 52: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

<attached-port-wwn>20:1b:c4:f5:7c:c0:fd:5d</attached-port-wwn> <n-port-fcid>0xeb1b00</n-port-fcid> <attached-switch-user-friendly-name>G620_066_235</attached-switch-user-friendly-name> <attached-switch-f-port>0/27</attached-switch-f-port> <attached-switch-ip-address>10.10.10.10</attached-switch-ip-address> </n-port-info> <configured-f-port-list/> <static-f-port-list/> </n-port-map> <n-port-map> <n-port>0/21</n-port> <failover-enabled>1</failover-enabled> <failback-enabled>1</failback-enabled> <online-status>1</online-status> <reliable-status>1</reliable-status> <n-port-info> <attached-fabric-name>10:10:10:05:1e:ab:47:00</attached-fabric-name> <attached-port-wwn>20:19:c4:f5:7c:00:c5:30</attached-port-wwn> <n-port-fcid>0xe81900</n-port-fcid> <attached-switch-user-friendly-name>G630_066_232</attached-switch-user-friendly-name> <attached-switch-f-port>0/25</attached-switch-f-port> <attached-switch-ip-address>10.10.10.10</attached-switch-ip-address> </n-port-info> <configured-f-port-list> <f-port>0/9</f-port> <f-port>0/10</f-port> <f-port>0/11</f-port> <f-port>0/12</f-port> <f-port>0/13</f-port> <f-port>0/14</f-port> <f-port>0/15</f-port> </configured-f-port-list> <static-f-port-list/> </n-port-map><Response>

Configuring an N_PortThe following example uses the PATCH request to configure port "0/45" to operate as an N_Port.

StructurePATCH <base_URI>/running/brocade-interface/fibrechannel/name/fibre-channel-interface-name/n-port-enabled/1

URIPATCH https://10.10.10.10/rest/running/brocade-interface/fibrechannel/name/0%2f45/n-port-enabled/1

Request BodyNo request body is required.

Response BodyWhen the operation is successful, the response contains an empty message body and a “204 No Content" status appears inthe header.

brocade-access-gateway

Brocade Fabric OS REST API Reference, 8.2.0a52 53-1005246-03

Page 53: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Configuring the reliability counter for N_PortsThe following example uses the PATCH request to configure the reliability counter to 30.

NOTEThe port group policy must be enabled (port-group-policy-enabled = 1) to configure the reliability counter.

StructurePATCH <base_URI>/running/brocade-access-gateway/n-port-settings/reliability-counter/reliability-counter-value

URIPATCH https://10.10.10.10/rest/running/brocade-access-gateway/n-port-settings/reliability-counter/30

Request BodyNo request body is required.

Response BodyWhen the operation is successful, the response contains an empty message body and a “204 No Content" status appears inthe header.

Enabling failover for an N_PortThe following example uses the PATCH request to enable failover for N_Port "0/40".

StructurePATCH <base_URI>/running/brocade-access-gateway/n-port-map

URIPATCH https://10.10.10.10/rest/running/brocade-access-gateway/n-port-map

Request Body<n-port-map> <n-port>0/40</n-port> <failover-enabled>1</failover-enabled></n-port-map>

Response BodyWhen the operation is successful, the response contains an empty message body and a “204 No Content" status appears inthe header.

brocade-access-gateway

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 53

Page 54: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Enabling failback for an N_PortThe following example uses the PATCH request to enable failback for N_Port "0/42".

StructurePATCH <base_URI>/running/brocade-access-gateway/n-port-map

URIPATCH https://10.10.10.10/rest/running/brocade-access-gateway/n-port-map

Request Body<n-port-map> <n-port>0/42</n-port> <failback-enabled>1</failback-enabled></n-port-map>

Response BodyWhen the operation is successful, the response contains an empty message body and a “204 No Content" status appears inthe header.

HistoryRelease version History

Fabric OS 8.2.0a This API call was introduced.

brocade-access-gateway

Brocade Fabric OS REST API Reference, 8.2.0a54 53-1005246-03

Page 55: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

brocade-fabricThis module is used to retrieve information on the switches in a fabric. If virtual fabrics are enabled, the request can include aquery parameter (vf-id) for the desired virtual fabric. If no query parameter is specified and virtual fabrics are enabled, then thedefault virtual fabric name is returned.

Module treeThis is the tree view of the module from the brocade-fabric.yang-tree.txt file. Refer to YANG module overview on page 26 forYANG node field definitions and possible values, and Supported data types on page 26 for data type descriptions.

module: brocade-fabric +--ro fabric +--ro fabric-switch* [name] +--ro name fibrechannel:wwn-type +--ro switch-user-friendly-name? string +--ro chassis-wwn? fibrechannel:wwn-type +--ro chassis-user-friendly-name? string +--ro domain-id? fibrechannel:domain-id-type +--ro principal? uint8 +--ro fcid? fibrechannel:fcid-type +--ro ip-address? inet:ipv4-address +--ro fcip-address? inet:ipv4-address +--ro ipv6-address? inet:ipv6-address +--ro firmware-version? string

URI formatThe URI format for this module takes one of the following forms:

• <base_URI>running/fabric/fabric-switch/ followed by the leafs as listed in the module tree to retrieve information

on all the switches in a fabric.

• <base_URI>running/fabric/fabric-switch/name/name followed by the leafs as listed in the module tree to retrieve

information on a specific switch.

Parametersfabric

Description: Fabric state parameters. Requests are made using queries specifying the vf-id of the specific fabric.Flag: read-onlyOptional: NoThis container has the following leafs:

fabric-switchDescription: The list of configured switches in the fabric.Flag: read-onlyOptional: NoKey: nameThis container has the following leafs:

nameDescription: The Fibre Channel WWN of the switch.Flag: read-only

brocade-fabric

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 55

Page 56: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Type: fibrechannel:wwn-typeConfig: falseValue: A valid WWN name.Optional: No

switch-user-friendly-nameDescription: The ASCII name assigned to the switch by the administrator.Flag: read-onlyType: stringConfig: falseValue: 1 to 30 alphanumeric characters plus hyphens, periods, and underscore characters. Spacesare not allowed. A switch name can begin with either a letter or number, but a switch name thatbegins with a numeric (0-9) character must also have at least an underscore (_), hyphen (-), period (.)or alphabetic (A-Z, a-z) character. A switch name with only numeric characters is not valid.Optional: Yes

chassis-wwnDescription: The chassis WWN.Flag: read-onlyType: fibrechannel:wwn-typeConfig: falseValue: A valid WWN name.Optional: Yes

chassis-user-friendly-nameDescription: The ASCII name assigned to the switch chassis by the administrator.Flag: read-onlyType: stringConfig: falseValue: 1 to 31 alphanumeric characters plus hyphens (-), periods (.), and underscore (_) characters.A chassis name must begin with a letter. Spaces are not allowed.Optional: Yes

domain-idDescription: The highest level in the three-level addressing hierarchy used in the Fibre Channeladdress identifier. A domain typically is associated with a single Fibre Channel switch.Flag: read-onlyType: fibrechannel:domain-id-typeConfig: falseValue: 1 through 239. Default: 1Optional: Yes

principalDescription: Indicates if this switch is the fabric's principal switch.Flag: read-onlyType: uint8Config: falseValue: 1 = This is the fabric's principal switch. 0 = This is not the fabric's principal switch.Optional: Yes

fcidDescription: The destination Fibre Channel ID (D_ID) of the switch.

brocade-fabric

Brocade Fabric OS REST API Reference, 8.2.0a56 53-1005246-03

Page 57: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Flag: read-onlyType: fibrechannel:fcid-typeConfig: falseValue: A valid destination FCID value.Optional: Yes

ip-addressDescription: The IPv4 address for the switch.Flag: read-onlyType: inet:ipv4-addressConfig: falseValue: A valid IPv4 address.Optional: Yes

fcip-addressDescription: The IPv4 address the switch is using for Fibre Channel over IP.Flag: read-onlyType: inet:ipv4-addressConfig: falseValue: A valid IPv4 address.Optional: Yes

ipv6-addressDescription: The IPv6 address for the switch.Flag: read-onlyType: inet:ipv6-addressConfig: falseValue: A valid IPv6 address.Optional: Yes

firmware-versionDescription: A human-readable string identifying the firmware version running on the switch.Flag: read-onlyType: stringConfig: falseValue: A Brocade-defined 11-character string identifying the software release installed on theswitch.Optional: Yes

Supported methodsOnly the GET, OPTIONS, and HEAD operations are supported in this module.

ExamplesComparable Fabric OS CLI commands include switchshow, fabricshow, wwn, chassisname, and ipaddrshow. Refer to theBrocade Fabric OS Command Reference for information and examples of these commands.

brocade-fabric

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 57

Page 58: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Retrieving switch informationThis example uses a GET request to retrieve the switch information for a switch.

Structure

GET <base_URI>running/fabric/fabric-switch

URI request

GET https://10.10.10.10/rest/running/fabric/fabric-switch

Request bodyNo request body is required.

Response bodyWhen the operation is successful, the response has a message body similar to the following, and a “200 OK” status in theheaders.

<?xml version="1.0"?><Response> <fabric-switch> <name>10:10:14:15:1c:9e:3b:c8</name> <chassis-wwn>10:10:14:15:1c:9e:3c:07</chassis-wwn> <domain-id>1</domain-id> <fcid>16776199</fcid> <switch-user-friendly-name>G610_81</switch-user-friendly-name> <chassis-user-friendly-name>BrocadeG610</chassis-user-friendly-name> <firmware-version>v820</firmware-version> <ip-address>10.10.10.1</ip-address> <fcip-address>0.0.0.0</fcip-address> <ipv6-address>::</ipv6-address> <principal>1</principal> </fabric-switch> <fabric-switch> <name>10:10:14:15:1c:a2:1f:40</name> <chassis-wwn>10:10:14:15:1c:a2:1f:7f</chassis-wwn> <domain-id>3</domain-id> <fcid>16776195</fcid> <switch-user-friendly-name>G610_82</switch-user-friendly-name> <chassis-user-friendly-name>BrocadeG610</chassis-user-friendly-name> <firmware-version>v820</firmware-version> <ip-address>10.10.10.2</ip-address> <fcip-address>0.0.0.0</fcip-address> <ipv6-address>::</ipv6-address> <principal>0</principal> </fabric-switch></Response>

Retrieving switch information from a virtual fabricThis example uses a GET request to retrieve the switch information for a switch in the virtual fabric with an VFID of 10.

StructureGET <base_URI>running/fabric/fabric-switch?vf-id=<vf-id#>

URI requestGET https://10.10.10.10/rest/running/fabric/fabric-switch?vf-id=10

brocade-fabric

Brocade Fabric OS REST API Reference, 8.2.0a58 53-1005246-03

Page 59: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Request bodyNo request body is required.

Response bodyWhen the operation is successful, the response has a message body similar to the following, and a “200 OK” status in theheaders.

<?xml version="1.0"?><Response> <fabric-switch> <name>10:10:14:15:1c:9e:3b:44</name> <chassis-wwn>10:10:14:15:1c:9e:3c:aa</chassis-wwn> <domain-id>5</domain-id> <fcid>16776100</fcid> <switch-user-friendly-name>G610_21</switch-user-friendly-name> <chassis-user-friendly-name>BrocadeG610</chassis-user-friendly-name> <firmware-version>v820</firmware-version> <vf-id>1</vf-id> <ip-address>10.10.20.21</ip-address> <fcip-address>0.0.0.0</fcip-address> <ipv6-address>::</ipv6-address> <principal>1</principal> </fabric-switch> <fabric-switch> <name>10:10:14:15:1c:a2:1f:40</name> <chassis-wwn>10:10:14:15:1c:a2:1f:af</chassis-wwn> <domain-id>1</domain-id> <fcid>16776101</fcid> <switch-user-friendly-name>G610_22</switch-user-friendly-name> <chassis-user-friendly-name>BrocadeG610</chassis-user-friendly-name> <firmware-version>v820</firmware-version> <vf-id>1</vf-id> <ip-address>10.10.20.1</ip-address> <fcip-address>0.0.0.0</fcip-address> <ipv6-address>::</ipv6-address> <principal>0</principal> </fabric-switch></Response>

HistoryRelease version History

Fabric OS 8.2.0 This API call was introduced.

brocade-fabric

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 59

Page 60: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

brocade-fdmiThis module retrieves Fabric Device Management Interface (FDMI) information for the specified switch. FDMI enables discoveryof devices such as Fibre Channel host bus adapters (HBAs). If virtual fabrics are enabled, the request can include a queryparameter (vf-id) for the desired virtual fabric. If no query parameter is specified and virtual fabrics are enabled, the informationfor the switch in the default virtual fabric is returned.

It assumes a knowledge of FDMI as performed in Fabric OS. For information on that topic, refer to the fdmiShow command inthe Brocade Fabric OS Command Reference.

NOTEThe brocade-fdmi module is supported in Fabric OS 8.2.0a and later.

Module treeThis is the tree view of the module from the brocade-fdmi.yang-tree.txt file. Refer to YANG module overview on page 26 forYANG node field definitions and possible values and to Supported data types on page 26 for data type descriptions.

module: brocade-fdmi +--ro brocade-fdmi +--ro hba* [hba-id] | +--ro hba-id fibrechannel:wwn-type | +--ro domain-id? fibrechannel:domain-id-type | +--ro manufacturer? string | +--ro serial-number? string | +--ro model? string | +--ro model-description? string | +--ro node-name? fibrechannel:wwn-type | +--ro node-symbolic-name? string | +--ro hardware-version? string | +--ro driver-version? string | +--ro option-rom-version? string | +--ro firmware-version? string | +--ro os-name-and-version? string | +--ro max-ct-payload? uint32 | +--ro vendor-id? string | +--ro vendor-specific-info? fibrechannel:brocade-hex-string-type | +--ro number-of-ports? uint32 | +--ro fabric-name? fibrechannel:wwn-type | +--ro boot-bios-version? string | +--ro boot-bios-enabled? uint8 | +--ro hba-port-list | +--ro wwn* fibrechannel:wwn-type +--ro port* [port-name] +--ro port-name fibrechannel:wwn-type +--ro hba-id? fibrechannel:wwn-type +--ro domain-id? fibrechannel:domain-id-type +--ro port-symbolic-name? string +--ro port-id? fibrechannel:fcid-hex-string-type +--ro port-type? fibrechannel:port-type-string-type +--ro supported-class-of-service? fibrechannel:class-of-service-type +--ro supported-fc4-type? fibrechannel:fc4-type-type +--ro active-fc4-type? fibrechannel:fc4-type-type +--ro supported-speed? fibrechannel:speed-type +--ro current-port-speed? fibrechannel:speed-type +--ro maximum-frame-size? uint32 +--ro os-device-name? string +--ro host-name? string +--ro node-name? fibrechannel:wwn-type +--ro fabric-name? fibrechannel:wwn-type +--ro port-state? fibrechannel:brocade-hex-string-type +--ro number-of-discovered-ports? uint32 +--ro vsa-service-category? string +--ro vsa-guid? string

brocade-fdmi

Brocade Fabric OS REST API Reference, 8.2.0a60 53-1005246-03

Page 61: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

+--ro vsa-version? string +--ro vsa-product-name? string +--ro vsa-port-info? string +--ro vsa-qos-supported? string +--ro vsa-security? string +--ro vsa-storage-array-family? string +--ro vsa-storage-array-name? string +--ro vsa-storage-array-system-model? string +--ro vsa-storage-array-os? string +--ro vsa-storage-array-node-count? uint32 +--ro vsa-storage-array-nodes | +--ro nodes* string +--ro vsa-connected-ports +--ro wwns* fibrechannel:wwn-type

URI formatThe URI format for this module takes the following form:

• <base_URI>/running/brocade-fdmi/hba to display the FDMI information for the HBA.

• <base_URI>/running/brocade-fdmi/port to display all HBA ports in the FDMI database.

Parametersbrocade-fdmi

Description: A detailed view of the Fabric Device Management Interface (FDMI).Flag: read-onlyConfig: falseThis container has the following leafs:

hbaDescription: List of HBA attributes registered with FDMI.Key: hba-idFlag: read-onlyThis list has the following leafs:

hba-idDescription: A 64-bit Name_Identifier that is uniquely associated with the HBA among all HBAs inthe same Fibre Channel interaction space (see FC-FS). The HBA identifier for an HBA may be thesame as the Name_Identifier of an Nx_Port on the HBA if the required persistence is satisfied. Oncean HBA has registered a Name_Identifier as its HBA identifier, that Name_Identifier persists (forexample, across power cycles) as the HBA identifier for the HBA.Flag: read-onlyType: fibrechannel:wwn-typeValue: A valid WWN name.Optional: No

domain-idDescription: The domain directly attached to the HBA.Flag: read-onlyType: fibrechannel:domain-id-typeValue: 1 through 239. Default: 1Optional: No

brocade-fdmi

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 61

Page 62: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

manufacturerDescription:A printable ASCII string that specifies the manufacturer of the host adapter. The value may matchthe name by which the manufacturer identifies itself in a telephone directory.Flag: read-onlyType: stringValue: 1 to 63 printable ASCII characters.Optional: Yes

serial-numberDescription: A printable ASCII string that specifies the serial number of the host adapter. The valueshould match a serial number engraved or printed on the host bus adapter, if there is any.Flag: read-onlyType: stringValue: 1 to 63 printable ASCII characters.Optional: Yes

modelDescription: A printable ASCII string that specifies the model of the host adapter. The value maymatch an encoded string used on purchase orders to identify the host adapter model. Somemanagement applications limit this attribute to 63 bytes.Flag: read-onlyType: stringValue: 1 to 255 printable ASCII characters.Optional: Yes

model-descriptionDescription: A printable ASCII string that describes the model of the host adapter. The value mayprovide more detailed or human-oriented identification of the model of the host bus adapter thanthe model resource does.Flag: read-onlyType: stringValue: 1 to 255 printable ASCII characters.Optional: Yes

node-nameDescription: An 8-byte value that identifies the node that contains the Nx_Ports on the host adapter.If all Nx_Ports on the host bus adapter have the same node name, the node-name resourcereturned for the host bus adapter matches the node-name resource for its Nx_Ports. If not allNx_Ports on the host bus adapter have the same node name, the node-name resource is notreturned for the host bus adapter.Flag: read-onlyType: fibrechannel:wwn-typeValue: A valid WWN (colon-separated hexadecimal octets, most significant bit first, with leadingzeros.)Optional: Yes

node-symbolic-nameDescription: The name registered with the Name Server as a Name Server Symbolic Node Nameobject, which is subject to all the description and constraints of that object. If not all Nx_Ports on the

brocade-fdmi

Brocade Fabric OS REST API Reference, 8.2.0a62 53-1005246-03

Page 63: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

host bus adapter have the same node name, the node-symbolic-name resource will not be returnedfor the host bus adapter.Flag: read-onlyType: stringValue: 4 to 255 printable ASCII characters.Optional: Yes

hardware-versionDescription: A printable ASCII string that identifies the hardware version level of the host adapter.Some management applications limit this to a length of 63 characters.Flag: read-onlyType: stringValue: 1 to 255 printable ASCII characters.Optional: Yes

driver-versionDescription: A printable ASCII string that identifies the version level of the driver software thatcontrols a host adapter. If a host bus adapter is concurrently under the control of multiple driversoftware modules with different versions, this resource may indicate the versions for more than onedriver module.Flag: read-onlyType: stringValue: 1 to 255 printable ASCII characters.Optional: Yes

option-rom-versionDescription: A printable ASCII string that identifies the Option ROM or BIOS version of a hostadapter.Flag: read-onlyType: stringValue: 1 to 255 printable ASCII characters.Optional: Yes

firmware-versionDescription: A printable ASCII string that identifies the version of firmware executed by a hostadapter. If a host bus adapter contains and has the capability to execute multiple firmware moduleswith different versions, this attribute may indicate the versions for more than one firmware module.Flag: read-onlyType: stringValue: 1 to 255 printable ASCII characters.Optional: Yes

os-name-and-versionDescription: A printable ASCII string that describes the type and version of the operating systemthat controls the host bus adapter.Flag: read-onlyType: stringValue: 1 to 255 printable ASCII characters.Optional: Yes

brocade-fdmi

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 63

Page 64: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

max-ct-payloadDescription: A 32-bit unsigned integer equal to the maximum size CT payload in 32-bit words,including all CT headers but no FC frame header(s) that may be sent or received by applicationsoftware resident in the host in which the host bus adapter is installed. If the host bus adapter doesnot support generic CT capability for application software on the host in which it is installed, thisattribute will not be returned.Flag: read-onlyType: uint32Value: 0 to the maximum size CT payload in 32-bit words.Optional: Yes

vendor-idDescription: The T10 vendor ID of the manufacturer of the HBA, or an OEM of the HBA.Flag: read-onlyType: stringValue: 1 to 8 printable ASCII characters.Optional: Yes

vendor-specific-infoDescription: A value with vendor-specific use.Flag: read-onlyType: fibrechannel:brocade-hex-string-typeValue: 0 to 10 hexidecimal string.Optional: Yes

number-of-portsDescription: The number of Nx_Ports on the HBA.Flag: read-onlyType: uint32Value: The number of Nx_Ports on the HBA.Optional: Yes

fabric-nameDescription: An 8-byte binary value equal to the Fabric_Name of the fabric associated with theHBA. If the HBA is associated with more than one fabric, fabric-name will not be provided.Flag: read-onlyType: fibrechannel:wwn-typeValues: A valid WWN name.Optional: Yes

boot-bios-versionDescription: A printable ASCII string that describes the identification and version of a boot BIOSprovided by the HBA.Flag: read-onlyType: stringValue: 4 to 255 printable ASCII characters.Optional: Yes

boot-bios-enabledDescription: Whether a boot BIOS provided by the HBA is enabled or disabled. boot-bios-enabledis true if the HBA provides a boot BIOS and the boot BIOS is enabled. boot-bios-enabled is false ifthe HBA provides a boot BIOS and the boot BIOS is disabled.

brocade-fdmi

Brocade Fabric OS REST API Reference, 8.2.0a64 53-1005246-03

Page 65: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Flag: read-onlyType: uint8Values: 1 = Boot-BIOS is enabled. 0 = Boot-BIOS is disabled.Optional: Yes

hba-port-listDescription: A list of port WWNs associated with the HBA. This list corresponds with the port-nameresource under the port list.Flag: read-onlyOptional: YesThis list has the following leaf:

wwnDescription: The WWN of the port on the HBA. This corresponds to the port-nameresource under the port list.Flag: read-onlyType: fibrechannel:wwn-typeValues: A valid WWN name.Optional: Yes

portDescription: A list of HBA port attributes registered with FDMI.Flag: read-onlyKey: port-nameThis list has the following leafs:

port-nameDescription: A WWN that identifies the port associated with the host bus adapter specified by thehba-id resource.Flag: read-onlyType: fibrechannel:wwn-typeValue: A valid fibre channel WWN.Optional: No

hba-idDescription: A 64-bit Name_Identifier that is uniquely associated with the HBA among all HBAs inthe same Fibre Channel interaction space (see FC-FS). The HBA identifier for an HBA may be thesame as the Name_Identifier of an Nx_Port on the HBA if the required persistence is satisfied. Oncean HBA has registered a Name_Identifier as its HBA identifier, that Name_Identifier persists (forexample, across power cycles) as the HBA identifier for the HBA. This corresponds to the hba-idresource under the hba list.Flag: read-onlyType: fibrechannel:wwn-typeValue: A valid fibre channel WWN.Optional: No

domain-idDescription: The domain directly attached to the HBA port.Flag: read-onlyType: fibrechannel:domain-id-typeValue: A FCID domain identifier.Optional: No

brocade-fdmi

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 65

Page 66: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

port-symbolic-nameDescription: The Port Symbolic Name object registered with the Name Server, which is subject to allthe description and constraints of that object defined in FC-GS.Flag: read-onlyType: stringValue: A valid port symbolic name.Optional: Yes

port-idDescription: The Port Identifier object registered with the Name Server, which is subject to all thedescription and constraints of that object defined in FC-GS.Flag: read-onlyType: fibrechannel:fcid-hex-string-typeValue: A vaild fibre channel ID (FCID) in hexadecimal format.Optional: Yes

port-typeDescription: The Name Server port type object registered with the Name Server, which is subject toall the description and constraints of that object defined in FC-GS.Flag: read-onlyType: fibrechannel:port-type-string-typeValue: The port type.n-port = (0x01)nl-port = (0x02)f/nl-port = (0x03)nx-port = (0x7F)f-port = (0x81)fl-port = (0x82)e-port = (0x84)b-port = (0x85)a-port = (0x86)0xnn = (Unknown/Reserved <hexadecimal value>)Optional: Yes

supported-class-of-serviceDescription: The Class of Service object registered with the Name Server, which is subject to all thedescription and constraints of that object defined in FC-GS.Flag: read-onlyType: fibrechannel:class-of-service-typeValue: The class of service type.class-f = (bit 0)class-1 = (bit 1)class-2 = (bit 2)class-3 = (bit 3)Optional: Yes

supported-fc4-typeDescription: The FC-4 types attribute registered with the HBA Management Server as a portattribute. An Nx_Port registers a supported FC-4 types value that indicates "support" for any FC-4type that it is able to be configured to support.Flag: read-only

brocade-fdmi

Brocade Fabric OS REST API Reference, 8.2.0a66 53-1005246-03

Page 67: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Type: fibrechannel:fc4-type-typeValue: The FC-4 type.IPFC = (0x05)FCP = (0x08)FCP-Features = (0x0A)SATA-Tunnel = (0x14)SBCCS = (0x18)SBCCS-Channel = (0x1B)SBCCS-Control-Unit =(0x1C)FC-CT = (0x20)FC-SW = (0x22)FC-IFR = (0x25)FC-NVMe = (0x28)HIPPI-FP = (0x40)MIL-STD-1553 = (0x48)ASM = (0x49)FC-VI = (0x58)Application-Services = (0x60)Generic-FC-Features = (0xDE)RNID-Topology-Discovery = (0xDF)Optional: Yes

active-fc4-typesDescription: The Port active FC-4 types attribute registered with the Name Server, which is subjectto all the description and constraints of that object defined in FC-GS. An Nx_Port registers asupported FC-4 types value that indicates "support" for any FC-4 type that it is able to beconfigured to support.Flag: read-onlyType: fibrechannel:fc4-type-typeValue: The FC-4 type. The same values as the supported-fc4-type.Optional: Yes

supported-speedDescription: The supported transmission speeds of the Nx_Port.Flag: read-onlyType: fibrechannel:speed-typeValues:speed-1-gfc = (Mask Value (hex): 0000 0001)speed-2-gfc = (Mask Value (hex): 0000 0002)speed-10-gfc = (Mask Value (hex): 0000 0004)speed-4-gfc = (Mask Value (hex): 0000 0008)speed-8-gfc = (Mask Value (hex): 0000 0010)speed-16-gfc = (Mask Value (hex): 0000 0020)speed-32-gfc = (Mask Value (hex): 0000 0040)speed-20-gfc = (Mask Value (hex): 0000 0080)speed-40-gfc = (Mask Value (hex): 0000 0100)speed-128-gfc = (Mask Value (hex): 0000 0200)speed-64-gfc = (Mask Value (hex): 0000 0400)speed-256-gfc = (Mask Value (hex): 0000 0800)

brocade-fdmi

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 67

Page 68: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

speed-not-established = (Mask Value (hex): 0000 8000)speed-10-ge = (Mask Value (hex): 0001 0000)speed-40-ge = (Mask Value (hex): 0002 0000)speed-100-ge = (Mask Value (hex): 0004 0000)speed-25-ge = (Mask Value (hex): 0008 0000)speed-50-ge = (Mask Value (hex): 0010 0000)speed-400-ge = (Mask Value (hex): 0020 0000)Optional: Yes

current-port-speedDescription: The Current Port Speed attribute returned by the HBA Management Server as a portattribute if either it has been registered or it has been determined by the HBA Management Server. Ifthe HBA Management Server is able to determine a speed, the value returned for the Current PortSpeed attribute indicates the speed determined by the HBA Management Server, regardless of anyvalue registered.Flag: read-onlyType: fibrechannel:speed-typeValue: The current port speed in gigabits per second (Gbps). The same values as the supported-speed.Optional: Yes

maximum-frame-sizeDescription: The Maximum Frame Size attribute registered with the HBA Management Server as aPort attribute. Maximum Frame Size attribute does not include the FC header but does include anyoptional headers.Flag: read-onlyType: uint32Value: The maximum FC frame payload in bytes.Optional: Yes

os-device-nameDescription: The OS Device Name attribute registered with the HBA Management Server as a portattribute. The OS Device Name attribute contains a printable ASCII character string that isrecognized as a reference to the Nx_Port by the OS that controls it. If there are several such OSdevice names that reference the same Nx_Port, this attribute may be a comma-separated list of asmany such names as fit in 255 bytes. If the software that registers Nx_Port attributes cannotdetermine any such OS Device Name, it does not register this attribute.Flag: read-onlyType: stringValue: 1 to 255 printable ASCII characters.Optional: Yes

host-nameDescription: The Host Name attribute registered with the HBA Management Server as a Portattribute. If there are several such names that reference the same host, this attribute may be acomma-separated list of as many such names as fit in 255 bytes. If the software that registersNx_Port attributes is unable to determine any such Host Name, it does not register this attribute.Flag: read-onlyType: stringValue: The host associated with the Nx_Port. 1 to 255 printable ASCII characters.Optional: Yes

brocade-fdmi

Brocade Fabric OS REST API Reference, 8.2.0a68 53-1005246-03

Page 69: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

node-nameDescription: The Node Name attribute registered with the Name Server for the Nx_Port. The formatof the Node_Name attribute is the format of the Name_Identifier described in FC-FS.Flag: read-onlyType: fibrechannel:wwn-typeValue: A fibre channel WWN that identifies the node that contains the Nx_Port.Optional: Yes

fabric-nameDescription: The Port Fabric Name attribute registered with the HBA Management Server as anNx_Port attribute. The Port Fabric Name attribute contains an 8-byte binary value equal to theFabric_Name of the fabric associated with the Nx_Port (see FC-SW). Registration of the Port FabricName attribute is optional, and may be registered automatically by the fabric for Nx_Ports that areregistered with the Fabric Name Server.Flag: read-onlyType: fibrechannel:wwn-typeValue: A fibre channel WWN.Optional: Yes

port-stateDescription: The Port State (see SM-HBA) for the specified Nx_Port. The Port State is an integerwhere the value indicates the current state of the Nx_Port. The sequence and timing of Port Statesthat are exhibited due to errors or transient conditions are vendor specific.Flag: read-onlyType: fibrechannel:brocade-hex-string-typeValues:0x0 = Undefined0x1 = Unknown0x2 = Fully Operational0x3 = Administratively offline0x4 = Bypassed0x5 = In Diagnostics Mode0x6 = Link down0x7 = Phy error0x8 = Loopback0x9 = Degraded, but Operational ModeOptional: Yes

number-of-discovered-portsDescription: The number of FC_Ports that are visible to the Nx_Port identified in the request. At aminimum, this is the number of FC_Ports mapped to a device, but it may not reflect all nodes on anetwork.Flag: read-onlyType: uint32Value: The number of FC_Ports that are visible to the specified Nx_Port.Optional: Yes

vsa-service-categoryDescription: The vendor-specific service category resource.Flag: read-onlyType: string

brocade-fdmi

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 69

Page 70: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Value: 1 to 255 printable ASCII characters.Optional: Yes

vsa-guidDescription: The vendor-specific guid resource.Flag: read-onlyType: stringValue: 1 to 34 printable ASCII characters.Optional: Yes

vsa-versionDescription: The vendor-specific version resource.Flag: read-onlyType: stringValue: 1 to 255 printable ASCII characters.Optional: Yes

vsa-product-nameDescription: The vendor-specific product name resource.Flag: read-onlyType: stringValue: 1 to 255 printable ASCII characters.Optional: Yes

vsa-port-infoDescription: The vendor-specific port information resource.Flag: read-onlyType: stringValue: 1 to 63 printable ASCII characters.Optional: Yes

vsa-qos-supportedDescription: The vendor-specific QOS supported resource.Flag: read-onlyType: stringValue: 1 to 63 printable ASCII characters.Optional: Yes

vsa-securityDescription: The vendor-specific security resource.Flag: read-onlyType: stringValue: 1 to 63 printable ASCII characters.Optional: Yes

vsa-storage-array-familyDescription: The vendor-specific storage array family.Flag: read-onlyType: stringValue: 1 to 63 printable ASCII characters.Optional: Yes

brocade-fdmi

Brocade Fabric OS REST API Reference, 8.2.0a70 53-1005246-03

Page 71: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

vsa-storage-array-nameDescription: The vendor-specific storage array name.Flag: read-onlyType: stringValue: 1 to 63 printable ASCII characters.Optional: Yes

vsa-storage-array-system-modelDescription: The vendor-specific storage array system model.Flag: read-onlyType: stringValue: 1 to 63 printable ASCII characters.Optional: Yes

vsa-storage-array-osDescription: The vendor-specific storage array operating system.Flag: read-onlyType: stringValue: 1 to 63 printable ASCII characters.Optional: Yes

vsa-storage-array-node-countDescription: The vendor-specific storage array node count.Flag: read-onlyType: uint32Value: The storage array node count.Optional: Yes

vsa-storage-array-nodesDescription: A list of vendor-specific storage array nodes.Flag: read-onlyOptional: YesThis container has the following leaf.

nodes*Description: The vendor-specific storage array node resource.Flag: read-onlyType: stringValue: 1 to 255 printable ASCII characters.Optional: Yes

vsa-connected-portsDescription: A list of vendor-specific connected ports.Flag: read-onlyOptional: YesThis container has the following leaf.

wwns*Description: The vendor-specific connected port resource.Flag: read-onlyType: fibrechannel:wwn-typeValue: A valid fibre channel WWN.Optional: Yes

brocade-fdmi

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 71

Page 72: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Supported methodsThe GET, OPTIONS, and HEAD operations are supported in this module.

Examples

Retrieving FDMI information from an HBAThis example uses a GET request to retrieve FDMI information for the HBA to which the request is sent.

StructureGET <base_URI>/running/brocade-fdmi/hba

URI requestGET https://10.10.10.10/rest/running/brocade-fdmi/hba

Request bodyThe request body is empty.

brocade-fdmi

Brocade Fabric OS REST API Reference, 8.2.0a72 53-1005246-03

Page 73: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Response body<?xml version="1.0"?><Response> <hba> <hba-id>21:00:00:0e:1e:1b:f9:10</hba-id> <domain-id>150</domain-id> <hba-port-list> <wwn>21:00:00:0e:1e:1b:f9:10</wwn> </hba-port-list> <node-name>20:00:00:0e:1e:1b:f9:10</node-name> <manufacturer>QLogic Corporation</manufacturer> <serial-number>BFE1425K14446</serial-number> <model>QLE2672</model> <model-description>QLE2672 QLogic 2-port 16Gb Fibre Channel Adapter</model-description> <hardware-version>HW VERSION</hardware-version> <driver-version>2.1.46.0</driver-version> <option-rom-version>3.40</option-rom-version> <firmware-version>8.03.06 (d0d5)</firmware-version> <os-name-and-version>VMware ESXi-6.5.0 (Releasebuild-4564106)</os-name-and-version> <max-ct-payload>2048</max-ct-payload> <node-symbolic-name>QLE2672 FW:v8.03.06 DVR:v2.1.46.0</node-symbolic-name> <vendor-specific-info>0x00001077</vendor-specific-info> <number-of-ports>1</number-of-ports> <fabric-name>20:00:00:0e:1e:1b:f9:10</fabric-name> <boot-bios-version>3.40</boot-bios-version> <boot-bios-enabled>1</boot-bios-enabled> <vendor-id>QLogic</vendor-id> </hba> <hba> <hba-id>21:00:00:0e:1e:18:99:71</hba-id> <domain-id>150</domain-id> <hba-port-list> <wwn>21:00:00:0e:1e:18:99:71</wwn> </hba-port-list> <node-name>20:00:00:0e:1e:18:99:71</node-name> <manufacturer>QLogic Corporation</manufacturer> <serial-number>BFE1346E15893</serial-number> <model>QLE2672</model> <model-description>QLE2672 QLogic 2-port 16Gb Fibre Channel Adapter</model-description> <hardware-version>HW VERSION</hardware-version> <driver-version>2.1.46.0</driver-version> <option-rom-version>3.40</option-rom-version> <firmware-version>8.03.06 (d0d5)</firmware-version> <os-name-and-version>VMware ESXi-6.5.0 (Releasebuild-4564106)</os-name-and-version> <max-ct-payload>2048</max-ct-payload> <node-symbolic-name>QLE2672 FW:v8.03.06 DVR:v2.1.46.0</node-symbolic-name> <vendor-specific-info>0x00001077</vendor-specific-info> <number-of-ports>1</number-of-ports> <fabric-name>20:00:00:0e:1e:18:99:71</fabric-name> <boot-bios-version>3.40</boot-bios-version> <boot-bios-enabled>1</boot-bios-enabled> <vendor-id>QLogic</vendor-id> </hba></Response>

Retrieving HBA port attributesThis example uses a GET request to retrieve port attributes.

StructureGET <base_URI>/running/brocade-fdmi/port

brocade-fdmi

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 73

Page 74: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

URI requestGET https://10.10.10.10/rest/running/brocade-fdmi/port

Request bodyThe request body is empty.

Response body<?xml version="1.0"?><Response> <port> <hba-id>21:00:00:0e:1e:1b:f9:10</hba-id> <domain-id>150</domain-id> <port-name>21:00:00:0e:1e:1b:f9:10</port-name> <supported-fc4-type>FCP</supported-fc4-type> <supported-speed>speed-4-gfc speed-8-gfc speed-16-gfc</supported-speed> <current-port-speed>speed-16-gfc</current-port-speed> <maximum-frame-size>2048</maximum-frame-size> <os-device-name>vmhba2</os-device-name> <host-name>537283a7-9d2d-a165-4c74-2c768a51</host-name> <node-name>20:00:00:0e:1e:1b:f9:10</node-name> <port-symbolic-name>QLE2672 FW:v8.03.06 DVR:v2.1.46.0 port</port-symbolic-name> <port-type>nx-port</port-type> <supported-class-of-service>class-3</supported-class-of-service> <fabric-name>20:a6:00:05:33:58:8d:00</fabric-name> <active-fc4-type>FCP</active-fc4-type> <port-state>0x2</port-state> <number-of-discovered-ports>1</number-of-discovered-ports> <port-id>0x96a640</port-id> </port> <port> <hba-id>21:00:00:0e:1e:18:99:71</hba-id> <domain-id>150</domain-id> <port-name>21:00:00:0e:1e:18:99:71</port-name> <supported-fc4-type>FCP</supported-fc4-type> <supported-speed>speed-4-gfc speed-8-gfc speed-16-gfc</supported-speed> <current-port-speed>speed-16-gfc</current-port-speed> <maximum-frame-size>2048</maximum-frame-size> <os-device-name>vmhba3</os-device-name> <host-name>537283a7-c500-c440-edf6-2c768a51</host-name> <node-name>20:00:00:0e:1e:18:99:71</node-name> <port-symbolic-name>QLE2672 FW:v8.03.06 DVR:v2.1.46.0 port</port-symbolic-name> <port-type>nx-port</port-type> <supported-class-of-service>class-3</supported-class-of-service> <fabric-name>2e:2e:00:05:33:58:8d:00</fabric-name> <active-fc4-type>FCP</active-fc4-type> <port-state>0x2</port-state> <number-of-discovered-ports>1</number-of-discovered-ports> <port-id>0x96a6c0</port-id> </port></Response>

HistoryRelease version History

Fabric OS 8.2.0a This API call was introduced.

brocade-fdmi

Brocade Fabric OS REST API Reference, 8.2.0a74 53-1005246-03

Page 75: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

brocade-fibrechannelThis module retrieves information for all Fibre Channel ports on the specified switch. If virtual fabrics are enabled, then therequest can include a query parameter (vf-id) for the desired virtual fabric. If no query parameter is specified and virtual fabricsare enabled, the port information for the switch in the default virtual fabric is returned.

This module augments the ‘interface’ and ‘interface-state’ lists defined in the “ietf-interfaces” module as defined in RFC 7223with Fibre Channel data nodes, and it adds Fibre Channel state data.

Module treeThis is the tree view of the module from the brocade-fibrechannel.yang-tree.txt file. Refer to YANG module overview on page26 for YANG node field definitions and possible values and to Supported data types on page 26 for data type descriptions.

module: brocade-fibrechannel +--rw brocade-interface +--rw fibrechannel* [name] | +--rw name string | +--ro wwn? fibrechannel:wwn-type | +--ro operational-status? uint32 | +--rw enabled-state? uint32 | +--rw user-friendly-name? string | +--rw speed? speed-type | +--ro auto-negotiate? uint8 | +--rw g-port-locked? uint8 {fibrechannel:fibrechannel_switch_platform}? | +--rw e-port-disable? uint8 {fibrechannel:fibrechannel_switch_platform}? | +--rw n-port-enabled? uint8 {fibrechannel:access_gateway_platform}? | +--rw d-port-enable? uint8 | +--rw persistent-disable? uint8 | +--ro neighbor | | +--ro wwn* fibrechannel:wwn-type | x--ro fcid? fibrechannel:fcid-type | +--ro fcid-hex? fibrechannel:fcid-hex-string-type | +--ro port-type? port-type-type | +--rw qos-enabled? uint8 | +--rw compression-configured? uint8 | +--ro compression-active? uint8 | +--ro encryption-active? uint8 {fibrechannel:fibrechannel_switch_platform}? | +--rw target-driven-zoning-enable? uint8 | +--rw sim-port-enabled? uint8 {fibrechannel:fibrechannel_switch_platform}? | +--rw mirror-port-enabled? int8 | +--rw credit-recovery-enabled? int8 | +--ro credit-recovery-active? int8 | +--ro fec-active? int8 | +--rw f-port-buffers? uint8 | +--rw e-port-credit? uint8 | +--rw csctl-mode-enabled? int8 {fibrechannel:fibrechannel_switch_platform}? | +--rw fault-delay-enabled? uint8 | +--rw octet-speed-combo? int8 | +--rw trunk-port-enabled? uint8 | +--ro long-distance? uint8 {fibrechannel:fibrechannel_switch_platform}? | +--ro vc-link-init? uint8 {fibrechannel:fibrechannel_switch_platform}? | +--rw isl-ready-mode-enabled? uint8 {fibrechannel:fibrechannel_switch_platform}? | +--rw rscn-suppression-enabled? uint8 {fibrechannel:fibrechannel_switch_platform}? | +--rw los-tov-mode-enabled? uint8 | +--rw npiv-enabled? uint8 | +--rw npiv-pp-limit? int16 | +--ro npiv-flogi-logout-enabled? int8 | +--rw ex-port-enabled? uint8 {fibrechannel:fibrechannel_switch_platform}? | +--rw fec-enabled? int8 | +--ro via-tts-fec-enabled? int8 | +--rw port-autodisable-enabled? uint8 | +--rw rate-limit-enabled? int16 {fibrechannel:fibrechannel_switch_platform}? | +--rw non-dfe-enabled? uint8 {fibrechannel:fibrechannel_switch_platform}? +--rw fibrechannel-statistics* [name] +--rw name string

brocade-fibrechannel

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 75

Page 76: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

+--ro sampling-interval? uint16 +--ro time-generated? fibrechannel:time-generated-type +--rw reset-statistics? uint8 +--ro in-octets? yang:zero-based-counter64 +--ro out-octets? yang:zero-based-counter64 +--ro in-multicast-pkts? yang:zero-based-counter64 +--ro out-multicast-pkts? yang:zero-based-counter64 +--ro in-link-resets? yang:zero-based-counter64 +--ro out-link-resets? yang:zero-based-counter64 +--ro in-offline-sequences? yang:zero-based-counter64 +--ro out-offline-sequences? yang:zero-based-counter64 +--ro invalid-ordered-sets? yang:zero-based-counter64 +--ro frames-too-long? yang:zero-based-counter64 +--ro truncated-frames? yang:zero-based-counter64 +--ro address-errors? yang:zero-based-counter64 +--ro delimiter-errors? yang:zero-based-counter64 +--ro encoding-disparity-errors? yang:zero-based-counter64 +--ro too-many-rdys? yang:zero-based-counter64 +--ro in-crc-errors? yang:zero-based-counter64 +--ro crc-errors? yang:zero-based-counter64 +--ro bad-eofs-received? yang:zero-based-counter64 +--ro encoding-errors-outside-frame? yang:zero-based-counter64 +--ro multicast-timeouts? yang:zero-based-counter64 +--ro in-lcs? yang:zero-based-counter64 +--ro in-frame-rate? yang:zero-based-counter64 +--ro out-frame-rate? yang:zero-based-counter64 +--ro in-max-frame-rate? yang:zero-based-counter64 +--ro out-max-frame-rate? yang:zero-based-counter64 +--ro in-rate? yang:zero-based-counter64 +--ro out-rate? yang:zero-based-counter64 +--ro in-peak-rate? yang:zero-based-counter64 +--ro out-peak-rate? yang:zero-based-counter64 +--ro in-frames? yang:zero-based-counter64 +--ro out-frames? yang:zero-based-counter64 +--ro bb-credit-zero? yang:zero-based-counter64 +--ro input-buffer-full? yang:zero-based-counter64 +--ro f-busy-frames? yang:zero-based-counter64 +--ro p-busy-frames? yang:zero-based-counter64 +--ro f-rjt-frames? yang:zero-based-counter64 +--ro p-rjt-frames? yang:zero-based-counter64 +--ro class-1-frames? yang:zero-based-counter64 +--ro class-2-frames? yang:zero-based-counter64 +--ro class-3-frames? yang:zero-based-counter64 +--ro class-3-discards? yang:zero-based-counter64 +--ro link-failures? yang:zero-based-counter64 +--ro invalid-transmission-words? yang:zero-based-counter64 +--ro primitive-sequence-protocol-error? yang:zero-based-counter64 +--ro loss-of-signal? yang:zero-based-counter64 +--ro loss-of-sync? yang:zero-based-counter64 +--ro class3-in-discards? yang:zero-based-counter64 +--ro class3-out-discards? yang:zero-based-counter64 +--ro pcs-block-errors? yang:zero-based-counter64

URI formatsThe URI format for this module takes one of the following forms:

• <base_URI>/running/brocade-interface/fibrechannel/ to return a list of all Fibre Channel ports on the specified

switch.

• <base_URI>/running/brocade-interface/fibrechannel-statistics/ to return the statistics for all Fibre Channel

ports on the specified switch.

• <base_URI>/running/brocade-interface/fibrechannel/name/fibre-channel-interface-name/n-port-enabled to configure a port as an N_Port.

brocade-fibrechannel

Brocade Fabric OS REST API Reference, 8.2.0a76 53-1005246-03

Page 77: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

• <base_URI>/running/switch/fibrechannel-switch/name/fibre-channel-interface-name/ag-mode to

determine if the switch is in Access Gateway mode.

Parametersbrocade-interface

Description: All fibre channel interface related configuration, operational state, and statistics.Flag: read-writeType: stringThis container has the following leafs:

fibrechannelDescription: A list of interfaces on the device. System-controlled interfaces created by the system are alwayspresent in this list, whether they are configured or not.Flag: read-writeKey: nameThis list has the following leafs:

nameDescription: The name of the interface.Flag: read-writeType: stringValues: The slot and port number of the specified port in the format “slot/port”.Optional: No

wwnDescription: The World Wide Name (WWN) of the specified port.Flag: read-onlyType: fibrechannel:wwn-typeConfig: falseValues: A valid WWN name.Optional: Yes

operational-statusDescription: The current operational status of the specified port.Flag: read-onlyType: uint32Config: falseValues:0 = Undefined2 = Online/Testing3 = Offline5 = FaultyOptional: Yes

enabled-stateDescription: The current state of the specified port.Flag: read-writeType: uint32Config: falseValues: 2 = Port is enabled. 6 = Port is disabled. Default: 2

brocade-fibrechannel

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 77

Page 78: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Optional: Yes

user-friendly-nameDescription: A user-friendly name to be assigned to the specified port.When a port name is not configured, a default name is assigned. The format of the default name isas follows:• On standalone platforms, the default port name displays as “port<port-number>”, for example,“port10”.• On enterprise-class platforms, the default port name displays as “slot<slot-number> port<port-number”, for example, “slot1 port5”.Flag: read-writeType: stringConfig: falseValues: 1 to 128 alphanumeric characters, including spaces and characters, and excludingcommas (,), semicolons (;), backslashes (\), and the at sign (@). When FICON Server Management(FSM) mode is enabled, the port name character string can be up to 24 characters in length. Thismust not contain special (high-ASCII) characters, and it is not case-sensitive. Default: An emptystring.Optional: Yes

speedDescription: The Fibre Channel interface may operate at various speeds; this leaf allows the portinterface to be forced to operate at a particular speed.Without any explicit speed set (for example, having the “auto-negotiated” value set), the FibreChannel interfaces run at the maximum speed that they are capable of operating at, subject to speednegotiations with its neighbor. The value 0 is returned only when auto-negotiate is set and the porthas not yet negotiated the speed with the other end (for example, if the port is offline or is syncing).Otherwise the negotiated speed or the fixed speed is returned. To determine whether the speed wasauto-negotiated or fixed, see the “auto-negotiate” leaf.Flag: read-writeType: speed-typeValues:0 - Auto negotiated speed (Default)1000000000 = Fixed at 1 Gbps2000000000 = Fixed at 2 Gbps4000000000 = Fixed at 4 Gbps8000000000 = Fixed at 8 Gbps10000000000 = Fixed at 10 Gbps16000000000 = Fixed at 16 Gbps32000000000 = Fixed at 32 GbpsOptional: Yes

auto-negotiateDescription: Status of the port speed auto-negotiation control on the specified port.Flag: read-onlyType: uint8Config: falseValues: 0 = Port speed is fixed. 1 = Port speed is auto-negotiated.Optional: Yes

brocade-fibrechannel

Brocade Fabric OS REST API Reference, 8.2.0a78 53-1005246-03

Page 79: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

g-port-lockedDescription: Designates the specified port as a G_Port. Note that Fibre Channel switch Native modemust be supported.After successful execution, the switch attempts to initialize the specified port as an F_Port only, anddoes not attempt loop initialization (FL_Port) on the port. A port designated as a G_Port canbecome an E_Port. This configuration can be cleared but not set on VE or VEX_Ports. Changesmade by this command are persistent across switch reboots or power cycles.Flag: read-writeType: uint8Config: falseValues: 0 = Unlocked (removes the G_Port designation from the port). 1 = Locked (port isdesignated as a G_Port). Default: 0Optional: Yes

e-port-disableDescription: Enables or disables E_Port capability on the specified port, or locks down the specifiedport as an E_Port. Note that Fibre Channel switch Native mode must be supported.E_Port capability is enabled by default. When an interswitch link (ISL) is connected to a port and theport's E_Port capability is disabled, the ISL is segmented, and all traffic between the switches stops.Fabric management data, such as zoning information, can no longer be exchanged through thisport.Flag: read-writeType: uint8Config: falseValues: 0 = Port is enabled as an E_Port. 1 = Port is disabled as an E_Port. Default: 0Optional: Yes

n-port-enabledDescription: Indicates whether this port can operate as a N_Port. Note that Fibre Channel switchmust be in Access Gateway mode.Flag: read-writeType: uint8Values: 0 = Port is disabled as an N_Port. 1 = Port is enabled as an N_Port.Optional: Yes

d-port-enableDescription: Indicates whether this port is configured as a D_Port.This resource is only on 16 Gbps-capable blades that support D_Port capability.Flag: read-writeType: uint8Config: falseValues: 0 = Port is disabled as a D_Port. 1 = Port is enabled as a D_Port. Default: 0Optional: Yes

persistent-disableDescription: Status of the persistent-disable feature for the port.Flag: read-writeType: uint8Config: falseValues: 0 = Persistent-disable is not active for port. 1 = Persistent-disable is active for port. Default:0

brocade-fibrechannel

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 79

Page 80: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Optional: Yes

neighborDescription: A list of WWNs.Flag: read-onlyConfig: falseThis container has the following leaf:

wwnDescription: The Fibre Channel WWN of the neighbor port.Flag: read-onlyType: fibrechannel:wwn-typeConfig: falseValues: A valid WWN name.Optional: No

fcidDescription: This parameter is deprecated. Use the fcid-hex parameter. The Fibre Channel ID (FCID)of the specified port (decimal format).Flag: read-onlyType: fibrechannel:fcid-typeConfig: falseValues: A valid Fibre Channel ID.Optional: Yes

fcid-hexDescription: The Fibre Channel ID (FCID) of the specified port (hexidecimal format).Flag: read-onlyType: fibrechannel:fcid-hex-string-typeConfig: falseValues: A valid Fibre Channel ID of the port.Optional: Yes

port-typeDescription: The specific port type currently enabled for the specified port. If this port is logged in,this will be the negotiated port type, otherwise the configured port type will be reported.Flag: read-onlyType: port-type-typeConfig: falseValues:0 = Unknown7 = E_Port10 = G_Port11 = U_Port (Default)15 = F_Port16 = L_Port17 = FCoE Port19 = EX_Port20 = D_Port21 = SIM Port22 = AF_Port

brocade-fibrechannel

Brocade Fabric OS REST API Reference, 8.2.0a80 53-1005246-03

Page 81: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

23 = AE_Port25 = VE_Port26 = Ethernet Flex Port32768 = LB_PortOptional: Yes

qos-enabledDescription: Port QoS status.Flag: read-writeType: uint8Config: falseValues: 0 = Port QoS disabled. 1 = Port QoS enabled. Default: 1Optional: Yes

compression-configuredDescription: Enables or disables the compression configuration on the specified port. This changeis persistent.Configuring a port for compression is disruptive. You must disable the port before you can enablecompression on the port. This command fails on an enabled port. The number of configurable portsis limited by the platform ASIC.Flag: read-writeType: uint8Config: falseValues: 0 = Compression configuration disabled. 1 = Compression configuration enabled. Default: 0Optional: Yes

compression-activeDescription: The runtime compression status for the specified port.Flag: read-onlyType: uint8Config: falseValues: 0 = Port is enabled for compression but offline, or not enabled for compression. 1 = Port isonline and compression is enabled. Default: 0Optional: Yes

encryption-activeDescription: The encryption status for the specified port. Note that Fibre Channel switch Nativemode must be supported.Flag: read-onlyType: uint8Config: falseValues: 0 = Encryption is disabled. 1 = Encryption is enabled. Default: 0Optional: Yes

target-driven-zoning-enableDescription: Enables or disables the Target Driven Zoning (TDZ) configuration on the specified port.This change is persistent.Target Driven Zoning can be configured on online or offline E_Ports, F_Ports, and L_Ports; it doesnot toggle the port to apply the configuration. After Target Driven Zoning is configured on a port, itallows the connected target device to configure Target Driven Peer Zones to be enabled andcommitted.

brocade-fibrechannel

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 81

Page 82: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Flag: read-writeType: uint8Config: falseValues: 0 = Target Driven Zoning configuration is disabled. 1 = Target Driven Zoning configuration isenabled. Default: 0Optional: Yes

sim-port-enabledDescription: Enables or disables the port as a SIM port. Note that Fibre Channel switch Nativemode must be supported.Flag: read-writeType: uint8Values: 0 = SIM port is disabled. 1 = SIM port is enabled. .Optional: Yes

mirror-port-enabledDescription:Enables or disables the port as a mirror port. Port mirroring reroutes data frames between twodevices to the mirror port.Flag: read-writeType: int8Values: 0 = Mirror port is disabled. 1 = Mirror port is enabled. -1Not applicable.Optional: Yes

credit-recovery-enabledDescription: Enables or disables credit recovery on the port. Credit recovery enables credits orframes to be recovered.Flag: read-writeType: int8Values: 0 = Credit recovery is disabled. 1 = Credit recovery is enabled. -1Not applicable. Default: 1Optional: Yes

credit-recovery-activeDescription: Whether or not credit recover is active on the port. Fabric OS must support creditrecovery at either end of the link for credit recovery to be active.Flag: read-onlyType: int8Config: falseValues: 0 = Credit recovery is not active on the port. 1 = Credit recovery is active on the port. -1Notapplicable.Optional: Yes

fec-activeDescription: Whether or not forward error correction is active on the port. Fabric OS must supportforward error correction at either end of the link for forward error correction to be active.Flag: read-onlyType: int8Config: falseValues: 0 = Forward error correction is not active on the port. 1 = Forward error correction is activeon the port. -1Not applicable.Optional: Yes

brocade-fibrechannel

Brocade Fabric OS REST API Reference, 8.2.0a82 53-1005246-03

Page 83: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

f-port-buffersDescription: Configures the buffer allocation for an F_Port. The minimum buffer allocation is thedefault number of buffers plus 1. The maximum is determined by the remaining buffer allocations inthe port's port group. If no buffers are configured, the value is zero. The F_Port buffer feature is notsupported on ports configured as EX_Ports, Mirror Ports, Long Distance Ports, L_Ports, QoS Ports,Fast Write, and Trunk Areas.Flag: read-writeType: uint8Values: From 0 to 31.Optional: Yes

e-port-creditDescription: Configures the number of credits to be allocated to the specified port. The minimumcredit allocation is 5 and the maximum can be up to 160 depending on the platform.Flag: read-writeType: uint8Values: From 5 to 160.Optional: Yes

csctl-mode-enabledDescription: Enables or disables Class-Specific Control (CSCTL) mode which enables trafficprioritization based on CS_CTL. Note that Fibre Channel switch Native mode must be supported.Flag: read-writeType: int8Values: 0 = CSCTL mode is disabled on the port. 1 = CSCTL mode is enabled on the port. -1Notapplicable.Optional: Yes

fault-delay-enabledDescription: Configures the fault delay for a port. In the event that the link is noisy after a host powercycle, the switch may go into a soft fault state, which means a delay of R_A_TOV. Setting the modevalue to 1 reduces the fault delay value to 1.2 seconds. The configuration is stored in nonvolatilememory and is persistent across switch reboots and power cycles.Flag: read-writeType: uint8Values: 0 = The value is R_A_TOV. 1 = The value is 1.2 seconds. Default: 0.Optional: Yes

octet-speed-comboDescription: Displays the speed configuration for a port octet. A port octet can be set to any of thethree octet combinations, and the ports in the octet can run on any speed supported by its octetcombination. This applies to both autonegotiated and fixed speeds.Flag: read-writeType: int8Values:1 - Autonegotiated or fixed port speeds of 32 Gbps, 16 Gbps, 8 Gbps, 4 Gbps, and 2 Gbps.2 - Autonegotiated or fixed port speeds of 10 Gbps, 8 Gbps, 4 Gbps, and 2 Gbps.3 - Autonegotiated or fixed port speeds of 16 Gbps and 10 Gbps.-1 - Not ApplicableDefault is 1.Optional: Yes

brocade-fibrechannel

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 83

Page 84: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

trunk-port-enabledDescription: Enables or disables trunking on a port. Trunking is enabled by default when a trunkinglicense is present on the switch.Flag: read-writeType: uint8Values: 0 = Trunking is disabled on the port. 1 = Trunking is enabled on the port.Optional: Yes

long-distanceDescription: The long distance level. Note that Fibre Channel switch Native mode must besupported.Flag: read-onlyType: uint8Config: falseValues: Displays one of the following values (the numerical value representing each distance_level isshown in parentheses):0 - Long-Distance is disabled for this port.1 - L0 configures the port as a regular port.2 - L1 configures the value as long (<= 50km)3 - L2 configures the value as super long (<= 100km)4 - LE mode configures an E_Port distance as greater than 5 km and up to 10 km.5 - L0.5 configures the value as medium long (<= 25km) .6 - LD configures the value as automatic long-distance.7 - LS mode configures the value as a static long distance link with a fixed buffer allocation greaterthan 10 km.Optional: Yes

vc-link-initDescription: The VC link initialization. Note that Fibre Channel switch Native mode must besupported.Flag: read-onlyType: uint8Config: falseValues: 0 = The long distance link initialization is turned off. 1 = The long distance link initialization isturned on for long distance mode.Optional: Yes

isl-ready-mode-enabledDescription: Enables or disables ISL ready mode on the port. Note that Fibre Channel switch Nativemode must be supported.Flag: read-writeType: uint8Values: 0 = ISL ready mode is disabled on the port. 1 = ISL ready mode is enabled on the port.Optional: Yes

rscn-suppression-enabledDescription: Enables or disables Registered State Change Notification (RSCN) suppression on theport. Note that Fibre Channel switch Native mode must be supported.When enabled, any device changes on the port do not generate an RSCN to any other end device.When disabled, device changes on the port generate an RSCN to all other end devices that arezoned with this one. By default, RSCN suppression is disabled on all ports.

brocade-fibrechannel

Brocade Fabric OS REST API Reference, 8.2.0a84 53-1005246-03

Page 85: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Flag: read-writeType: uint8Values: 0 = RSCN is disabled on the port. 1 = RSCN is enabled on the port. Default: 0.Optional: Yes

los-tov-mode-enabledDescription: Enables or disables de-bouncing of signal loss for front end ports for 100 ms.Flag: read-writeType: uint8Values: 0 = LOS_TOV mode is disabled on the port. 1 = LOS_TOV mode is enabled on fixed speedports. 2 = LOS_TOV mode is enabled for both fixed speed and auto-negogiate ports.Optional: Yes

npiv-enabledDescription: Enables or disables NPIV capability on the port.Flag: read-writeType: uint8Values: 0 = NPIV is disabled on the port. 1 = NPIV is enabled on the port.Optional: Yes

npiv-pp-limitDescription: Configures the maximum number of allowed logins for the port.Flag: read-writeType: int16Values: 1 to 255 = The maximum number of allowed logins for the port. -1 = Not applicable.Default = 126.Optional: Yes

npiv-flogi-logout-enabledDescription: Whether or not base device logout is enabled or disabled.Flag: read-onlyType: int8Config: falseValues: 0 = Base device logout is disabled on the port which causes NPIV devices on the same portto log out when the base device logs out. 1 = Base device logout is enabled on the port. The basedevice can logout without disrupting the NPIV devices on the same port. -1 = Not applicable.Optional: Yes

ex-port-enabledDescription: Configures the port as an EX_Port. Note that Fibre Channel switch Native mode mustbe supported.Flag: read-writeType: uint8Values: 0 = Does not configure the port as an EX_Port. 1 = Configures the port as an EX_Port.Optional: Yes

fec-enabledDescription: Whether Forward Error Correction (FEC) is enabled or disabled on a port. FEC providesa mechanism for reducing error rates during data transmissions over 16 Gbps Fibre Channel links.When FEC is enabled on a port, the sender adds systematically generated error-correcting code(ECC) to its data transmission. This mechanism allows the receiver to detect and correct errorswithout needing to get additional information from the sender.

brocade-fibrechannel

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 85

Page 86: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

NOTEFEC only supported in 10 Gbps and 16 Gbps.

Flag: read-writeType: int8Values: 0 = FEC is disabled on the port. 1 = FEC is enabled on the port and the port is online. -1 =Not applicable. Default: 0.Optional: Yes

via-tts-fec-enabledDescription: Whether or not FEC negotiation via TTS is enabled or disabled on the port.Flag: read-onlyType: int8Config: falseValues: 0 = The external control of FEC is disabled. 1 = The control of the FEC state is permitted viaTTS by an externally attached host or device. -1 = Not applicable.Optional: Yes

port-autodisable-enabledDescription: Enables or disables port autodisable on the port which minimizes traffic disruptionintroduced in some instances of automatic port recovery. When the autodisable flag is enabled, youcan specify the conditions that prevent the port to reinitialize. Such conditions include loss of sync,loss of signal, OLS, NOS, and LIP. Note that a link reset does not cause a port autodisable. When aport is in FICON Management Server (FMS) mode, an autodisabled port remains persistentlydisabled across High Availability (HA) failover.Flag: read-writeType: uint8Values: 0 = Port autodisable is disabled on the port. 1 = Port autodisable is enabled on the port.Default: 0.Optional: Yes

rate-limit-enabledDescription: Configures the rate limits. Note that Fibre Channel switch Native mode must besupported. This is applicable only to F/FL_Ports. For E/EX_Ports, this resource is not effective. Theingress rate limit is enforced only when a given port can run at a speed higher than the speedspecified in the configurationFlag: read-writeType: int16Values: One of the following rates in Mbps: -1 (not applicable), 0 (no rate limit set), 200, 400, 600,800, 1000, 1500, 2000, 2500, 3000, 3500, 4000, 5000, 7000, 8000, 9000, 10000,11000, 12000, 13000, 14000, 15000, 16000. Default: 0.Optional: Yes

non-dfe-enabledDescription: Enables or disables non-DFE mode on the port. Note that Fibre Channel switch Nativemode must be supported. Active receiver DFE uses sophisticated algorithms to automatically adjustthe receiver to compensate for signal distortions.Flag: read-writeType: uint8Values: 0 = Non-DFE mode is disabled on the port. The automatic receiver adjustment throughDFE is activated. 1 = Non-DFE mode is enabled on the port. If the non-DFE enabled port is

brocade-fibrechannel

Brocade Fabric OS REST API Reference, 8.2.0a86 53-1005246-03

Page 87: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

connected to a port that does not require fixed receiver equalization, CRC errors may be detected onthe port and the link may toggle. Even if disabled, non-DFE is still automatically activated if both ofthe following conditions are met: if port speed is 8G or N8 and the received fillword is IDLE. Default:0.Optional: Yes

fibrechannel-statisticsDescription: Statistics for all the interfaces on the device.System-controlled interfaces created by the system are always present in this list, whether they areconfigured or not.Flag: read-writeKey: nameThis list has the following leafs:

nameDescription: The name of the interface.Flag: read-writeType: stringConfig: falseValues: The slot and port number of the port in the format “slot/port”.Optional: No

sampling-intervalDescription: The sampling interval for statistics.Flag: read-onlyType: uint16Config: falseUnits: secondsValues: 1 through 65536. Default: 5Optional: Yes

time-generatedDescription: The time at which the statistics were queried.Flag: read-onlyType: fibrechannel:time-generated-typeConfig: falseUnits: secondsValues: standard IETF date-time outputOptional: Yes

reset-statisticsDescription: Resets statistic counters. The only readable value is 0, and the only settablevalue is 1.Flag: read-writeType: uint8Config: falseValues: 0 = Statistic counters have not been reset. 1 = Statistic counters are reset. A valueof 0 is always returned during read operations.Optional: Yes

brocade-fibrechannel

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 87

Page 88: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

in-octetsDescription: The total number of octets received on the interface, including framingcharacters.Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: octet countValues: 0 through 18446744073709551615Optional: Yes

out-octetsDescription: The total number of octets transmitted out of the interface, including framingcharacters.Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: octet countValues: 0 through 18446744073709551615Optional: Yes

in-multicast-pktsDescription: The number of packets, delivered by this sub-layer to a higher sub-layer, thatwere addressed to a multicast address at this sub-layer. For a MAC-layer protocol, thisincludes both Group and Functional addresses.Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: packet countValues: 0 through 18446744073709551615Optional: Yes

out-multicast-pktsDescription: The total number of packets that higher-level protocols requested betransmitted, and that were addressed to a multicast address at this sub-layer, includingthose that were discarded or not sent. For a MAC-layer protocol, this includes both Groupand Functional addresses.Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: packet countValues: 0 through 18446744073709551615Optional: Yes

in-link-resetsDescription: The number of link resets received.Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: instance countValues: 0 through 18446744073709551615Optional: Yes

brocade-fibrechannel

Brocade Fabric OS REST API Reference, 8.2.0a88 53-1005246-03

Page 89: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

out-link-resetsDescription: The total number of Link resets transmitted.Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: instance countValues: 0 through 18446744073709551615Optional: Yes

in-offline-sequencesDescription: The total number of offline sequences transmitted.Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: instance countValues: 0 through 18446744073709551615Optional: Yes

out-offline-sequencesDescription: The total number of offline sequences transmitted.Flag:read-onlyType: yang:zero-based-counter64Config: falseUnits: instance countValues: 0 through 18446744073709551615Optional: Yes

invalid-ordered-setsDescription: The total number of invalid ordered sets received.Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: set countValues: 0 through 18446744073709551615Optional: Yes

frames-too-longDescription: The number of frames received that were longer than 2140 octets. The valueof 2140 is calculated based on an assumption of 24 header bytes plus 4 CRC bytes and2112 bytes of payload.Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: frame countValues: 0 through 18446744073709551615Optional: Yes

truncated-framesDescription: The total number of truncated frames received.Flag: read-onlyType: yang:zero-based-counter64

brocade-fibrechannel

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 89

Page 90: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Config: falseUnits: frame countValues: 0 through 18446744073709551615Optional: Yes

address-errorsDescription: Count of frames received with unknown addressing. An example is anunknown SID or DID. The SID or DID is not known to the routing algorithm.Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: frame countValues: 0 through 18446744073709551615Optional: Yes

delimiter-errorsDescription: Count of invalid frame delimiters that are received at this port. An examplewould be a frame that has a class 2 start and a class 3 at the end.Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: instance countValues: 0 through 18446744073709551615Optional: Yes

encoding-disparity-errorsDescription: The total number of disparity errors received at this port.Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: error countValues: 0 through 18446744073709551615Optional: Yes

too-many-rdysDescription: The number of instances that the number of RDYs (readys) exceeded thenumber of frames received.Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: instance countValues: 0 through 18446744073709551615Optional: Yes

in-crc-errorsDescription: The number of CRC errors for all frames received.Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: error countValues: 0 through 18446744073709551615

brocade-fibrechannel

Brocade Fabric OS REST API Reference, 8.2.0a90 53-1005246-03

Page 91: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Optional: Yes

crc-errorsDescription: The number of times that the CRC in a frame does not match the CRC that iscomputed by the receiver. This count is part of the Link Error Status Block (LESB).Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: error countValues: 0 through 18446744073709551615Optional: Yes

bad-eofs-receivedDescription: The number of bad EOF frames received.Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: frame countValues: 0 through 18446744073709551615Optional: Yes

encoding-errors-outside-frameDescription: The number of encoding error or disparity error outside frames received.Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: frame countValues: 0 through 18446744073709551615Optional: Yes

multicast-timeoutsDescription: The number of multicast frames that have timed out.Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: frame countValues: 0 through 18446744073709551615Optional: Yes

in-lcsDescription: The number of link control (lcs) frames received.Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: frame countValues: 0 through 18446744073709551615Optional: Yes

in-frame-rateDescription: The instantaneous receive frame rate.Flag: read-onlyType: yang:zero-based-counter64

brocade-fibrechannel

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 91

Page 92: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Config: falseUnits: frame countValues: 0 through 18446744073709551615Optional: Yes

out-frame-rateDescription: The instantaneous transmit frame rate.Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: frame countValues: 0 through 18446744073709551615Optional: Yes

in-max-frame-rateDescription: The maximum frame receive rate since the last reset.Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: frame countValues: 0 through 18446744073709551615Optional: Yes

out-max-frame-rateDescription: The maximum frame transmit rate since the last reset.Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: frame countValues: 0 through 18446744073709551615Optional: Yes

in-rateDescription: The instantaneous byte receive rate.Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: bytesValues: 0 through 18446744073709551615Optional: Yes

out-rateDescription: The instantaneous byte transmit rate.Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: bytesValues: 0 through 18446744073709551615Optional: Yes

in-peak-rateDescription: The peak byte receive rate.

brocade-fibrechannel

Brocade Fabric OS REST API Reference, 8.2.0a92 53-1005246-03

Page 93: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: bytesValues: 0 through 18446744073709551615Optional: Yes

out-peak-rateDescription: The peak byte transmit rate.Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: bytesValues: 0 through 18446744073709551615Optional: Yes

in-framesDescription: The number of frames received at this port.Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: frame countValues: 0 through 18446744073709551615Optional: Yes

out-framesDescription: The number of frames transmitted from this port.Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: frame countValues: 0 through 18446744073709551615Optional: Yes

bb-credit-zeroDescription: The number of transitions in and out of BB credit zero state.Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: transition countValues: 0 through 18446744073709551615Optional: Yes

input-buffer-fullDescription: The number of transitions in and out of Input Buffer Full state.Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: transition countValues: 0 through 18446744073709551615Optional: Yes

brocade-fibrechannel

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 93

Page 94: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

f-busy-framesDescription: The number of F_BSY (fabric busy) frames generated.Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: frame countValues: 0 through 18446744073709551615Optional: Yes

p-busy-framesDescription: The number of P_BSY (port busy) frames generated.Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: frame countValues: 0 through 18446744073709551615Optional: Yes

f-rjt-framesDescription: The number of F_RJT (fabric frame reject) frames generated.Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: frame countValues: 0 through 18446744073709551615Optional: Yes

p-rjt-framesDescription: The number of P_RJT (port frame reject) frames generated.Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: frame countValues: 0 through 18446744073709551615Optional: Yes

class-1-framesDescription: The number of Class 1 frames received at this port.Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: frame countValues: 0 through 18446744073709551615Optional: Yes

class-2-framesDescription: The number of Class 2 frames received at this port.Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: frame count

brocade-fibrechannel

Brocade Fabric OS REST API Reference, 8.2.0a94 53-1005246-03

Page 95: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Values: 0 through 18446744073709551615Optional: Yes

class-3-framesDescription: The number of Class 3 frames received at this port.Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: frame countValues: 0 through 18446744073709551615Optional: Yes

class-3-discardsDescription: The number of Class 3 frames discarded by this port.Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: frame countValues: 0 through 18446744073709551615Optional: Yes

link-failuresDescription: The number of link failures at this port.Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: instance countValues: 0 through 18446744073709551615Optional: Yes

invalid-transmission-wordsDescription: The number of invalid transmission words received at this port.Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: word countValues: 0 through 18446744073709551615Optional: Yes

primitive-sequence-protocol-errorDescription: The number of primitive sequence protocol errors detected at this port.Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: error countValues: 0 through 18446744073709551615Optional: Yes

loss-of-signalDescription: The number of signal loss instances detected at this port.Flag: read-onlyType: yang:zero-based-counter64

brocade-fibrechannel

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 95

Page 96: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Config: falseUnits: instance countValues: 0 through 18446744073709551615Optional: Yes

loss-of-syncDescription: The number of instances of synchronization loss detected at this port.Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: instance countValues: 0 through 18446744073709551615Optional: Yes

class3-in-discardsDescription: The number of class 3 receive frames discarded due to timeout.Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: frame countValues: 0 through 18446744073709551615Optional: Yes

class3-out-discardsDescription: The number of class 3 transmit frames discarded due to timeout.Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: frame countValues: 0 through 18446744073709551615Optional: Yes

pcs-block-errorsDescription: The number of physical coding sublayer (PCS) block errors. This counterrecords encoding violations on 10 Gbps or 16 Gbps ports.Flag: read-onlyType: yang:zero-based-counter64Config: falseUnits: block error countValues: 0 through 18446744073709551615Optional: Yes

Supported methodsOnly the GET, HEAD, OPTIONS, and PATCH operations are supported in this module.

ExamplesComparable Fabric OS CLI commands include portStatsShow and portErrorShow. Refer to the Brocade Fabric OS CommandReference for information and examples of these commands.

brocade-fibrechannel

Brocade Fabric OS REST API Reference, 8.2.0a96 53-1005246-03

Page 97: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Retrieving a list of Fibre Channel resourcesThis example uses a GET request to retrieve a list of all Fibre Channel resources in the fabric.

StructureGET <base_URI>/running/brocade-interface/fibrechannel

URI requestGET https://10.10.10.10/rest/running/brocade-interface/fibrechannel

Request bodyNo request body is required.

brocade-fibrechannel

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 97

Page 98: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Response bodyWhen the operation is successful, the response has a message body similar to the following, and a “200 OK” status appears inthe header.

<?xml version="1.0"?><Response> <fibrechannel> <name>0/0</name> <wwn>10:10:10:eb:1a:b7:77:bc</wwn> <port-type>11</port-type> <speed>16000000000</speed> <user-friendly-name>port0</user-friendly-name> <operational-status>3</operational-status> <enabled-state>2</enabled-state> <auto-negotiate>1</auto-negotiate> <fcid>65536</fcid> <persistent-disable>0</persistent-disable> <g-port-locked>0</g-port-locked> <e-port-disable>0</e-port-disable> <qos-enabled>0</qos-enabled> <d-port-enable>0</d-port-enable> <compression-configured>0</compression-configured> <compression-active>0</compression-active> <encryption-active>0</encryption-active> <neighbor/> <target-driven-zoning-enable>0</target-driven-zoning-enable> </fibrechannel> . . . <fibrechannel> <name>0/47</name> <wwn>10:1f:10:eb:1a:b7:77:bc</wwn> <port-type>11</port-type> <speed>16000000000</speed> <user-friendly-name>port47</user-friendly-name> <operational-status>3</operational-status> <enabled-state>6</enabled-state> <auto-negotiate>1</auto-negotiate> <fcid>77568</fcid> <persistent-disable>0</persistent-disable> <g-port-locked>0</g-port-locked> <e-port-disable>0</e-port-disable> <qos-enabled>0</qos-enabled> <d-port-enable>0</d-port-enable> <compression-configured>0</compression-configured> <compression-active>0</compression-active> <encryption-active>0</encryption-active> <neighbor/> <target-driven-zoning-enable>0</target-driven-zoning-enable> </fibrechannel></Response>

Getting details on a single Fibre Channel portThis example uses a GET request to get the details of a single Fibre Channel port; in this example, port 0/10.

StructureGET <base_URI>/running/brocade-interface/fibrechannel/name/fibre-channel-interface-name

URI requestGET https://10.10.10.10/rest/running/brocade-interface/fibrechannel/name/0%2f10

brocade-fibrechannel

Brocade Fabric OS REST API Reference, 8.2.0a98 53-1005246-03

Page 99: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Request bodyNo request body is required.

Response bodyWhen the operation is successful, the response has a message body similar to the following, and a “200 OK” status appears inthe header.

<?xml version="1.0"?><Response> <fibrechannel> <name>0/10</name> <wwn>10:1a:14:15:1c:9e:3b:aa</wwn> <port-type>11</port-type> <speed>32000000000</speed> <user-friendly-name>port10</user-friendly-name> <operational-status>3</operational-status> <enabled-state>6</enabled-state> <fcid>68096</fcid> <persistent-disable>0</persistent-disable> <g-port-locked>0</g-port-locked> <e-port-disable>0</e-port-disable> <qos-capabilities>3</qos-capabilities> <qos-enabled>1</qos-enabled> <d-port-enable>0</d-port-enable> <compression-configured>0</compression-configured> <compression-active>0</compression-active> <encryption-active>0</encryption-active> <neighbor/> </fibrechannel></Response>

Getting details on a single Fibre Channel port attributeThis example uses a GET request to determine if trunking is enabled on a port; in this example, port 3/4.

NOTEYou can get details for any port attribute in the fibrechannel-interface container.

StructureGET <base_URI>/running/brocade-interface/fibrechannel/name/fibre-channel-interface-name

URI requestGET https://10.10.10.10/rest/running/brocade-interface/fibrechannel/name/3%2f4/trunk-port-enabled

Request bodyNo request body is required.

brocade-fibrechannel

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 99

Page 100: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Response bodyWhen the operation is successful, the response has a message body similar to the following, and a “200 OK” status appears inthe header.

<?xml version="1.0"?><Response> <fibrechannel> <name>3/4</name> <trunk-port-enabled>1</trunk-port-enabled> </fibrechannel></Response>

Configuring a single Fibre Channel port attributeThis example uses a PATCH request to disable trunking on a port; in this example, port 3/4.

NOTEYou can configure any read-write port attribute in the fibrechannel container.

StructurePATCH <base_URI>/running/brocade-interface/fibrechannel/name/fibre-channel-interface-name

URI requestGET https://10.10.10.10/rest/running/brocade-interface/fibrechannel/name/3%2f4/trunk-port-enabled/0

Request bodyNo request body is required.

Response bodyWhen the operation is successful, the response has a message body similar to the following, and a “200 OK” status appears inthe header.

<?xml version="1.0"?><Response> <fibrechannel> <name>3/4</name> <trunk-port-enabled>0</trunk-port-enabled> </fibrechannel></Response>

Setting the user-friendly name for a Fibre Channel interfaceThis example uses a PATCH request to set the user-friendly name for the Fibre Channel interface 10/2.

StructurePATCH <base_URI>/running/brocade-interface/fibrechannel/name/fibre-channel-interface-name/user-friendly-name/user-friendly-name

brocade-fibrechannel

Brocade Fabric OS REST API Reference, 8.2.0a100 53-1005246-03

Page 101: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

URI requestNotice that the slash character in the name resource is encoded as “%2f”.

PATCH https://10.10.10.10/rest/running/brocade-interface/fibrechannel/name/10%2f2/user-friendly-name/Port_ten-two

Request bodyNo request body is required.

Response bodyWhen the operation is successful, the response has an empty message body and a “204 No Content” status appears in theheader.

Setting a Fibre Channel interface stateThis example uses an PATCH request to disable the Fibre Channel interface 10/2.

StructurePATCH <base_URI>/running/brocade-interface/fibrechannel/name/fibre-channel-interface-name/enabled-state/enabled-state

URI requestPATCH https://10.10.10.10/rest/running/brocade-interface/fibrechannel/name/10%2f2/enabled-state/6

Request bodyNo request body is required.

Response bodyWhen the operation is successful, the response has an empty message body and a “204 No Content” status appears in theheader.

HistoryRelease version History

Fabric OS 8.2.0 This API call was introduced.

Fabric OS 8.2.0a This API call was modified to add new parameters to the brocade-interface container.

brocade-fibrechannel

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 101

Page 102: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

brocade-fibrechannel-diagnosticsThis module provides support for both Fibre Channel diagnostic port configuration and diagnostic port results. It expects thatthe switch is configured with an actual online diagnostics port (D_Port).

For information on diagnostics, refer to the Brocade Fabric OS Troubleshooting and Diagnostics Guide .

Module treeThis is the tree view of the module from the brocade-fibrechannel-diagnostics.yang-tree.txt file. Refer to YANG moduleoverview on page 26 for YANG node field definitions and possible values, and Supported data types on page 26 for data typedescriptions.

module: brocade-fibrechannel-diagnostics +--rw diagnostics +--rw fibrechannel-diagnostics* [name] +--rw name string +--rw diagnostic-control? uint32 +--ro mode? enumeration +--ro state? string +--ro distance? int32 +--ro electrical-loopback-test | +--ro result? result-type | +--ro comments? comments-type +--ro optical-loopback-test | +--ro result? result-type | +--ro comments? comments-type +--ro link-traffic-test | +--ro result? result-type | +--ro comments? comments-type +--ro start-time? yang:date-and-time +--rw frame-count? yang:counter32 +--rw frame-size? uint32 +--rw time? string +--rw payload-pattern | +--rw pattern? string | +--rw payload? string +--rw fec | +--rw enable? enumeration | +--ro active? enumeration | +--ro option? enumeration +--ro rt-latency? uint32 +--ro buffers-required? string +--ro end-time? yang:date-and-time +--rw cr | +--rw enable? enumeration | +--ro active? enumeration | +--ro option? enumeration +--ro failure-report | +--ro errors-detected-local? enumeration | +--ro errors-detected-remote? enumeration +--ro egress-power-loss | +--ro tx? decimal64 | +--ro rx? decimal64 | +--ro loss? decimal64 | +--ro comments? string +--ro ingress-power-loss +--ro tx? decimal64 +--ro rx? decimal64 +--ro loss? decimal64 +--ro comments? string

brocade-fibrechannel-diagnostics

Brocade Fabric OS REST API Reference, 8.2.0a102 53-1005246-03

Page 103: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

URI formatThe URI format for this module takes the following form:

<base_URI>/running/diagnostics/fibrechannel-diagnostics/ followed by the leafs as listed in the module tree.

Parametersdiagnostics

Description: The base container for this module.This module allows you to manually start, restart, or stop a test running on a diagnostic port (D_Port). Theportdporttest --show command displays the result of the D_Port tests. The port must be configured as a D_Port andphysically connected to a second D_Port on a remote switch. Refer to the Brocade Fabric OS Command Referencefor more information. The portdporttest --start command only needs to be issued on one end of the link. You canperform the following diagnostics via REST:• An electrical loopback test (supported only on 16Gb and 32Gb SFPs capable of electrical loopback).• An optical loopback test (supported only on 16Gb and 32Gb SFPs capable of optical loopback).• A link traffic test.• A link distance measurement.

NOTEOnly Dynamic D_Ports are supported by this module.

Flag: read-writeThis container has the following leafs:

fibrechannel-diagnosticsDescription: The list of diagnostic ports on the specified device.Flag: read-writeOptional: NoKey: nameThis container has the following leafs:

nameDescription: The name of the interface.Flag: read-writeType: ListConfig: falseValues: The slot and port number of the port, in “slot/port” format. This supports a maximum of 12slots and a maximum of 1024 ports.Optional: No

diagnostic-controlDescription: Manually start the test, re-initiate the test, or stop the test on a diagnostic port (D_Port).Flag: read-writeType: uint32Values: 0 = Terminates the diagnostics on the D_Port. 1 = Initiates the diagnostics on the D_Port. 2= Restarts the D Port diagnostic tests with the configured parameters. Option 2 is not supported forD_Port HBA connections. Default: 0Optional: Yes

brocade-fibrechannel-diagnostics

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 103

Page 104: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

modeDescription: This indicates whether the test was started manually or automatically.Flag: read-onlyType: enumerationConfig: falseValues: manual = Test started manually (manually restarted using either the CLI or the API).automatic = Test started automatically (initiated due to a “port online” event). Default: manualOptional: Yes

stateDescription: The overall test status.Flag: read-onlyType: stringConfig: falseValues:PASSED = The diagnostic test succeeded. (On the link initiator or link responder.)FAILED = The diagnostic test has failed. (On the link initiator or link responder.)FAILED (protocol error) = The diagnostic test has failed with a protocol error. (On the link initiatoronly.)IN PROGRESS = The diagnostic test is in progress. (On the link initiator only.)NOT STARTED = The diagnostic test has not started. (On the link initiator only.)SKIPPED = One or more of the three tests was skipped. (On the link initiator only.)STOPPED = The diagnostic test was stopped. (On the link initiator or link responder.)RESPONDER = The port is in “responder” state. Test results are only available at the initiator port onthe remote side of the link.Optional: Yes

distanceDescription: The estimated physical distance of the length of the interswitch link in metres.The link distance accuracy for SPFs or ICL ports which do not support electrical wrap or opticalwrap functionality is +/- 50 meters for 8 Gbps LWL SFPs, 8 Gbps ELWL SFPs, 10 Gbps SFPs,and ICL ports, and +/- 5 meters for 16 Gbps and 16 Gbps SFPs and QSFPs.Flag: read-onlyType: int32Config: falseUnits: meterValues: -1 through 4294967295. A value of -1 indicates an unknown distance.Optional: Yes

electrical-loopback-testDescription: An electrical loopback test.This is supported only on 16 Gbps and 32 Gbps SFPs capable of electrical loopback.Config: falseThis container has the following leafs:

resultDescription: The completion status of this test.Flag: read-onlyType: stringValues:PASSED = The diagnostic test succeeded. (On the link initiator or link responder.)

brocade-fibrechannel-diagnostics

Brocade Fabric OS REST API Reference, 8.2.0a104 53-1005246-03

Page 105: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

FAILED = The diagnostic test has failed. (On the link initiator or link responder.)IN PROGRESS = The diagnostic test is in progress. (On the link initiator only.)NOT STARTED = The diagnostic test has not started. (On the link initiator only.)SKIPPED = One or more of the three tests was skipped. (On the link initiator only.)STOPPED = The diagnostic test was stopped. (On the link initiator or link responder.)RESPONDER = The port is in “responder” state. Test results are only available at theinitiator port on the remote side of the link.UNKNOWN = The result could not be determined.Optional: Yes

commentsDescription: Additional textual information elaborating on the completion status when testis skipped or fails.Flag: read-onlyType: comments-typeValues: Responses may include: Test failed; No SFP or chip support; See remote portresults; Remote port is not ready to start the test; Too many offline events; Remote port testfailed; Remote port WWN changed; Slot or port offline; Protocol error; Unable to start/restart the test; D-Port mode mismatch, Not D-Port; Module removed; No remote SFP orchip support; No remote port support or skipped; E_WRAP/O_WRAP set failed; Useropted to skip; Test skipped due to SFP loopback error; or Test timed out. An empty stringis returned when there are no valid comments.Optional: Yes

optical-loopback-testDescription: An optical loopback test.This is supported only on 16 Gbps and 32 Gbps SFPs that are capable of optical loopback.Config: falseThis container has the following leafs:

resultDescription: The completion status of this test.Flag: read-onlyType: stringValues:PASSED = The diagnostic test succeeded. (On the link initiator or link responder.)FAILED = The diagnostic test has failed. (On the link initiator or link responder.)STOPPED = The diagnostic test was stopped. (On the link initiator or link responder.)IN PROGRESS = The diagnostic test is in progress. (On the link initiator only.)NOT STARTED = The diagnostic test has not started. (On the link initiator only.)SKIPPED = One or more of the three tests was skipped. (On the link initiator only.)RESPONDER = The port is in “responder” state. Test results are only available at theinitiator port on the remote side of the link.UNKNOWN = The result could not be determined.Optional: Yes

commentsDescription: Additional textual information elaborating on the completion status when testis skipped or fails.Flag: read-onlyType: comments-type

brocade-fibrechannel-diagnostics

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 105

Page 106: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Values: Responses may include: Test failed; No SFP or chip support; See remote portresults; Remote port is not ready to start the test; Too many offline events; Remote port testfailed; Remote port WWN changed; Slot or port offline; Protocol error; Unable to start/restart the test; D-Port mode mismatch, Not D-Port; Module removed; No remote SFP orchip support; No remote port support or skipped; E_WRAP/O_WRAP set failed; Useropted to skip; Test skipped due to SFP loopback error; or Test timed out. An empty stringis returned when there are no valid comments.Optional: Yes

link-traffic-testDescription: The results of the link traffic test and any comments appended to those results.Config: falseThis container has the following leafs:

resultDescription: The completion status of this test.Flag: read-onlyType: result-typeValues:PASSED = The diagnostic test succeeded. (On the link initiator or link responder.)FAILED = The diagnostic test has failed. (On the link initiator or link responder.)IN PROGRESS = The diagnostic test is in progress. (On the link initiator only.)NOT STARTED = The diagnostic test has not started. (On the link initiator only.)SKIPPED = One or more of the three tests was skipped. (On the link initiator only.)STOPPED = The diagnostic test was stopped. (On the link initiator or link responder.)RESPONDER = The port is in “responder” state. Test results are only available at theinitiator port on the remote side of the link.UNKNOWN = The result could not be determined.Optional: Yes

commentsDescription: Additional textual information elaborating on the completion status when testis skipped or fails.Flag: read-onlyType: comments-typeConfig: falseValues: Responses may include: Test failed; No SFP or chip support; See remote portresults; Remote port is not ready to start the test; Too many offline events; Remote port testfailed; Remote port WWN changed; Slot or port offline; Protocol error; Unable to start/restart the test; D-Port mode mismatch, Not D-Port; Module removed; No remote SFP orchip support; No remote port support or skipped; E_WRAP/O_WRAP set failed; Useropted to skip; Test skipped due to SFP loopback error; or Test timed out. An empty stringis returned when there are no valid comments.Optional: Yes

start-timeDescription: Time that the diagnostics run was started.Flag: read-onlyConfig: falseType: yang:date-and-timeUnits: seconds

brocade-fibrechannel-diagnostics

Brocade Fabric OS REST API Reference, 8.2.0a106 53-1005246-03

Page 107: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Values: Standard IETF date and time (Refer to the ietf-yang-types.yang file for format information.)Optional: Yes

frame-countDescription: Number of frames sent for the link traffic test in millions. The default value is 1 for 1million frames. If more than the maximum number of frames is specified, the test uses only theinitial 65535 million frames.Note: This is mutually exclusive with the “time” leaf. A request can have only one of these leafs.Flag: read-writeType: yang:counter32Units: frame countValues: 1 through 65535. Default: 1 (1 million frames)Optional: Yes

frame-sizeDescription: The size in bytes of the diagnostics test frame.Flag: read-writeType: uint32Units: bytesValues: 36 through 2112. The frame size should be specified in multiples of 4 (4, 8, 12, 16…); if thevalue is not a multiple of 4, the nearest higher multiple of 4 value will be taken as the frame size.Default: 1024Optional: Yes

timeDescription: Specifies the time duration (in HH:MM format) for which the frame traffic test shouldrun.Note: This is mutually exclusive with the “frame-count” leaf. A request can have only one of theseleafs.Flag: read-writeType: yang:hh:mmUnits: secondsValues: 00:00 to 99:59 in the format <Hours><Hours>:<Minutes><Minutes>.Optional: Yes

payload-patternThe diagnostic frame payload and pattern.This container has the following mutually-exclusive leafs:

patternDescription: The name of the system-defined industry pattern to be used in the payload.Flag: read-writeType: stringValues: A system-defined industry pattern name. Valid patterns are: BYTE_NOT,QUAD_NOT, WORD_NOT, BYTE_RAMP, QUAD_RAMP, WORD_RAMP, BYTE_LFSR,RANDOM, CRPAT, CSPAT, CHALF_SQ, CQTR_SQ,RDRAM_PAT, jCRPAT, jCJTPAT,jCSPAT, PRED_RAND, SMI_TEST, CJPAT, QUAD_NOTP, JSPAT, JTSPAT. Use the FabricOS datatypeshow command to get the frame pattern details as a list. Default: jCRPATOptional: Yes

payloadDescription: The user-defined payload pattern.

brocade-fibrechannel-diagnostics

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 107

Page 108: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Flag: read-writeType: stringValues: 32 hexadecimal characters.Optional: Yes

fecDescription: Switch Forward Error Correction (FEC) status for diagnostic testing.This option is not supported on ports configured with Dense Wavelength Division Multiplexing(DWDM).This container has the following leafs:

enableDescription: FEC status on the specified switch.When FEC is enabled on a port, the sender adds systematically generated error-correctingcode (ECC) to its data transmission. This mechanism allows the receiver to detect andcorrect errors without needing to get additional information from the sender. This leaf onlysupports enabling FEC for D_Port testing. It is not possible to disable FEC through REST.Flag: read-writeType: enumerationValues: Yes = FEC is enabled. No = FEC is disabled. Default: Based on the existing switchconfigurationOptional: Yes

activeDescription: FEC state on the specified switch.The FEC state can be active or inactive. Active indicates that FEC is enabled and actuallyrunning. Inactive can indicate either of two conditions: FEC is enabled but not running dueto some error condition (for example, FEC may not be enabled on both ends of the link), orFEC is disabled and therefore inactive.Flag: read-onlyType: enumerationConfig: falseValues: Yes = FEC is active. No = FEC is not active or is disabled. Default: Based on theexisting switch configurationOptional: Yes

optionDescription: Indicates whether or not the D_Port diagnostic test is using FEC.Flag: read-onlyType: enumerationConfig: falseValues: Yes = FEC is used in D_Port tests. No = FEC is not used in D_Port tests. Default:Based on the existing switch configurationOptional: Yes

rt-latencyDescription: Roundtrip link latency is the time required for light to travel from a given port to the portat the remote side of the link and back.Flag: read-onlyType: uint32Units: nanoseconds

brocade-fibrechannel-diagnostics

Brocade Fabric OS REST API Reference, 8.2.0a108 53-1005246-03

Page 109: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Values: 0 to 4294967295. This function returns “unknown” when the test is in progress.Optional: Yes

buffers-requiredDescription: Number of buffers required for the given distance and speed.No matter what size of the test frame is, the number of buffers required is calculated for 2112-byteframes.Flag: read-onlyType: stringConfig: falseUnits: buffer countValues: A text string recording 1 to the maximum number of buffers supported by the platform.Default: Based on the existing switch configuration.Optional: Yes

end-timeDescription: Time that the diagnostics run ended.Flag: read-onlyConfig: falseType: yang:date-and-timeUnits: secondsValues: Standard date and time (Refer to the ietf-yang-types.yang file for format information.)Optional: Yes

crDescription: Switch Credit Recovery status. This leaf only supports enabling Credit Recovery forD_Port testing.This container has the following leafs:

enableDescription: Credit Recovery feature status on the specified switch.Flag: read-writeType: enumerationValues: Yes = Credit Recovery is enabled. No = Credit Recovery is disabled. Default: Basedon the existing switch configurationOptional: Yes

activeDescription: Credit Recovery state on the specified switch.Flag: read-onlyType: enumerationConfig: falseValues: Yes = Credit Recovery is active. No = Credit Recovery is not active. Default: Basedon the existing switch configurationOptional: Yes

optionDescription: Indicates whether or not the D_Port diagnostic test is using Credit Recovery.Flag: read-onlyType: enumerationConfig: false

brocade-fibrechannel-diagnostics

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 109

Page 110: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Values: Yes = Credit Recovery is used in D_Port tests. No = Credit Recovery is not used inD_Port tests. Default: Based on the existing switch configurationOptional: Yes

failure-reportDescription: Displays if there are errors on the local port and remote port.Config: falseThis list has the following leafs:

errors-detected-localDescription: Errors detected on the local port.Flag: read-onlyType: enumerationValues: Yes = Errors were detected on the local port. No = Errors were not detected on thelocal port.Optional: Yes

errors-detected-remoteDescription: Errors detected on the remote port.Flag: read-writeType: enumerationValues: Yes = Errors were detected on the remote port. No = Errors were not detected onthe remote port.Optional: Yes

egress-power-lossDescription: The power values and power loss in the transmitting (outbound) path.The following values are displayed: power transmitted from the local side of the link (Tx), powerreceived on the remote side of the link (Rx), the power loss, that is, the relative difference in power(Diff), and the status of the cable power loss (No loss, within tolerable limits, or outside of tolerablelimits).Config: falseThis container has the following leafs:

txDescription: The power transmitted from the local side of the link (Tx).Flag: read-onlyType: decimal64Units: dBmValues: 1 through 255Optional: Yes

rxDescription: The power received on the remote side of the link (Rx).Flag: read-onlyType: decimal64Units: dBmValues: 1 through 255Optional: Yes

lossDescription: The power lost in transmission (the relative difference in power) on this path.Flag: read-only

brocade-fibrechannel-diagnostics

Brocade Fabric OS REST API Reference, 8.2.0a110 53-1005246-03

Page 111: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Type: decimal64Units: dBmValues: 1 through 255Optional: Yes

commentsDescription: Status of the power lossFlag: read-onlyType: stringValues: No Loss, Cable power loss is within tolerable limits, or Cable power loss is outsidetolerable limits.Optional: Yes

ingress-power-lossDescription: The power values and power loss in the receiving (inbound) path.The following values are displayed: power transmitted from the local side of the link (Tx), powerreceived on the remote side of the link (Rx), the power loss, that is, the relative difference in power(Diff), and the status of the cable power loss (No loss, within tolerable limits, or outside of tolerablelimits).Config: falseThis container has the following leafs:

txDescription: Power transmitted from the remote side of the link (Tx).Flag: read-onlyType: decimal64Units: dBmValues: 1 through 255Optional: Yes

rxDescription: The power received on the local side of the link (Rx).Flag: read-onlyType: decimal64Units: dBmValues: 1 through 255Optional: Yes

lossDescription: The power lost in transmission (the relative difference in power) on this path.Flag: read-onlyType: decimal64Units: dBmValues: 1 through 255Optional: Yes

commentsDescription: The status of the power loss.Flag: read-onlyType: stringValues: No Loss, Cable power loss is within tolerable limits, or Cable power loss is outsidetolerable limits.

brocade-fibrechannel-diagnostics

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 111

Page 112: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Optional: Yes

Supported methodsThe GET, HEAD, PATCH, and OPTIONS are supported in this module.

Examples

Retrieving diagnostic port detailsThis example uses a GET request to retrieve the details of the diagnostic port.

StructureGET <base_URI>/running/diagnostics/fibrechannel-diagnostics

URI requestGET https://10.10.10.10/rest/running/diagnostics/fibrechannel-diagnostics

Request bodyNo request body is required.

brocade-fibrechannel-diagnostics

Brocade Fabric OS REST API Reference, 8.2.0a112 53-1005246-03

Page 113: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Response bodyWhen the operation is successful, the response has a message body similar to the following, and a “200 OK” status in theheaders.

<?xml version="1.0"?><Response> <fibrechannel-diagnostics> <name>0/0</name> <diagnostic-control>0</diagnostic-control> <mode>Manual</mode> <state>PASSED </state> <distance>1</distance> <electrical-loopback> <Result>PASSED</Result> <Comments>----------</Comments> </electrical-loopback> <optical-loopback> <Result>SKIPPED</Result> <Comments>----------</Comments> </optical-loopback> <remote-loopback> <Result>PASSED</Result> <Comments>----------</Comments> </remote-loopback> <start-time>Sun Oct 1 22:13:01 2017</start-time> <frame-count>2</frame-count> <frame-size>2112</frame-size> <time></time> <payload-pattern> <Pattern>0</Pattern> <Payload>0</Payload> </payload-pattern> <fec> <Enable>yes</Enable> <Active>no</Active> </fec> <cr> <Enable>yes</Enable> <Active>no</Active> </cr> <rt-latency>303</rt-latency> <required-buffers>Buffers required: 1 (for 2112 byte frames at 16Gbps speed)</required-buffers> <failure-report> <errors-detected-local>No</errors-detected-local> <errors-detected-remote>No</errors-detected-remote> </failure-report> <end-time>Sun Oct 1 22:13:35 2017</end-time> <egress-powerloss> <TX>-4.2</TX> <RX>-3.5</RX> <LOSS>0.0</LOSS> <COMMENTS>No Loss</COMMENTS> </egress-powerloss> <ingress-powerloss> <TX>-2.2</TX> <RX>-2.8</RX> <LOSS>0.6</LOSS> <COMMENTS>Cable power loss is within tolerable limits</COMMENTS> </ingress-powerloss> </fibrechannel-diagnostics> <fibrechannel-diagnostics> <name>0/1</name> <diagnostic-control>0</diagnostic-control> <mode>Manual</mode> <state>PASSED</state> <distance>1</distance> <electrical-loopback> <Result>PASSED</Result> <Comments>----------</Comments> </electrical-loopback>

brocade-fibrechannel-diagnostics

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 113

Page 114: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

<optical-loopback> <Result>SKIPPED</Result> <Comments>----------</Comments> </optical-loopback> <remote-loopback> <Result>PASSED</Result> <Comments>----------</Comments> </remote-loopback> <start-time>Wed Mar 1 22:13:01 2017</start-time> <frame-count>2</frame-count> <frame-size>2112</frame-size> <time></time> <payload-pattern> <Pattern>0</Pattern> <Payload>0</Payload> </payload-pattern> <fec> <Enable>yes</Enable> <Active>no</Active> </fec> <cr> <Enable>yes</Enable> <Active>no</Active> </cr> <rt-latency>303</rt-latency> <required-buffers>Buffers required: 1 (for 2112 byte frames at 16Gbps speed)</required-buffers> <failure-report> <errors-detected-local>No</errors-detected-local> <errors-detected-remote>No</errors-detected-remote> </failure-report> <end-time>Sun Oct 1 22:13:35 2017</end-time> <egress-powerloss> <TX>-2.2</TX> <RX>-2.8</RX> <LOSS>0.6</LOSS> <COMMENTS>Cable power loss is within tolerable limits</COMMENTS> </egress-powerloss> <ingress-powerloss> <TX>-4.2</TX> <RX>-3.5</RX> <LOSS>0.0</LOSS> <COMMENTS>No Loss</COMMENTS> </ingress-powerloss> </fibrechannel-diagnostics></Response>

Retrieving the test status of a diagnostic portThis example uses a GET request to discover the status of the diagnostic port at the address “0/1”.

StructureGET <base_URI>/running/diagnostics/fibrechannel-diagnostics/name/<port_ID>/state

URI requestNotice that the slash character in the name resource is encoded as “%2f”.

GET https://10.10.10.10/rest/running/diagnostics/fibrechannel-diagnostics/name/0%2f1/state

Request bodyNo request body is required.

brocade-fibrechannel-diagnostics

Brocade Fabric OS REST API Reference, 8.2.0a114 53-1005246-03

Page 115: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Response bodyWhen the operation is successful, the response has a message body similar to the following, and a “200 OK” status in theheaders.

<?xml version="1.0"?><Response> <fibrechannel-diagnostics> <name>0/1</name> <state>PASSED</state> </fibrechannel-diagnostics></Response>

Starting a diagnostic port testThis example uses a PATCH request to start a diagnostic port test on port “0/1” with a frame count of 2 and a frame size of2112 bytes.

StructurePATCH <base_URI>/running/diagnostics/fibrechannel-diagnostics/name/<portID>/diagnostic-control/<instruction>

URI requestPATCH https://10.10.10.10/rest/running/diagnostics/fibrechannel-diagnostics/name/0%2f1/diagnostic-control/1

Request body<frame-count>2</frame-count><frame-size>2112</frame-size>

Response bodyWhen the operation is successful, the response contains an empty message body and a “200 OK” status in the headers.

Stopping a diagnostic port testThis example uses a PATCH request to stop the diagnostic port test on port “0/1”.

StructurePATCH <base_URI>/running/diagnostics/fibrechannel-diagnostics/name/<port_ID>/diagnostic-control/<instruction>

URI requestPATCH https://10.10.10.10/rest/running/diagnostics/fibrechannel-diagnostics/name/0%2f1/diagnostic-control/0

Request bodyNo request body is required.

brocade-fibrechannel-diagnostics

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 115

Page 116: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Response bodyWhen the operation is successful, the response contains an empty message body and a “200 OK” status in the headers.

HistoryRelease version History

Fabric OS 8.2.0 This API call was introduced.

brocade-fibrechannel-diagnostics

Brocade Fabric OS REST API Reference, 8.2.0a116 53-1005246-03

Page 117: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

brocade-fibrechannel-logical-switchThis module retrieves information of all logical switches in a operational chassis. This module also provides a logical switchconfiguration.

It assumes a knowledge of Virtual Fabrics and logical switches as performed in Fabric OS. For more information, refer toManaging Virtual Fabrics in the Brocade Fabric OS Administrator's Guide.

NOTEThe brocade-fibrechannel-logical-switch module is supported in Fabric OS 8.2.0a and later.

Module treeThis is the tree view of the module from the brocade-fibrechannel-logical-switch.yang-tree.txt file. Refer to YANG moduleoverview on page 26 for YANG node field definitions and possible values, and Supported data types on page 26 for data typedescriptions.

module: brocade-fibrechannel-logical-switch +--rw logical-switch +--rw fibrechannel-logical-switch* [fabric-id] +--rw fabric-id uint32 +--ro switch-wwn? fibrechannel:wwn-type +--rw base-switch-enabled? uint8 +--ro default-switch-status? uint8 +--rw logical-isl-enabled? uint8 +--rw ficon-mode-enabled? uint8 +--rw port-member-list | +--rw port-member* fibrechannel:slot-port-name-type +--rw ge-port-member-list +--rw port-member* fibrechannel:slot-port-name-type

URI formatThe URI format for this module takes the following form:

<base_URI>/running/logical-switch/fibrechannel-logical-switch to retrieve logical switch information or

configure a logical switch.

Parametersbrocade-fibrechannel-logical-switch

Description: The base container for this module.Flag: read-writeThis container has the following leafs:

logical-switchDescription: Provides logical switch state parameters of all configured logical switches.Flag: read-writeThis container has the following leafs:

fibrechannel-logical-switch*Description: The logical switch configuration.Flag: read-writeKey: fabric-idThis list has the following leafs:

brocade-fibrechannel-logical-switch

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 117

Page 118: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

fabric-idDescription: The virtual fabric identification (VFID) of the logical switch.Flag: read-writeType: uint32Value: 1 to 128 alpha characters.Optional: No

switch-wwnDescription: The switch WWN, which is a unique numeric identifier for the switch assignedby the chassis.Flag: read-onlyType: fibrechannel:wwn-typeValue: A valid WWN for the switch.Config: falseOptional: Yes

base-switch-enabledDescription: The logical switch that is the base switch in the chassis. You can onlyconfigure the base switch when creating a logical switch. Only available when logical isl isdisabled (logical-isl-enabled=0) and ficon-mode is disabled (ficon-mode-enabled=0). Youcannot configure the base swich when deleting a logical switch.Flag: read-writeType: uint8Value: 0 = Disabled. 1 = Enabled. Default is 0.Optional: Yes

default-switch-statusDescription: The logical switch is the default switch in the chassis.Flag: read-onlyType: uint8Value: 0 = Disabled. 1 = Enabled.Config: falseOptional: Yes

logical-isl-enabledDescription: Enables logical ISLs (LISLs) on a logical switch. You can only disable LISLswhen you create a logical switch. Only available when base switch is disabled (base-switch-enabled=0).Flag: read-writeType: uint8Value: 0 = Disabled. 1 = Enabled. Default is 1.Optional: Yes

ficon-mode-enabledDescription: Indicates the FICON mode. Only available when base switch is disabled(base-switch-enabled=0) and default switch status is disabled (default-switch-status=0).You cannot disable FICON mode in a logical switch.Flag: read-writeType: uint8Value: 0 = Disabled. 1 = Enabled. Default is 0.Optional: Yes

brocade-fibrechannel-logical-switch

Brocade Fabric OS REST API Reference, 8.2.0a118 53-1005246-03

Page 119: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

port-member-listDescription: A list of logical switch port interface (fibre channel and flex) names.Flag: read-writeThis container has the following leaf:

port-memberDescription: The name of the fibre channel interface including the slot and portnumber (slot/port). This list only contains fibre channel ports and flex ports.Flag: read-writeType: fibrechannel:slot-port-name-typeValue: The fibre channel or flex port name (slot/port_name).Optional: Yes

ge-port-member-listDescription: A list of logical switch port interface (Gigabit Ethernet (GE)) names.Flag: read-writeThis container has the following leaf:

port-memberDescription: The name of the Gigabit Ethernet (GE) interface including the slotand port number (slot/port). This list only contains GE ports.Flag: read-writeType: fibrechannel:slot-port-name-typeValue: The GE port name (slot/port_name).Optional: Yes

Supported methodsThe GET, POST, PATCH, DELETE, OPTIONS, and HEAD operations are supported in this module.

Examples

Retrieving logical switch informationThis example uses a GET request to retrieve the logical switch information.

StructureGET <base_URI>/running/logical-switch/fibrechannel-logical-switch

URIGET https://10.10.10.10/rest/running/logical-switch/fibrechannel-logical-switch

Request BodyNo request body is required.

brocade-fibrechannel-logical-switch

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 119

Page 120: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Response BodyWhen the operation is successful, the response has a message body similar to the following, and a “200 OK” status appears inthe headers.

<?xml version="1.0"?><Response> <fibrechannel-logical-switch> <fabric-id>128</fabric-id> <base-switch-enabled>0</base-switch-enabled> <switch-wwn>10:00:00:05:1e:b7:44:00</switch-wwn> <default-switch-status>1</default-switch-status> <logical-isl-enabled>1</logical-isl-enabled> <ficon-mode-enabled>0</ficon-mode-enabled> <port-member-list> <port-member>7/0</port-member> <port-member>7/1</port-member> <port-member>7/2</port-member> <port-member>7/3</port-member> <port-member>7/4</port-member> <port-member>7/5</port-member> <port-member>7/6</port-member> <port-member>7/7</port-member> <port-member>7/8</port-member> <port-member>7/9</port-member> <port-member>7/10</port-member> </port-member-list> <ge-port-member-list/> </fibrechannel-logical-switch> <fibrechannel-logical-switch> <fabric-id>10</fabric-id> <base-switch-enabled>0</base-switch-enabled> <switch-wwn>10:00:00:05:1e:b7:44:01</switch-wwn> <default-switch-status>0</default-switch-status> <logical-isl-enabled>1</logical-isl-enabled> <ficon-mode-enabled>0</ficon-mode-enabled> <port-member-list> <port-member>3/12</port-member> <port-member>3/13</port-member> <port-member>3/14</port-member> <port-member>3/15</port-member> </port-member-list> <ge-port-member-list/> </fibrechannel-logical-switch> <fibrechannel-logical-switch> <fabric-id>20</fabric-id> <base-switch-enabled>0</base-switch-enabled> <switch-wwn>10:00:00:05:1e:b7:44:02</switch-wwn> <default-switch-status>0</default-switch-status> <logical-isl-enabled>1</logical-isl-enabled> <ficon-mode-enabled>0</ficon-mode-enabled> <port-member-list/> <ge-port-member-list/> </fibrechannel-logical-switch> <fibrechannel-logical-switch> <fabric-id>1</fabric-id> <base-switch-enabled>1</base-switch-enabled> <switch-wwn>10:00:00:05:1e:b7:44:03</switch-wwn> <default-switch-status>0</default-switch-status> <logical-isl-enabled>0</logical-isl-enabled> <ficon-mode-enabled>0</ficon-mode-enabled> <port-member-list/> <ge-port-member-list/> </fibrechannel-logical-switch> <fibrechannel-logical-switch> <fabric-id>2</fabric-id> <base-switch-enabled>0</base-switch-enabled> <switch-wwn>10:00:00:05:1e:b7:44:04</switch-wwn> <default-switch-status>0</default-switch-status> <logical-isl-enabled>1</logical-isl-enabled> <ficon-mode-enabled>0</ficon-mode-enabled>

brocade-fibrechannel-logical-switch

Brocade Fabric OS REST API Reference, 8.2.0a120 53-1005246-03

Page 121: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

<port-member-list/> <ge-port-member-list/> </fibrechannel-logical-switch> <fibrechannel-logical-switch> <fabric-id>3</fabric-id> <base-switch-enabled>0</base-switch-enabled> <switch-wwn>10:00:00:05:1e:b7:44:05</switch-wwn> <default-switch-status>0</default-switch-status> <logical-isl-enabled>0</logical-isl-enabled> <ficon-mode-enabled>1</ficon-mode-enabled> <port-member-list/> <ge-port-member-list/> </fibrechannel-logical-switch></Response>

Retrieving information for a logical switch instanceThis example uses a GET request to retrieve logical switch information for fabric ID 10.

StructureGET <base_URI>/running/logical-switch/fibrechannel-logical-switch/fabric-id/fabric_id

URIGET https://10.10.10.10/rest/running/logical-switch/fibrechannel-logical-switch/fabric-id/10

No request body is required.

Response BodyWhen the operation is successful, the response has a message body similar to the following, and a “200 OK” status appears inthe headers.

<?xml version="1.0"?><Response> <fibrechannel-logical-switch> <fabric-id>10</fabric-id> <base-switch-enabled>0</base-switch-enabled> <switch-wwn>10:00:00:05:1e:b7:44:01</switch-wwn> <default-switch-status>0</default-switch-status> <logical-isl-enabled>1</logical-isl-enabled> <ficon-mode-enabled>0</ficon-mode-enabled> <port-member-list> <port-member>3/12</port-member> <port-member>3/13</port-member> <port-member>3/14</port-member> <port-member>3/15</port-member> </port-member-list> <ge-port-member-list/> </fibrechannel-logical-switch></Response>

Creating a logical switchThis example uses a POST request to create logical switch "20" which is not a base switch and contains no port assignments.

NOTEPOST requests time out after 3 minutes; therefore, it is recommended that you do not create more than 3 logicalswitches in one POST request.

brocade-fibrechannel-logical-switch

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 121

Page 122: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

StructurePOST <base_URI>/running/logical-switch/fibrechannel-logical-switch

URIPOST https://10.10.10.10/rest/running/logical-switch/fibrechannel-logical-switch

Request Body<fibrechannel-logical-switch> <fabric-id>20</fabric-id> <base-switch-enabled>0</base-switch-enabled></fibrechannel-logical-switch>

Response BodyWhen the operation is successful, there is no response, and a “201 Created” status appears in the headers.

Assigning ports to a logical switchYou can use a POST or PATCH request to assign ports to a logical switch. You must use POST to assign ports to a new logicalswitch. You can use both a POST or PATCH request to assign ports to an existing logical switch. However, when you use aPATCH request to assign ports to an existing logical switch, the PATCH request replaces the existing port list with the new portlist.

NOTEYou cannot use a PATCH request to assign ports to the default logical switch.

This example uses a POST request to assign three ports to a logical switch "20".

StructurePOST <base_URI>/running/logical-switch/fibrechannel-logical-switch

URIPOST https://10.10.10.10/rest/running/logical-switch/fibrechannel-logical-switch

Request Body<fibrechannel-logical-switch> <fabric-id>20</fabric-id> <port-member-list> <port-member>0/1</port-member> <port-member>0/2</port-member> <port-member>0/3</port-member> </port-member-list></fibrechannel-logical-switch>

Response BodyWhen the operation is successful, there is no response, and a “201 Created” status appears in the headers.

brocade-fibrechannel-logical-switch

Brocade Fabric OS REST API Reference, 8.2.0a122 53-1005246-03

Page 123: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Deleting a logical switchThis example uses a DELETE request to delete a logical switch "23".

NOTEYou cannot delete the default logical switch.

StructureDELETE <base_URI>/running/logical-switch/fibrechannel-logical-switch

URIDELETE https://10.10.10.10/rest/running/logical-switch/fibrechannel-logical-switch

Request Body<fibrechannel-logical-switch> <fabric-id>23</fabric-id></fibrechannel-logical-switch>

Response BodyWhen the operation is successful, there is no response, and a “204 No Content” status appears in the headers.

Removing ports from a logical switchThis example uses a DELETE request to remove 2 ports from logical switch "20".

StructureDELETE <base_URI>/running/logical-switch/fibrechannel-logical-switch

URIDELETE https://10.10.10.10/rest/running/logical-switch/fibrechannel-logical-switch

Request Body<fibrechannel-logical-switch> <fabric-id>20</fabric-id> <port-member-list> <port-member>0/1</port-member> <port-member>0/2</port-member> </port-member-list></fibrechannel-logical-switch>

Response BodyWhen the operation is successful, there is no response, and a “204 No Content” status appears in the headers.

brocade-fibrechannel-logical-switch

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 123

Page 124: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Enabling the base switchYou must use a POST request to enable a new logical switch as the base switch. You must use a PATCH request to enable anexisting logical switch as the base switch.

NOTEOnly one logical switch can be configured as the base switch per chassis.

This example uses a POST request to enable a new logical switch "23" as the base switch.

StructurePOST <base_URI>/running/logical-switch/fibrechannel-logical-switch

URIPOST https://10.10.10.10/rest/running/logical-switch/fibrechannel-logical-switch

Request Body<fibrechannel-logical-switch> <fabric-id>23</fabric-id> <base-switch-enabled>1</base-switch-enabled></fibrechannel-logical-switch>

Response BodyWhen the operation is successful, there is no response, and a “201 Created” status appears in the headers.

Disabling the base switchYou must use a PATCH request to disable an existing logical switch as the base switch.

NOTEOnly one logical switch can be configured as the base switch per chassis.

This example uses a PATCH request to disable logical switch "23" as the base switch.

StructurePATCH <base_URI>/running/logical-switch/fibrechannel-logical-switch

URIPATCH https://10.10.10.10/rest/running/logical-switch/fibrechannel-logical-switch

Request Body<fibrechannel-logical-switch> <fabric-id>23</fabric-id> <base-switch-enabled>0</base-switch-enabled></fibrechannel-logical-switch>

brocade-fibrechannel-logical-switch

Brocade Fabric OS REST API Reference, 8.2.0a124 53-1005246-03

Page 125: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Response BodyWhen the operation is successful, there is no response, and a “204 No Content” status appears in the headers.

Enabling the FICON mode on a logical switchYou must use a POST request to enable FICON mode on a new logical switch. You must use a PATCH request to enableFICON mode on an existing logical switch.

This example uses a POST request to create new logical switch "23" with FICON mode enabled.

StructurePOST <base_URI>/running/logical-switch/fibrechannel-logical-switch

URIPOST https://10.10.10.10/rest/running/logical-switch/fibrechannel-logical-switch

Request Body<fibrechannel-logical-switch> <fabric-id>23</fabric-id> <ficon-mode-enabled>1</ficon-mode-enabled></fibrechannel-logical-switch>

Response BodyWhen the operation is successful, there is no response, and a “201 Created” status appears in the headers.

Disabling FICON mode on a logical switchYou can only disable FICON mode during logical switch creation. You must use a POST request to disable FICON mode andcreate a new logical switch.

NOTEYou cannot disable FICON mode on an existing logical switch.

This example uses a POST request to disable FICON mode on new logical switch "24".

StructurePOST <base_URI>/running/logical-switch/fibrechannel-logical-switch

URIPOST https://10.10.10.10/rest/running/logical-switch/fibrechannel-logical-switch

brocade-fibrechannel-logical-switch

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 125

Page 126: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Request Body<fibrechannel-logical-switch> <fabric-id>24</fabric-id> <ficon-mode-enabled>0</ficon-mode-enabled></fibrechannel-logical-switch>

Response BodyWhen the operation is successful, there is no response, and a “201 Created” status appears in the headers.

Enabling the logical ISL on a logical switchYou cannot enable logical ISL when creating a new logical switch. You can only enable logical ISL on an existing logical switchusing a PATCH request.

NOTEYou can only disable logical ISL during logical switch creation using a POST request.

This example uses a PATCH request to enable logical ISL on logical switch "23".

StructurePATCH <base_URI>/running/logical-switch/fibrechannel-logical-switch

URIPATCH https://10.10.10.10/rest/running/logical-switch/fibrechannel-logical-switch

Request Body<fibrechannel-logical-switch> <fabric-id>23</fabric-id> <logical-isl-enabled>1</logical-isl-enabled> </fibrechannel-logical-switch>

Response BodyWhen the operation is successful, there is no response, and a “204 No Content” status appears in the headers.

Disabling logical ISL on a logical switchYou can only disable logical ISL during logical switch creation. You must use a POST request to disable logical ISL and create anew logical switch.

NOTEYou cannot disable logical ISL on an existing logical switch.

This example uses a POST request to disable logical ISL on new logical switch "24".

StructurePOST <base_URI>/running/logical-switch/fibrechannel-logical-switch

brocade-fibrechannel-logical-switch

Brocade Fabric OS REST API Reference, 8.2.0a126 53-1005246-03

Page 127: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

URIPOST https://10.10.10.10/rest/running/logical-switch/fibrechannel-logical-switch

Request Body<fibrechannel-logical-switch> <fabric-id>24</fabric-id> <logical-isl-enabled>0</logical-isl-enabled> <port-member-list> <port-member>0/1</port-member> <port-member>0/2</port-member> <port-member>0/3</port-member> </port-member-list> </fibrechannel-logical-switch>

Response BodyWhen the operation is successful, there is no response, and a “201 Created” status appears in the headers.

HistoryRelease version History

Fabric OS 8.2.0a This API call was introduced.

brocade-fibrechannel-logical-switch

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 127

Page 128: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

brocade-fibrechannel-switchThis module provides a detailed view of the switch being queried. If virtual fabrics are enabled, the request can include a queryparameter (vf-id) for the desired virtual fabric. If no query parameter is specified and virtual fabrics are enabled, then the defaultvirtual fabric values are returned.

Module treeThis is the tree view of the module from the brocade-fibrechannel-switch.yang-tree.txt file. Refer to YANG module overview onpage 26 for YANG node field definitions and possible values, and Supported data types on page 26 for data type descriptions.

module: brocade-fibrechannel-switch +--rw switch +--rw fibrechannel-switch* [name] +--rw name fibrechannel:wwn-type +--rw domain-id? fibrechannel:domain-id-type +--rw user-friendly-name? string +--ro fcid? fibrechannel:fcid-type +--ro vf-id? int16 +--ro principal? uint8 +--rw enabled-state? uint32 +--ro up-time? yang:timeticks +--ro model? string +--ro firmware-version? string +--rw ip-address | +--rw ip-address* inet:ip-address +--rw domain-name? string +--rw fabric-user-friendly-name? string +--ro ag-mode? uint8

URI formatThe URI format for this module takes the following form:

<base_URI>/running/switch/name/ followed by the leafs as listed in the module tree.

Parametersswitch

Description: Switch state parameters.Flag: read-writeOptional: NoThis container has the following leafs:

fibrechannel-switchDescription: Switch identification parameters.Requests can also be made using a query that specifies the vf-id of the fabric. This request will also providethe switch state parameters.Flag: read-writeOptional: NoKey: nameThis list has the following leafs:

nameDescription: The switch WWN.

brocade-fibrechannel-switch

Brocade Fabric OS REST API Reference, 8.2.0a128 53-1005246-03

Page 129: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Flag: read-writeType: fibrechannel:wwn-typeValues: A valid WWN nameOptional: No

domain-idDescription: Domain ID of switch.The highest level in a three-level addressing hierarchy used in the Fibre Channel address identifier. Adomain typically is associated with a single Fibre Channel switch.Flag: read-writeType: fibrechannel:domain-id-typeValues: 1 through 239. Default: 1Optional: Yes

user-friendly-nameDescription: A human-readable name assigned to the switch by the administrator.Flag: read-writeType: stringValue: 1 to 30 alphanumeric characters plus hyphens, periods, and underscore characters. Spacesare not allowed. A switch name can begin with either a letter or number, but a switch name thatbegins with a numeric (0-9) character must also have at least an underscore (_), hyphen (-), period (.)or alphabetic (A-Z, a-z) character. A switch name with only numeric characters is not valid.Optional: Yes

fcidDescription: The destination ID (D_ID) of the switch.Flag: read-onlyType: fibrechannel:fcid-typeConfig: FalseValue: A valid destination FCID value.Optional: Yes

vf-idDescription: The virtual fabric identification (VFID) of the logical switch.Flag: read-onlyType: int16Config: FalseValue: A valid VFID value from 1 to 128, or -1 (Indicates that the virtual fabric feature isunsupported or disabled).Optional: Yes

principalDescription: Principal switch in the fabric.Flag: read-onlyType: uint8Config: FalseValue: 1 = This is the fabric's principal switch. 0 = This is not the fabric's principal switch.Optional: Yes

enabled-stateDescription: The current state of the switch.Flag: read-write

brocade-fibrechannel-switch

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 129

Page 130: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Type: uint32Values: 0 = Undefined. 2 = Switch is enabled. 3 = Switch is disabled. 7 = Switch is being tested.This leaf can only be set to 2 or 3, it cannot be set to 0 or 7.Default: 2Optional: Yes

up-timeDescription: The period of time elapsed since the last reboot of the specified switch.The absolute time interval that the switch has been up, not the time measured between midnight,January 1, 1970 UTC and the most recent reboot of the switch.Flag: read-onlyType: yang:timeticksConfig: FalseUnits: secondsValues: 0 through 4294967296.Optional: Yes

modelDescription: Model name of the switch.Flag: read-onlyType: stringConfig: FalseValue: The Brocade switchType of the switch (example: “145”)Optional: Yes

firmware-versionDescription: A human-readable string identifying the firmware version running on the switch.Flag: read-onlyType: stringConfig: FalseValue: Brocade-defined firmware version ID.Optional: Yes

ip-addressDescription: List of out-of-band IP addresses assigned to the Ethernet port on the switch. Thiscontainer is needed by the underlying infrastructure.Flag: read-writeThis container has the following leaf:

ip-addressDescription: List of IP addresses assigned to the Ethernet port on the switch.Flag: read-writeType: inet:ip-addressValue: A valid IPv4 or IPv6 addressOptional: No

domain-nameDescription: The DNS domain name of the switch.Flag: read-writeType: string

brocade-fibrechannel-switch

Brocade Fabric OS REST API Reference, 8.2.0a130 53-1005246-03

Page 131: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Value: 1 to 63 alphanumeric characters, as well as the underscore character (_). This must start witha alphabetic character (a-z, A-Z) and must not contain special characters (high-ASCII), and is notcase-sensitive.Optional: Yes

fabric-user-friendly-nameDescription: The human-readable name for the fabric.Flag: read-writeType: stringValue: 1 to 128 alphanumeric characters, plus hyphens (-), periods(.), and underscore(_) characters.It is not case-sensitive.Optional: Yes

ag-modeDescription: Indicates the Access Gateway (AG) mode capability and enablement state. A switch iscapable of AG mode support when this value is not zero.Flag: read-writeType: uint8Config: falseValue: 0 = AG mode is not supported by this device. 1 = AG mode is supported and currentlydisabled. 3 = AG mode is supported and currently enabled.Optional: Yes

Supported methodsOnly the GET, OPTIONS, PATCH, and HEAD method operations are supported in this module.

Examples

Retrieving switch resource informationThis example uses a GET request to retrieve the switch resources.

StructureGET <base_URI>/running/fibrechannel-switch/

URI requestGET https://10.10.10.10/rest/running/fibrechannel-switch/

Request bodyNo request body is required.

brocade-fibrechannel-switch

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 131

Page 132: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Response bodyWhen the operation is successful, the response has a message body similar to the following, and a “200 OK” status in theheaders.

<?xml version="1.0"?><Response> <fibrechannel-switch> <name>10:10:10:1b:1a:b7:77:bc</name> <domain-id>1</domain-id> <fcid>16776193</fcid> <user-friendly-name>Rack_A-4_6510</user-friendly-name> <enabled-state>2</enabled-state> <up-time>430570</up-time> <domain-name/> <principal>1</principal> <ip-address> <ip-address>10.10.10.32</ip-address> </ip-address> <model>109.1</model> <firmware-version>v8.2.0</firmware-version> <vf-id>128</vf-id> <fabric-user-friendly-name/> <ag-mode>1</ag-mode> </fibrechannel-switch></Response>

Retrieving switch resource information from a virtual fabricThis example uses a GET request to retrieve the switch resource information for a switch in the virtual fabric with an VFID of 20.

StructureGET <base_URI>/running/fibrechannel-switch?vf-id=<vf-id#>

URI requestGET https://10.10.10.10/rest/running/fibrechannel-switch?vf-id=20

Request bodyNo request body is required.

brocade-fibrechannel-switch

Brocade Fabric OS REST API Reference, 8.2.0a132 53-1005246-03

Page 133: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Response bodyWhen the operation is successful, the response has a message body similar to the following, and a “200 OK” status in theheaders.

<?xml version="1.0"?><Response> <fibrechannel-switch> <name>10:10:10:1b:1a:b7:77:33</name> <domain-id>1</domain-id> <fcid>16776133</fcid> <user-friendly-name>Rack_C-24_6520</user-friendly-name> <enabled-state>2</enabled-state> <up-time>430570</up-time> <domain-name/> <principal>1</principal> <ip-address> <ip-address>10.10.10.62</ip-address> </ip-address> <model>109.1</model> <firmware-version>v8.2.0</firmware-version> <vf-id>20</vf-id> <fabric-user-friendly-name/> <ag-mode>1</ag-mode> </fibrechannel-switch></Response>

Setting the user-friendly name for a switchThis example uses a PATCH request to set the user-friendly name for the switch “10:10:10:10:1c:16:98:14” to“My_Switch_1”.

StructurePATCH <base_URI>/running/switch/fibrechannel-switch/name/switch_name/user-friendly-name/friendly_name

URI requestGET https://10.10.10.10/rest/running/switch/fibrechannel-switch/name/10:10:10:10:1c:16:98:14/user-friendly-name/My_Switch_1

Request bodyNo request body is required.

Response bodyWhen the operation is successful, the response contains an empty message body and a “200 OK” status in the header.

HistoryRelease version History

Fabric OS 8.2.0 This API call was introduced.

brocade-fibrechannel-switch

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 133

Page 134: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

brocade-name-serverThis module is used to monitor the operation of one or more instances of Name Server functionality.

NOTEThe brocade-name-server module is supported in Fabric OS 8.2.0a and later.

URI formatThe URI format for this module takes the following form:

<base_URI>running/brocade-name-server/.

Module treeThis is the tree view of the module from the brocade-name-server.yang-tree.txt file. Refer to YANG module overview on page26 for YANG node field definitions and possible values, and Supported data types on page 26 for data type descriptions.

module: brocade-name-server +--ro brocade-name-server +--ro fibrechannel-name-server* [port-id] +--ro port-id fibrechannel:fcid-hex-string-type +--ro port-name? fibrechannel:wwn-type +--ro port-symbolic-name? string +--ro fabric-port-name? fibrechannel:wwn-type +--ro permanent-port-name? fibrechannel:wwn-type +--ro node-name? fibrechannel:wwn-type +--ro node-symbolic-name? string +--ro class-of-service? fibrechannel:class-of-service-type +--ro fc4-type? fibrechannel:fc4-type-type +--ro fc4-features? fibrechannel:fc4-features-type +--ro port-type? fibrechannel:port-type-string-type +--ro state-change-registration? string +--ro name-server-device-type? string +--ro port-index? fibrechannel:user-port-number-type +--ro share-area? string +--ro frame-redirection? string +--ro partial? string +--ro lsan? string +--ro link-speed? string +--ro port-properties? string +--ro cascaded-ag? string +--ro connected-through-ag? string +--ro real-device-behind-ag? string +--ro fcoe-device? string +--ro slow-drain-device-quarantine? string

URI formatThe URI format for this module takes the following form:

• <base_URI>/running/brocade-name-server/ to view Name Server attributes for the switch.

• <base_URI>/running/brocade-name-server/port-identifier/ <port-identifier> to view the Name Server

attributes for a specific port.

brocade-name-server

Brocade Fabric OS REST API Reference, 8.2.0a134 53-1005246-03

Page 135: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Parametersbrocade-name-server

Description: Proprietary Name Server directory entry container.Flag: read-onlyConfig: falseThis container has the following leafs:

fibrechannel-name-serverDescription: The port identifier serves as the unique data base key for the Name Server .Key: port-idFlag: read-onlyThis container has the following leaves.

port-idDescription: A fibre channel address identifier assigned to an Nx_Port during either implicit orexplicit fabric logins. The format of the port identifier is identical to the address identifier format. Theport identifier serves as the unique data base key for the Name Server.Flag: read-onlyType: fibrechannel:fcid-typeValue: A valid fibre channel address.Optional: Yes

port-nameDescription: The device port world wide name (WWN).Flag: read-onlyType: fibrechannel:wwn-typeValue: A valid WWN name.Optional: Yes

port-symbolic-nameDescription: The symbolic port name registered with the Name Server. It is subject to all thedescription and constraints of that object.Flag: read-onlyType: stringValue: The symbolic port name registered with the Name Server. 1 to 384 alphanumericcharachters.Optional: Yes

fabric-port-nameDescription: The F_Port WWN to which the N_Port connects.Flag: read-onlyType: fibrechannel:wwn-typeValue: A valid WWN name.Optional: Yes

permanent-port-nameDescription: The Name_Identifier associated with the physical Nx_Port. If there are multipleName_Identifiers associated with a single physical Nx_Port via FDISC (see FC-FS), the permanentport name is the original Name_Identifier associated with that physical Nx_Port at fabric login.Flag: read-onlyType: fibrechannel:wwn-type

brocade-name-server

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 135

Page 136: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Value: A valid port WWN name.Optional: Yes

node-nameDescription: The device port world wide name (WWN).Flag: read-onlyType: fibrechannel:wwn-typeValue: A valid port WWN name.Optional: Yes

node-symbolic-nameDescription: The name registered with the Name Server as a Name Server symbolic node nameobject and is subject to all the description and constraints of that object. If not all Nx_Ports on thehost bus adapter have the same node name, the node-symbolic-name resource will not be returnedfor the host bus adapter.Flag: read-onlyType: stringValue: Between 4 and 255 alphanumeric characters. Not case-sensitive. Must not contain specialcharacters (high-ASCII) or keywords such as ‘all’ or ‘none’.Optional: Yes

class-of-serviceDescription: The class of service levels supported by the device. A device can support multiple classof service levels.Flag: read-onlyType: fibrechannel:class-of-service-typeValue: These can be class f, class 1, class 2, or class 3. Only the numeric value displays:0 = class-f1 = class-12 = class-23 = class-3Optional: Yes

fc4-typeDescription: A set of supported data structure type values (for example, supported values of thetype field in frame headers) for Device_Data and FC-4 Link_Data frames. For each possible typevalue, this leaf has a bit in the fc4-type leaf that indicates whether or not frames with that type valueare supported. For each supported type value, the bit is set in the leaf. For each unsupported typevalue, the bit is not set in the leaf.Flag: read-onlyType: fibrechannel:fc4-type-typeValue: The fc4 type (such as, FCP).Optional: Yes

fc4-featuresDescription: The registered FC-4 features bits for a given FC-4 type.Flag: read-onlyType: fibrechannel:fc4-features-typeValue: The registered FC-4 features in relation to a given FC-4 type.FCP-InitiatorFCP-Target

brocade-name-server

Brocade Fabric OS REST API Reference, 8.2.0a136 53-1005246-03

Page 137: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

FC-NVMe-Discovery-ServiceFC-NVMe-InitiatorFC-NVMe-TargetOptional: Yes

port-typeDescription: The port type of the device.Flag: read-onlyType: fibrechannel:port-type-string-typeValue: The port type is one of the following options:n-port (0x01)nl-port (0x02)f/nl-port (0x03)nx-port (0x7F)f-port (0x81)fl-port (0x82)e-port (0x84)b-port (0x85)a-port (0x86)0xnn (Other: A two-digit numeric value of the undefined/unrecognized type supplied by the port(hexadecimal).)Optional: Yes

state-change-registrationDescription: The state change registration (SCR) of the device. Returns an empty tag if the SCRvalue is not known.Flag: read-onlyType: stringValue: The state change registration is one of the following options:None - No registration. Device has not registered for any RSCN function.Fabric-Detected - Registered to receive all RSCN for events detected by the fabric.Nx-Port-Detected - Registered to receive all RSCN requests issued for events detected by theaffected Nx_Port.Fabric-Name - Fabric Name change registration (FC Standard variant). Registered to receive anRSCN when the Fabric Principal switch changes.Peer-Zone - Registered to receive an RSCN when an associated Peer Zone changes.Brocade-Principal-Switch - Principal switch change registration (proprietary).Brocade-QoS - Access Gateway Quality-of-Service change registration (proprietary).Optional: Yes

name-server-device-typeDescription: The definition for the type and role of a device.Flag: read-onlyType: stringValue: 0 to 64 characters.Types can be ‘Physical’, ‘Virtual’, ‘NPIV’, or ‘iSCSI’. If the device registers a type that is not one ofthese, the type is listed as ‘undefined’.Roles can be ‘Initiator’, ‘Target’, or ‘Initiator+Target’. If the device role is not registered, the role is listedas ‘unknown’.Pattern:

brocade-name-server

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 137

Page 138: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Undefined|Unknown(initiator/target)Physical Initiator|NPIV InitiatorVirtual Initiator|iSCSI InitiatorPhysical Target|NPIV TargetVirtual Target|iSCSI TargetPhysical Initiator+Target|NPIV Initiator+TargetVirtual Initiator+Target|iSCSI Initiator+TargetOptional: Yes

port-indexDescription: The index number of the physical N_Port to which the device connects.Flag: read-onlyType: fibrechannel:user-port-number-typeValue: The Fibre Channel port user port number.Optional: Yes

share-areaDescription: Indicates whether or not the port utilizes the Brocade Shared Area method of FibreChannel addressing.Flag: read-onlyType: stringValue:yes - The port shares an area.no - The port does not share an area.Optional: Yes

frame-redirectionDescription: Indicates whether or not the port is involved in Frame Redirection zoning. The deviceinvolved in frame redirection is specified as either ‘virtual’ , ‘host’, or ‘target’.Flag: read-onlyType: stringValue:yes - The port is involved in frame redirection.no - The port is not involved in frame redirection.Optional: Yes

partialDescription: Indicates whether or not the device entry is incomplete. Incomplete devices haverouting established, but are not considered during device discovery (for example, during FC-GSName Server queries).Flag: read-onlyType: stringValue:yes - The device entry is incomplete.no - The device entry is complete.Optional: Yes

lsanDescription: Indicates whether or not the device is part of an active LSAN zone. If the LSAN zonestatus is not known, then an empty tag is returned. Flag: read-only

brocade-name-server

Brocade Fabric OS REST API Reference, 8.2.0a138 53-1005246-03

Page 139: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Type: stringValue:yes - The device is a member of an active LSAN zone.no - The device is not a member of an active LSAN zone.Optional: Yes

link-speedDescription: The link speed of the device.The link speed of end devices that log in to the edge fabric through F_Port trunk display thebandwidth of the F_Port trunk. For example, if an 8 GFC host attached to AG login to fabric througha 32 GFC F_Port trunk, the device link speed for the 8 GFC host is displayed as 32 GFC.Flag: read-onlyType: stringValue:4 GFC8 GFC16 GFC32 GFCOptional: Yes

port-propertiesDescription: A list of port properties, for example: ‘SIM Port’ for Brocade SIM ports.Flag: read-onlyType: stringValue:SIM PortMirror PortI/O Analytics PortOptional: Yes

cascaded-agDescription: Indicates whether or not the device is connected via a Cascaded Access Gateway (AG)connection.Flag: read-onlyType: stringValue:yes - The device is connect via a Cascaded Access Gateway (AG) connection (for example, a 2-hopAG connection).no - The device is not connected to a Cascaded Access Gateway (AG) connection.Optional: Yes

connected-through-agDescription: Indicates whether or not the device is connected through Access Gateway (AG).Flag: read-onlyType: stringValue:yes - The device is connected through Access Gateway.no - The device is not connected through Access Gateway.Optional: Yes

brocade-name-server

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 139

Page 140: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

real-device-behind-agDescription: Indicates whether or not the device is not a virtualized device (NPIV) connected viaAccess Gateway (AG).Flag: read-onlyType: stringValue:yes - The device is not a virtualized device (NPIV) connected through Access Gateway.no - The device is a virtualized device (NPIV) connected through Access Gateway.Optional: Yes

fcoe-deviceDescription: Indicates whether or not the device is an FCoE device.Flag: read-onlyType: stringValue:yes - The device is an FCoE device.no - The device is not an FCoE device.Optional: Yes

slow-drain-device-quarantineDescription: Indicates whether or not the device has been identified as having symptoms of creditstalling.Flag: read-onlyType: stringValue:yes - The device has been identified as having a credit stalled condition, and has its incoming trafficquarantined to a Low Priority VC.no - The device has not been flagged for having a credit stalled issue.Optional: Yes

Supported methodsOnly the GET operation is supported in this module.

Examples

Retrieving Name Server information for a switchThis example uses a GET request to retrieve the Name Server information for a switch.

StructureGET <base_URI>/running/brocade-name-server/

URIGET https://10.10.10.10/rest/running/brocade-name-server/

brocade-name-server

Brocade Fabric OS REST API Reference, 8.2.0a140 53-1005246-03

Page 141: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Request BodyNo request body is required.

Response BodyWhen the operation is successful, the response has a message body similar to the following, and a “200 OK” status appears inthe headers.

<?xml version="1.0"?><Response> <fibrechannel-name-server> <port-identifier>10a00</port-identifier> <port-symbolic-name>[30] "dsim:brcdtgt:sw0[10.38.18.116]"</port-symbolic-name> <node-symbolic-name>[30] "dsim:brcdtgt:sw0[10.38.18.116]"</node-symbolic-name> <port-name>30:0a:c4:f5:7c:4e:59:54</port-name> <node-name>10:00:c4:f5:7c:4e:59:54</node-name> <port-index>10</port-index> <share-area> No </share-area> <frame-redirection> No </frame-redirection> <partial> No </partial> <lsan> No </lsan> <link-speed>16</link-speed> <state-change-registeration>0000000000</state-change-registeration> <port-type>N</port-type> <class-of-service>2,3</class-of-service> <fc4-type>FCP</fc4-type> <fabric-port-name>20:0a:c4:f5:7c:16:99:f4</fabric-port-name> <connected-through-ag>No</connected-through-ag> <port-properties/> <nameserver-devicetype>Physical Initiator</nameserver-devicetype> <real-device-behind-ag>No</real-device-behind-ag> <cascaded-ag>No</cascaded-ag> <slow-drain-device-quarantine>No</slow-drain-device-quarantine> <fcoe-device>No</fcoe-device> <fc4-features>FCP-Initiator</fc4-features> <permanent-port-name>30:03:00:05:33:a3:e8:85</permanent-port-name> </fibrechannel-name-server> <fibrechannel-name-server> <port-identifier>10b00</port-identifier> <port-symbolic-name>[30] "dsim:brcdtgt:sw0[10.38.18.116]"</port-symbolic-name> <node-symbolic-name>[30] "dsim:brcdtgt:sw0[10.38.18.116]"</node-symbolic-name> <port-name>30:0b:c4:f5:7c:4e:59:54</port-name> <node-name>10:00:c4:f5:7c:4e:59:54</node-name> <port-index>11</port-index> <share-area> No </share-area> <frame-redirection> No </frame-redirection> <partial> No </partial> <lsan> No </lsan> <link-speed>16</link-speed> <state-change-registeration>0000000000</state-change-registeration> <port-type>N</port-type> <class-of-service>2,3</class-of-service> <fc4-type>FCP </fc4-type> <fabric-port-name>20:0b:c4:f5:7c:16:99:f4</fabric-port-name> <connected-through-ag>No</connected-through-ag> <port-properties/> <nameserver-devicetype>Physical Initiator</nameserver-devicetype> <real-device-behind-ag>No</real-device-behind-ag> <cascaded-ag>No</cascaded-ag> <slow-drain-device-quarantine>No</slow-drain-device-quarantine> <fcoe-device>No</fcoe-device> <fc4-features>FCP-Initiator</fc4-features> <permanent-port-name>30:03:00:05:33:a3:e8:85</permanent-port-name> </fibrechannel-name-server></Response>

brocade-name-server

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 141

Page 142: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Retrieving Name Server information for a portThis example uses a GET request to retrieve the Name Server information for a specific port.

StructureGET <base_URI>/running/brocade-name-server/port-identifier/port-identifier

URI requestGET https://10.10.10.10/running/brocade-name-server/port-identifier/520000

Request BodyNo request body is required.

Response BodyWhen the operation is successful, the response has a message body similar to the following, and a “200 OK” status appears inthe headers.

<?xml version="1.0"?><Response> <fibrechannel-nameserver> <port-id>0xeb1200</port-id> <port-symbolic-name/> <node-symbolic-name>[41] "dsim:fdmi_host:edsim-b11-160[10.38.79.70]"</node- symbolic-name> <port-name>30:03:00:05:33:a3:e8:85</port-name> <node-name>10:00:00:05:33:a3:e8:85</node-name> <port-index>18</port-index> <share-area>No</share-area> <frame-redirection>No</frame-redirection> <partial>No</partial> <lsan>No</lsan> <link-speed>16G</link-speed> <state-change-registration>Fabric-Detected Nx-Port-Detected Fabric-Name Peer-Zone</state-change-registration> <port-type>N</port-type> <class-of-service>2,3</class-of-service> <fc4-type>FCP</fc4-type> <fabric-port-name>20:12:c4:f5:7c:c0:fd:5d</fabric-port-name> <connected-through-ag>No</connected-through-ag> <port-properties/> <nameserver-devicetype>Physical Initiator</nameserver-devicetype> <real-device-behind-ag>No</real-device-behind-ag> <cascaded-ag>No</cascaded-ag> <slow-drain-device-quarantine>No</slow-drain-device-quarantine> <fcoe-device>No</fcoe-device> <fc4-features>FCP-Initiator</fc4-features> <permanent-port-name>30:03:00:05:33:a3:e8:85</permanent-port-name> </fibrechannel-nameserver></Response>

HistoryRelease version History

Fabric OS 8.2.0a This API call was introduced.

brocade-name-server

Brocade Fabric OS REST API Reference, 8.2.0a142 53-1005246-03

Page 143: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

brocade-zoneThis module is used for managing Fibre Channel zoning.

It assumes a knowledge of fabric zoning as performed in Fabric OS. For information on that topic, refer to AdministeringAdvanced Zoning in the Brocade Fabric OS Administration Guide.

Module treeThis is the tree view of the module from the brocade-zone.yang-tree.txt file. Refer to YANG module overview on page 26 forYANG node field definitions and possible values, and Supported data types on page 26 for data type descriptions.

module: brocade-zone +--rw zoning +--rw defined-configuration | +--rw cfg* [cfg-name] | | +--rw cfg-name zoning-name-type | | +--rw member-zone | | +--rw zone-name* zoning-name-type | +--rw zone* [zone-name] | | +--rw zone-name zoning-name-type | | +--rw zone-type? zone-type-type | | +--rw member-entry | | +--rw entry-name* union | | +--rw principal-entry-name* union | +--rw alias* [alias-name] | +--rw alias-name zoning-name-type | +--rw member-entry | +--rw alias-entry-name* union +--rw effective-configuration +--rw cfg-name? zoning-name-type +--rw checksum? string +--rw cfg-action? uint8 +--rw default-zone-access? uint8 +--ro db-max? uint32 +--ro db-avail? uint32 +--ro db-committed? uint32 +--ro db-transaction? uint32 +--ro transaction-token? uint32 +--ro db-chassis-wide-committed? uint32 +--ro enabled-zone* [zone-name] +--ro zone-name zoning-name-type +--ro zone-type? zone-type-type +--ro member-entry +--ro entry-name* union +--ro principal-entry-name* union

URI formatThe URI format for this module takes the following form:

• <base_URI>/running/brocade-zone/zoning/defined-configuration followed by the leafs as listed in the

module tree.

• <base_URI>/running/brocade-zone/zoning/effective-configuration followed by the leafs as listed in the

module tree.

URI parameter definitions

• cfg-name—The zone configuration name

• alias-name—The zone alias name

• zone-name—The zone name

brocade-zone

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 143

Page 144: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

NOTEIf all the switches in the fabric and both the CPs in a chassis system are running Fabric OS 8.1.0 or later, all of thesenames can start with a number or a letter, and may contain a hyphen (-), underscore (_), dollar sign ($), or a caret (^),except as the first character. If you merge a domain running Fabric OS 8.0.1 or lower with a domain having zoneobject names (configuration, alias, or zone name) starting with numbers, or containing "$", "-", or "^", the fabric willsegment.

NOTEIn certain circumstances, zone, zone configuration, and zone alias names that use the dollar sign character ($) may beproblematic in a REST request. The solution is to replace the dollar sign with its encoded version (%24).

Parameterszoning

Description: This is the primary container for this module.Flag: read-writeThis container has the following containers:

defined-configurationDescription: The defined zoning configuration.Flag: read-writeKey: cfg-nameThis container has the following leafs:

cfgDescription: The names of the interface configurations. There may only be one.Flag: read-writeType: stringValues: A list of configuration names.Optional: NoThis list has the following leafs:

cfg-nameDescription: The name of the zone configuration.Flag: read-writeType: zoning-name-typeValues: 1 to 64 alphanumeric characters, as well as the $, ^, - (hyphen), and _ (underscore)characters. This is case-sensitive, and must not contain special (high-ASCII) characters.See notes about names above.Optional: No

member-zoneDescription: List of configuration member zones.Flag: read-writeOptional: NoThis list has the following leafs:

zone-nameDescription: The zone name.Flag: read-writeType: zoning-name-type

brocade-zone

Brocade Fabric OS REST API Reference, 8.2.0a144 53-1005246-03

Page 145: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Values: 1 to 64 alphanumeric characters, as well as the $, ^, - (hyphen), and_ (underscore) characters. This is case-sensitive, and must not contain special(high-ASCII) characters. See notes about names above.Optional:No

zoneDescription: The list of zones.Flag: read-writeKey: zone-nameThis list has the following leafs:

zone-nameDescription: The zone name.Flag: read-writeType: zoning-name-typeValues: 1 to 64 alphanumeric characters, as well as the $, ^, - (hyphen), and _ (underscore)characters. This is case-sensitive, and must not contain special (high-ASCII) characters.See notes about names above.Optional: No

zone-typeDescription: The zone type.Flag: read-writeType: zone-type-typeOptional: YesValues: 0 = default. (The zone type that is already set on the switch.) 1 = User peer zone. 2= Target peer zone. Default: 0Optional: Yes

member-entryDescription: The zone member.Flag: read-writeThis list has the following leafs:

entry-nameDescription: List of the members in the zone.Flag: read-writeType: union { zoning-name-type; brocade:wwn-type; domain-index-type }Values: A valid zone alias, a WWN, or a port identifier in the format“domain,index”.Optional: No

principal-entry-nameDescription: List of the principal members in the peer zone. The members canonly be identified as a WWN, domain,index, or zone alias.Flag: read-writeType: union { zoning-name-type; brocade:wwn-type; domain-index-type }Values: A valid zone alias, a WWN, or a port identifier in the format“domain,index”.Optional: This field is optional if the zone-type field is not specified or is set to 0.It is required if the “zone-type” field is set to 1 (user peer) and a write is beingperformed.

brocade-zone

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 145

Page 146: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

aliasDescription: The list of zone aliases.Flag: read-writeKey: alias-nameThis list has the following leafs:

alias-nameDescription: The zone alias name.Flag: read-writeType: zoning-name-typeValues: 1 to 64 alphanumeric characters, as well as the $, ^, - (hyphen), and _ (underscore)characters. This is case-sensitive, and must not contain special (high-ASCII) characters.See notes about names above.Optional: No

member-entryDescription: The alias member.Flag: read-writeOptional: NoThis list has the following leaf:

alias-entry-nameDescription: The zone alias.Flag: read-writeType: union { brocade:wwn-type; domain-index-type }Values: A valid WWN or a port identifier in the format “domain,index”.Optional: No

effective-configurationDescription: The effective zoning configuration.

NOTEIf you perform a GET request on the effective-configuration container and there is an open zone transaction whoseuser is logged out of the REST session, the open zone transaction is aborted.

Flag: read-writeOptional: NoKey: cfg-nameThis container has the following leafs:

cfg-nameDescription: The name of the effective configuration to be enabled or a configuration that iscurrently enabled.This must be the name of a configuration that is already defined.Flag: read-writeType: zoning-name-typeValues: 1 to 64 alphanumeric characters, as well as the $, ^, - (hyphen), and _ (underscore)characters. This is case-sensitive, and must not contain special (high-ASCII) characters. See notesabout names above.Optional: Yes

checksumDescription: The checksum of the configuration database.

brocade-zone

Brocade Fabric OS REST API Reference, 8.2.0a146 53-1005246-03

Page 147: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

The checksum is an MD5 (Message-Digest algorithm 5) calculation (128-bit cryptographic hash)used to verify data integrity. This resource is used by the client to verify that the zone database hasnot changed since the configuration was read. It should be read as part of the initial query beforemodifications are made. It must be written when the changes are saved. The changes will beaccepted if the checksum agrees and rejected if it does not.The checksum field is required for cfgenable operations and also for cfg-action values of 1 or 2(See cfg-action entry below.)Flag: read-writeType: stringValues: 32 hexadecimal charactersOptional: Yes

cfg-actionDescription: The action to be done to the pending zoning configuration changes.Flag: read-writeType: unit8Values: 0 = Read is not applicable. 1 = Save the pending changes. (Similar to cfgSave command.) 2= Disable the effective configuration. (Similar to cfgDisable command.) 3 = Clear the entire zonedatabase. (Similar to cfgTransAbort command.) 4 = Clear any pending changes. (Similar to cfgClearor cfgTransAbort command.) Default: 0Optional: Yes

default-zone-accessDescription: Enable or disable zone access.The default zoning mode controls device access if zoning is not implemented or if there is noenabled zone configuration.Flag: read-writeType: unit8Values: 0 = Devices in the fabric cannot access any other device in the fabric (No Access). 1 = Alldevices within the fabric can communicate with all other devices in the fabric (All Access). Default: 1Optional: Yes

db-maxDescription: The maximum size of the zone database in bytes. The maximum size for the zonedatabase is the upper limit for the zone-defined configuration determined by the amount ofnonvolatile memory available for storing the defined configuration. The maximum size for the zonedatabase is further reduced due to a message header that is propagated with the zone configurationto all switches in the fabric.

NOTEIf you perform a GET request on the db-max parameter and there is an open zone transaction whose user is loggedout of the REST session, the open zone transaction is aborted.

Flag: read-onlyType: uint32Config: falseUnits: bytesValues: 0 to the maximum zone database size supported by the platforms in the fabric. Chassis-only fabrics support up to 2 MB (2084640 bytes). If one or more fixed-port switches are in a fabric,the maximum is 1 MB (1042320 bytes).Optional: Yes

brocade-zone

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 147

Page 148: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

db-availDescription: The size in bytes of free space available in the zone database.

NOTEIf you perform a GET request on the db-avail parameter and there is an open zone transaction whose user is loggedout of the REST session, the open zone transaction is aborted.

Flag: read-onlyType: uint32Config: falseUnits: bytesValues: 0 to the maximum zone database size supported by the platforms in the fabric. Chassis-only fabrics support up to 2 MB (2084640 bytes). If one or more fixed-port switches are in a fabric,the maximum is 1 MB (1042320 bytes). Default: 0Optional: Yes

db-committedDescription: The size in bytes of the defined configuration currently stored in nonvolatile memory. Ifthe context is for a virtual fabric, then this resource is the size of the defined configuration for thelogical switch.

NOTEIf you perform a GET request on the db-committed parameter and there is an open zone transaction whose user islogged out of the REST session, the open zone transaction is aborted.

Flag: read-onlyType: unit32Config: falseUnits: bytesValues: 4 to the maximum zone database size supported by the chassis or fabric. Chassis-onlyfabrics support up to 2 MB (2084640 bytes). If one or more fixed-port switches are in a fabric, themaximum is 1 MB (1042320 bytes). Default: 4Optional: Yes

db-transactionDescription: The size in bytes of memory bytes required to commit the current transaction.The database transaction size will not be 0 if the defined configuration is being modified by REST,Telnet, API, or other applications; otherwise it is 0.

NOTEIf you perform a GET request on the db-transaction parameter and there is an open zone transaction whose user islogged out of the REST session, the open zone transaction is aborted.

Flag: read-onlyType: unit32Config: falseUnits: bytesValues: 0 to the maximum zone database size supported by the chassis or fabric. Chassis-onlyfabrics support up to 2 MB (2084640 bytes). If one or more fixed-port switches are in a fabric, themaximum is 1 MB (1042320 bytes). Default: 0Optional: Yes

brocade-zone

Brocade Fabric OS REST API Reference, 8.2.0a148 53-1005246-03

Page 149: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

transaction-tokenDescription: The token for the current zoning transaction.Flag: read-onlyType: unit32Config: falseValues: 0 through 4294967280. If a transaction is open, this will be a 32-bit transaction token. Ifno transaction is open, this will be 0. Default: 0 (No outstanding zoning transaction.)Optional: Yes

db-chassis-wide-committedDescription: The size in bytes for the zone database across all the logical switches in the chassis ifvirtual fabrics are in use. If virtual fabrics are not in use, this is the size of the zone database for theswitch. The db-committed value is smaller than this resource due to storage overhead.Flag: read-onlyType: unit32Config: falseUnits: bytesValues: 0 to the maximum zone database size supported by the chassis or fabric. Chassis-onlyfabrics support up to 2 MB (2092741 bytes). If one or more fixed-port switches are in a fabric, themaximum is 1 MB (1042320 bytes). Default: 0Optional: Yes

enabled-zoneDescription: The enabled zones.Flag: read-onlyOptional: NoKey: zone-nameThis list has the following leafs:

zone-nameDescription: The name of the zone.Flag: read-onlyType: zoning-name-typeValues: 1 to 64 alphanumeric characters, as well as the $, ^, - (hyphen), and _ (underscore)characters. This is case-sensitive, and must not contain special (high-ASCII) characters.See notes about names above.Config: falseOptional: No

zone-typeDescription: The zone type.Flag: read-onlyType: zone-type-typeValues: 0 = default (The zone type that is already set on the switch.) 1 = User peer zone. 2 =Target peer zone. Default: 0Optional: No. On reads, this will always be populated.

member-entryDescription: The zone members.Flag: read-onlyThis list has the following leafs:

brocade-zone

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 149

Page 150: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

entry-nameDescription: List of the members in the zone.Zone aliases are expanded when the configuration is enabled and are not includedin the effective configuration.Flag: read-onlyType: union { zoning-name-type: brocade:wwn-type }Values: A valid WWN or a port identifier in the format “domain,index”.Optional: No

principal-entry-nameDescription: If the zone is a peer zone, this property contains the list of principalsin the zone.The members can be identified using either a WWN or a domain,index ID. Zonealiases are expanded when the configuration is enabled and consequently are notincluded in the effective configuration.Flag: read-onlyType: union { brocade:wwn-type; domain-index-type }Values: A valid WWN or a port identifier in the format “domain,index”.Optional: No. This leaf will only be returned if the zone is a peer zone. It will not bereturned for other zone types.

Supported methodsThe GET, POST, PATCH, DELETE, OPTIONS, and HEAD operations are supported in this module.

Examples

Retrieving the list of zone configurationsThis example uses a GET request to retrieve the list of all the zone configurations.

StructureGET <base_URI>running/zoning/defined-configuration/cfg

URI requestGET http://10.10.10.10/rest/running/zoning/defined-configuration/cfg

Request bodyNo request body is required.

brocade-zone

Brocade Fabric OS REST API Reference, 8.2.0a150 53-1005246-03

Page 151: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Response bodyWhen the operation is successful, the response has a message body similar to the following, and a “200 OK” status in theheaders.

<?xml version="1.0"?><Response> <cfg> <cfg-name>cfg_push</cfg-name> <member-zone> <zone-name>qosh_112</zone-name> <zone-name>qosl_113</zone-name> <zone-name>qosm_114</zone-name> <zone-name>qosh_115</zone-name> <zone-name>qosl_116</zone-name> <zone-name>qosm_117</zone-name> <zone-name>qosh_ed</zone-name> </member-zone> </cfg> <cfg> <cfg-name>cfg_push_165</cfg-name> <member-zone> <zone-name>qosh_0</zone-name> <zone-name>qosh_3</zone-name> <zone-name>qosl_4</zone-name> <zone-name>qosl_1</zone-name> <zone-name>qosm_2</zone-name> <zone-name>qosm_5</zone-name> </member-zone> </cfg> <cfg> <cfg-name>ck</cfg-name> <member-zone> <zone-name>zk</zone-name> <zone-name>tdg</zone-name> <zone-name>fcoe</zone-name> </member-zone> </cfg> <cfg> <cfg-name>test_cfg</cfg-name> <member-zone> <zone-name>testzone</zone-name> </member-zone> </cfg></Response>

Retrieving the list of member zonesThis example uses a GET request to retrieve the list of member zones contained in the zone configuration “cfg_push”.

StructureGET <base_URI>/running/zoning/defined-configuration/cfg/cfg-name/cfg-name/member-zone/

URI requestGET http://10.10.10.10/rest/running/zoning/defined-configuration/cfg/cfg-name/cfg_push/member-zone/

Request bodyNo request body is required.

brocade-zone

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 151

Page 152: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Response bodyWhen the operation is successful, the response has a message body similar to the following, and a “200 OK” status in theheaders.

<?xml version="1.0"?><Response> <cfg> <cfg-name>cfg_push</cfg-name> <member-zone> <zone-name>qosh_112</zone-name> <zone-name>qosl_113</zone-name> <zone-name>qosm_114</zone-name> <zone-name>qosh_115</zone-name> <zone-name>qosl_116</zone-name> <zone-name>qosm_117</zone-name> <zone-name>qosh_ed</zone-name> </member-zone> </cfg></Response>

Retrieving a list of the zone members in a specific zoneThis example uses a GET request to retrieve the list of zone members for the “qos” zone.

StructureGET <base_URI>/running/zoning/defined-configuration/zone/zone-name/input zone-name

URI requestGET http://10.10.10.10/rest/running/zoning/defined-configuration/zone/zone-name/qos

Request bodyNo request body is required..

Response bodyWhen the operation is successful, the response has a message body similar to the following, and a “200 OK” status in theheaders. There are four member entries in this zone.

<?xml version="1.0"?><Response> <zone> <zone-name>qos</zone-name> <zone-type>1</zone-type> <member-entry> <principal-entry-name>10:10:10:27:f8:8f:44:cd</principal-entry-name> <entry-name>10:10:10:27:f8:f0:2a:e8</entry-name> <entry-name>10:10:10:27:f8:f0:3a:70</entry-name> <entry-name>10:10:10:27:f8:f0:38:70</entry-name> </member-entry> </zone></Response>

brocade-zone

Brocade Fabric OS REST API Reference, 8.2.0a152 53-1005246-03

Page 153: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Adding a zone to the defined configurationThis example uses a POST request to create a user peer zone named “qos” to the defined configuration. This zone has fourmembers.

StructurePOST <base_URI>/running/zoning/defined-configuration/zone/zone-name/input zone-name

URI requestPOST http://10.10.10.10/rest/running/zoning/defined-configuration/zone/zone-name/qos

Request body<zone-type>1</zone-type><member-entry> <principal-entry-name>10:10:10:27:f8:8f:44:cd</principal-entry-name> <entry-name>10:10:10:27:f8:f0:2a:e8</entry-name> <entry-name>10:10:10:27:f8:f0:3a:70</entry-name> <entry-name>10:10:10:27:f8:f0:38:65</entry-name></member-entry>

Response bodyWhen the operation is successful, the response contains an empty message body and a “201 Created” status in the header.

Delete a zone from a cfgThis example uses a DELETE request to delete the zone “zone_host_10” from the “cfg_auto” configuration.

StructureDELETE <base_URI>/running/zoning/defined-configuration/cfg/cfg-name/configuration_name

URI requestDELETE http://10.10.10.10/rest/running/zoning/defined-configuration/cfg/cfg-name/cfg_auto

Request body<member-zone> <zone-name>zone_host_10</zone-name> </member-zone>

Response bodyWhen the operation is successful, the response contains an empty message body and a “200 OK” status in the header.

Create an aliasThis example uses a POST request to create the alias “ali_1”.

brocade-zone

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 153

Page 154: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

StructurePOST <base_URI>/running/zoning/defined-configuration/alias

URI requestPOST http://10.10.10.10/rest/running/zoning/defined-configuration/alias

Request body<alias> <alias-name>ali_1</alias-name> <member-entry> <alias-entry-name>1,3</alias-entry-name> <alias-entry-name>10:10:10:38:85:9a:13:15</alias-entry-name> </member-entry></alias>

Response bodyWhen the operation is successful, the response contains an empty message body and a “200 OK” status in the header.

HistoryRelease version History

Fabric OS 8.2.0 This API call was introduced.

Fabric OS 8.2.0a This API call was updated to include information about running a GET request on the effective-configuration container for the db-max, db-avail, db-committed, or db-transaction parameters.

brocade-zone

Brocade Fabric OS REST API Reference, 8.2.0a154 53-1005246-03

Page 155: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

FOS REST API modules for Extensionfeatures

• brocade-extension-ip-interface................................................................................................................................................................156• brocade-extension-ip-route.......................................................................................................................................................................160• brocade-extension-ipsec-policy.............................................................................................................................................................. 164• brocade-extension-tunnel...........................................................................................................................................................................168• brocade-gigabitethernet.............................................................................................................................................................................. 194

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 155

Page 156: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

brocade-extension-ip-interfaceThis module is used to retrieve or configure IP interfaces on the specified switch.

Module treeThis is the tree view of the module from the brocade-extension-ip-interface.yang-tree.txt file. Refer to YANG module overviewon page 26 for YANG node field definitions and possible values, and Supported data types on page 26 for data typedescriptions.

module: brocade-extension-ip-interface +--rw brocade-interface +--rw extension-ip-interface* [name ip-address dp-id] +--rw name ge-interface-type +--rw ip-address inet:ip-address +--rw dp-id uint16 +--rw ip-prefix-length ip-prefix-length +--rw mtu-size? uint16 +--rw vlan-id? uint16 +--ro status-flags? string

URI formatThe URI for this module takes the following form:

<base_URI>/running/brocade-interface/extension-ip-interface/ followed by the leafs as listed in the module

tree.

Parametersbrocade-interface

Description: The module container.Flag: read-writeThis container has the following leafs.

extension-ip-interfaceDescription: The IP interface defined on the extension blade or system.Flag: read-writeKey: name plus ip-address plus dp-id. All must be included to identify a specific interface.This list has the following leafs.

nameDescription: The name of the interface.Flag: read-writeType: ge-interface-typeValues: The slot and port number of the port, shown as “slot/port”.Optional: No

ip-addressDescription: The source IPv4 or IPv6 address of the interface.Flag: read-writeType: inet:ip-addressValues: A properly-formatted IPv4 or IPv6 address.

brocade-extension-ip-interface

Brocade Fabric OS REST API Reference, 8.2.0a156 53-1005246-03

Page 157: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Optional: No

dp-idDescription: Extension Data Path Processor ID associated with the IP interface.Flag: read-writeType: uint16Values: 0 or 1. Default: NoneOptional: No

ip-prefix-lengthDescription: The prefix length operator for the IP address. Once set, the prefix length can not bechanged.Flag: read-writeType: ip-prefix-lengthValues: 1 through 31 for IPv4, or 1 through 128 for IPv6. Default: NoneMandatory: This is true only when creating a new interface instance; that is, in a POST operation,and is optional in other operations such as GET, DELETE, or PATCH.Units: BitsOptional: Yes

mtu-sizeDescription: The maximum transmission unit (MTU) size.Flag: read-writeType: uint16Units: BytesValues: 1 or a value from 1280 through 9216. Default: 1500The special value of 1 is equivalent to ‘auto’ mode to enable PMTU discovery. The discovered valueof MTU in ‘auto’ mode can be found as a circuit attribute.Optional: Yes

vlan-idDescription: The VLAN ID.Flag: read-writeType: uint16Values: 0 through 4095. Default: 0Optional: Yes

status-flagsDescription: The IP interface status flags.Flag: read-onlyConfig: falseType: stringValues: B = Broadcast; D = Debug; I = InUse; L = Loopback; LU = LinkUp; M = Multicast; N = NoArp;P = Point2Point; PR = Promiscuous; R = Running; S = StaticArp; U = Up.Optional: Yes

Supported methodsThe GET, POST, PATCH, DELETE, OPTIONS, and HEAD operations are supported in this module.

brocade-extension-ip-interface

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 157

Page 158: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Examples

Creating an IP interfaceThis example uses a POST request to create an IP interface on port 4/5 with a MTU of 1500 and a VLAN ID of 100.

StructurePOST <base_URI>/running/brocade-interface/extension-ip-interface

URI requestPOST http://10.10.10.40/rest/running/brocade-interface/extension-ip-interface

Request bodyNotice that the slash character in the name resource is not encoded as “%2f”. This is because it is in the request body.

<extension-ip-interface> <name>4/5</name> <dp-id>0</dp-id> <ip-address>10.10.10.1</ip-address> <mtu-size>1500</mtu-size> <vlan-id>100</vlan-id></extension-ip-interface>

Response bodyWhen the resource is successfully created, the response contains an empty message body and a “204 No Content” status inthe headers.

Deleting an IP interfaceThis example uses a DELETE request to delete the IP interface on port 4/5.

StructureDELETE <base_URI>/running/brocade-interface/extension-ip-interface

URI requestDELETE http://10.10.10.10/rest/running/brocade-interface/extension-ip-interface

Request body<extension-ip-interface> <name>4/5</name> <dp-id>0</dp-id> <ip-address>10.10.10.10</ip-address> <ip-prefix-length>24</ip-prefix-length></extension-ip-interface>

brocade-extension-ip-interface

Brocade Fabric OS REST API Reference, 8.2.0a158 53-1005246-03

Page 159: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Response bodyWhen the resource is successfully deleted, the response contains an empty message body and a “204 No Content” status inthe headers.

Retrieving information on an IP interfaceThe following example uses a GET request to retrieve information on the IP interface on port 0/2.

StructureGET <base_URI>/running/brocade-interface/extension-ip-interface

URI requestGET https://10.10.10.10/rest/running/brocade-interface/extension-ip-interface/name/0%2f2/dp-id/0/ip-address/192.168.20.1/

Request bodyNo request body is required.

Response bodyWhen the operation is successful, the response has a message body similar to the following, and a “200 OK” status in theheaders.

<?xml version="1.0"?><Response> <extension-ip-interface> <name>0/2</name> <dp-id>0</dp-id> <ip-address>192.168.20.1</ip-address> <ip-prefix-length>24</ip-prefix-length> <mtu-size>1500</mtu-size> <vlan-id>0</vlan-id> <status-flags>U R M I </status-flags> </extension-ip-interface></Response>

HistoryRelease version History

Fabric OS 8.2.0 This API call was introduced.

brocade-extension-ip-interface

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 159

Page 160: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

brocade-extension-ip-routeThis module is used to retrieve or configure IP route information on the specified switch.

Module treeThis is the tree view of the module from the brocade-extension-ip-route.yang-tree.txt file. Refer to YANG module overview onpage 26 for YANG node field definitions and possible values, and Supported data types on page 26 for data type descriptions.

module: brocade-extension-ip-route +--rw brocade-extension-ip-route +--rw extension-ip-route* [name dp-id ip-address ip-prefix-length] +--rw name ge-interface-type +--rw dp-id uint16 +--rw ip-address inet:ip-address +--rw ip-prefix-length ip-prefix-length +--rw ip-gateway ip-gateway-type +--ro status-flags? string

URI formatThe URI format for this module takes the following form:

<base_URI>/running/brocade-extension-ip-route/extension-ip-route/ followed by the leafs as listed in the

module tree to create, modify, or delete an IP route.

Parametersbrocade-extension-ip-route

Description: The module container.Optional: NoFlag: read-writeThis container has the following leafs.

extension-ip-routeDescription: The static IP route on the IP interface defined on an extension blade or system.Flag: read-writeKey: name plus dp-id plus ip-address plus ip-prefix-length. All must be included to identify a specificinterface.This list has the following leafs.

nameDescription: The name of the interface.Flag: read-writeType: ge-interface-typeValues: The slot and port number of the port in the format “slot/port”.Optional: No

dp-idDescription: The Extension Data Path Processor ID associated with the IP interface.Flag: read-writeType: uint16Values: Either 0 or 1. There is no default value.

brocade-extension-ip-route

Brocade Fabric OS REST API Reference, 8.2.0a160 53-1005246-03

Page 161: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Optional: No

ip-addressDescription: The destination IPv4 or IPv6 address.Flag: read-writeType: inet:ip-addressValues: An address in valid IPv4 or IPv6 format.Optional: No

ip-prefix-lengthDescription: The prefix length operator for the destination IP address. Once set, prefix length cannot be changed.Flag: read-writeType: ip-prefix-lengthValues: A value in the range from 1 to 32 for IPv4 or from 1 to 128 for IPv6. There is no defaultvalue.Optional: No

ip-gatewayDescription: The IP address of an IP router that can route packets to the destination IP address. Thegateway address must be on the same IP subnet as one of the port IP addresses. Once set, the IPgateway address can not be changed. This operand is optional with IPv6 addresses.Flag: read-writeType: inet:ip-gateway-typeValues: An address in valid IPv4 or IPv6 format.Mandatory: True during route creation using POST operationsOptional: This leaf is optional, except in POST route creation operations

status-flagsDescription: IP route status flags.Flag: read-onlyType: StringValues:C = Created (Interface)G = GatewayH = HostL = Link LayerU = UsableS = StaticOptional: Yes

Supported methodsThe GET, POST, PATCH, DELETE, OPTIONS, and HEAD operations are supported in this module.

Examples

Creating an IP routeThe following example uses POST to create an IP route to 3.0.0.0 using port 4/0 on the 2.2.2.3 gateway.

brocade-extension-ip-route

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 161

Page 162: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

StructurePOST <base_URI>/running/brocade-extension-ip-route/extension-ip-route

URI requestPOST http://10.10.10.10/rest/running/brocade-extension-ip-route/extension-ip-route

Request bodyWhen the operation is successful, the response has a message body similar to the following, and a “200 OK” status in theheaders.

<extension-ip-route> <name>4/0</name> <ip-address>3.0.0.0</ip-address> <ip-prefix-length>24</ip-prefix-length> <dp-id>0</dp-id> <ip-gateway>2.2.2.3</ip-gateway></extension-ip-route>

Response bodyWhen the resource is successfully deleted, the response contains an empty message body and a "201 Created" status in thefirst line of the headers.

Deleting an IP routeThe following example uses DELETE to delete the IP route to 3.0.0.0 from port 4/0.

StructureDELETE <base_URI>/running/brocade-extension-ip-route/extension-ip-route

URI requestDELETE http://10.10.10.10/rest/running/brocade-extension-ip-route/extension-ip-route

Request body<extension-ip-route> <name>4/0</name> <ip-address>3.0.0.0</ip-address> <ip-prefix-length>24</ip-prefix-length> <dp-id>0</dp-id></extension-ip-route>

Response bodyWhen the operation is successful, the response contains an empty message body and a "204 No Content" status in the first lineof the headers.

brocade-extension-ip-route

Brocade Fabric OS REST API Reference, 8.2.0a162 53-1005246-03

Page 163: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Retrieving an IP routeThe following example uses GET to retrieve all the IP routes on the switch.

StructureGET <base_URI>/running/brocade-extension-ip-route/extension-ip-route

URI requestGET http://10.10.10.10/rest/running/brocade-extension-ip-route/extension-ip-route

Request bodyNo request body is required.

Response bodyWhen the operation is successful, the response has a message body similar to the following, and a “200 OK” status in theheaders.

<?xml version="1.0"?><Response> <extension-ip-route> <name>0/2</name> <dp-id>0</dp-id> <ip-address>7.9.0.0</ip-address> <ip-prefix-length>24</ip-prefix-length> <ip-gateway>12.18.20.1</ip-gateway> <status-flags>U G S </status-flags> </extension-ip-route> <extension-ip-route> <name>0/2</name> <dp-id>0</dp-id> <ip-address>12.18.20.0</ip-address> <ip-prefix-length>24</ip-prefix-length> <ip-gateway>*</ip-gateway> <status-flags>U C </status-flags> </extension-ip-route></Response>

HistoryRelease version History

Fabric OS 8.2.0 This API call was introduced.

brocade-extension-ip-route

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 163

Page 164: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

brocade-extension-ipsec-policyThis module is used to retrieve or configure the IP security (IPsec) policy on the specified switch. IPsec policy creation supportscreating a profile name using either a preshared format or a PKI format. The authentication-data attribute will contain thepreshared key for a preshared profile and a key pair for a PKI profile.

Module treeThis is the tree view of the module from the brocade-extension-ipsec-policy.yang-tree.txt file. Refer to YANG module overviewon page 26 for YANG node field definitions and possible values, and Supported data types on page 26 for data typedescriptions.

module: brocade-extension-ipsec-policy +--rw brocade-extension-ipsec-policy +--rw extension-ipsec-policy* [policy-name] +--rw policy-name string +--rw profile-name? extension-ipsec-profile-name +--rw authentication-data? authentication-data +--ro num-ike-sessions? uint16 +--rw restart-ike-sessions? uint8

URI formatThe URI format for this module takes the following form:

<base_URI>/running/brocade-extension-ipsec-policy/extension-ipsec-policy/ followed by the leafs as

listed in the module tree to create, modify, or delete an IPsec policy.

Parametersbrocade-extension-ipsec-policy

Description: The container for this module.Flag: read-writeOptional: NoThis container has the following leafs:

extension-ipsec-policyDescription: The IPsec policy defined on an extension blade or platform.Flag: read-writeOptional: NoKey: policy-nameThis list has the following leafs:

policy-nameDescription: Name of the extension IPSec policy being called.Flag: read-writeType: StringValues: From 1 to 31 alphanumeric characters. This is case-sensitive, and must not containkeywords such as “all” or “none” and cannot contain the following characters: ; $ ! # ` / \ > <& ' " = , ? . * ^ { } ( ).

Optional: No

brocade-extension-ipsec-policy

Brocade Fabric OS REST API Reference, 8.2.0a164 53-1005246-03

Page 165: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

profile-nameDescription: Specifies the IPsec profile to use with the IPSec policy.Flag: read-writeType: extension-ipsec-profile-nameValues: preshared = Preshared key profile. pki = PKI key-pair profile. Default: presharedOptional: Yes

authentication-dataDescription: The authentication-data value depends on the profile used.Flag: read-writeType: authentication-dataValues:For a preshared profile, this is the preshared-key to be used for authentication. This operand isrequired for shared-key authentication profiles. A preshared key must be from 16 to 64 charactersin length.For a pki profile, this is the local key pair name to use for IKE authentication. This operand is requiredfor PKI authentication profiles. A PKI key pair name must be from 1 to 32 characters in length.Authentication data is returned as a zero-length string for read operations on policies with a“preshared” profile.Optional: Yes

num-ike-sessionsDescription: Number of Internet Key Exchange (IKE) sessions.Flag: read-onlyType: uint16Values: From 0 to 128. There is no default valueOptional: Yes

restart-ike-sessionsDescription: Control to restart all inactive IKE sessions for this policy.Flag: read-writeType: uint8Values: 1 = restart all inactive IKE sessions. 0 = do not restart all inactive IKE sessions. Default: 0Optional: Yes

Supported methodsOnly the GET, POST, PATCH, DELETE, OPTIONS, and HEAD operations are supported in this module.

Examples

Creating an IPsec policy using a preshared profileThis example uses a POST request to create the IPsec policy “psk1” using a preshared profile.

StructurePOST <base_URI>/running/brocade-extension-ipsec-policy/extension-ipsec-policy

brocade-extension-ipsec-policy

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 165

Page 166: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

URI requestPOST https://10.10.10.10/rest/running/brocade-extension-ipsec-policy/extension-ipsec-policy

Request body<extension-ipsec-policy> <policy-name>psk1</policy-name> <profile-name>preshared</profile-name> <authentication-data>1234567891011121314</authentication-data></extension-ipsec-policy>

Response bodyWhen the operation is successful, the response has an empty message body and a “201 Created” status in the headers.

Creating an IPsec policy using a PKI profileThis example uses a POST request to create the IPsec policy “pki_1” using a PKI profile.

StructurePOST <base_URI>/running/brocade-extension-ipsec-policy/extension-ipsec-policy

URI requestPOST https://10.10.10.10/rest/running/brocade-extension-ipsec-policy/extension-ipsec-policy

Request body<extension-ipsec-policy> <policy-name>pki_1</policy-name> <profile-name>pki</profile-name> <authentication-data>pki-key-1</authentication-data></extension-ipsec-policy>

Response bodyWhen the operation is successful, the response has an empty message body and a “201 Created” status in the headers.

Deleting an IPsec policyThe following example uses a DELETE request to delete the IPsec policy named “psk1”.

StructureDELETE <base_URI>/running/brocade-extension-ipsec-policy/extension-ipsec-policy/policy-name/policy_name

URI requestDELETE https://10.10.10.10/rest/running/brocade-extension-ipsec-policy/extension-ipsec-policy/policy-name/psk1

brocade-extension-ipsec-policy

Brocade Fabric OS REST API Reference, 8.2.0a166 53-1005246-03

Page 167: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Request bodyThe request body is empty.

Response bodyWhen the operation is successful, the response has an empty message body and a “204 No Content” status message.

Retrieving a list of IPsec policiesThe following example uses a GET request to retrieve all the IPsec policies on the switch.

StructureGET <base_URI>/running/brocade-extension-ipsec-policy/extension-ipsec-policy

URI requestGET https://10.10.10.10/rest/running/brocade-extension-ipsec-policy/extension-ipsec-policy

Request bodyNo request body is required.

Response bodyWhen the operation is successful, the response has a message body similar to the following, and a “200 OK” status in theheaders.

<?xml version="1.0"?><Response> <extension-ipsec-policy> <policy-name>pki_policy</policy-name> <profile-name>pki</profile-name> <authentication-data>kprest</authentication-data> <num-ike-sessions>0</num-ike-sessions> <restart-ike-sessions>0</restart-ike-sessions> </extension-ipsec-policy> <extension-ipsec-policy> <policy-name>preshared_policy</policy-name> <profile-name>preshared</profile-name> <authentication-data/> <num-ike-sessions>0</num-ike-sessions> <restart-ike-sessions>0</restart-ike-sessions> </extension-ipsec-policy></Response>

HistoryRelease version History

Fabric OS 8.2.0 This API call was introduced.

brocade-extension-ipsec-policy

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 167

Page 168: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

brocade-extension-tunnelThis module is used to retrieve information on or configure Brocade Extension tunnels.

Module treeThis is the tree view of the module from the brocade-extension-tunnel.yang-tree.txt file. Refer to YANG module overview onpage 26 for YANG node field definitions and possible values, and Supported data types on page 26 for data type descriptions.

module: brocade-extension-tunnel +--rw brocade-extension-tunnel +--rw extension-tunnel* [name] | +--rw name ve-interface-type | +--rw user-friendly-name? string | +--ro local-wwn? fibrechannel:wwn-type | +--rw remote-wwn? fibrechannel:wwn-type | +--ro peer-wwn? fibrechannel:wwn-type | +--rw admin-enabled? uint8 | +--rw fast-write-enabled? uint8 | +--rw tape-read? uint8 | +--rw tape-write? uint8 | +--ro tunnel-status? operational-type | +--ro ipsec-enabled? uint8 | +--rw ipsec-policy? string | +--ro ha-operational-status? uint16 | +--rw ficon? uint8 | +--rw ficon-xrc-acceleration? uint8 | +--rw ficon-tape-write-acceleration? uint8 | +--rw ficon-tape-read-acceleration? uint8 | +--rw ficon-tin-tir-emulation? uint8 | +--rw ficon-device-acknowledgement-emulation? uint8 | +--rw ficon-read-block-id-emulation? uint8 | +--rw ficon-teradata-read-acceleration? uint8 | +--rw ficon-teradata-write-acceleration? uint8 | +--rw ficon-tape-write-max-pipe? uint32 | +--rw ficon-tape-read-max-pipe? uint32 | +--rw ficon-tape-write-max-devices? uint32 | +--rw ficon-tape-read-max-devices? uint32 | +--rw ficon-tape-write-timer? uint32 | +--rw ficon-tape-write-max-chain? uint32 | +--rw ficon-oxid-base? uint32 | +--rw ip-extension? uint16 | +--rw load-level? tunnel-load-level | +--ro active-load-level? tunnel-load-level | +--ro peer-load-level? tunnel-load-level | +--rw compression-tunnel? uint16 | +--rw compression-protocol | | +--rw fc-compression? string | | +--rw ip-compression? string | +--rw qos-ratio | +--rw distribution? string | +--rw distribution-value? union | +--rw fc-high-qos? string | +--rw fc-medium-qos? string | +--rw fc-low-qos? string | +--rw ip-high-qos? string | +--rw ip-medium-qos? string | +--rw ip-low-qos? string +--ro extension-tunnel-statistics* [name] | +--ro name ve-interface-type | +--ro flow-status? uint16 | +--ro operational-status? operational-type | +--ro connection-count? yang:zero-based-counter32 | +--ro duration? uint32 | +--ro uncompressed-bytes? yang:zero-based-counter64 | +--ro compressed-bytes? yang:zero-based-counter64 +--rw extension-circuit* [name circuit-id]

brocade-extension-tunnel

Brocade Fabric OS REST API Reference, 8.2.0a168 53-1005246-03

Page 169: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

| +--rw name ve-interface-type | +--rw circuit-id uint16 | +--rw local-ip-address? inet:ip-address | +--rw remote-ip-address? inet:ip-address | +--rw metric? uint32 | +--rw failover-group-id? uint32 | +--rw admin-enabled? uint8 | +--ro path-mtu-discovered? uint32 | +--rw minimum-communication-rate? uint32 | +--rw maximum-communication-rate? uint32 | +--rw keep-alive-timeout? uint32 | +--ro vlan-id? uint32 | +--rw l2-cos | | +--rw priority-control? string | | +--rw fc-priority-high? string | | +--rw fc-priority-medium? string | | +--rw fc-priority-low? string | | +--rw ip-priority-high? string | | +--rw ip-priority-medium? string | | +--rw ip-priority-low? string | +--rw dscp | | +--rw priority-control? string | | +--rw fc-priority-high? string | | +--rw fc-priority-medium? string | | +--rw fc-priority-low? string | | +--rw ip-priority-high? string | | +--rw ip-priority-medium? string | | +--rw ip-priority-low? string | +--ro circuit-status? operational-type | +--rw local-ha-ip-address? inet:ip-address | +--rw remote-ha-ip-address? inet:ip-address | +--rw arl-algorithm-mode? uint32 +--ro extension-circuit-statistics* [name circuit-id] +--ro name ve-interface-type +--ro circuit-id uint16 +--ro flow-status? uint16 +--ro operational-status? operational-type +--ro connection-count? yang:zero-based-counter32 +--ro duration? uint32

URI formatsThe URI format for this module takes one of the following forms:

• <base_URI>/running/brocade-extension-tunnel/extension-tunnel/ followed by the leafs as listed in the

module tree to create, modify, or delete an extension tunnel.

• <base_URI>/running/brocade-extension-tunnel/extension-circuit/ followed by the leafs as listed in the

module tree to create, modify, or delete a circuit on an extension tunnel.

• <base_URI>/running/brocade-extension-tunnel/extension-tunnel-statistics/ followed by the leafs as

listed in the module tree to return the statistics for the extension tunnel.

• <base_URI>/running/brocade-extension-tunnel/extension-circuit-statistics/ followed by the leafs as

listed in the module tree to return the statistics for the extension circuit.

Parametersbrocade-extension-tunnel

Description:The module container.Flag: read-writeThis container has the following leafs.

brocade-extension-tunnel

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 169

Page 170: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

extension-tunnelDescription: The tunnel and circuit configuration and operational status for the named extension blade orsystem.Key: nameThis container has the following leafs.

nameDescription: The name of the interface.Flag: read-writeType: ve-interface-typeValues: The slot and port number of the port in the format slot/port.Optional: No

user-friendly-nameDescription: Description of the specified tunnel.Flag: read-writeType: stringValues: 0 to 255 alphanumeric characters. This is case-sensitive, and must not contain specialcharacters (high-ASCII). Default: A zero-length string.Optional: Yes

local-wwnDescription: The WWN of the local Fibre Channel device.Flag: read-onlyType: fibrechannel:wwn-typeConfig: falseValues: Valid WWN (Colon-separated hexadecimal octets, most significant bit first, with leadingzeros.)Optional: Yes

remote-wwnDescription: A WWN that can be optionally configured to be verified against the WWN of theremote Fibre Channel entity.Flag: read-writeType: fibrechannel:wwn-typeValues: Valid WWN (Colon-separated hexadecimal octets, most significant bit first, with leadingzeros.)Optional: Yes

peer-wwnDescription: The WWN of the remote Fibre Channel device.Flag: read-onlyConfig: falseType: fibrechannel:wwn-typeValues: Valid WWN (Colon-separated hexadecimal octets, most significant bit first, with leadingzeros.)Optional: Yes

admin-enabledDescription: Enables or disables the tunnel VE port on the circuit.Flag: read-writeType: uint8

brocade-extension-tunnel

Brocade Fabric OS REST API Reference, 8.2.0a170 53-1005246-03

Page 171: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Values: 0 = Admin status disabled. 1 = Admin status enabled. Default: 1Optional: Yes

fast-write-enabledDescription: Enables or disables FCIP FastWrite on the specified extension tunnel.Flag: read-writeType: uint8Values: 0 = FCIP FastWrite disabled. 1 = FCIP FastWrite enabled. Default: 0Optional: Yes

tape-readDescription: Enables Read Tape Pipelining on the specified extension tunnel.To enable this, FCIP FastWrite must also be enabled. Read Tape Pipelining can not be enabled ifWrite Tape Pipelining is disabled.Flag: read-writeType: uint8Values: 0 = Read Tape Pipelining disabled. 1 = Read Tape Pipelining enabled. Default: 0Optional: Yes

tape-writeDescription: Enables Write Tape Pipelining on the specified extension tunnel.To enable this, FCIP FastWrite must also be enabled.Flag: read-writeType: uint8Values: 0 = Write Tape Pipelining disabled. 1 = Write Tape Pipelining enabled. Default: 0Optional: Yes

tunnel-statusDescription: Operational status of specified extension tunnel.Flag: read-onlyConfig: falseType: operational-typeValues:0 = NULL. 1 = Offline. 2 = Online. 3 = Online Warning. 4 = Disabled. 5 = Degraded. 6 = Initializing.7 = Delete Pending. 8 = HA Online. 9 = HA Offline. 10 = HA Ready. 11 = Empty. 12 = In Progress.13 = Misconfiguration. 14 = Failover. 15 = Down Pending. 16 = Circuit Disabled/Fenced/Testing.17 = Internal Error. 18 = IPSec Error. 19 = Network Error. 20 = Authentication Error. 21 = Timeout.22 = TCP-Timeout. 23 = Remote Close Timeout. 24 = Remote Close. 25 = Rejected. 26 = No Port.27 = No Route. 28 = DP Offline. 29 = HCL In progress. 30 = Internal Error.31 = Configuration Incomplete. 32 = Circuit Fenced. 33 = Child Delete Complete.34 = Delete Failure. 35 = Spillover. 36 = Running. 37 = Testing. 38 = Aborted. 39 = Passed.40 = Failed.Optional: Yes

ipsec-enabledDescription: The Internet Protocol Security (IPsec) state of the specified extension tunnel.Flag: read-onlyType: uint8Config: falseValues: 0 = IPsec is disabled on the tunnel. 1 = IPsec is enabled on the tunnel. Default: 0Optional: Yes

brocade-extension-tunnel

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 171

Page 172: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

ipsec-policyDescription: The name of the Internet Protocol Security (IPsec) policy to be used on the specifiedextension tunnel.Flag: read-writeType: StringValues: 0 to 31 alphanumeric characters. Cannot contain any of the following characters ; $ ! #` / \ > < & ' " = , ? . * ^ { } ( ). This value is not case-sensitive and must not

contain special characters (high-ASCII) or keywords such as all. Using none disables IPsec for thetunnel. Default: A zero-length string.Optional: Yes

ha-operational-statusDescription: The High Availability (HA) status of the tunnel.Flag: read-onlyType: uint16Config: falseValues: 8 = HA Online. 9 = HA Offline. 10= HA ReadyOptional: Yes

ficonDescription: Enables or disables FICON emulation on the specified extension tunnel.Flag: read-writeType: uint8Values: 0 = FICON emulation disabled. 1 = FICON emulation enabled. Default: 0Optional: Yes

ficon-xrc-accelerationDescription: Enables or disables FICON XRC emulation.FICON XRC Emulation allows XRC (IBM eXtendedRemote Copy, also known as IBM z/OS GlobalMirroring) to operate effectively at extended distances. This field is valid only if FICON emulation isenabled on the specified tunnel.Flag: read-writeType: uint8Values: 0 = FICON XRC emulation disabled. 1 = FICON XRC emulation enabled. Default: 0Optional: Yes

ficon-tape-write-accelerationDescription: Enables or disables FICON Tape Write Pipelining.This feature improves the performance of certain applications when writing to tape over extendeddistances. This field is valid only if FICON emulation is enabled on the specified tunnel.Flag: read-writeType: uint8Values: 0 = FICON Tape Write Pipelining disabled. 1 = FICON Tape Write Pipelining enabled.Default: 0Optional: Yes

ficon-tape-read-accelerationDescription: Enables or disables FICON Tape Read Pipelining.This feature improves performance for certain applications when reading from FICON tape overextended distances. This field is valid only if FICON emulation is enabled on the specified tunnel.Flag: read-write

brocade-extension-tunnel

Brocade Fabric OS REST API Reference, 8.2.0a172 53-1005246-03

Page 173: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Type: uint8Values: 0 = FICON Tape Read Pipelining disabled. 1 = FICON Tape Read Pipelining enabled.Default: 0Optional: Yes

ficon-tin-tir-emulationDescription: Enables or disables FICON TIN/TIR emulation.This feature enhances recovery when a TIN/TIR exchange occurs as part of a channel recoveryoperation during tape emulation and is enabled by default (recommended setting). This field is validonly if FICON emulation is enabled on the specified tunnel.Flag: read-writeType: uint8Values: 0 = FICON TIN/TIR emulation disabled. 1 = FICON TIN/TIR emulation enabled. Default: 1Optional: Yes

ficon-device-acknowledgement-emulationDescription: Enables or disables FICON Device Level Acknowledgement emulation.This feature is applicable to both FICON Disk and Tape configurations. The feature removes onenetwork round trip for exchanges that end with a Device Level Acknowledgment frame from thedevice, and is enabled by default (recommended setting). This field is valid only if FICON emulationis enabled on the specified tunnel.Flag: read-writeType: uint8Values: 0 = FICON Device Level Acknowledgement emulation disabled. 1 = FICON Device LevelAcknowledgement emulation enabled. Default: 1Optional: Yes

ficon-read-block-id-emulationDescription: Enables or disables FICON read Tape Read Block ID emulation.This feature permits FICON write channel programs containing embedded read block ID commands(CCWs) with a byte count of exactly four bytes to be processed as emulated commands during writeemulation processes. This field is valid only if FICON emulation is enabled on the specified tunnel.Flag: read-writeType: uint8Values: 0 = FICON Tape Read Block ID emulation disabled. 1 = FICON Tape Read Block IDemulation enabled. Default: 0Optional: Yes

ficon-teradata-read-accelerationDescription: Enables or disables FICON Read emulation for a Teradata server on the specifiedextension tunnel.This field is valid only if FICON emulation is enabled on the specified tunnel.Flag: read-writeType: uint8Values: 0 = FICON Read emulation for Teradata disabled. 1 = FICON Read emulation for Teradataenabled. Default: 0Optional: Yes

ficon-teradata-write-accelerationDescription: Enables or disables FICON Write emulation for a Teradata server on the specifiedextension tunnel.

brocade-extension-tunnel

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 173

Page 174: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

This field is valid only if FICON emulation is enabled on the specified tunnel.Flag: read-writeType: uint8Values: 0 = FICON Write emulation for Teradata disabled. 1 = FICON Write emulation for Teradataenabled. Default: 0Optional: Yes

ficon-tape-write-max-pipeDescription: Defines the maximum number of tape write channel commands (CCWs) that can enterthe write pipeline for a single device whether all the CCWs are bundled in a single channel programor in multiple channel programs.This setting has significance only for host (channel) initiated operations at this side and will not affecttape write operations initiated by hosts (channels) attached at the opposite side. Too small of a valuewill result in poor performance. The value should be chosen based upon the typical tape channelprogram that requires optimum performance. This field is valid only if FICON emulation is enabledon the specified tunnel.Flag: read-writeType: uint32Values: 1 through 100. Default: 32 (Recommended setting)Optional: Yes

ficon-tape-read-max-pipeDescription: Defines the maximum number of tape read channel commands (CCWs) that can enterthe read pipeline for a single device whether all the CCWs are bundled in a single channel programor in multiple channel programs.This setting has significance only for host (channel) initiated operations at this side and will not affecttape write operations initiated by hosts (channels) attached at the opposite side. Too small of a valuewill result in poor performance. The value should be chosen based upon the typical tape channelprogram that requires optimum performance. This field is valid only if FICON emulation is enabledon the specified tunnel.Flag: read-writeType: uint32Values: 1 through 100. Default: 32 (Recommended setting)Optional: Yes

ficon-tape-write-max-devicesDescription: Defines the maximum number of concurrent emulated tape write operations.As concurrency increases, the value of emulation decreases. Excessive concurrency has thepotential to oversubscribe packet data memory. The setting has significance only for host (channel)initiated operations at this side and will not affect tape write operations initiated by hosts (channels)attached. This field is valid only if FICON emulation is enabled on the specified tunnel.Flag: read-writeType: uint32Values: 1 through 32. Default: 16 (Recommended setting)Optional: Yes

ficon-tape-read-max-devicesDescription: Defines the maximum number of concurrent emulated tape read operations.As concurrency increases, the value of emulation decreases. Excessive concurrency has thepotential to oversubscribe packet data memory. The setting has significance only for host (channel)initiated operations at this side and will not affect tape read operations initiated by hosts (channels)

brocade-extension-tunnel

Brocade Fabric OS REST API Reference, 8.2.0a174 53-1005246-03

Page 175: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

attached at the opposite side. This field is valid only if FICON emulation is enabled on the specifiedtunnel.Flag: read-writeType: uint32Values: 1 through 32. Default: 16 (Recommended setting)Optional: Yes

ficon-tape-write-timerDescription: The time limit for pipelined write chains.If a pipelined write chain takes longer than this value to complete, the ending status for the next writechain will be withheld from the channel. This limits processing to what the network and device cansupport. Too small a value limits pipelining performance. Too large a value results in too much databeing accepted for one device on a path. This field is valid only if FICON emulation is enabled onthe specified tunnel.Flag: read-writeType: uint32Units: milliseconds (ms)Values: 100 through 1500. Default: 300Optional: Yes

ficon-tape-write-max-chainDescription: The maximum amount of data that can be contained in a single CCW (ChannelCommand Words) chain.If this value is exceeded, emulation is suspended. This field is valid only if FICON emulation isenabled on the specified tunnel.Flag: read-writeType: uint32Units: bytesValues: 1000000 through 5000000 (1 MB through 5 MB). Default: 3200000 (3.2 MB)Optional: Yes

ficon-oxid-baseDescription: Defines the base value of an entry pool of 256 0XIDs (Format 0 exchangeidentifications) supplied to emulation-generated exchanges.The base value specified should fall outside the range used by FICON channels and devices toavoid conflicts. This field is valid only if FICON emulation is enabled on the specified tunnel.Flag: read-writeType: uint32Values: One of the following values: 0, 4096, 8192, 12288, 16384, 20480, 24576, 28672,32768, 36864, 40960, 45056, 49152, or 53248. Default: 36864 (Recommended setting)Optional: Yes

ip-extensionDescription: Enables or disables the IP Extension capability of the specified tunnel.Flag: read-writeType: uint16Values: 0 = IP Extension capability disabled. 1 = IP Extension capability enabled. Default: 0Optional: Yes

brocade-extension-tunnel

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 175

Page 176: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

load-levelDescription: Specifies spillover or failover load-balancing method for the specified tunnel. Thisprovides an orderly means to recover from circuit failures.Flag: read-writeType: tunnel-load-levelValues: One of the following values:default = This uses the load-balancing method that is already specified on the switch.failover = This load-balancing method tries to retransmit any pending send traffic over the nextlowest metric circuit. Failover load balancing, in comparison to spillover, requires that all lower metriccircuits become unavailable before the higher metric circuits are used. (Default)spillover = This load-balancing method allows you to define circuits that are used only when there iscongestion or a period of high bandwidth utilization.Refer to the Brocade Fabric OS Extension Configuration Guide for a more complete description ofhow load balancing is managed in Brocade Extension tunnels.Optional: Yes

active-load-levelDescription: Load level value currently active on the tunnel.Flag: read-onlyType: tunnel-load-levelConfig: falseValues:failover = This load-balancing method tries to retransmit any pending send traffic over the nextlowest metric circuit. Failover load balancing, in comparison to spillover, requires that all lower metriccircuits become unavailable before the higher metric circuits are used.spillover = This load-balancing method allows you to define circuits that are used only when there iscongestion or a period of high bandwidth utilization.Refer to the Brocade Fabric OS Extension Configuration Guide for a more complete description ofhow load balancing is managed in Brocade Extension tunnels.Optional: Yes

peer-load-levelDescription: The load level configured on the peer-end of the tunnel.Flag: read-onlyType: tunnel-load-levelConfig: falseValues:default = Use the load-balancing method that is already specified on the switch.failover = Trunking tries to retransmit any pending send traffic over the next lowest metric circuit.Failover load balancing, in comparison to spillover, requires that all lower metric circuits becomeunavailable before the higher metric circuits are used. (Default)spillover = This is a load-balancing method that allows you to define circuits that are used only whenthere is congestion or a period of high bandwidth utilizationRefer to the Brocade Fabric OS Extension Configuration Guide for a more complete description ofhow load balancing is managed in Brocade Extension tunnels.Optional: Yes

compression-tunnelDescription: Configures compression on the specified tunnel.Flag: read-write

brocade-extension-tunnel

Brocade Fabric OS REST API Reference, 8.2.0a176 53-1005246-03

Page 177: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Type: uint16Values: 0 = Off (Compression disabled), 3 = Deflate, 4 = Aggressive Deflate, 5 = Fast Deflate.Default: 0Optional: Yes

compression-protocolThe FC/IP compression mode for the specified tunnel.This container has the following leafs.

fc-compressionDescription: The Fibre Channel compression level applied to the specified tunnel.Flag: read-writeType: stringValues: -1 = The default compression level specified in the compression-tunnel attribute,0 = Off (Compression disabled), 3 = Deflate, 4 = Aggressive Deflate, 5 = Fast Deflate.Default: -1Optional: Yes

ip-compressionDescription: The Internet Protocol compression level applied to the specified tunnel.Flag: read-writeType: stringValues: -1 = The default IP compression level specified in the compression-tunnelattribute, 0 = Off (Compression disabled), 3 = Deflate, 4 = Aggressive Deflate. Default: -1Note: If “default” is configured for either the Fibre Channel or IP compression protocolvalue, a GET request returns -1. If a user-configured value is defined, a GET requestreturns the configured value.Optional: Yes

qos-ratioDescription: The tunnel bandwidth distribution values to be applied. This container has the followingleafs.

distributionDescription: The tunnel bandwidth distribution mode.Flag: read-writeType: stringValues: 1 = FCIP mode. 2 = Hybrid mode. Default: 1Optional: Yes

distribution-valueDescription: The values for bandwidth distribution.Flag: read-writeType: union, stringUnits: Percentage as an integerValues: This is either blank for FCIP mode or FC_bandwidth,IP_bandwidth for Hybridmode. Each distribution value can be a minimum of 10%. The sum of both percentagesmust equal 100%. Default: 50,50 (Hybrid mode)Optional: Yes

fc-high-qosDescription: The QoS percentage value for high priority FCIP traffic.

brocade-extension-tunnel

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 177

Page 178: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Each priority can have a minimum of 10%. The sum of all three percentages must equal100%.Flag: read-writeType: stringUnits: Percentage as an integerValues: 10 through 80. Default: 50Optional: Yes

fc-medium-qosDescription: The QoS percentage value for medium priority FCIP traffic.Flag: read-writeType: stringUnits: Percentage as an integerValues: 10 through 80. Default: 30Optional: Yes

fc-low-qosDescription: The QoS percentage value for low priority FCIP traffic.Flag: read-writeType: stringUnits: Percentage as an integerValues: 10 through 80. Default: 20Optional: Yes

ip-high-qosDescription: The QoS percentage value for high priority IP Extension traffic.Each priority can have a minimum of 10%. The sum of all three percentages must equal100%.Flag: read-writeType: stringUnits: Percentage as an integerValues: 10 through 80. Default: 50Optional: Yes

ip-medium-qosDescription: The QoS percentage value for medium priority IP Extension traffic.Flag: read-writeType: stringUnits: Percentage as an integerValues: 10 through 80. Default: 30Optional: Yes

ip-low-qosDescription: The QoS percentage value for low priority IP Extension traffic.Flag: read-writeType: stringUnits: Percentage as an integerValues: 10 through 80. Default: 20Optional: Yes

extension-tunnel-statisticsDescription: The tunnel statistics for the extension blade or system.

brocade-extension-tunnel

Brocade Fabric OS REST API Reference, 8.2.0a178 53-1005246-03

Page 179: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Key: nameConfig: falseThis list has the following leafs.

nameDescription: The name of the interface.Flag: read-writeType: ve-interface-typeValues: The slot and port number of the port in the format slot/port.Optional: No

flow-statusDescription: Flow control status.Flag: read-writeType: uint16Values: 0 = Flow control is off. 1 = Flow control is on. Default: 0Optional: Yes

operational-statusDescription: Operational status of tunnel.Flag: read-onlyType: operational-typeValues:0 = NULL. 1 = Offline. 2 = Online. 3 = Online Warning. 4 = Disabled. 5 = Degraded. 6 = Initializing.7 = Delete Pending. 8 = HA Online. 9 = HA Offline. 10 = HA Ready. 11 = Empty. 12 = In Progress.13 = MisConfiguration. 14 = Failover. 15 = Down Pending. 16 = Circuit Disabled/Fenced/Testing.17 = Internal Error. 18 = IPsec Error. 19 = Network Error. 20 = Authentication Error. 21 = Timeout.22 = TCP-Timeout. 23 = Remote Close Timeout. 24 = Remote Close. 25 = Rejected. 26 = No Port.27 = No Route. 28 = DP Offline. 29 = HCL In progress. 30 = Internal Error.31 = Configuration Incomplete. 32 = Circuit Fenced. 33 = Child Delete Complete.34 = Delete Failure. 35 = Spill Over. 36 = Running. 37 = Testing. 38 = Aborted. 39 = Passed.40 = Failed. There is no default value.Optional: Yes

connection-countDescription: The number of times the tunnel or circuit has transitioned to an online state. It starts at0 at time of tunnel/circuit creation, or at a statistics reset, then increments by 1 every time the tunnelor circuit comes online.Flag: read-onlyType: yang:zero-based-counter32Values: 0 to 4294967295. There is no default.Optional: Yes

durationDescription: The length of time (in seconds) since the tunnel/circuit last transitioned to an onlinestate.Flag: read-onlyType: uint32Units: secondsValues: 0 to 4294967295. There is no defaultOptional: Yes

brocade-extension-tunnel

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 179

Page 180: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

uncompressed-bytesDescription: The number of uncompressed bytes of data that have traversed the tunnel.Flag: read-onlyType: yang:zero-based-counter64Units: BytesValues: 0 through 18446744073709551615. Default: 0Optional: Yes

compressed-bytesDescription: The number of compressed bytes of data that have traversed the tunnel.Flag: read-onlyType: yang:zero-based-counter64Units: BytesValues: 0 through 18446744073709551615. Default: 0Optional: Yes

extension-circuitDescription: The circuit interface for the extension blade or system. This list has the following leafs.Key: name plus circuit-id. Both must be included to identify a specific circuit interface.This list has the following leafs:

nameDescription: The name of the extension tunnel interface.Flag: read-writeType: ve-interface-typeValues: The slot and port number of the port in the format slot/port.Optional: No

circuit-idDescription: Circuit ID for the specified extension circuit.Flag: read-writeType: uint16Values: 0 through 9. Default: 0Optional: No

local-ip-addressDescription: The local IP address to use for the circuit.Flag: read-writeType: inet:ip-addressValues: An address in valid IPv4 or IPv6 format.Optional: Yes

remote-ip-addressDescription: The remote IP address to use for the circuit.Flag: read-writeType: inet:ip-addressValues: An address in valid IPv4 or IPv6 format.Optional: Yes

metricDescription: The metric for the configured circuit.A lower metric assigns a higher priority to the circuit. As data is flowing through the extension tunnel,it automatically traverses the lowest metric cost circuits. For example, if a tunnel has four circuits,

brocade-extension-tunnel

Brocade Fabric OS REST API Reference, 8.2.0a180 53-1005246-03

Page 181: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

three of which are set to a metric of 0 and one is set to a metric of 1, all data will flow over the metric0 circuits. This parameter is meaningful only if you configure more than one circuit.Flag: read-writeType: uint32Values: 0 = Primary. 1 = Failover. Default: 0Optional: Yes

failover-group-idDescription: The failover group ID for the configured circuit.The circuit failover groups must be defined at both ends of the extension tunnel and each failovergroup should include at least one metric 0 and one metric 1 circuit. If all metric 0 circuits in thefailover group go down, the transmission fails over to the metric 1 circuits in the group. If all metric 0circuits in a tunnel go down, by default the traffic will run over the metric 1 circuits. This field has nomeaning when load level for the tunnel is ‘spillover’.Flag: read-writeType: uint32Values: A value in the range from 0 to 9. Default group ID: 0Optional: Yes

admin-enabledDescription: Enables or disables the circuit.Flag: read-writeType: uint8Values: 0 = Circuit disabled on the tunnel. 1 = Circuit enabled on the tunnel. Default: 1Optional: Yes

path-mtu-discoveredDescription: Discovered Path MTU value.This field is valid only when Path MTU discovery is enabled. The min and max values are restrictedby mtu-size of the interface.Flag: read-onlyType: uint32Config: falseValues: 1280 to 9216 or 0 if not used. Default: 0Optional: Yes

minimum-communication-rateDescription: Minimum communication rate of the tunnel.You can set a minimum and a maximum for the committed rate to configure the tunnel for AdaptiveRate Limiting (ARL), which allows for a more effective sharing of bandwidth between applications.The maximum committed rate can be no larger than five times the minimum committed rate, andboth sides of the circuit must have matching configurations.Flag: read-writeType: uint32Units: kbpsValues: 20000 through 10000000. Default: 0. The value is 0 when the rate is not yet configured.Optional: Yes

maximum-communication-rateDescription: Maximum communication rate of the tunnel.

brocade-extension-tunnel

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 181

Page 182: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

You can set a minimum and a maximum for the committed rate to configure the tunnel for AdaptiveRate Limiting (ARL), which allows for a more effective sharing of bandwidth between applications.The maximum committed rate can be no larger than five times the minimum committed rate, andboth sides of the circuit must have matching configurations.Flag: read-writeType: uint32Units: kbpsValues: 20000 through 10000000. Default: 0. This must be a larger value than minimum-communication-rate, and the value is 0 when the rate is not yet configured.Optional: Yes

keep-alive-timeoutDescription: The keep alive timeout.Flag: read-writeType: uint32Units: milliseconds (ms)Values: 500 through 7200000If the tunnel does not already have FICON Emulation enabled, circuits created on the tunnel defaultto a keep-alive timeout of 6000 ms (6 seconds). If FICON emulation is enabled on the extensiontunnel when a circuit is created, the keep-alive timeout defaults to 1000 ms (1 second).Optional: Yes

vlan-idDescription: Specifies the VLAN ID.Flag: read-writeType: uint32Config: falseValues: 0 through 4095. Default: 0. When not set, this value will register as 0.Optional: Yes

l2-cosDescription: L2 class of service or priority as defined by IEEE 802.1p for the tunnel.This container has the following leafs.

priority-controlDescription: The Layer 2 Class of Service (L2CoS) value for F-Class Traffic.This priority setting controls connections between switches.Flag: read-writeType: stringValues: 0 through 7. Default: 0Optional: Yes

fc-priority-highDescription: The L2 CoS value for Fibre Channel high priority traffic.Flag: read-writeType: stringValues: 0 through 7. Default: 0Optional: Yes

fc-priority-mediumDescription: The L2 CoS value for Fibre Channel medium priority traffic.Flag: read-write

brocade-extension-tunnel

Brocade Fabric OS REST API Reference, 8.2.0a182 53-1005246-03

Page 183: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Type: stringValues: 0 through 7. Default: 0Optional: Yes

fc-priority-lowDescription: The L2 CoS value for Fibre Channel low priority traffic.Flag: read-writeType: stringValues: 0 through 7. Default: 0Optional: Yes

ip-priority-highDescription: The L2 CoS value for Internet Protocol high priority traffic.Flag: read-writeType: stringValues: 0 through 7. Default: 0Optional: Yes

ip-priority-mediumDescription: The L2 CoS value for Internet Protocol medium priority traffic.Flag: read-writeType: stringValues: 0 through 7. Default: 0Optional: Yes

ip-priority-lowDescription: The L2 CoS value for Internet Protocol low priority traffic.Flag: read-writeType: stringValues: 0 through 7. Default: 0Optional: Yes

dscpDescription: The Internet Protocol (IP) Differentiated Services Code Point (DSCP) markings forframes.Config: falseThis container has the following leafs:

priority-controlDescription: The DSCP value for F-class traffic.Flag: read-writeType: stringValues: 0 through 63. Default: 0Optional: Yes

fc-priority-highDescription: The DSCP value for Fibre Channel high priority traffic.Flag: read-writeType: stringValues: 0 through 63. Default: 0Optional: Yes

brocade-extension-tunnel

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 183

Page 184: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

fc-priority-mediumDescription: The DSCP value for Fibre Channel medium priority traffic.Flag: read-writeType: stringValues: 0 through 63. Default: 0Optional: Yes

fc-priority-lowDescription: The DSCP value for Fibre Channel low priority traffic.Flag: read-writeType: stringValues: 0 through 63. Default: 0Optional: Yes

ip-priority-highDescription: The DSCP value for Internet Protocol high priority traffic.Flag: read-writeType: stringValues: 0 through 63. Default: 0Optional: Yes

ip-priority-mediumDescription: The DSCP value for Internet Protocol medium priority traffic.Flag: read-writeType: stringValues: 0 through 63. Default: 0Optional: Yes

ip-priority-lowDescription: The DSCP value for Internet Protocol low priority traffic.Flag: read-writeType: stringValues: 0 through 63. Default: 0Optional: Yes

circuit-statusDescription: Operational status of the circuit.Flag: read-onlyType: operational-typeConfig: falseValues:0 = NULL, 1 = Offline, 2 = Online, 3 = Online Warning, 4 = Disabled, 5 = Degraded, 6 = Initializing,7 = Delete Pending, 8 = HA Online, 9 = HA Offline, 10 = HA Ready, 11 = Empty, 12 = In Progress,13 = Misconfiguration, 14 = Failover, 15 = Down Pending, 16 = Circuit Disabled/Fenced/Testing,17 = Internal Error, 18 = IPsec Error, 19 = Network Error, 20 = Authentication Error, 21 = Timeout,22 = TCP-Timeout, 23 = Remote Close Timeout, 24 = Remote Close, 25 = Rejected, 26 = No Port,27 = No Route, 28 = DP Offline, 29 = HCL In progress, 30 = Internal Error, 31 = Configuration Incomplete,32 = Circuit Fenced, 33 = Child Delete Complete, 34 = Delete Failure, 35 = Spill Over, 36 = Running,37 = Testing, 38 = Aborted, 39 = Passed, 40 = Failed. There is no default value.

local-ha-ip-addressDescription: The local High Availability IP address to use for the circuit.

brocade-extension-tunnel

Brocade Fabric OS REST API Reference, 8.2.0a184 53-1005246-03

Page 185: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Flag: read-writeType: inet:ip-addressValues: Valid IPV4 or IPv6 addressOptional: Yes

remote-ha-ip-addressDescription: The remote High Availability IP address to use for the circuit.Flag: read-writeType: inet:ip-addressValues: Valid IPV4 or IPv6 addressOptional: Yes

arl-algorithm-modeDescription: The adaptive rate limiting (ARL) algorithm in use.Flag: read-writeType: inet:ip-addressValues: 0 = auto, 1 = reset, 2 = step-down, 3 = timed-step-down. Default: 0Optional: Yes

extension-circuit-statisticsDescription: Represents circuit statistics for extension blade or system.Key: name plus circuit-id. Both must be included to identify a specific circuit.Config: falseThis list has the following leafs:

nameDescription: The name of the interface.Flag: read-onlyType: ve-interface-typeValues: The slot and port number of the port in the format slot/port.Optional: No

circuit-idDescription: Circuit identifier.Flag: read-onlyType: uint16Values: 0 through 9. Default: 0Optional: No

flow-statusDescription: Flow control status of circuit.Flag: read-onlyType: uint16Values: 0 = Flow control is off. 1 = Flow control is on. Default: 0Optional: Yes

operational-statusDescription: Operational status of circuit.Flag: read-onlyType: operational-type0 = NULL, 1 = Offline, 2 = Online, 3 = Online Warning, 4 = Disabled, 5 = Degraded, 6 = Initializing,7 = Delete Pending, 8 = HA Online, 9 = HA Offline, 10 = HA Ready, 11 = Empty, 12 = In Progress,13 = MisConfiguration, 14 = Failover, 15 = Down Pending, 16 = Circuit Disabled/Fenced/Testing,

brocade-extension-tunnel

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 185

Page 186: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

17 = Internal Error, 18 = IPsec Error, 19 = Network Error, 20 = Authentication Error, 21 = Timeout,22 = TCP-Timeout, 23 = Remote Close Timeout, 24 = Remote Close, 25 = Rejected. 26 = No Port,27 = No Route, 28 = DP Offline, 29 = HCL In progress, 30 = Internal Error,31 = Configuration Incomplete, 32 = Circuit Fenced, 33 = Child Delete Complete,34 = Delete Failure, 35 = Spill Over, 36 = Running, 37 = Testing, 38 = Aborted, 39 = Passed,40 = Failed. There is no default value.Optional: Yes

connection-countDescription: Active connection count on circuit.Flag: read-onlyType: yang:zero-based-counter32Values: 0 through 4294967295. Default: 0Optional: Yes

durationDescription: Duration of time that the circuit has been in an online state.Flag: read-onlyType: uint32Units: secondsValues: 0 through 4294967295. Default: 0Optional: Yes

Supported methodsTable 7 lists the supported and unsupported methods for this module.

TABLE 7 Supported and unsupported methods

URI Supported methods Unsupported methods

<base_URI>/running/brocade-extension-tunnel/extension-tunnel GET, POST, PATCH, DELETE,OPTIONS, and HEAD

<base_URI>/running/brocade-extension-tunnel/extension-tunnel-statistics

GET, OPTIONS, and HEAD POST, PATCH, andDELETE

<base_URI>/running/brocade-extension-tunnel/extension-circuit GET, POST, PATCH, DELETE,OPTIONS, and HEAD

<base_URI>/running/brocade-extension-tunnel/extension-circuit-statistics

GET, OPTIONS, and HEAD POST, PATCH, andDELETE

ExamplesNOTEThe examples presented here illustrate only the key parameters required to create a tunnel or circuit. Multiple attributescan be provided in the data body of the request to set the values along with the key parameters.

Creating a tunnelThis example uses a POST request to create a tunnel on port 4/17.

brocade-extension-tunnel

Brocade Fabric OS REST API Reference, 8.2.0a186 53-1005246-03

Page 187: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

StructurePOST <base_URI>/running/brocade-extension-tunnel/extension-tunnel

URI requestPOST https://10.10.10.10/rest/running/brocade-extension-tunnel/extension-tunnel

Request bodyNotice that the slash character in the name resource is not encoded as “%2f”. This is because it is in the request body.

<extension-tunnel> <name>4/17</name></extension-tunnel>

Response bodyWhen the operation is successful, the response contains an empty message body and a "201 Created" status in the headers.

Creating a circuit on a tunnelThis example uses a POST request to create circuit 0 on tunnel 4/17.

StructurePOST <base_URI>/running/brocade-extension-tunnel/extension-circuit

URI requestPOST https://10.10.10.10/rest/running/brocade-extension-tunnel/extension-circuit

Request body<extension-circuit> <name>4/17</name> <circuit-id>0</circuit-id></extension-circuit>

Response bodyWhen the operation is successful, the response contains an empty message body and a "201 Created" status in the headers.

Deleting a tunnelThis example uses a DELETE request to delete the tunnel and circuit running on port 4/17.

StructureDELETE <base_URI>/running/brocade-extension-tunnel/extension-tunnel/name/4%2f17

brocade-extension-tunnel

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 187

Page 188: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

URI requestDELETE https://10.10.10.10/rest/running/brocade-extension-tunnel/extension-tunnel/name/4%2f17

Request bodyNo request body is required.

Response bodyWhen the operation is successful, the response contains an empty message body and a "200 OK" status in the headers.

List all the tunnels on a switchThis example uses a GET request to retrieve the list of all tunnels available on the switch without retrieving tunnel statistics,circuits, or circuit statistics.

StructureGET <base_URI>/running/brocade-extension-tunnel/extension-tunnel

URI requestGET https://10.10.10.10/rest/running/brocade-extension-tunnel/extension-tunnel

Request bodyNo request body is required.

brocade-extension-tunnel

Brocade Fabric OS REST API Reference, 8.2.0a188 53-1005246-03

Page 189: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Response bodyWhen the operation is successful, the response has a message body similar to the following, and a “200 OK” status in theheaders.

<?xml version="1.0"?><Response> <extension-tunnel> <name>4/16</name> <user-friendly-name/> <local-wwn>10:00:00:05:33:e7:c5:10</local-wwn> <remote-wwn>00:00:00:00:00:00:00:00</remote-wwn> <peer-wwn>00:00:00:00:00:00:00:00</peer-wwn> <compression-tunnel>0</compression-tunnel> <admin-enabled>1</admin-enabled> <fast-write-enabled>0</fast-write-enabled> <tape-read>0</tape-read> <tape-write>0</tape-write> <tunnel-status>11</tunnel-status> <ipsec-enabled>0</ipsec-enabled> <ipsec-policy/> <ha-operational-status>9</ha-operational-status> <ficon>0</ficon> <ficon-xrc-acceleration>0</ficon-xrc-acceleration> <ficon-tape-write-acceleration>0</ficon-tape-write-acceleration> <ficon-tape-read-acceleration>0</ficon-tape-read-acceleration> <ficon-tin-tir-emulation>1</ficon-tin-tir-emulation> <ficon-device-acknowledgement-emulation>1</ficon-device-acknowledgement-emulation> <ficon-read-block-id-emulation>0</ficon-read-block-id-emulation> <ficon-teradata-read-acceleration>0</ficon-teradata-read-acceleration> <ficon-teradata-write-acceleration>0</ficon-teradata-write-acceleration> <ficon-tape-write-max-pipe>32</ficon-tape-write-max-pipe> <ficon-tape-read-max-pipe>32</ficon-tape-read-max-pipe> <ficon-tape-write-max-devices>16</ficon-tape-write-max-devices> <ficon-tape-read-max-devices>16</ficon-tape-read-max-devices> <ficon-tape-write-timer>300</ficon-tape-write-timer> <ficon-tape-write-max-chain>3200000</ficon-tape-write-max-chain> <ficon-oxid-base>36864</ficon-oxid-base> <ip-extension>0</ip-extension> <qos-ratio> <distribution>1</distribution> <distribution-value/> <fc-high-qos>50</fc-high-qos> <fc-medium-qos>30</fc-medium-qos> <fc-low-qos>20</fc-low-qos> </qos-ratio> <compression-protocol> <fc-compression>0</fc-compression> </compression-protocol> <load-level>Failover</load-level> <active-load-level>Failover</active-load-level> <peer-load-level>Failover</peer-load-level> </extension-tunnel> <extension-tunnel> <name>4/30</name> <user-friendly-name/> <local-wwn>10:00:00:05:33:e7:c5:10</local-wwn> <remote-wwn>00:00:00:00:00:00:00:00</remote-wwn> <peer-wwn>10:00:00:05:33:e7:3d:60</peer-wwn> <compression-tunnel>0</compression-tunnel> <admin-enabled>1</admin-enabled> <fast-write-enabled>0</fast-write-enabled> <tape-read>0</tape-read> <tape-write>0</tape-write> <tunnel-status>2</tunnel-status> <ipsec-enabled>0</ipsec-enabled> <ipsec-policy/> <ha-operational-status>8</ha-operational-status> <ficon>0</ficon> <ficon-xrc-acceleration>0</ficon-xrc-acceleration> <ficon-tape-write-acceleration>0</ficon-tape-write-acceleration>

brocade-extension-tunnel

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 189

Page 190: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

<ficon-tape-read-acceleration>0</ficon-tape-read-acceleration> <ficon-tin-tir-emulation>1</ficon-tin-tir-emulation> <ficon-device-acknowledgement-emulation>1</ficon-device-acknowledgement-emulation> <ficon-read-block-id-emulation>0</ficon-read-block-id-emulation> <ficon-teradata-read-acceleration>0</ficon-teradata-read-acceleration> <ficon-teradata-write-acceleration>0</ficon-teradata-write-acceleration> <ficon-tape-write-max-pipe>32</ficon-tape-write-max-pipe> <ficon-tape-read-max-pipe>32</ficon-tape-read-max-pipe> <ficon-tape-write-max-devices>16</ficon-tape-write-max-devices> <ficon-tape-read-max-devices>16</ficon-tape-read-max-devices> <ficon-tape-write-timer>300</ficon-tape-write-timer> <ficon-tape-write-max-chain>3200000</ficon-tape-write-max-chain> <ficon-oxid-base>36864</ficon-oxid-base> <ip-extension>0</ip-extension> <qos-ratio> <distribution>1</distribution> <distribution-value/> <fc-high-qos>50</fc-high-qos> <fc-medium-qos>30</fc-medium-qos> <fc-low-qos>20</fc-low-qos> </qos-ratio> <compression-protocol> <fc-compression>0</fc-compression> </compression-protocol> <load-level>Failover</load-level> <active-load-level>Failover</active-load-level> <peer-load-level>Failover</peer-load-level> </extension-tunnel></Response>

Getting a list of tunnel statisticsThis example uses a GET request to retrieve a list of extension tunnel statistics.

StructureGET <base_URI>/running/brocade-extension-tunnel/extension-tunnel-statistics

URI requestGET https://10.10.10.10/rest/running/brocade-extension-tunnel/extension-tunnel-statistics

Request bodyNo request body is required.

brocade-extension-tunnel

Brocade Fabric OS REST API Reference, 8.2.0a190 53-1005246-03

Page 191: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Response bodyWhen the operation is successful, the response has a message body similar to the following, and a “200 OK” status in theheaders.

<?xml version="1.0"?><Response> <extension-tunnel-statistics> <name>4/16</name> <flow-status>0</flow-status> <operational-status>11</operational-status> <connection-count>0</connection-count> <duration>0</duration> <uncompressed-bytes>0</uncompressed-bytes> <compressed-bytes>0</compressed-bytes> </extension-tunnel-statistics> <extension-tunnel-statistics> <name>4/30</name> <flow-status>0</flow-status> <operational-status>2</operational-status> <connection-count>1</connection-count> <duration>735</duration> <uncompressed-bytes>0</uncompressed-bytes> <compressed-bytes>0</compressed-bytes> </extension-tunnel-statistics></Response>

Getting a list of extension circuitsThis example uses a GET request to retrieve a list of extension circuits.

StructureGET <base_URI>/running/brocade-extension-tunnel/extension-circuit

URI requestGET https://10.10.10.10/rest/running/brocade-extension-tunnel/extension-circuit

Request bodyNo request body is required.

brocade-extension-tunnel

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 191

Page 192: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Response bodyWhen the operation is successful, the response has a message body similar to the following, and a “200 OK” status in theheaders.

<?xml version="1.0"?><Response> <extension-circuit> <name>4/16</name> <circuit-id>1</circuit-id> <local-ip-address>0.0.0.0</local-ip-address> <remote-ip-address>0.0.0.0</remote-ip-address> <metric>0</metric> <admin-enabled>0</admin-enabled> <path-mtu-discovered>0</path-mtu-discovered> <minimum-communication-rate>0</minimum-communication-rate> <maximum-communication-rate>0</maximum-communication-rate> <keep-alive-timeout>6000</keep-alive-timeout> <vlan-id>0</vlan-id> <l2-cos> <priority-control>0</priority-control> <fc-priority-high>0</fc-priority-high> <fc-priority-medium>0</fc-priority-medium> <fc-priority-low>0</fc-priority-low> <ip-priority-high>0</ip-priority-high> <ip-priority-medium>0</ip-priority-medium> <ip-priority-low>0</ip-priority-low> </l2-cos> <dscp> <priority-control>0</priority-control> <fc-priority-high>0</fc-priority-high> <fc-priority-medium>0</fc-priority-medium> <fc-priority-low>0</fc-priority-low> <ip-priority-high>0</ip-priority-high> <ip-priority-medium>0</ip-priority-medium> <ip-priority-low>0</ip-priority-low> </dscp> <failover-group-id>0</failover-group-id> <circuit-status>31</circuit-status> <local-ha-ip-address>0.0.0.0</local-ha-ip-address> <remote-ha-ip-address>0.0.0.0</remote-ha-ip-address> <arl-algorithm-mode>0</arl-algorithm-mode> </extension-circuit> <extension-circuit> <name>4/30</name> <circuit-id>0</circuit-id> <local-ip-address>192.168.0.10</local-ip-address> <remote-ip-address>192.168.0.20</remote-ip-address> <metric>0</metric> <admin-enabled>1</admin-enabled> <path-mtu-discovered>0</path-mtu-discovered> <minimum-communication-rate>1000000</minimum-communication-rate> <maximum-communication-rate>1000000</maximum-communication-rate> <keep-alive-timeout>6000</keep-alive-timeout> <vlan-id>0</vlan-id> <l2-cos> <priority-control>0</priority-control> <fc-priority-high>0</fc-priority-high> <fc-priority-medium>0</fc-priority-medium> <fc-priority-low>0</fc-priority-low> <ip-priority-high>0</ip-priority-high> <ip-priority-medium>0</ip-priority-medium> <ip-priority-low>0</ip-priority-low> </l2-cos> <dscp> <priority-control>0</priority-control> <fc-priority-high>0</fc-priority-high> <fc-priority-medium>0</fc-priority-medium> <fc-priority-low>0</fc-priority-low> <ip-priority-high>0</ip-priority-high> <ip-priority-medium>0</ip-priority-medium>

brocade-extension-tunnel

Brocade Fabric OS REST API Reference, 8.2.0a192 53-1005246-03

Page 193: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

<ip-priority-low>0</ip-priority-low> </dscp> <failover-group-id>0</failover-group-id> <circuit-status>2</circuit-status> <local-ha-ip-address>192.168.0.11</local-ha-ip-address> <remote-ha-ip-address>192.168.0.21</remote-ha-ip-address> <arl-algorithm-mode>0</arl-algorithm-mode> </extension-circuit></Response>

Getting a list of extension circuit statisticsThis example uses a GET request to retrieve a list of extension circuit statistics.

StructureGET <base_URI>/running/brocade-extension-tunnel/extension-circuit-statistics

URI requestGET https://10.10.10.10/rest/running/brocade-extension-tunnel/extension-circuit-statistics

Request bodyNo request body is required.

Response bodyWhen the operation is successful, the response has a message body similar to the following, and a “200 OK” status in theheaders.

<?xml version="1.0"?><Response> <extension-circuit-statistics> <name>4/16</name> <circuit-id>1</circuit-id> <flow-status>0</flow-status> <operational-status>31</operational-status> <connection-count>0</connection-count> <duration>0</duration> </extension-circuit-statistics> <extension-circuit-statistics> <name>4/30</name> <circuit-id>0</circuit-id> <flow-status>0</flow-status> <operational-status>2</operational-status> <connection-count>1</connection-count> <duration>964</duration> </extension-circuit-statistics></Response>

HistoryRelease version History

Fabric OS 8.2.0 This API call was introduced.

brocade-extension-tunnel

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 193

Page 194: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

brocade-gigabitethernetThis module allows you to retrieve or configure both Gigabit Ethernet interfaces and Gigabit Ethernet interface statistics.

Module treeThis is the tree view of the module from the brocade-gigabitethernet.yang-tree.txt file. Refer to YANG module overview on page26 for YANG node field definitions and possible values, and Supported data types on page 26 for data type descriptions.

module: brocade-gigabitethernet +--rw brocade-interface +--rw gigabitethernet* [name] | +--rw name ge-interface-type | +--rw enabled-state? uint8 | +--rw speed? speed-type | +--ro mac-address? yang:mac-address | +--ro operational-status? uint16 | +--rw persistent-disable? uint8 +--rw gigabitethernet-statistics* [name] +--rw name ge-interface-type +--ro out-pkts? yang:zero-based-counter64 +--ro out-octets? yang:zero-based-counter64 +--ro out-unicast-pkts? yang:zero-based-counter64 +--ro out-multicast-pkts? yang:zero-based-counter64 +--ro out-broadcast-pkts? yang:zero-based-counter64 +--ro out-vlan-pkts? yang:zero-based-counter64 +--ro out-pause-pkts? yang:zero-based-counter64 +--ro in-pkts? yang:zero-based-counter64 +--ro in-octets? yang:zero-based-counter64 +--ro in-unicast-pkts? yang:zero-based-counter64 +--ro in-multicast-pkts? yang:zero-based-counter64 +--ro in-broadcast-pkts? yang:zero-based-counter64 +--ro in-vlan-pkts? yang:zero-based-counter64 +--ro in-pause-pkts? yang:zero-based-counter64 +--ro carrier-loss-error? yang:zero-based-counter64 +--ro crc-error? yang:zero-based-counter64 +--ro jabber-error? yang:zero-based-counter64 +--rw reset-statistics? uint8 +--ro time-generated? fibrechannel:time-generated-type

URI formatThe URI for this module takes one of the following forms:

• <base_URI>/running/brocade-interface/gigabitethernet/ to return a list of all the Gigabit Ethernet ports on the

switch.

• <base_URI>/running/brocade-interface/gigabitethernet-statistics/ to return the statistics for all the

Gigabit Ethernet ports on the switch.

Parametersbrocade-interface

Description: The container for this module.Flag: read-writeThis container has the following leafs.

gigabitethernetDescription: The list of Gigabit Ethernet interfaces on the device.

brocade-gigabitethernet

Brocade Fabric OS REST API Reference, 8.2.0a194 53-1005246-03

Page 195: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

System-controlled interfaces created by the system are always present in this list, whether they are configuredor not.Flag: read-writeKey: nameThis list has the following leafs.

nameDescription: The name of the interface.Flag: read-writeType: ge-interface-typeValues: The slot and port number of the port in the format “slot/port”.Optional: No

enabled-stateDescription: The state of the interface.Flag: read-writeType: uint8Values: 1 = Enabled. 2 = Disabled. Default: 1Optional: Yes

speedDescription: For physical layer device types that may operate at various speeds, this leaf allows theinterface to be forced to operate at a particular speed. Without any explicit configuration,gigabitethernet interfaces run at the maximum speed that they are capable of.Flag: read-writeType: speed-typeValues:1000000000 = 1 Gbps10000000000 = 10 Gbps40000000000 = 40 GbpsNote: Ports ge0 and ge1 have a fixed speed of 40 Gbps. Ports ge2 through ge17 have a defaultspeed of 10Gbps.Optional: Yes

mac-addressDescription: MAC address for the interface.Flag: read-onlyType: yang:mac-addressConfig: falseValues: Valid MAC addressOptional: Yes

operational-statusDescription: Operational status of the port.Flag: read-onlyType: uint16Config: falseValues: 1 = Online. 2 = Offline. Default: No valueOptional: Yes

persistent-disableDescription: Indicates if the port is persistently enabled or persistently disabled.

brocade-gigabitethernet

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 195

Page 196: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Flag: read-writeType: uint8Value: 0 = persistently enabled. 1 = persistently disabled. Default: 0Optional: Yes

gigabitethernet-statisticsDescription: A list of interface-related statistics for a Gigabit Ethernet port.Flag: read-writeKey: nameThis list has the following leafs.

nameDescription: The name of the interface.Flag: read-writeType: ge-interface-typeValues: The slot and port number of the port in the format “slot/port”.Optional: No

out-pktsDescription: The total number of packets transmitted out of the interface.Flag: read-onlyType: yang:zero-based-counter64Config: falseValues: 0 through 18446744073709551615Optional: Yes

out-octetsDescription: The total number of octets transmitted out of the interface.Flag: read-onlyType: yang:zero-based-counter64Config: falseValues: 0 through 18446744073709551615Optional: Yes

out-unicast-pktsDescription: The total number of unicast packets transmitted out of the interface.Flag: read-onlyType: yang:zero-based-counter64Config: falseValues: 0 through 18446744073709551615Optional: Yes

out-multicast-pktsDescription: The total number of multicast packets transmitted out of the interface.Flag: read-onlyType: yang:zero-based-counter64Config: falseValues: 0 through 18446744073709551615Optional: Yes

out-broadcast-pktsDescription: The total number of broadcast packets transmitted out of the interface.Flag: read-only

brocade-gigabitethernet

Brocade Fabric OS REST API Reference, 8.2.0a196 53-1005246-03

Page 197: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Type: yang:zero-based-counter64Config: falseValues: 0 through 18446744073709551615Optional: Yes

out-vlan-pktsDescription: The total number of VLAN packets transmitted out of the interface.Flag: read-onlyType: yang:zero-based-counter64Config: falseValues: 0 through 18446744073709551615Optional: Yes

out-pause-pktsDescription: The total number of pause packets transmitted out of the interface.Flag: read-onlyType: yang:zero-based-counter64Config: falseValues: 0 through 18446744073709551615Optional: Yes

in-pktsDescription: The number of packets received on the interface.Flag: read-onlyType: yang:zero-based-counter64Config: falseValues: 0 through 18446744073709551615Optional: Yes

in-octetsDescription: The total number of octets received on the interface.Flag: read-onlyType: yang:zero-based-counter64Config: falseValues: 0 through 18446744073709551615Optional: Yes

in-unicast-pktsDescription: The number of unicast packets received on the interface.Flag: read-onlyType: yang:zero-based-counter64Config: falseValues: 0 through 18446744073709551615Optional: Yes

in-multicast-pktsDescription: The number of multicast packets received on the interface.Flag: read-onlyType: yang:zero-based-counter64Config: falseValues: 0 through 18446744073709551615Optional: Yes

brocade-gigabitethernet

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 197

Page 198: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

in-broadcast-pktsDescription: The number of broadcast packets received on the interface.Flag: read-onlyType: yang:zero-based-counter64Config: falseValues: 0 through 18446744073709551615Optional: Yes

in-vlan-pktsDescription: The total number of VLAN packets received on the interface.Flag: read-onlyType: yang:zero-based-counter64Config: falseValues: 0 through 18446744073709551615Optional: Yes

in-pause-pktsDescription: The total number of pause packets received on the interface.Flag: read-onlyType: yang:zero-based-counter64Config: falseValues: 0 through 18446744073709551615Optional: Yes

carrier-loss-errorDescription: The total number of carrier loss errors.Flag: read-onlyType: yang:zero-based-counter64Config: falseValues: 0 through 18446744073709551615Optional: Yes

crc-errorDescription: The total number of cyclic redundancy check (CRC) errors.Flag: read-onlyType: yang:zero-based-counter64Config: falseValues: 0 through 18446744073709551615Optional: Yes

jabber-errorDescription: The total number of jabber errors.Flag: read-onlyType: yang:zero-based-counter64Config: falseValues: 0 through 18446744073709551615Optional: Yes

reset-statisticsDescription: Resets statistic countersFlag: read-writeType: uint8

brocade-gigabitethernet

Brocade Fabric OS REST API Reference, 8.2.0a198 53-1005246-03

Page 199: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Values: 0 = Statistical counters have not been reset. 1 = reset statistical counters. A 0 willalways be returned on a GET. Default: 0Optional: Yes

time-generatedDescription: The time at which the statistics were queried.Flag: read-onlyType: fibrechannel:time-generated-typeConfig: falseUnits: secondsValues: 1 through 2147483646Optional: Yes

Supported methodsThe GET, PATCH, OPTIONS, and HEAD methods are supported in this module. The DELETE and POST methods are notsupported.

Examples

Retrieving the list of all Gigabit Ethernet ports on a switchThis example uses a GET request to retrieve the list of all the Gigabit Ethernet ports on the specified switch.

StructureGET <base_URI>/running/brocade-interface/gigabitethernet

URI requestGET https://10.10.10.10/rest/running/brocade-interface/gigabitethernet

Request bodyNo request body is required.

brocade-gigabitethernet

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 199

Page 200: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Response bodyWhen the operation is successful, the response has a message body similar to the following, and a “200 OK” status in theheaders.

<?xml version="1.0"?><Response> <gigabitethernet> <name>4/0</name> <enabled-state>1</enabled-state> <speed>40000000000</speed> <mac-address>14:15:1c:16:d0:4c</mac-address> <operational-status>1</operational-status> <persistent-disable>0</persistent-disable> </gigabitethernet>... <gigabitethernet> <name>4/17</name> <enabled-state>1</enabled-state> <speed>10000000000</speed> <mac-address>14:15:1c:16:d0:5d</mac-address> <operational-status>2</operational-status> <persistent-disable>0</persistent-disable> </gigabitethernet></Response>

Retrieving Gigabit Ethernet port statisticsThis example uses a GET request to retrieve the Gigabit Ethernet port statistics for all Gigabit Ethernet ports on the switch.

StructureGET <base_URI>/running/brocade-interface/gigabitethernet-statistics

URI requestGET https://10.10.10.10/rest/running/brocade-interface/gigabitethernet-statistics

Request bodyNo request body is required.

brocade-gigabitethernet

Brocade Fabric OS REST API Reference, 8.2.0a200 53-1005246-03

Page 201: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Response bodyWhen the operation is successful, the response has a message body similar to the following, and a “200 OK” status in theheaders.

<?xml version="1.0"?><Response> <gigabitethernet-statistics> <name>4/0</name> <out-pkts>178269</out-pkts> <out-octets>23396402</out-octets> <out-unicast-pkts>176862</out-unicast-pkts> <out-multicast-pkts>0</out-multicast-pkts> <out-broadcast-pkts>1407</out-broadcast-pkts> <out-vlan-pkts>0</out-vlan-pkts> <out-pause-pkts>0</out-pause-pkts> <in-pkts>278070</in-pkts> <in-octets>30069936</in-octets> <in-unicast-pkts>267797</in-unicast-pkts> <in-multicast-pkts>0</in-multicast-pkts> <in-broadcast-pkts>10273</in-broadcast-pkts> <in-vlan-pkts>0</in-vlan-pkts> <in-pause-pkts>0</in-pause-pkts> <carrier-loss-error>3</carrier-loss-error> <crc-error>0</crc-error> <jabber-error>0</jabber-error> <reset-statistics>0</reset-statistics> <time-generated>1500431065</time-generated> </gigabitethernet-statistics>... <gigabitethernet-statistics> <name>4/17</name> <out-pkts>0</out-pkts> <out-octets>0</out-octets> <out-unicast-pkts>0</out-unicast-pkts> <out-multicast-pkts>0</out-multicast-pkts> <out-broadcast-pkts>0</out-broadcast-pkts> <out-vlan-pkts>0</out-vlan-pkts> <out-pause-pkts>0</out-pause-pkts> <in-pkts>0</in-pkts> <in-octets>0</in-octets> <in-unicast-pkts>0</in-unicast-pkts> <in-multicast-pkts>0</in-multicast-pkts> <in-broadcast-pkts>0</in-broadcast-pkts> <in-vlan-pkts>0</in-vlan-pkts> <in-pause-pkts>0</in-pause-pkts> <carrier-loss-error>0</carrier-loss-error> <crc-error>0</crc-error> <jabber-error>0</jabber-error> <reset-statistics>0</reset-statistics> <time-generated>1500431065</time-generated> </gigabitethernet-statistics></Response>

Retrieving information for a single Gigabit Ethernet portThis example uses a GET request to retrieve information about the Gigabit Ethernet port “4/1”.

StructureGET <base_URI>/running/brocade-interface/gigabitethernet/name/4%2f1

brocade-gigabitethernet

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 201

Page 202: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

URI requestNotice that the slash character in the name resource is encoded as “%2f”.

GET https://10.10.10.10/rest/running/brocade-interface/gigabitethernet/name/4%2f1

Request bodyNo request body is required.

Response bodyWhen the operation is successful, the response has a message body similar to the following, and a “200 OK” status in theheaders.

<?xml version="1.0"?><Response> <gigabitethernet> <name>4/1</name> <enabled-state>1</enabled-state> <speed>40000000000</speed> <mac-address>14:15:1c:16:d0:4d</mac-address> <operational-status>2</operational-status> <persistent-disable>0</persistent-disable> </gigabitethernet></Response>

Resetting the port stats for a single Gigabit Ethernet portThis example uses a PATCH request to reset statistics for the Gigabit Ethernet port 4/2. The “name” key/value is included in theURI to indicate the correct port.

StructurePATCH <base_URI>/running/brocade-interface/gigabitethernet/name/name/reset-statistics/1

Request bodyNo request body is required.

Response bodyWhen the statistics are is successfully reset, the response contains an empty message body and a "204 No Content" status inthe headers.

HistoryRelease version History

Fabric OS 8.2.0 This API call was introduced.

brocade-gigabitethernet

Brocade Fabric OS REST API Reference, 8.2.0a202 53-1005246-03

Page 203: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Sample Use Cases• Logging in, retrieving switch information, and logging out............................................................................................................203• Using PATCH to disable and enable a port.........................................................................................................................................205• Creating an up state tunnel using multiple URIs................................................................................................................................206• Running a diagnostic port test.................................................................................................................................................................. 208• Creating, modifying, and deleting a zone using REST................................................................................................................... 210• Concurrent zoning transactions on a local switch............................................................................................................................. 221• Multi-switch concurrent transaction cancellation...............................................................................................................................222• Simultaneous multi-switch zone transaction commitments........................................................................................................ 222• REST Zone Transaction Timer timeout ............................................................................................................................................... 223

Logging in, retrieving switch information, and loggingoutThis example uses a POST request to log into a fabric, use a GET request to retrieve the switch information for a switch, and use a POSTrequest to log out of the fabric.

1. Use a POST request to log in to a fabric.

POST <base_URI>/login

URI request

POST https://10.10.10.10/rest/login

Request body

There is no request body; however, you must provide a valid Fabric OS user name and password (such as, administrator /password) through an authorization header.

Response body

There is no request response. When the operation is successful, the response body contains an empty message body and a“200 OK” status in the header.

If authentication is successful, a session authorization key is returned to the client in the response headers (for example,Custom_Basic Tk0ZmY2Zjg3NTY2ZDYwYjhmNj5NGQ0NTkzZjM0M2ZlMWM=). Subsequent FOS REST API operationsmust include this authorization key in the request authorization header. The client applications use this token to obtain furtheraccess to the server using the persistent connection.

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 203

Page 204: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

2. Use a GET request to retrieve the information for a switch.

GET <base_URI>running/fabric/fabric-switch

URI request

GET https://10.10.10.10/rest/running/fabric/fabric-switch

Request body

No request body is required; however, you must include the session authorization key in the request authorization header.

Response body

When the operation is successful, the response has a message body similar to the following, and a “200 OK” status in theheaders.

<?xml version="1.0"?><Response> <fabric-switch> <name>10:10:14:15:1c:9e:3b:c8</name> <chassis-wwn>10:10:14:15:1c:9e:3c:07</chassis-wwn> <domain-id>1</domain-id> <fcid>16776199</fcid> <switch-user-friendly-name>G610_81</switch-user-friendly-name> <chassis-user-friendly-name>BrocadeG610</chassis-user-friendly-name> <firmware-version>v820</firmware-version> <ip-address>10.10.10.1</ip-address> <fcip-address>0.0.0.0</fcip-address> <ipv6-address>::</ipv6-address> <principal>1</principal> </fabric-switch> <fabric-switch> <name>10:10:14:15:1c:a2:1f:40</name> <chassis-wwn>10:10:14:15:1c:a2:1f:7f</chassis-wwn> <domain-id>3</domain-id> <fcid>16776195</fcid> <switch-user-friendly-name>G610_82</switch-user-friendly-name> <chassis-user-friendly-name>BrocadeG610</chassis-user-friendly-name> <firmware-version>v820</firmware-version> <ip-address>10.10.10.2</ip-address> <fcip-address>0.0.0.0</fcip-address> <ipv6-address>::</ipv6-address> <principal>0</principal> </fabric-switch></Response>

3. Use a POST request to log out of a fabric.

<base_URI>/logout

URI request

POST https://10.10.10.10/rest/logout

Request body

No request body is required; however, you must include the session authorization key in the request authorization header.

Response body

There is no request response. When the operation is successful, the response contains an empty message body and a “204 NoContent” status in the header.

Logging in, retrieving switch information, and logging out

Brocade Fabric OS REST API Reference, 8.2.0a204 53-1005246-03

Page 205: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Using PATCH to disable and enable a portThis example uses PATCH to disable and enable a specific port.

The following example first uses GET to identify the state of a gigabitethernet port, uses PATCH to disable the port, uses GET to verifythat the state value got changed, and finally uses PATCH to reenable the port.

1. Use a GET request to identify the enabled-state attribute of the gigabitethernet port 0/3.

GET <base_URI>/running/brocade-interface/gigabitethernet/name/0%2f3/enabled-state

Request body

No request body is required.

Response body

<?xml version="1.0"?><Response> <gigabitethernet> <name>0/0</name> <enabled-state>1</enabled-state> <-Port is in enabled state. </gigabitethernet></Response>

2. Use a PATCH request to modify the value for enabled-state attribute.

PATCH <base_URI>/running/brocade-interface/gigabitethernet/name/0%2f3/enabled-state/0

Request body

No request body is required.

Response body

When the port status is successfully changed, the response contains an empty message body and a "204 No Content" status inthe first line of the headers.

3. Use a GET request to retrieve and verify that the enabled-state attribute value is changed.

GET <base_URI>/running/brocade-interface/gigabitethernet/name/0%2f3/enabled-state

Request body

No request body is required.

Response body

<?xml version="1.0"?><Response> <gigabitethernet> <name>0/0</name> <enabled-state>0</enabled-state> <-Port is in disabled state. </gigabitethernet></Response>

Using PATCH to disable and enable a port

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 205

Page 206: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

4. Use a PATCH request to reenable the port.

PATCH <base_URI>/running/brocade-interface/gigabitethernet/name/0%2f0/enabled-state/1

Request body

No request body is required.

Response body

When the port status is successfully changed, the response contains an empty message body and a "204 No Content" status inthe first line of the headers.

Creating an up state tunnel using multiple URIsThis example uses POST to create a specific port (IP interface), and then adds an Extension tunnel and a circuit to that port.

1. Make a POST request to create the IP interface on port 4/0.

URI

POST <base_URI>/running/brocade-interface/extension-ip-interfaceRequest body

<extension-ip-interface><name>4/0</name><dp-id>1</dp-id><ip-address>10.10.0.10</ip-address><ip-prefix-length>24</ip-prefix-length><mtu-size>1500</mtu-size></extension-ip-interface>

Response body

When the interface is successfully created, the response contains an empty message body and a "201 Created" status in thefirst line of the headers.

NOTEThis is the equivalent of portcfg ipif 4/ge0.dp1 create 10.10.0.10/24.

2. Enter portshow ipif to confirm that the IP interface has been created.

This is the “4/ge0.dp1” row. It has been rendered in bold for the example; it will not be bold in the actual output.

portshow ipif

Port IP Address / Pfx MTU VLAN Flags-------------------------------------------------------------------------------- 4/ge0.dp0 10.10.0.11 / 24 1500 0 U R M 4/ge0.dp0 10.10.2.12 / 24 1500 0 U R M 4/ge0.dp0 12.2.2.2 / 24 1500 0 U R M 4/ge0.dp1 10.10.0.10 / 24 1500 0 U R M--------------------------------------------------------------------------------Flags: U=Up B=Broadcast D=Debug L=Loopback P=Point2Point R=Running I=InUse N=NoArp PR=Promisc M=Multicast S=StaticArp LU=LinkUp X=Crossport

Creating an up state tunnel using multiple URIs

Brocade Fabric OS REST API Reference, 8.2.0a206 53-1005246-03

Page 207: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

3. Make a POST request to create the tunnel on port 4/30.

URI

POST <base_URI>/running/brocade-extension-tunnel/extension-tunnelRequest body

<extension-tunnel> <name>4/30</name></extension-tunnel>

Response body

When the tunnel is successfully created, the response contains an empty message body and a "201 Created" status in the firstline of the headers.

NOTEThis is the equivalent of portcfg fciptunnel 4/30 create.

4. Enter portshow fciptunnel -c to confirm that the tunnel has been created.

This is the 4/30 row. It has been rendered in bold for the example; it will not be bold in the actual output.

Tunnel Circuit OpStatus Flags Uptime TxMBps RxMBps ConnCnt CommRt Met/G-------------------------------------------------------------------------------- 4/16 - Empty --------- 0s 0.00 0.00 0 - - 4/16 1 InComp ----a---- 0s 0.00 0.00 0 0/0 0/- 4/30 - Empty --------- 0s 0.00 0.00 0 - --------------------------------------------------------------------------------- Flags (tunnel): l=Legacy QOS Mode i=IPSec f=Fastwrite T=TapePipelining F=FICON r=ReservedBW a=FastDeflate d=Deflate D=AggrDeflate P=Protocol I=IP-Ext (circuit): h=HA-Configured v=VLAN-Tagged p=PMTU i=IPSec 4=IPv4 6=IPv6 ARL a=Auto r=Reset s=StepDown t=TimedStepDown S=SLA

5. Make a POST request to create circuit 0.

URI

POST <base_URI>/running/brocade-extension-tunnel/extension-circuitRequest body

<extension-circuit><name>4/30</name><circuit-id>0</circuit-id><local-ip-address>10.10.0.10</local-ip-address><remote-ip-address>10.10.0.20</remote-ip-address><minimum-communication-rate>1000000</minimum-communication-rate><maximum-communication-rate>1000000</maximum-communication-rate></extension-circuit>

Response body

When the circuit is successfully created, the response contains an empty message body and a "201 Created" status in the firstline of the headers.

NOTEThis is the equivalent of portcfg fcipcircuit 4/30 create 0 --local-ip 10.10.0.10 --remote-ip 10.10.0.20 --min-comm-rate 1000000 --max-comm-rate 1000000.

Creating an up state tunnel using multiple URIs

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 207

Page 208: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

6. Enter portshow fciptunnel -c to confirm that the tunnel has been created.

This is the 4/30 row. It has been rendered in bold for the example; it will not be bold in the actual output.

Tunnel Circuit OpStatus Flags Uptime TxMBps RxMBps ConnCnt CommRt Met/G-------------------------------------------------------------------------------- 4/16 - Empty --------- 0s 0.00 0.00 0 - - 4/16 1 InComp ----a---- 0s 0.00 0.00 0 0/0 0/- 4/30 - Up --------- 10s 0.00 0.00 1 - - 4/30 0 4/ge0 Up ----a---4 9s 0.00 0.00 1 1000/1000 0/- -------------------------------------------------------------------------------- Flags (tunnel): l=Legacy QOS Mode i=IPSec f=Fastwrite T=TapePipelining F=FICON r=ReservedBW a=FastDeflate d=Deflate D=AggrDeflate P=Protocol I=IP-Ext (circuit): h=HA-Configured v=VLAN-Tagged p=PMTU i=IPSec 4=IPv4 6=IPv6 ARL a=Auto r=Reset s=StepDown t=TimedStepDown S=SLA

Running a diagnostic port testThis example demonstrates using the FOS REST API to perform a diagnostic test on an existing D_Port.

1. Use a GET request to verify that the port (0/89) is configured as a diagnostic port (D_Port). Notice that the slash character inthe name resource is encoded as “%2f”.

URI

GET <base_URI>/brocade-interface/fibrechannel/name/0%2f89/d-port-enable

Request body

No request body is required.

Response body

When the operation is successful, the response has a message body similar to the following, and a “200 OK” status in theheaders.

<?xml version="1.0"?><Response> <fibrechannel> <name>0/89</name> <d-port-enable>1</d-port-enable> </fibrechannel></Response>

A “1” in the “d-port-enable” field indicates that the port is configured as a diagnostic port.

2. Use a PATCH request to start the diagnostic test on the desired D_Port. This example uses a diagnostic test frame-size value of2048.

URI

PATCH <base_URI>/diagnostics/fibrechannel-diagnostics/name/0%2f89/diagnostic-control/1

Request body

<frame-size>2048</frame-size>

Response body

When the operation is successful, the response has a message body similar to the following, and a “204 No Content” status inthe headers.

Running a diagnostic port test

Brocade Fabric OS REST API Reference, 8.2.0a208 53-1005246-03

Page 209: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

3. Use a GET request to retrieve the diagnostic results.

URI

GET <base_URI>/diagnostics/fibrechannel-diagnostics/name/0%2f89

Request body

No request body is required.

Response body

When the operation is successful, the response has a message body similar to the following, and a “200 OK” status in theheaders.

<?xml version="1.0"?><Response> <fibrechannel-diagnostics> <name>0/89</name> <diagnostic-control>0</diagnostic-control> <mode>manual</mode> <state>PASSED</state> <distance>4</distance> <electrical-loopback-test> <result>PASSED</result> <comments>----------</comments> </electrical-loopback-test> <optical-loopback-test> <result>PASSED</result> <comments>----------</comments> </optical-loopback-test> <link-traffic-test> <result>PASSED</result> <comments>----------</comments> </link-traffic-test> <start-time>Tue Oct 17 15:18:37 2017</start-time> <frame-count>1</frame-count> <frame-size>2048</frame-size> <time/> <payload-pattern> <pattern>jCRPAT</pattern> </payload-pattern> <fec> <enable>yes</enable> <active>no</active> <option>no</option> </fec> <cr> <enable>yes</enable> <active>no</active> <option>no</option> </cr> <rt-latency>314</rt-latency> <buffers-required>1</buffers-required> <failure-report> <errors-detected-local>no</errors-detected-local> <errors-detected-remote>no</errors-detected-remote> </failure-report> <end-time>Tue Oct 17 15:18:58 2017</end-time> <egress-power-loss> <tx>-2.3</tx> <rx>-2.6</rx> <loss>0.3</loss> <comments>Cable power loss is within tolerable limit</comments> </egress-power-loss> <ingress-power-loss> <tx>-2.4</tx> <rx>-1.7</rx> <loss>0.0</loss> <comments>No Loss</comments>

Running a diagnostic port test

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 209

Page 210: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

</ingress-power-loss> </fibrechannel-diagnostics></Response>

Creating, modifying, and deleting a zone using RESTThis use case set walks you through the following actions:

• Creating a zone using REST on page 211

• Modifying a zone on page 215

• Aborting a zone transaction on page 218

• Deleting a zone on page 219

In this use case set, zone configuration “cfg1” already exists with member zones “zone1”, “zone2”, and “zone4”. We will create a newzone, “zone3” and add it to the “cfg1” zone configuration. We will then delete “zone4” from the zone configuration.

Creating, modifying, and deleting a zone using REST

Brocade Fabric OS REST API Reference, 8.2.0a210 53-1005246-03

Page 211: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Creating a zone using RESTIn this use case, zone configuration “cfg1” already exists with member zones “zone1”, and “zone2”. This will create a new zone, “zone3”,and add it to the existing “cfg1” zone configuration.

1. Use a GET request to verify the current zone configuration.

URI

GET <base_URI>/rest/running/zoning/effective-configuration

Request body

No request body is required.

Response body

The response contains a message body similar to the following, and has a “200 OK” status in the first line of the headers.

<?xml version="1.0"?><Response> <effective-configuration> <default-zone-access>1</default-zone-access> <cfg-action>0</cfg-action> <db-max>1045274</db-max> <db-avail>1023818</db-avail> <db-committed>17186</db-committed> <db-transaction>0</db-transaction> <db-chassis-wide-committed>18198</db-chassis-wide-committed> <transaction-token>0</transaction-token> <checksum>fd0d26c940d4f55b467b76552d687e74</checksum> <== record this value <cfg-name>cfg1</cfg-name> <enabled-zone> <zone-name>zone1</zone-name> <zone-type>0</zone-type> <member-entry> <entry-name>10:00:00:00:00:00:00:01</entry-name> <entry-name>10:00:00:00:00:00:00:02</entry-name> <entry-name>10:00:00:00:00:00:00:03</entry-name> </member-entry> </enabled-zone> <enabled-zone> <zone-name>zone2</zone-name> <zone-type>0</zone-type> <member-entry> <entry-name>10:00:00:00:00:00:00:04</entry-name> <entry-name>10:00:00:00:00:00:00:05</entry-name> <entry-name>10:00:00:00:00:00:00:06</entry-name> </member-entry> </enabled-zone> </effective-configuration></Response>

2. Record the checksum value.

Creating, modifying, and deleting a zone using REST

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 211

Page 212: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

3. Use a PATCH request to create the new zone, “zone3”.

URI

PATCH <base_URI>/rest/running/zoning/defined-configuration/zone

Request body

<zone> <zone-name>zone3</zone-name> <zone-type>0</zone-type> <member-entry> <entry-name>10:00:00:00:00:00:00:07</entry-name> <entry-name>10:00:00:00:00:00:00:08</entry-name> <entry-name>10:00:00:00:00:00:00:09</entry-name> </member-entry></zone>

Response body

When the resource is successfully created, the response contains an empty message body and a “201 Created” status in thefirst line of the headers.

4. Use a PATCH request to add “zone3” to the existing configuration “cfg1” with all desired zone members. Because a PATCHoperation overwrites the entire member-zone leaf-list for “cfg1”, all desired member-zones must be included, including anymember zones that were already in the configuration.

URI

PATCH <base_URI>/rest/running/zoning/defined-configuration/cfg

Request body

<cfg> <cfg-name>cfg1</cfg-name> <member-zone> <zone-name>zone1</zone-name> <zone-name>zone2</zone-name> <zone-name>zone3<zone-name> </member-zone></cfg>

Response body

When the resource is successfully created, the response contains an empty message body and a “204 No Content” status inthe first line of the headers.

5. Use a PATCH request to save the zone configuration using the zoneDB checksum from step 1.

URI

PATCH <base_URI>/rest/running/zoning/effective-configuration/cfg-action/1

Request body

<checksum>fd0d26c940d4f55b467b76552d687e74</checksum>

Response body

When the request is successfully completed, the response contains an empty message body and a “204 No Content” status inthe first line of the headers.

Creating, modifying, and deleting a zone using REST

Brocade Fabric OS REST API Reference, 8.2.0a212 53-1005246-03

Page 213: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

6. Use a GET request to retrieve the new zoneDB checksum value.

URI

GET <base_URI>/rest/running/zoning/effective-configuration/checksum

Request body

No request body is required.

Response body The response contains a message body similar to the following, and has a “200 OK” status in the first line ofthe headers.

<?xml version="1.0"?><Response> <effective-configuration> <checksum>d2ba41573853f387d9fd1d76f3b56112</checksum> </effective-configuration></Response>

7. Use a PATCH request to enable the new zone configuration using the zoneDB checksum from step 6.

URI

PATCH <base_URI>/rest/running/zoning/effective-configuration/cfg-name/cfg1

Request body

<checksum>d2ba41573853f387d9fd1d76f3b56112</checksum>

Response body

When the request is successfully completed, the response contains an empty message body and a “204 No Content” status inthe first line of the headers.

Creating, modifying, and deleting a zone using REST

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 213

Page 214: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

8. Use a GET request to view the new effective zoning configuration.

URI

GET <base_URI>/rest/running/zoning/effective-configuration

Request body

No request body is required.

Response body

The response contains a message body similar to the following, and has a “200 OK” status in the first line of the headers. Thezone named “zone3” has been added to the zoning configuration named “cfg1”.

<?xml version="1.0"?><Response> <effective-configuration> <default-zone-access>1</default-zone-access> <cfg-action>0</cfg-action> <db-max>1045274</db-max> <db-avail>1023812</db-avail> <db-committed>17192</db-committed> <db-transaction>0</db-transaction> <db-chassis-wide-committed>18204</db-chassis-wide-committed> <transaction-token>0</transaction-token> <checksum>d2ba41573853f387d9fd1d76f3b56112</checksum> <cfg-name>cfg1</cfg-name> <enabled-zone> <zone-name>zone1</zone-name> <zone-type>0</zone-type> <member-entry> <entry-name>10:00:00:00:00:00:00:01</entry-name> <entry-name>10:00:00:00:00:00:00:02</entry-name> <entry-name>10:00:00:00:00:00:00:03</entry-name> </member-entry> </enabled-zone> <enabled-zone> <zone-name>zone2</zone-name> <zone-type>0</zone-type> <member-entry> <entry-name>10:00:00:00:00:00:00:04</entry-name> <entry-name>10:00:00:00:00:00:00:05</entry-name> <entry-name>10:00:00:00:00:00:00:06</entry-name> </member-entry> </enabled-zone> <enabled-zone> <zone-name>zone3</zone-name> <zone-type>0</zone-type> <member-entry> <entry-name>10:00:00:00:00:00:00:07</entry-name> <entry-name>10:00:00:00:00:00:00:08</entry-name> <entry-name>10:00:00:00:00:00:00:09</entry-name> </member-entry> </enabled-zone> </effective-configuration></Response>

Creating, modifying, and deleting a zone using REST

Brocade Fabric OS REST API Reference, 8.2.0a214 53-1005246-03

Page 215: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Modifying a zoneThis example modifies the existing "zone2" in the defined-configuration “cfg1”, which is currently enabled.

1. Use a GET request to retrieve the current zoneDB checksum value.

URI

GET <base_URI>/rest/running/zoning/effective-configuration/checksum

Request body

No request body is required.

Response body

The response contains a message body similar to the following, and has a “200 OK” status in the headers.

<?xml version="1.0"?><Response> <effective-configuration> <checksum>fd0d26c940d4f55b467b76552d687e74</checksum> <== record this value </effective-configuration></Response>

2. Use a GET request to verify the current zone “zone2” configuration.

URI

GET <base_URI>/rest/running/zoning/defined-configuration/zone/zone-name/zone2

Request body

No request body is required.

Response body

The response contains a message body similar to the following, and has a “200 OK” status in the headers.

<?xml version="1.0"?><Response> <zone> <zone-name>zone2</zone-name> <zone-type>0</zone-type> <member-entry> <entry-name>10:00:00:00:00:00:00:04</entry-name> <entry-name>10:00:00:00:00:00:00:05</entry-name> <entry-name>10:00:00:00:00:00:00:06</entry-name> </member-entry> </zone></Response>

Creating, modifying, and deleting a zone using REST

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 215

Page 216: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

3. Use a PATCH request to update the existing zone “zone2”. Because a PATCH operation overwrites the entire member-entryleaf-list for “zone2”, all desired member-entries must be included, including any member entries that were already in theconfiguration.

URI

PATCH <base_URI>/rest/running/zoning/defined-configuration/zone

Request body

<zone> <zone-name>zone2</zone-name> <zone-type>0</zone-type> <member-entry> <entry-name>10:00:00:00:00:00:00:04</entry-name> <entry-name>10:00:00:00:00:00:00:05</entry-name> <entry-name>10:00:00:00:00:00:00:06</entry-name> <entry-name>10:00:00:00:00:00:00:07</entry-name> <entry-name>10:00:00:00:00:00:00:08</entry-name> <entry-name>10:00:00:00:00:00:00:09</entry-name> </member-entry></zone>

Response body

When the operation completes successfully, the response returns an empty message body and a “204 No Content” status inthe headers.

4. Use a PATCH request to enable the updated zone configuration using the zoneDB checksum from step 1.

URI

PATCH <base_URI>/rest/running/zoning/effective-configuration/cfg-name/cfg1

Request body

<checksum>fd0d26c940d4f55b467b76552d687e74</checksum>

Response body

When the operation completes successfully, the response returns an empty message body and a “204 No Content” status inthe headers.

Creating, modifying, and deleting a zone using REST

Brocade Fabric OS REST API Reference, 8.2.0a216 53-1005246-03

Page 217: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

5. Use a GET request to view the updated zone “zone2” effective zoning configuration.

URI

GET <base_URI>/rest/running/zoning/effective-configuration/enabled-zone/zone-name/zone2

Request body

No request body is required.

Response body

The response contains a message body similar to the following, and has a “200 OK” status in the headers. The zone named“zone2” has been updated in the effective zoning configuration.

<?xml version="1.0"?><Response> <effective-configuration> <enabled-zone> <zone-name>zone2</zone-name> <zone-type>0</zone-type> <member-entry> <entry-name>10:00:00:00:00:00:00:04</entry-name> <entry-name>10:00:00:00:00:00:00:05</entry-name> <entry-name>10:00:00:00:00:00:00:06</entry-name> <entry-name>10:00:00:00:00:00:00:07</entry-name> <entry-name>10:00:00:00:00:00:00:08</entry-name> <entry-name>10:00:00:00:00:00:00:09</entry-name> </member-entry> </enabled-zone> </effective-configuration></Response>

6. Use a PATCH request to update to replace a zone member in “zone2” with a new entry.

URI

GET <base_URI>/rest/running/zoning/effective-configuration/enabled-zone/zone-name/zone2

Request body

No request body is required.

Response body

The response contains a message body similar to the following, and has a “200 OK” status in the headers. The zone named“zone2” has been updated in the effective zoning configuration.

<?xml version="1.0"?><Response> <effective-configuration> <enabled-zone> <zone-name>zone2</zone-name> <zone-type>0</zone-type> <member-entry> <entry-name>10:00:00:00:00:00:00:04</entry-name> <entry-name>10:00:00:00:00:00:00:05</entry-name> <entry-name>10:00:00:00:00:00:00:06</entry-name> <entry-name>10:00:00:00:00:00:00:07</entry-name> <entry-name>10:00:00:00:00:00:00:08</entry-name> <entry-name>10:00:00:00:00:00:00:09</entry-name> </member-entry> </enabled-zone> </effective-configuration></Response>

Creating, modifying, and deleting a zone using REST

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 217

Page 218: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Aborting a zone transactionThis example aborts a zone transaction before you commit a zone transaction.

This example assumes you have followed steps 1 through 4 of the 'Creating a zone using REST' or steps 1 through 3 of the 'Modifyinga zone' use cases above.

1. Use a PATCH request to abort pending zone changes.

URI

PATCH <base_URI>/rest/running/zoning/effective-configuration/cfg-action/4

Request body

No request body is required.

Response body

When the operation completes successfully, the response returns an empty message body and a “204 No Content” status inthe headers.

2. Use a GET request to verify the pending zone changes are aborted.

URI

GET <base_URI>/rest/running/zoning/effective-configuration/transaction-token

Request body

No request body is required.

Response body

The response contains a message body similar to the following, and has a “200 OK” status in the headers.

<?xml version="1.0"?><Response> <effective-configuration> <transaction-token>0</transaction-token> </effective-configuration></Response>

Creating, modifying, and deleting a zone using REST

Brocade Fabric OS REST API Reference, 8.2.0a218 53-1005246-03

Page 219: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Deleting a zoneIn this example, we will delete an existing zone, "zone4", from the defined-configuration.

1. Use a GET request to retrieve the current zoneDB checksum value.

URI

GET <base_URI>/rest/running/zoning/effective-configuration/checksum

Request body

No request body is required.

Response body

The response contains a message body similar to the following, and has a “200 OK” status in the first line of the headers.

<?xml version="1.0"?><Response> <effective-configuration> <checksum>5c37a7bfe10f77de3253080b174a3239</checksum> <== record this value </effective-configuration></Response>

Creating, modifying, and deleting a zone using REST

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 219

Page 220: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

2. Use a GET request to verify the current zoning defined-configuration.

URI

GET <base_URI>/rest/running/zoning/defined-configuration/zone

Request body

No request body is required.

Response body

The response contains a message body similar to the following, and has a “200 OK” status in the first line of the headers.

<?xml version="1.0"?><Response> <zone> <zone-name>zone1</zone-name> <zone-type>0</zone-type> <member-entry> <entry-name>10:00:00:00:00:00:00:01</entry-name> <entry-name>10:00:00:00:00:00:00:02</entry-name> <entry-name>10:00:00:00:00:00:00:03</entry-name> </member-entry> </zone> <zone> <zone-name>zone2</zone-name> <zone-type>0</zone-type> <member-entry> <entry-name>10:00:00:00:00:00:00:04</entry-name> <entry-name>10:00:00:00:00:00:00:05</entry-name> <entry-name>10:00:00:00:00:00:00:06</entry-name> </member-entry> </zone> <zone> <zone-name>zone3</zone-name> <zone-type>0</zone-type> <member-entry> <entry-name>10:00:00:00:00:00:00:07</entry-name> <entry-name>10:00:00:00:00:00:00:08</entry-name> <entry-name>10:00:00:00:00:00:00:09</entry-name> </member-entry> </zone> <zone> <zone-name>zone4</zone-name> <zone-type>0</zone-type> <member-entry> <entry-name>10:00:00:00:00:00:00:10</entry-name> <entry-name>10:00:00:00:00:00:00:11</entry-name> <entry-name>10:00:00:00:00:00:00:12</entry-name> </member-entry> </zone></Response>

3. Use a DELETE request to delete the existing zone “zone4”.

URI

DELETE <base_URI>/rest/running/zoning/defined-configuration/zone/zone-name/zone4

Request body

No request body is required.

Response body

When the request is successfully completed, the response contains an empty message body and a “204 No Content” status inthe first line of the headers.

Creating, modifying, and deleting a zone using REST

Brocade Fabric OS REST API Reference, 8.2.0a220 53-1005246-03

Page 221: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

4. Use a PATCH request to save the zone configuration using the zoneDB checksum from step 1.

URI

PATCH <base_URI>/rest/running/zoning/effective-configuration/cfg-action/1

Request body

<checksum>5c37a7bfe10f77de3253080b174a3239</checksum>

Response body

When the request is successfully completed, the response contains an empty message body and a “204 No Content” status inthe first line of the headers.

5. Use a GET request to view the new defined zoning configuration.

URI

GET <base_URI>/rest/running/zoning/defined-configuration/zone

Request body

No request body is required.

Response body

The response contains a message body similar to the following, and has a “200 OK” status in the first line of the headers. Thezone named “zone4” has been removed from the zoning configuration named “cfg1”.

<?xml version="1.0"?><Response> <zone> <zone-name>zone1</zone-name> <zone-type>0</zone-type> <member-entry> <entry-name>10:00:00:00:00:00:00:01</entry-name> <entry-name>10:00:00:00:00:00:00:02</entry-name> <entry-name>10:00:00:00:00:00:00:03</entry-name> </member-entry> </zone> <zone> <zone-name>zone2</zone-name> <zone-type>0</zone-type> <member-entry> <entry-name>10:00:00:00:00:00:00:04</entry-name> <entry-name>10:00:00:00:00:00:00:05</entry-name> <entry-name>10:00:00:00:00:00:00:06</entry-name> </member-entry> </zone> <zone> <zone-name>zone3</zone-name> <zone-type>0</zone-type> <member-entry> <entry-name>10:00:00:00:00:00:00:07</entry-name> <entry-name>10:00:00:00:00:00:00:08</entry-name> <entry-name>10:00:00:00:00:00:00:09</entry-name> </member-entry> </zone></Response>

Concurrent zoning transactions on a local switchIn this example, assume that there are two FOS API REST clients (R1a and R1b) logged into the same switch.

Concurrent zoning transactions on a local switch

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 221

Page 222: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

FOS API RESTclient 1a (R1a) opens a zone transaction normally. If FOS API REST client 1b (R1b) also attempts to open a zonetransaction, the zone operation attempt from R1b will fail with the following error:

<?xml version="1.0"?><errors xmlns="urn:ietf:params:xml:ns:yang:ietf-restconf"> <error> <error-type>protocol</error-type> <error-tag>Operation-failed</error-tag> <error-app-tag>Error</error-app-tag> <error-path>/zone/zone-name/rest1b_zone1/</error-path> <error-message>There is an outstanding REST transaction, and you are not the owner of that transaction. (4 mins 48 secs left)</error-message> <error-info> <error-code>-3</error-code> <error-module>zone</error-module> </error-info> </error></errors>

As R1a has an open zone transaction and is still logged in, the R1a client transaction will not be disturbed as long as that client is loggedin and the session has not reached the 5 minute timeout limit.

Multi-switch concurrent transaction cancellationFor this example assume that there are two switches in a fabric (Switch 1 and Switch 2).

1. A FOS API REST client on switch 1 (Rest_sw1) starts a zone transaction.

2. While this is in progress, a CLI user on switch 2 (CLI_sw2) starts a different zone transaction.

3. Subsequently CLI_sw2 commits their zone changes while the Rest_sw1 zone transaction is still open.

As part of the fabric-wide commit of the CLI_sw2 zone transaction, Rest_sw1's zone transaction will be automaticallycancelled.

As Rest_sw1 doesn't have any knowledge of CLI_sw2's commit operation, if Rest_sw1 attempts to perform another zone editoperation, they will receive an error similar to the following notifying them that their previous zone transaction was cancelled:

<errors xmlns="urn:ietf:params:xml:ns:yang:ietf-restconf"> <error> <error-type>protocol</error-type> <error-tag>Operation-failed</error-tag> <error-app-tag>Error</error-app-tag> <error-path>/zone/zone-name/rest_sw1_zone2/</error-path> <error-message>Warning: Cannot complete operation due to the current zoning transaction being aborted (Reason: User Command). Retry prior operation(s) to recover.</error-message> <error-info> <error-code>-16</error-code> <error-module>zone</error-module> </error-info> </error></errors>

Simultaneous multi-switch zone transactioncommitmentsFor this example assume that there are two switches in a fabric (Switch 1 and Switch 2).

1. A FOS API REST client (Rest_sw1) starts a zone transaction on switch 1.

Multi-switch concurrent transaction cancellation

Brocade Fabric OS REST API Reference, 8.2.0a222 53-1005246-03

Page 223: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

2. A different FOS API REST client (Rest_sw2) starts a zone transaction on switch 2.

3. Both clients the attempt to commit their changes at the same time.

In this case, whichever RESTCONF transaction is processed first would win and go through. In the event of an exact tie, both commitswould be rejected and failed. The clients would have to retry and whoever got their retry attempt in first would win.

REST Zone Transaction Timer timeoutFor this example, assume that FOS REST API client 1 is logged into switch 1.

1. A FOS REST API client on switch 1 (Rest_sw1) starts a zone transaction.

2. The Rest_sw1 user leaves their zone transaction open with no activity occurring for more than 5 minutes.

3. At this point, a CLI user on switch 1 (CLI_sw1) attempts a zone transaction. Because the Rest_sw1 timer has expired, CLI_sw1transaction is allowed to be opened and as a result, Rest_sw1's transaction is cancelled.

4. If Rest_sw1 later attempts to continue their zone transactions by issuing another zone operation, they will see the followingerror:

<errors xmlns="urn:ietf:params:xml:ns:yang:ietf-restconf"> <error> <error-type>protocol</error-type> <error-tag>Operation-failed</error-tag> <error-app-tag>Error</error-app-tag> <error-path>/zone/zone-name/rest_sw1_zone2/</error-path> <error-message>Warning: Cannot complete operation due to the current zoning transaction being aborted (Reason: User Command). Retry prior operation(s) to recover.</error-message> <error-info> <error-code>-16</error-code> <error-module>zone</error-module> </error-info> </error></errors>

REST Zone Transaction Timer timeout

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 223

Page 224: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Brocade Fabric OS REST API Reference, 8.2.0a224 53-1005246-03

Page 225: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

References• REST API description...................................................................................................................................................................................225• XML resource representation.....................................................................................................................................................................228• Error Reporting................................................................................................................................................................................................ 229

REST API descriptionREpresentational State Transfer (REST) is a style of software architecture for networked applications.

REST is based on the following principles:

• Everything is a resource. These resources are exposed through a universal resource indicator (URI).

• Every resource is identified by a unique identifier.

• Communication is through simple and uniform interfaces by representation.

• Clients can cache the responses. The responses must define themselves as cacheable or not cacheable to prevent the clientfrom sending inappropriate data in response to further requests.

• All interactions are stateless; this means that all the information necessary to service the request must be contained in the URL,query parameters, body, or headers.

REST itself is not a standard, but it prescribes the use of standards such as HTTP, URL, and XML/HTML. RESTCONF is a REST-likeprotocol running over HTTP, used to access data defined in YANG (Yet Another Next Generation) model language using datastoresdefined in the Network Configuration Protocol, or NETCONF (RFC 6241).

ResourcesA resource is an object with a type, associated data, relationships to other resources, and a set of methods that operate on it. A resourcehas a set of methods such as GET, HEAD, OPTIONS, POST, PATCH, and DELETE are defined for it. Resources can be grouped intocollections (in the YANG model, a collection is represented as a “List” statement). Each collection is homogeneous (a collection containsonly one type of resource) and unordered. Refer to the table below for a more complete description of the methods.

TABLE 8 Supported FOS REST API methods

Method Description

DELETE method on page 20 Deletes the specified resource.

GET method on page 20 Retrieves the representation of the resource (for example, “base, configuration”) including the metadata.

HEAD method on page 21 Retrieves the metadata of the resource identified in the request. The response to this operation contains only theheaders and an empty response body.

OPTIONS method on page 21 Retrieves the allowed methods for the resource identified in the request. The response to this operation contains theheaders and an empty response body. The operations allowed on the resource are returned in the response “Allow”header.

PATCH method on page 22 Specifies an ordered list of edits to be applied to the target datastore by the RESTCONF server.

POST method on page 23 Creates a new resource in the resource location identified by the URI specified in the request. The URI of the newresource is returned in the response “Location” header.

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 225

Page 226: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Base resourcesBase resource elements represent high-level resources in the system and are categorized by media type.

In the FOS REST API implementation the only defined media type is XML. The XML representation is defined in The YANG 1.1 DataModeling Language (RFC 7950), and is supported by the “application/yang-data+xml” media type.

The entry point container in the resource model is “/rest”, and all fields and sub-resources with the same resource type are defined in thenamespace “http://<device_ID>/rest”, where <device_ID> is the IP address for the device. Refer to Logging in and out on page 16 formore information on the device ID.

The FOS REST API does not support actions on base resources or on the first-level containers of modules.

Resources and the YANG modelThree types of resources are supported to represent configuration data and YANG-RPC operations: base resource, configurationresource, and YANG-RPC operations resource.

Resources can exist inside or outside a collection. Resources that are outside a collection are known as singleton resources (in the YANGmodel, these are represented in “Container” statements). Collections are resources themselves. For example, resources defined in theYANG model are physical interface, switches, zones, and so on.

The following figure illustrates the YANG resource model.

FIGURE 3 YANG resource models

Relationship of YANG and resource data modelsThe resource data model is based on the YANG data model. All top-level containment statements such as “List” and “Container” that arepresent in the YANG data model are the resources, with a few exceptions.

TABLE 9 Top-level containment statements

Statement Description

List A collection of resources that contains the same type of resources, which are ordered. Entries such as a Container statement inside a Liststatement are also a resource.

Container A singleton resource or a group of resources of different types.

Leaf Leaf statements inside a List or Container resource are the attributes of these sources. A Leaf is a subresource of a List or Container. Thatis, a Leaf cannot be identified without referencing its parent List or Container resource.

REST API description

Brocade Fabric OS REST API Reference, 8.2.0a226 53-1005246-03

Page 227: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

The following diagram illustrates the relationship between YANG and Resource data.

FIGURE 4 YANG and Resource data model relationship

Uniform resource identifiersA uniform resource identifier (URI) is a link used to identify a specific resource. It is the only means for clients and servers to exchangeresource representations.

URIs have two parts:

• Base URI—The base URI is specific to the Fabric OS server. All URIs accessing the same server use the same base URI.

• Request URI—The request URI is the URI used to perform a GET, POST, PATCH, DELETE, HEAD, or OPTIONS operation.

In this example of a URI, the text in bold is the base URI, and the remaining portion is the request URI:

http://10.10.10.122:80/rest/running/fabric/fabric-switch

Common practice for URI illustration is to compact the base URI as <base_URI>, as shown in the following example:

<base_URI>/running/brocade-extension-tunnel/

NOTEURIs are case-sensitive.

URI structureThe hierarchical structure of the URI is used to support those resources defined in the YANG model by the List and Container statementelements.

The URI path conveys a resource model that is similar to the YANG model, with each forward-slash-separated path segmentcorresponding to a unique resource within the model's hierarchy (using the following syntax: <base_URI>/path1/path2/{key1},{key2}/path3/...). For example, the URI /rest/running/brocade-interface/fibrechannel identifies the Fibre Channel interfaces as

target resources. In this example, anything in the URI from the path element (“…/brocade-interface”) onward represents YANG modelresources.

• rest—The entry point.

• running—Represents the running configuration datastore.

• brocade-interface—Represents all interfaces present in the running configuration.

REST API description

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 227

Page 228: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

• fibrechannel—Represents all Fibre Channel interfaces present in the running configuration.

There are some additional restrictions that apply specifically to the FOS REST API . Refer to FOS REST API URI restrictions on page 12for details.

URI encoding

The following rules apply to encoding URI content when directly in the request. Encoding is not supported for content in request bodies.

• A key that contains a forward slash (/) must be encoded as “%2f”. For example, the port value “0/2” is encoded as 0%2f2.

• The delimiter between adjacent keywords in URIs is a comma (,). This is encoded as %2C.

• There are other scenarios that could require encoding, for example IPSec policy names support the special characters such as@, %, and *. For example, an IPSec policy named “ABC%123” would be encoded as: /rest/running/brocade-extension-ipsec-policy/extension-ipsec-policy/policy-name/ABC%25123, with the percent symbol encoded

as “%25”.

For additional information on HTML URI encoding values, refer to https://en.wikipedia.org/wiki/Percent-encoding.

Base URI

The base URI (https://host:port/rest/) is the entry point to access and manage all resources defined in the system. The port is the defaultHTTPS port (443). It is used to identify the base resource and to retrieve the first-level child resources belonging to the base resource.

NOTEA leaf attribute can also be present in a URI to identify the exact resource. For example, the URI <base URI>/rest/running/brocade-interface/fibrechannel/name/<name>/operational-status will identify the operational-

status resource of the specified fibrechannel interface.

Top-level URIs

The URI identifies the first-level resource in its hierarchy with the media type in its request, for example, <base URI>/config/running.

IMPORTANTThe FOS REST API does not support any methods on the top-level URIs. For example, you cannot make any request to<base URI>/rest/running/brocade-zone.

XML resource representationIn the FOS REST API, a resource is represented in XML as an XML element. Sub-resources are encoded as sub-elements to theresource element.

In the XML representation of a list resource, the keys are always present and encoded first, and leafs are properties of the resource.Single-valued resource properties are encoded as sub-elements to the resource element, with the value encoded as character data in thesub-element. Refer to the module descriptions elsewhere in this publication for illustrations.

XML resource representation

Brocade Fabric OS REST API Reference, 8.2.0a228 53-1005246-03

Page 229: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

The following example shows the XML representation of the “operational-status” resource for port 0/0. Notice that it uses “%2f” for theslash character.

Request URI

GET https://10.10.10.10/rest/running/brocade-interface/fibrechannel/name/0%2f0/operational-status

Request body

No request body is required.

Response body

When the operation is successful, the response has a message body similar to the following, and a “200 OK” status in the headers.

<?xml version="1.0"?><Response> <fibrechannel> <== container resource <name>0/0</name> <== leaf "name" <operational-status>3</operational-status> <== leaf "operational-status" </fibrechannel></Response>

The “name” and “operational-status” leafs are sub-elements of the “fibrechannel” resource.

Error ReportingA Brocade-specific ResourceID (XML) is encoded in to the standard RESTCONF “errors” structure, so that it is returned as part as anyfailure report. The error type determines the error-path value. Object- and operation-level errors use the root URI command in the errorpath, while attribute-level errors return the object name and attribute as part of the error path value.

If there is an XML parsing error in the request, the request will return without processing any of the objects in the request. If objects areprocessed and any errors found, the request will be returned with the object identifier along with keys in the error-path. You can thenidentify the exact error path and correct any errors before applying the right payload and resubmitting the request.

The following is the YANG tree diagram for error data:

+---- errors +---- error* +---- error-type enumeration +---- error-tag string +---- error-app-tag? string +---- error-path? instance-identifier +---- error-message? string +---- error-info?

Refer to the sample error logs for details on how different single or multiple errors are returned.

Error Reporting

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 229

Page 230: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Error returned due to invalid POST requestThis example shows the error returned when an invalid POST request is made.

URI

POST http://300.3.3.3/rest/running/gigabitethernet-interface

Request body

No request body is required.

Response body

Notice the error-message and error-info fields. They been rendered in bold for the example; they will not be bold in the actualresponse.

<?xml version="1.0" ?><errors xmlns="urn:ietf:params:xml:ns:yang:ietf-restconf"> <error> <error-type>application</error-type> <error-tag>unknown-element</error-tag> <error-app-tag>Error</error-app-tag> <error-path>/rest/running/gigabitethernet-interface/</error-path> <error-message>Invalid REST URI</error-message> <error-info> <error-code>5</error-code> <error-module>rest</error-module> </error-info> </error></errors>

Error Reporting

Brocade Fabric OS REST API Reference, 8.2.0a230 53-1005246-03

Page 231: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Existing IP address errorThis example shows the error returned when a multiple IP address configuration is tried using POST and the IP addresses arealready configured.

URI

http://10.10.10.10/running/brocade-interface/extension-ip-interface

Request Body

<extension-ip-interface> <name>4/0</name> <dp-id>0</dp-id> <ip-address>10.10.0.11</ip-address> <ip-prefix-length>24</ip-prefix-length></extension-ip-interface><extension-ip-interface> <name>4/0</name> <dp-id>1</dp-id> <ip-address>10.10.0.10</ip-address> <ip-prefix-length>24</ip-prefix-length></extension-ip-interface>

Response body

Notice the value for the error-message fields. This has been rendered in bold for the example; it will not be bold in the actualresponse.

<?xml version="1.0"?><errors xmlns="urn:ietf:params:xml:ns:yang:ietf-restconf"> <error> <error-type>protocol</error-type> <error-tag>Operation-failed</error-tag> <error-app-tag>Error</error-app-tag> <error-path>/extension-ip-interface/name/4/0/</error-path> <error-message>IP Address already configured.IP Address 10.10.0.11 already configured on port 4/ge0. IP interface creation failed.</error-message> <error-info> <error-code>54</error-code> <error-module>extension-service</error-module> </error-info> </error> <error> <error-type>protocol</error-type> <error-tag>Operation-failed</error-tag> <error-app-tag>Error</error-app-tag> <error-path>/extension-ip-interface/name/4/0/</error-path> <error-message>IP Address already configured.IP Address 10.10.0.10 already configured on port 4/ge0. IP interface creation failed.</error-message> <error-info> <error-code>54</error-code> <error-module>extension-service</error-module> </error-info> </error></errors>

Error Reporting

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 231

Page 232: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Unsupported platform errorThis example shows the error returned when a GET request using brocade-interface/gigabitethernet is executed on a platformthat does not support a Gigabit Ethernet interface.

URI

http://10.10.10.10/rest/running/brocade-interface/gigabitethernet

Request body

No request body is required.

Response body

Notice the value for the error-message field. This has been rendered in bold for the example; it will not be bold in the actualresponse.

<?xml version="1.0" ?><errors xmlns="urn:ietf:params:xml:ns:yang:ietf-restconf"> <error> <error-type>application</error-type> <error-tag>unknown-element</error-tag> <error-app-tag>Error</error-app-tag> <error-path>/rest/running/brocade-interface/gigabitethernet</error-path> <error-message>Invalid resource identifier</error-message> <error-info> <error-code>-1</error-code> <error-module>cal</error-module> </error-info> </error></errors>

Login errorsLogin errors (other than a flawed id/password combination) are usually due to either trying to log in using the HTTPS protocol when asecurity certificate is not installed on the switch (or using HTTP when a certificate is installed), or having an invalid session key.

This example shows the error returned when an request is made that is invalid because the session key is not valid. This is usuallybecause the session has not been correctly logged into the switch, or the session has timed out.

URIhttp://10.10.10.10/rest/login

Request bodyNo request body is required.

Error Reporting

Brocade Fabric OS REST API Reference, 8.2.0a232 53-1005246-03

Page 233: Brocade Fabric OS REST API Reference, 8.2 - … on page 164 Allows you to retrieve or configure the IP security (IPsec) policies on a switch or director. DELETE, GET, HEAD,

Response bodyNotice the error-message and error-info fields. They been rendered in bold for the example; they will not be bold in the actual response.

<?xml version="1.0" ?><errors xmlns="urn:ietf:params:xml:ns:yang:ietf-restconf"> <error> <error-type>application</error-type> <error-tag>operation-failed</error-tag> <error-app-tag>Error</error-app-tag> <error-path>/rest/running/brocade-interface/fibrechannel-statistics</error-path> <error-message>Invalid session key</error-message> <error-info> <error-code>15</error-code> <error-module>auth</error-module> </error-info> </error></errors>

Error Reporting

Brocade Fabric OS REST API Reference, 8.2.0a53-1005246-03 233


Recommended