beautypg.com

Deleting an fc fabric, Sample error response for wrong password, Sample java code for deleting an fc fabric – Brocade Network Advisor REST API Guide (Supporting Network Advisor 12.3.0) User Manual

Page 61

background image

Brocade Network Advisor REST API Guide

47

53-1003160-01

SAN fabric discovery

4

REQUEST HTTPSTATUS = 200

{"virtualFabricIds":[]}

/**

* Getting FC fabrics list AFTER discoverfabric operation, fabrics exist

*/

CALLING GET http://10.24.48.103/rest/resourcegroups/All/fcfabrics

REQUEST HTTPSTATUS = 200

{"fcFabrics":[{"key":"10:00:00:05:1E:40:40:02","seedSwitchWwn":"10:00:00:05:1E:40

:40:02","name":"ApsFabric-10:00:00:05:1e:40:40:01","secure":false,"adEnvironment"

:false,"contact":null,"location":null,"description":null,"principalSwitchWwn":"10

:00:00:05:1E:40:40:02","fabricName":"","virtualFabricId":2,"seedSwitchIpAddress":

"10.24.45.92"},{"key":"10:00:00:05:1E:40:40:01","seedSwitchWwn":"10:00:00:05:1E:4

0:40:01","name":"ApsFabric","secure":false,"adEnvironment":false,"contact":null,"

location":null,"description":null,"principalSwitchWwn":"10:00:00:05:1E:40:40:01",

"fabricName":"","virtualFabricId":1,"seedSwitchIpAddress":"10.24.45.92"},{"key":"

10:00:00:05:1E:40:40:00","seedSwitchWwn":"10:00:00:05:1E:40:40:00","name":"ApsFab

ric-10:00:00:05:1e:40:40:01-10:00:00:05:1e:40:40:02","secure":false,"adEnvironmen

t":false,"contact":null,"location":null,"description":null,"principalSwitchWwn":"

10:00:00:05:1E:40:40:00","fabricName":"","virtualFabricId":128,"seedSwitchIpAddre

ss":"10.24.45.92"}]}

Sample error response for wrong password

The following is an example of a SAN fabric discovery incorrect password error message.

CALLING POST http://10.24.48.103/rest/resourcegroups/All/discoverfabric

REQUEST HTTPSTATUS = 500

RSException errorCode=6030, errorMsg=Seed switch authentication failed.

Deleting an FC fabric

You can use the following POST URI to delete an existing fabric in Network Advisor.

/resourcegroups/All/fcfabrics/fcfkey/deletefabric

This POST operation does not require any request payload except for the session token which is
passed back in an HTTP header parameter after a successful login.

This POST operation is performed on the fabric specified by fcfkey.

Sample Java code for deleting an FC fabric

The following is the sample Java code for deleting an FC fabric.

HttpURLConnection con = null;

try {

/**

* Create the HTTP connection object with the URI, method and headers

*/

URL obj = new

URL("http://10.24.48.103/rest/resourcegroups/All/fcfabrics/10:00:00:05:1E:40:40:0

0/deletefabric"

);

con = (HttpURLConnection) obj.openConnection();

con.setRequestMethod("POST");

con.addRequestProperty("WStoken", "wppCy/NGdC4o5gGFJjXRMv7blhc=");