show vsan

show vsan
import requests
import json

"""
Modify these please
"""
url='http://<ip_address>:<port_number>/ins'
switchuser='<user_id>'
switchpassword='<password>'

myheaders={'content-type':'application/json'}
payload={
"ins_api":{
  "version": "1.0",
  "type": "cli_show",
  "chunk": "0",
  "sid": "1",
  "input": "show vsan",
  "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))
{
    "TABLE_vsan": {
        "ROW_vsan": [
            {
                "interop_mode": "default",
                "load_balancing": "src-id/dst-id/oxid",
                "name": "VSAN0001",
                "operational_state": "up",
                "state": "active",
                "vsan": 1
            },
            {
                "evfp_control_vsan_name": "evfp_isolated_vsan",
                "vsan": 4079
            },
            {
                "inactive_vsan_name": "isolated_vsan",
                "vsan": 4094
            }
        ]
    }
}
       <TABLE_vsan>
        <ROW_vsan>
         <vsan>1</vsan>
         <name>VSAN0001</name>
         <state>active</state>
         <interop_mode>default</interop_mode>
         <load_balancing>src-id/dst-id/oxid</load_balancing>
         <operational_state>up</operational_state>
        </ROW_vsan>
        <ROW_vsan>
         <vsan>4079</vsan>
         <evfp_control_vsan_name>evfp_isolated_vsan</evfp_control_vsan_name>
        </ROW_vsan>
        <ROW_vsan>
         <vsan>4094</vsan>
         <inactive_vsan_name>isolated_vsan</inactive_vsan_name>
        </ROW_vsan>
       </TABLE_vsan>

The show vsan command displays information about all the configured VSANs. For command descriptions, see the Cisco MDS 9000 Series Switches Command References.

Note: This sample output is generated for Cisco MDS 9000 Series NX-OS Release 8.4(2a) or later.

CLI Output
switch# show vsan

vsan 1 information
name:VSAN0001 state:active
interoperability mode:default
loadbalancing:src-id/dst-id/oxid
operational state:up

vsan 4079:evfp_isolated_vsan

vsan 4094:isolated_vsan
ParameterDescriptionTypeSample Values
stateVSAN stateString['active']
interop_modeInteroperability modeString['default']
operational_stateVSAN operational stateString['up', 'down']
load_balancingLoad balancing methodString['src-id/dst-id/oxid']
vsanVSAN IDInteger['1-4094']
nameVSAN nameString
inactive_vsan_nameIsolated VSAN nameString
evfp_control_vsan_nameEVFP Isolated VSAN nameString

show vsan <*vsan_id*>

show vsan <vsan_id>
import requests
import json

"""
Modify these please
"""
url='http://<ip_address>:<port_number>/ins'
switchuser='<user_id>'
switchpassword='<password>'

myheaders={'content-type':'application/json'}
payload={
"ins_api":{
  "version": "1.0",
  "type": "cli_show",
  "chunk": "0",
  "sid": "1",
  "input": "show vsan <vsan_id>",
  "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))
{
    "TABLE_vsan": {
        "ROW_vsan": {
            "interop_mode": "default",
            "load_balancing": "src-id/dst-id/oxid",
            "name": "VSAN0001",
            "operational_state": "up",
            "state": "active",
            "vsan": 1
        }
    }
}
       <TABLE_vsan>
        <ROW_vsan>
         <vsan>1</vsan>
         <name>VSAN0001</name>
         <state>active</state>
         <interop_mode>default</interop_mode>
         <load_balancing>src-id/dst-id/oxid</load_balancing>
         <operational_state>up</operational_state>
        </ROW_vsan>
       </TABLE_vsan>

The show vsan <*vsan_id*> command displays information about a specific configured VSAN. For command descriptions, see the Cisco MDS 9000 Series Switches Command References.

Note: This sample output is generated for Cisco MDS 9000 Series NX-OS Release 8.4(2a) or later.

CLI Output
switch# show vsan 1

vsan 1 information
name:VSAN0001 state:active
interoperability mode:default
loadbalancing:src-id/dst-id/oxid
operational state:up
ParameterDescriptionTypeSample Values
operational_stateVSAN operational stateString['up', 'down']
load_balancingLoad balancing methodString['src-id/dst-id/oxid']
interop_modeInteroperability modeString['default']
stateVSAN StateString['active']
vsanVSAN IDInteger['1-4094']
nameVSAN nameString
evfp_control_vsan_nameEVFP isolated VSAN nameString
inactive_vsan_nameIsolated VSAN nameString

show vsan <*vsan_id*> membership

show vsan <vsan_id> membership
import requests
import json

"""
Modify these please
"""
url='http://<ip_address>:<port_number>/ins'
switchuser='<user_id>'
switchpassword='<password>'

myheaders={'content-type':'application/json'}
payload={
"ins_api":{
  "version": "1.0",
  "type": "cli_show",
  "chunk": "0",
  "sid": "1",
  "input": "show vsan <vsan_id> 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))
{
    "TABLE_vsan_membership": {
        "ROW_vsan_membership": {
            "interfaces": [
                "fc1/1",
                "fc1/2",
                "fc1/3",
                "fc1/4",
                "fc1/5",
                "fc1/6",
                "fc1/7",
                "fc1/8",
                "fc1/9",
                "fc1/10",
                "fc1/11",
                "fc1/12",
                "fc1/13",
                "fc1/14",
                "fc1/15",
                "fc1/16",
                "fc1/17",
                "fc1/18",
                "fc1/19",
                "fc1/20",
                "fc1/21",
                "fc1/22",
                "fc1/23",
                "fc1/24",
                "fc1/25",
                "fc1/26",
                "fc1/28",
                "fc1/29",
                "fc1/30",
                "fc1/31",
                "fc1/32",
                "fc1/33",
                "fc1/34",
                "fc1/35",
                "fc1/36",
                "fc1/37",
                "fc1/38",
                "fc1/39",
                "fc1/40",
                "fc1/41",
                "fc1/42",
                "fc1/44",
                "fc1/45",
                "fc1/46",
                "fc1/47",
                "fc1/48",
                "port-channel15"
            ],
            "vsan": 1
        }
    }
}
        <TABLE_vsan_membership>
         <ROW_vsan_membership>
          <vsan>1</vsan>
          <interfaces>fc1/1</interfaces>
          <interfaces>fc1/2</interfaces>
          <interfaces>fc1/3</interfaces>
          <interfaces>fc1/4</interfaces>
          <interfaces>fc1/5</interfaces>
          <interfaces>fc1/6</interfaces>
          <interfaces>fc1/7</interfaces>
          <interfaces>fc1/8</interfaces>
          <interfaces>fc1/9</interfaces>
          <interfaces>fc1/10</interfaces>
          <interfaces>fc1/11</interfaces>
          <interfaces>fc1/12</interfaces>
          <interfaces>fc1/13</interfaces>
          <interfaces>fc1/14</interfaces>
          <interfaces>fc1/15</interfaces>
          <interfaces>fc1/16</interfaces>
          <interfaces>fc1/17</interfaces>
          <interfaces>fc1/18</interfaces>
          <interfaces>fc1/19</interfaces>
          <interfaces>fc1/20</interfaces>
          <interfaces>fc1/21</interfaces>
          <interfaces>fc1/22</interfaces>
          <interfaces>fc1/23</interfaces>
          <interfaces>fc1/24</interfaces>
          <interfaces>fc1/25</interfaces>
          <interfaces>fc1/26</interfaces>
          <interfaces>fc1/28</interfaces>
          <interfaces>fc1/29</interfaces>
          <interfaces>fc1/30</interfaces>
          <interfaces>fc1/31</interfaces>
          <interfaces>fc1/32</interfaces>
          <interfaces>fc1/33</interfaces>
          <interfaces>fc1/34</interfaces>
          <interfaces>fc1/35</interfaces>
          <interfaces>fc1/36</interfaces>
          <interfaces>fc1/37</interfaces>
          <interfaces>fc1/38</interfaces>
          <interfaces>fc1/39</interfaces>
          <interfaces>fc1/40</interfaces>
          <interfaces>fc1/41</interfaces>
          <interfaces>fc1/42</interfaces>
          <interfaces>fc1/44</interfaces>
          <interfaces>fc1/45</interfaces>
          <interfaces>fc1/46</interfaces>
          <interfaces>fc1/47</interfaces>
          <interfaces>fc1/48</interfaces>
          <interfaces>port-channel15</interfaces>
         </ROW_vsan_membership>
        </TABLE_vsan_membership>

The show vsan <*vsan_id*> membership command displays membership information for a specific VSAN. For command descriptions, see the Cisco MDS 9000 Series Switches Command References.

Note: This sample output is generated for Cisco MDS 9000 Series NX-OS Release 8.4(2a) or later.

CLI Output
switch# show vsan 1 membership

vsan 1 interfaces:
fc1/1 fc1/2 fc1/3 fc1/4
fc1/5 fc1/6 fc1/7 fc1/8
fc1/9 fc1/10 fc1/11 fc1/12
fc1/13 fc1/14 fc1/15 fc1/16
fc1/17 fc1/18 fc1/19 fc1/20
fc1/21 fc1/22 fc1/23 fc1/24
fc1/25 fc1/26 fc1/28 fc1/29
fc1/30 fc1/31 fc1/32 fc1/33
fc1/34 fc1/35 fc1/36 fc1/37
fc1/38 fc1/39 fc1/40 fc1/41
fc1/42 fc1/44 fc1/45 fc1/46
fc1/47 fc1/48 port-channel15
ParameterDescriptionTypeSample Values
interfacesInterface nameString List['fc', 'port-channel', 'vfc']
vsanVSAN IDInteger['1-4094']
vsan_inactive_nameIsolated VSAN nameString
vsan_evfp_control_nameVSAN EVFP control nameString

show vsan membership

show vsan membership
import requests
import json

"""
Modify these please
"""
url='http://<ip_address>:<port_number>/ins'
switchuser='<user_id>'
switchpassword='<password>'

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))
{
    "TABLE_vsan_membership": {
        "ROW_vsan_membership": [
            {
                "interfaces": [
                    "fc1/1",
                    "fc1/2",
                    "fc1/3",
                    "fc1/4",
                    "fc1/5",
                    "fc1/6",
                    "fc1/7",
                    "fc1/8",
                    "fc1/9",
                    "fc1/10",
                    "fc1/11",
                    "fc1/12",
                    "fc1/13",
                    "fc1/14",
                    "fc1/15",
                    "fc1/16",
                    "fc1/17",
                    "fc1/18",
                    "fc1/19",
                    "fc1/20",
                    "fc1/21",
                    "fc1/22",
                    "fc1/23",
                    "fc1/24",
                    "fc1/25",
                    "fc1/26",
                    "fc1/28",
                    "fc1/29",
                    "fc1/30",
                    "fc1/31",
                    "fc1/32",
                    "fc1/33",
                    "fc1/34",
                    "fc1/35",
                    "fc1/36",
                    "fc1/37",
                    "fc1/38",
                    "fc1/39",
                    "fc1/40",
                    "fc1/41",
                    "fc1/42",
                    "fc1/44",
                    "fc1/45",
                    "fc1/46",
                    "fc1/47",
                    "fc1/48",
                    "port-channel15"
                ],
                "vsan": 1
            },
            {
                "vsan": 4079,
                "vsan_evfp_control_name": "evfp_isolated_vsan"
            },
            {
                "interfaces": [
                    "fc1/27",
                    "fc1/43"
                ],
                "vsan": 4094,
                "vsan_inactive_name": "isolated_vsan"
            }
        ]
    }
}
        <TABLE_vsan_membership>
         <ROW_vsan_membership>
          <vsan>1</vsan>
          <interfaces>fc1/1</interfaces>
          <interfaces>fc1/2</interfaces>
          <interfaces>fc1/3</interfaces>
          <interfaces>fc1/4</interfaces>
          <interfaces>fc1/5</interfaces>
          <interfaces>fc1/6</interfaces>
          <interfaces>fc1/7</interfaces>
          <interfaces>fc1/8</interfaces>
          <interfaces>fc1/9</interfaces>
          <interfaces>fc1/10</interfaces>
          <interfaces>fc1/11</interfaces>
          <interfaces>fc1/12</interfaces>
          <interfaces>fc1/13</interfaces>
          <interfaces>fc1/14</interfaces>
          <interfaces>fc1/15</interfaces>
          <interfaces>fc1/16</interfaces>
          <interfaces>fc1/17</interfaces>
          <interfaces>fc1/18</interfaces>
          <interfaces>fc1/19</interfaces>
          <interfaces>fc1/20</interfaces>
          <interfaces>fc1/21</interfaces>
          <interfaces>fc1/22</interfaces>
          <interfaces>fc1/23</interfaces>
          <interfaces>fc1/24</interfaces>
          <interfaces>fc1/25</interfaces>
          <interfaces>fc1/26</interfaces>
          <interfaces>fc1/28</interfaces>
          <interfaces>fc1/29</interfaces>
          <interfaces>fc1/30</interfaces>
          <interfaces>fc1/31</interfaces>
          <interfaces>fc1/32</interfaces>
          <interfaces>fc1/33</interfaces>
          <interfaces>fc1/34</interfaces>
          <interfaces>fc1/35</interfaces>
          <interfaces>fc1/36</interfaces>
          <interfaces>fc1/37</interfaces>
          <interfaces>fc1/38</interfaces>
          <interfaces>fc1/39</interfaces>
          <interfaces>fc1/40</interfaces>
          <interfaces>fc1/41</interfaces>
          <interfaces>fc1/42</interfaces>
          <interfaces>fc1/44</interfaces>
          <interfaces>fc1/45</interfaces>
          <interfaces>fc1/46</interfaces>
          <interfaces>fc1/47</interfaces>
          <interfaces>fc1/48</interfaces>
          <interfaces>port-channel15</interfaces>
         </ROW_vsan_membership>
         <ROW_vsan_membership>
          <vsan>4079</vsan>
          <vsan_evfp_control_name>evfp_isolated_vsan</vsan_evfp_control_name>
         </ROW_vsan_membership>
         <ROW_vsan_membership>
          <vsan>4094</vsan>
          <vsan_inactive_name>isolated_vsan</vsan_inactive_name>
          <interfaces>fc1/27</interfaces>
          <interfaces>fc1/43</interfaces>
         </ROW_vsan_membership>
        </TABLE_vsan_membership>

The show vsan membership command displays membership information for all the configured VSANs. For command descriptions, see the Cisco MDS 9000 Series Switches Command References.

Note: This sample output is generated for Cisco MDS 9000 Series NX-OS Release 8.4(2a) or later.

CLI Output
switch# show vsan membership

vsan 1 interfaces:
fc1/1 fc1/2 fc1/3 fc1/4
fc1/5 fc1/6 fc1/7 fc1/8
fc1/9 fc1/10 fc1/11 fc1/12
fc1/13 fc1/14 fc1/15 fc1/16
fc1/17 fc1/18 fc1/19 fc1/20
fc1/21 fc1/22 fc1/23 fc1/24
fc1/25 fc1/26 fc1/28 fc1/29
fc1/30 fc1/31 fc1/32 fc1/33
fc1/34 fc1/35 fc1/36 fc1/37
fc1/38 fc1/39 fc1/40 fc1/41
fc1/42 fc1/44 fc1/45 fc1/46
fc1/47 fc1/48 port-channel15

vsan 4079(evfp_isolated_vsan) interfaces:


vsan 4094(isolated_vsan) interfaces:
fc1/27 fc1/43
ParameterDescriptionTypeSample Values
interfacesInterface nameString List['fc', 'port-channel', 'vfc']
vsanVSAN IDInteger['1-4094']
vsan_inactive_nameIsolated VSAN nameString
vsan_evfp_control_nameVSAN EVFP control nameString

show vsan usage

show vsan usage
import requests
import json

"""
Modify these please
"""
url='http://<ip_address>:<port_number>/ins'
switchuser='<user_id>'
switchpassword='<password>'

myheaders={'content-type':'application/json'}
payload={
"ins_api":{
  "version": "1.0",
  "type": "cli_show",
  "chunk": "0",
  "sid": "1",
  "input": "show vsan usage",
  "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))
{
    "configured_range_of_vsans": "1",
    "no_of_vsan_configured": 1,
    "vsans_available_to_configure": "2-4078,4080-4093"
}
       <no_of_vsan_configured>1</no_of_vsan_configured>
       <configured_range_of_vsans>1</configured_range_of_vsans>
       <vsans_available_to_configure>2-4078,4080-4093</vsans_available_to_configure>

The show vsan usage command displays VSAN usage in the system. For command descriptions, see the Cisco MDS 9000 Series Switches Command References.

Note: This sample output is generated for Cisco MDS 9000 Series NX-OS Release 8.4(2a) or later.

CLI Output
switch# show vsan usage

1 vsan configured
configured vsans:1
vsans available for configuration:2-4078,4080-4093
ParameterDescriptionType
configured_range_of_vsansList of configured VSANsString
no_of_vsan_configuredNumber of configured VSANsInteger
vsans_available_to_configureAvailable VSANs for configurationString