### Detailed Pending Zoneset Output Example
Source: https://developer.cisco.com/cisco-mds-9000-series-nx-api-reference/latest/zoning
This example shows the detailed output of the 'show zoneset pending' command, illustrating how different zone members (interfaces, WWNs, IP addresses, FCIDs) are displayed within their respective zones and zonesets.
```text
zoneset name zoneset1 vsan 1
zone name zone2 vsan 1
interface fc1/5 swwn 20:00:00:2a:6a:fd:04:a0
interface fc1/15 swwn 20:00:00:2a:6a:fd:04:b0
zone name zone3 vsan 1
zoneset name zoneset2 vsan 20
zoneset name zoneset5 vsan 20
zoneset name zoneset4 vsan 20
zone name zone8 vsan 20
interface fc1/1 swwn 20:00:00:2a:6a:fd:04:a0
pwwn 21:01:00:e0:8b:39:a9:07
ip-address 174.54.87.79
zone name zone9 vsan 20
fcid 0xa0000a
zoneset name zoneset3 vsan 20
```
--------------------------------
### Sample XML Output for Show Command
Source: https://developer.cisco.com/cisco-mds-9000-series-nx-api-reference/latest/getting-started-with-cisco-mds-9000-series-nx-api
This is an example of the XML output received when querying NX-API for show command details, such as NX-API status and port configurations.
```xml
Enabled
Disabled
231
8443
C=US, ST=CA, L=San Jose, O=Cisco Systems Inc., OU=dcnxos, CN=nxos
Jun 27 17:51:29 2019 GMT
-----BEGIN CERTIFICATE-----
MIIDpzCCAo+gAwIBAgIJAPZbKvt6GjebMA0GCSqGSIb3DQEBCwUAMGoxCzAJBgNV
BAYTAlVTMQswCQYDVQQIDAJDQTERMA8GA1UEBwwIU2FuIEpvc2UxGzAZBgNVBAoM
EkNpc2NvIFN5c3RlbXMgSW5jLjEPMA0GA1UECwwGZGN5eG9zMQ0wCwYDVQQDDARu
eG9zMB4XDTE5MDYyNjE3NTEyOVoXDTE5MDYyNzE3NTEyOVowajELMAkGA1UEBhMC
VVMxCzAJ
... (truncated for brevity)
-----END CERTIFICATE-----
```
--------------------------------
### Install Python Requests Module
Source: https://developer.cisco.com/cisco-mds-9000-series-nx-api-reference/latest/getting-started-with-cisco-mds-9000-series-nx-api
Use this command to install the 'requests' module required for running sample Python scripts. Ensure Python 3.0 or later is installed.
```bash
python3 -m pip install requests
```
--------------------------------
### Install Python JSON Module
Source: https://developer.cisco.com/cisco-mds-9000-series-nx-api-reference/latest/getting-started-with-cisco-mds-9000-series-nx-api
Use this command to install the 'json' module required for running sample Python scripts. Ensure Python 3.0 or later is installed.
```bash
python3 -m pip install json
```
--------------------------------
### Sample JSON Output for Show Command
Source: https://developer.cisco.com/cisco-mds-9000-series-nx-api-reference/latest/getting-started-with-cisco-mds-9000-series-nx-api
This is an example of the JSON output received when querying NX-API for show command details, such as NX-API status and port configurations.
```json
{
"http_port": 231,
"https_port": 8443,
"nxapi_status": "Enabled",
"sandbox_status": "Disabled",
"ssl_content": "-----BEGIN CERTIFICATE-----\nMIIDpzCCAo+gAwIBAgIJAPZbKvt6GjebMA0GCSqGSIb3DQEBCwUAMGoxCzAJBgNV\nBAYTAlVTMQswCQYDVQQIDAJDQTERMA8GA1UEBwwIU2FuIEpvc2UxGzAZBgNVBAoM\nEkNpc2NvIFN5c3RlbXMgSW5jLjEPMA0GA1UECwwGZGN5eG9zMQ0wCwYDVQQDDARu\neG9zMB4XDTE5MDYyNjE3NTEyOVoXDTE5MDYyNzE3NTEyOVowajELMAkGA1UEBhMC\nVVMxCzAJ
... (truncated for brevity)
-----END CERTIFICATE-----\n",
"ssl_enddate": "Jun 27 17:51:29 2019 GMT",
"ssl_issuer": "C=US, ST=CA, L=San Jose, O=Cisco Systems Inc., OU=dcnxos, CN=nxos"
}
```
--------------------------------
### Show fcdomain XML Output Example (VSAN 1)
Source: https://developer.cisco.com/cisco-mds-9000-series-nx-api-reference/latest/fcdomain
This snippet displays the XML output for the 'show fcdomain' command for VSAN 1, detailing local switch status and configuration.
```xml
1
The local switch is the Principal Switch
Stable
20:01:00:2a:6a:fd:04:a1
20:01:00:2a:6a:fd:04:a1
128
0xab
171
Enabled
Enabled
Disabled
Disabled
20:01:00:05:30:00:28:df
Enabled
Scale Restart
128
0x00
0
preferred
128
2
The local switch is the Principal Switch
Stable
20:02:00:2a:6a:fd:04:a1
20:02:00:2a:6a:fd:04:a1
128
0xbb
187
Enabled
Enabled
Disabled
Disabled
20:01:00:05:30:00:28:df
Enabled
Scale Restart
128
0x00
0
preferred
128
3
The local switch is the Principal Switch
Stable
20:03:00:2a:6a:fd:04:a1
20:03:00:2a:6a:fd:04:a1
128
0xe8
```
--------------------------------
### Show fcdomain Output Example
Source: https://developer.cisco.com/cisco-mds-9000-series-nx-api-reference/latest/fcdomain
This snippet shows the typical JSON output for the 'show fcdomain' command, detailing fabric domain configuration and status for a VSAN.
```json
{
"ins_api": {
"outputs": {
"output": [
{
"TABLE_switch_status": {
"ROW_switch_status": [
{
"vsan": 3,
"local_switch_info": "The local switch is the Principal Switch",
"TABLE_localswitch_run_info": {
"ROW_localswitch_run_info": [
{
"current_domain_id": "0xe8",
"current_domain_id_num": 232,
"local_switch_wwn": "20:03:00:2a:6a:fd:04:a1",
"running_fabric_name": "20:03:00:2a:6a:fd:04:a1",
"running_priority": 128,
"state": "Stable"
}
]
},
"TABLE_principalswitch_run_info": {
"ROW_principalswitch_run_info": [
{
"priority": 128
}
]
},
"TABLE_localswitch_config_info": {
"ROW_localswitch_config_info": [
{
"state": "Enabled",
"fcid_persistence": "Enabled",
"optimized_mode": "Enabled",
"optimized_mode_type": "Scale Restart"
}
]
}
}
]
}
}
]
}
}
}
```
--------------------------------
### Sample XML Output for 'show version'
Source: https://developer.cisco.com/cisco-mds-9000-series-nx-api-reference/latest/version
This is a sample XML output for the 'show version' command executed via the NX-API on a Cisco MDS 9000 Series switch.
```xml
Cisco Nexus Operating System (NX-OS) Software
TAC support: http://www.cisco.com/tac
Documents: http://www.cisco.com/en/US/products/ps9372/tsd_products_support_series_home.html
Copyright (c) 2002-2020, Cisco Systems, Inc. All rights reserved.
The copyrights to certain works contained herein are owned by
other third parties and are used and distributed under license.
Some parts of this software are covered under the GNU Public
License. A copy of the license is available at
http://www.gnu.org/licenses/gpl.html.
0.16.0
N/A
8.4(2a)
8.4(2a)
09/25/2019
bootflash:///m9148-s6ek9-kickstart-mz.8.4(2a).bin
7/11/2020 12:00:00
06/17/2020 15:45:45
bootflash:///m9148-s6ek9-mz.8.4(2a).bin
7/11/2020 12:00:00
06/17/2020 17:16:13
MDS 9148T 48X32G FC (1 RU) Chassis
4/8/16/32 Gbps FC/Sup-4
Intel(R) Xeon(R) CPU D-1530 @ 2.40GHz
5752572
kB
JAE2151022Y
test-switch
3833856
0
3
26
41
234389
Wed Jun 26 17:49:03 2019
Reset Requested by CLI command reload
8.4(2a)
Cisco Systems, Inc.
```
--------------------------------
### Sample XML Output for 'show zoneset brief'
Source: https://developer.cisco.com/cisco-mds-9000-series-nx-api-reference/latest/zoning
This is a sample XML output for the 'show zoneset brief' command, providing an alternative structured representation of zone set information.
```xml
zoneset1
1
zoneset1
2
zone1
Zoneset_10
10
Host_A-Target_1
Host_A-Target_2
zoneset2
20
zoneset5
20
zoneset4
20
zone8
zone9
zoneset3
20
```
--------------------------------
### Show FCNS Statistics VSAN (CLI Example)
Source: https://developer.cisco.com/cisco-mds-9000-series-nx-api-reference/latest/fcns
Example of executing the 'show fcns statistics vsan 1' command directly on the Cisco MDS 9000 Series NX-OS CLI.
```bash
switch# show fcns statistics vsan 1
Name server statistics for vsan 1
===================================
registration requests received = 0
deregistration requests received = 0
queries received = 2
queries sent= 2
reject responses sent = 2
RSCNs received = 0
RSCNs sent = 2
```
--------------------------------
### Sample JSON Output for 'show zoneset brief'
Source: https://developer.cisco.com/cisco-mds-9000-series-nx-api-reference/latest/zoning
This is a sample JSON output for the 'show zoneset brief' command, illustrating the structure of zone set information.
```json
{
"TABLE_zoneset": {
"ROW_zoneset": [
{
"name": "zoneset1",
"vsan": 1
},
{
"TABLE_zone": {
"ROW_zone": {
"name": "zone1"
}
},
"name": "zoneset1",
"vsan": 2
},
{
"TABLE_zone": {
"ROW_zone": [
{
"name": "Host_A-Target_1"
},
{
"name": "Host_A-Target_2"
}
]
},
"name": "Zoneset_10",
"vsan": 10
},
{
"name": "zoneset2",
"vsan": 20
},
{
"name": "zoneset5",
"vsan": 20
},
{
"TABLE_zone": {
"ROW_zone": [
{
"name": "zone8"
},
{
"name": "zone9"
}
]
},
"name": "zoneset4",
"vsan": 20
},
{
"name": "zoneset3",
"vsan": 20
}
]
}
}
```
--------------------------------
### Sample XML Output for show environment clock
Source: https://developer.cisco.com/cisco-mds-9000-series-nx-api-reference/latest/environment
This is a sample XML output for the 'show environment clock' command, detailing the status of clock modules.
```xml
A
Clock Module
--
NotSupported
None
B
Clock Module
--
NotSupported
None
```
--------------------------------
### Sample XML Output for Show Clock
Source: https://developer.cisco.com/cisco-mds-9000-series-nx-api-reference/latest/clock
Example of the XML output received when querying the 'show clock' command via NX-API.
```xml
NTP
21:15:47.532 UTC Wed Jun 26 2019
```
--------------------------------
### Sample XML Output for show module xbar
Source: https://developer.cisco.com/cisco-mds-9000-series-nx-api-reference/latest/module
This is a sample XML output for the 'show module xbar' command, presenting the same module information in an XML structure.
```xml
1
0
Fabric Module 1
DS-X9706-FAB1
ok
1
NA
1.0
1
NA
JAE190802YU
Enabled
Top
CLOSE
Bottom
CLOSE
does
enabled
```
--------------------------------
### Sample JSON Output for Show Clock
Source: https://developer.cisco.com/cisco-mds-9000-series-nx-api-reference/latest/clock
Example of the JSON output received when querying the 'show clock' command via NX-API.
```json
{
"simple_time": "21:15:47.432 UTC Wed Jun 26 2019",
"time_source": "NTP"
}
```
--------------------------------
### Show Environment Clock Information (XML)
Source: https://developer.cisco.com/cisco-mds-9000-series-nx-api-reference/latest/environment
Retrieves information about the clock modules installed in the system. This is useful for verifying clock synchronization and module status.
```xml
A
Clock Module
```
--------------------------------
### Sample JSON Output for show fcdomain
Source: https://developer.cisco.com/cisco-mds-9000-series-nx-api-reference/latest/fcdomain
This is a sample JSON output for the 'show fcdomain' command, detailing switch status, local switch configuration, and running information for VSANs.
```json
{
"TABLE_switch_status": {
"ROW_switch_status": [
{
"TABLE_localswitch_config_info": {
"ROW_localswitch_config_info": [
{
"auto_reconfig": "Disabled",
"config_domain_id": "0x00",
"config_domain_id_num": 0,
"config_domain_id_type": "preferred",
"config_fabric_name": "20:01:00:05:30:00:28:df",
"config_priority": 128,
"contiguous_allocation": "Disabled",
"fcid_persistence": "Enabled",
"optimized_mode": "Enabled",
"optimized_mode_type": "Scale Restart",
"state": "Enabled"
}
]
},
"TABLE_localswitch_run_info": {
"ROW_localswitch_run_info": [
{
"current_domain_id": "0xab",
"current_domain_id_num": 171,
"local_switch_wwn": "20:01:00:2a:6a:fd:04:a1",
"running_fabric_name": "20:01:00:2a:6a:fd:04:a1",
"running_priority": 128,
"state": "Stable"
}
]
},
"TABLE_principalswitch_run_info": {
"ROW_principalswitch_run_info": [
{
"priority": 128
}
]
},
"local_switch_info": "The local switch is the Principal Switch",
"vsan": 1
},
{
"TABLE_localswitch_config_info": {
"ROW_localswitch_config_info": [
{
"auto_reconfig": "Disabled",
"config_domain_id": "0x00",
"config_domain_id_num": 0,
"config_domain_id_type": "preferred",
"config_fabric_name": "20:01:00:05:30:00:28:df",
"config_priority": 128,
"contiguous_allocation": "Disabled",
"fcid_persistence": "Enabled",
"optimized_mode": "Enabled",
"optimized_mode_type": "Scale Restart",
"state": "Enabled"
}
]
},
"TABLE_localswitch_run_info": {
"ROW_localswitch_run_info": [
{
"current_domain_id": "0xbb",
"current_domain_id_num": 187,
"local_switch_wwn": "20:02:00:2a:6a:fd:04:a1",
"running_fabric_name": "20:02:00:2a:6a:fd:04:a1",
"running_priority": 128,
"state": "Stable"
}
]
},
"TABLE_principalswitch_run_info": {
"ROW_principalswitch_run_info": [
{
"priority": 128
}
]
},
"local_switch_info": "The local switch is the Principal Switch",
"vsan": 2
},
{
"TABLE_localswitch_config_info": {
"ROW_localswitch_config_info": [
{
"auto_reconfig": "Disabled",
"config_domain_id": "0x00",
"config_domain_id_num": 0,
"config_domain_id_type": "preferred",
"config_fabric_name": "20:01:00:05:30:00:28:df",
"config_priority": 128,
"contiguous_allocation": "Disabled",
```
--------------------------------
### Sample XML Output for 'show fcdomain pending'
Source: https://developer.cisco.com/cisco-mds-9000-series-nx-api-reference/latest/fcdomain
This is a sample XML output for the 'show fcdomain pending' command, presenting VSAN configurations for domain IDs.
```xml
1
230-239
1-229
2
230-239
1-229
```
--------------------------------
### Sample XML Output for Show Topology
Source: https://developer.cisco.com/cisco-mds-9000-series-nx-api-reference/latest/topology
This is a sample XML output representing the topology information obtained from the 'show topology' command.
```xml
1
port-channel5
0xaa(170)
port-channel5
10.197.155.244
cisco-mds
3
port-channel5
0xe7(231)
port-channel5
10.197.155.244
cisco-mds
4
port-channel5
0xda(218)
port-channel5
10.197.155.244
cisco-mds
11
port-channel5
0xab(171)
port-channel5
10.197.155.244
cisco-mds
```
--------------------------------
### Display Module Information
Source: https://developer.cisco.com/cisco-mds-9000-series-nx-api-reference/latest/module
Use the 'show module' command to display information about installed modules and fabric modules. This command is useful for verifying hardware status and configuration.
```bash
switch# show module
Mod Ports Module-Type Model Status
--- ----- ----------------------------------- ------------------ ----------
2 48 2/4/8/10/16 Gbps Advanced FC Module DS-X9448-768K9 ok
3 0 Supervisor Module-3 DS-X97-SF1-K9 ha-standby
4 0 Supervisor Module-3 DS-X97-SF1-K9 active *
Mod Sw Hw
--- --------------- ------
2 8.4(2a) 1.3
3 8.4(2a) 1.2
4 8.4(2a) 1.2
Mod MAC-Address(es) Serial-Num
--- -------------------------------------- ----------
2 a8-9d-21-89-9a-b0 to a8-9d-21-89-9a-b3 JAE190602VU
3 84-b8-02-70-d0-4c to 84-b8-02-70-d0-5e JAE190802N3
4 84-b8-02-70-d7-b8 to 84-b8-02-70-d7-ca JAE190802NS
Mod Online Diag Status
--- ------------------
2 Pass
3 Pass
4 Pass
Xbar Ports Module-Type Model Status
--- ----- ----------------------------------- ------------------ ----------
1 0 Fabric Module 1 DS-X9706-FAB1 ok
3 0 Fabric Module 1 DS-X9706-FAB1 ok
5 0 Fabric Module 1 DS-X9706-FAB1 ok
Xbar Sw Hw
--- --------------- ------
1 NA 1.0
3 NA 1.0
5 NA 1.0
Xbar MAC-Address(es) Serial-Num
--- -------------------------------------- ----------
1 NA JAE190802YU
3 NA JAE190802YQ
5 NA JAE19070CGP
* this terminal session
```
--------------------------------
### Sample XML Output for 'show cores'
Source: https://developer.cisco.com/cisco-mds-9000-series-nx-api-reference/latest/cores
This is a sample XML output for the 'show cores' NX-API command, presenting core details in an XML format.
```xml
4
1
vni
5233
2020-06-23 06:22:56
```
--------------------------------
### Display System Hardware Inventory
Source: https://developer.cisco.com/cisco-mds-9000-series-nx-api-reference/latest/inventory
Use the 'show inventory' command to view the hardware components of the switch. This command is useful for verifying installed hardware and their serial numbers.
```bash
switch# show inventory
NAME: "Chassis", DESCR: "MDS 9148T 48X32G FC (1 RU) Chassis"
PID: DS-C9148T-K9 , VID: V00 , SN: JPG215200BQ
NAME: "Slot 1", DESCR: "4/8/16/32 Gbps FC/Sup-4"
PID: DS-C9148T-K9-SUP , VID: V00 , SN: JAE2151022Y
NAME: "Slot 2", DESCR: "MDS 9148T 48X32G FC (1 RU) Chassis Power Supply"
PID: DS-CAC-650W-I , VID: V00 , SN: ART2132F7X2
NAME: "Slot 3", DESCR: "MDS 9148T 48X32G FC (1 RU) Chassis Power Supply"
PID: DS-CAC-650W-I , VID: V00 , SN: ART2132F7WS
NAME: "Slot 4", DESCR: "MDS 9148T 48X32G FC (1 RU) Chassis Fan Module"
PID: DS-C32T-FAN-I , VID: V00 , SN: N/A
NAME: "Slot 5", DESCR: "MDS 9148T 48X32G FC (1 RU) Chassis Fan Module"
PID: DS-C32T-FAN-I , VID: V00 , SN: N/A
NAME: "Slot 6", DESCR: "MDS 9148T 48X32G FC (1 RU) Chassis Fan Module"
PID: DS-C32T-FAN-I , VID: V00 , SN: N/A
NAME: "Slot 7", DESCR: "MDS 9148T 48X32G FC (1 RU) Chassis Fan Module"
PID: DS-C32T-FAN-I , VID: V00 , SN: N/A
```
--------------------------------
### Sample JSON Output for 'show cores'
Source: https://developer.cisco.com/cisco-mds-9000-series-nx-api-reference/latest/cores
This is a sample JSON output for the 'show cores' NX-API command, detailing core information such as instance, module ID, PID, process name, and system time.
```json
{
"TABLE_cores": {
"ROW_cores": {
"instance": 1,
"module_id": 4,
"pid": "5233",
"process_name": "vni",
"sys_time": "2020-06-23 06:22:56"
}
}
}
```
--------------------------------
### Sample JSON Output for 'show version'
Source: https://developer.cisco.com/cisco-mds-9000-series-nx-api-reference/latest/version
This is a sample JSON output for the 'show version' command executed via the NX-API on a Cisco MDS 9000 Series switch.
```json
{
"bios_cmpl_time": "09/25/2019",
"bios_ver_str": "0.16.0",
"bootflash_size": 3833856,
"chassis_id": "MDS 9148T 48X32G FC (1 RU) Chassis",
"cpu_name": "Intel(R) Xeon(R) CPU D-1530 @ 2.40GHz",
"header_str": "Cisco Nexus Operating System (NX-OS) Software\nTAC support: http://www.cisco.com/tac\nDocuments: http://www.cisco.com/en/US/products/ps9372/tsd_products_support_series_home.html\nCopyright (c) 2002-2020, Cisco Systems, Inc. All rights reserved.\nThe copyrights to certain works contained herein are owned by\nother third parties and are used and distributed under license.\nSome parts of this software are covered under the GNU Public\nLicense. A copy of the license is available at\nhttp://www.gnu.org/licenses/gpl.html.\n",
"host_name": "test-switch",
"isan_cmpl_time": " 7/11/2020 12:00:00",
"isan_file_name": "bootflash:///m9148-s6ek9-mz.8.4(2a).bin",
"isan_tmstmp": "06/17/2020 17:16:13",
"kern_uptm_days": 0,
"kern_uptm_hrs": 3,
"kern_uptm_mins": 26,
"kern_uptm_secs": 41,
"kick_cmpl_time": " 7/11/2020 12:00:00",
"kick_file_name": "bootflash:///m9148-s6ek9-kickstart-mz.8.4(2a).bin",
"kick_tmstmp": "06/17/2020 15:45:45",
"kickstart_ver_str": "8.4(2a)",
"loader_ver_str": "N/A",
"manufacturer": "Cisco Systems, Inc.",
"mem_type": "kB",
"memory": 5752572,
"module_id": "4/8/16/32 Gbps FC/Sup-4",
"proc_board_id": "JAE2151022Y",
"rr_ctime": "Wed Jun 26 17:49:03 2019",
"rr_reason": "Reset Requested by CLI command reload",
"rr_service": "",
"rr_sys_ver": "8.4(2a)",
"rr_usecs": 234389,
"sys_ver_str": "8.4(2a)"
}
```
--------------------------------
### Sample JSON Output for Diagnostic Results
Source: https://developer.cisco.com/cisco-mds-9000-series-nx-api-reference/latest/diagnostic
This is an example of the JSON output you can expect when running the diagnostic command. It details test results for each module, including test names, IDs, and pass/fail status.
```json
{
"TABLE_Module": {
"ROW_Module": [
{
"TABLE_Test": {
"ROW_Test": [
{
"test_id": 1,
"testname": "ASICRegisterCheck",
"testresult": "Pass"
},
{
"test_id": 2,
"testname": "PrimaryBootROM",
"testresult": "Pass"
},
{
"test_id": 3,
"testname": "SecondaryBootROM",
"testresult": "Pass"
},
{
"test_id": 4,
"testname": "EOBCPortLoopback",
"testresult": "Pass"
},
{
"test_id": 5,
"testname": "OBFL",
"testresult": "Pass"
},
{
"aborted_ports": "none",
"err_disabled_ports": "none",
"failed_ports": "none",
"incomplete_ports": "none",
"passed_ports": "none",
"test_id": 6,
"testname": "PortLoopback",
"untested_ports": "1-48"
},
{
"aborted_ports": "none",
"err_disabled_ports": "none",
"failed_ports": "none",
"incomplete_ports": "none",
"passed_ports": "1-48",
"test_id": 7,
"testname": "SnakeLoopback",
"untested_ports": "none"
},
{
"aborted_ports": "none",
"err_disabled_ports": "none",
"failed_ports": "none",
"incomplete_ports": "none",
"passed_ports": "1-48",
"test_id": 8,
"testname": "IntPortLoopback",
"untested_ports": "none"
},
{
"aborted_ports": "none",
"err_disabled_ports": "none",
"failed_ports": "none",
"incomplete_ports": "none",
"passed_ports": "1",
"test_id": 9,
"testname": "RewriteEngineLoopback",
"untested_ports": "2-48"
},
{
"aborted_ports": "none",
"err_disabled_ports": "none",
"failed_ports": "none",
"incomplete_ports": "none",
"passed_ports": "none",
"test_id": 10,
"testname": "ExtPortLoopback",
"untested_ports": "1-48"
},
{
"aborted_ports": "none",
"err_disabled_ports": "none",
"failed_ports": "none",
"incomplete_ports": "none",
"passed_ports": "1-48",
"test_id": 11,
"testname": "BootupPortLoopback",
"untested_ports": "none"
}
]
},
"curr_diag_level": "complete",
"module_id": 2,
```
--------------------------------
### Sample JSON Output for 'show fcdomain pending'
Source: https://developer.cisco.com/cisco-mds-9000-series-nx-api-reference/latest/fcdomain
This is a sample JSON output for the 'show fcdomain pending' command, detailing VSAN configurations for domain IDs.
```json
{
"TABLE_fcdomain_pending": {
"ROW_fcdomain_pending": [
{
"assigned_or_reserved_domain_id": "230-239",
"user_config_allowed_domain_id": "1-229",
"vsan": 1
},
{
"assigned_or_reserved_domain_id": "230-239",
"user_config_allowed_domain_id": "1-229",
"vsan": 2
}
]
}
}
```
--------------------------------
### CLI Output for Module Uptime
Source: https://developer.cisco.com/cisco-mds-9000-series-nx-api-reference/latest/module
This is the direct CLI output for the 'show module uptime' command on a Cisco MDS 9000 Series Switch, displaying module start times and uptime durations.
```text
switch# show module uptime
------ Module 2 -----
Module Start Time: Mon Jun 22 14:50:41 2020
Up Time: 0 days, 7 hours, 19 minutes, 38 seconds
------ Module 3 -----
Module Start Time: Mon Jun 22 15:01:33 2020
Up Time: 0 days, 7 hours, 8 minutes, 46 seconds
------ Module 4 -----
Module Start Time: Mon Jun 22 14:48:40 2020
Up Time: 0 days, 7 hours, 21 minutes, 39 seconds
------ Xbar 1 -----
Xbar Start Time: Mon Jun 22 14:48:59 2020Up Time: 0 days, 7 hours, 21 minutes, 20 seconds
------ Xbar 3 -----
Xbar Start Time: Mon Jun 22 14:49:03 2020Up Time: 0 days, 7 hours, 21 minutes, 16 seconds
------ Xbar 5 -----
```
--------------------------------
### Show Active Zoneset Configuration
Source: https://developer.cisco.com/cisco-mds-9000-series-nx-api-reference/latest/zoning
Displays the active zoneset configuration, including zone names, VSAN IDs, and member WWNs or FCIDs. Use this command to verify the current zoning setup.
```nx-api
show zoneset active
```
--------------------------------
### Sample JSON Output for Show Topology
Source: https://developer.cisco.com/cisco-mds-9000-series-nx-api-reference/latest/topology
This is a sample JSON output representing the topology information obtained from the 'show topology' command.
```json
{
"TABLE_topology_vsan": {
"ROW_topology_vsan": [
{
"TABLE_topology": {
"ROW_topology": {
"interface": "port-channel5",
"peer_domain": "0xaa(170)",
"peer_interface": "port-channel5",
"peer_ip_address": "10.197.155.244",
"peer_switch_name": "cisco-mds"
}
},
"id": 1
},
{
"TABLE_topology": {
"ROW_topology": {
"interface": "port-channel5",
"peer_domain": "0xe7(231)",
"peer_interface": "port-channel5",
"peer_ip_address": "10.197.155.244",
"peer_switch_name": "cisco-mds"
}
},
"id": 3
},
{
"TABLE_topology": {
"ROW_topology": {
"interface": "port-channel5",
"peer_domain": "0xda(218)",
"peer_interface": "port-channel5",
"peer_ip_address": "10.197.155.244",
"peer_switch_name": "cisco-mds"
}
},
"id": 4
},
{
"TABLE_topology": {
"ROW_topology": {
"interface": "port-channel5",
"peer_domain": "0xab(171)",
"peer_interface": "port-channel5",
"peer_ip_address": "10.197.155.244",
"peer_switch_name": "cisco-mds"
}
},
"id": 11
}
]
}
}
```
--------------------------------
### Sample XML Output for show zoneset pending brief
Source: https://developer.cisco.com/cisco-mds-9000-series-nx-api-reference/latest/zoning
This is a sample XML output for the 'show zoneset name pending brief vsan ' command.
```xml
zoneset1
1
zone2
zone3
```
--------------------------------
### Python Script to Get VSAN Membership
Source: https://developer.cisco.com/cisco-mds-9000-series-nx-api-reference/latest/vsan
Use this Python script to query the Cisco MDS switch for VSAN membership information. Ensure you replace placeholder values for IP address, port, username, and password.
```python
import requests
import json
"""
Modify these please
"""
url='http://:/ins'
switchuser=''
switchpassword=''
myheaders={'content-type':'application/json'}
payload={
"ins_api":{
"version": "1.0",
"type": "cli_show",
"chunk": "0",
"sid": "1",
"input": "show vsan membership",
"output_format": "json"
}
}
response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)
json_output = json.loads(output)["ins_api"]["outputs"]["output"]["body"]
print(json.dumps(json_output, indent=4, sort_keys=True))
```