Skip to content

Latest commit

 

History

History
537 lines (500 loc) · 21.8 KB

cisco.nxos.nxos_zone_zoneset_module.rst

File metadata and controls

537 lines (500 loc) · 21.8 KB

cisco.nxos.nxos_zone_zoneset

Configuration of zone/zoneset for Cisco NXOS MDS Switches.

Version added: 1.0.0

  • Configuration of zone/zoneset for Cisco MDS NXOS.
Parameter Choices/Defaults Comments
zone_zoneset_details
list / elements=dictionary
List of zone/zoneset details to be added or removed
default_zone
string
    Choices:
  • permit
  • deny
default zone behaviour for the vsan
mode
string
    Choices:
  • enhanced
  • basic
mode of the zone for the vsan
smart_zoning
boolean
    Choices:
  • no
  • yes
Removes the vsan if True
vsan
integer / required
vsan id
zone
list / elements=dictionary
List of zone options for that vsan
members
list / elements=dictionary
Members of the zone that needs to be removed or added
devtype
string
    Choices:
  • initiator
  • target
  • both
devtype of the zone member used along with Smart zoning config
pwwn
string / required
pwwn member of the zone, use alias 'device_alias' as option for device_alias member

aliases: device_alias
remove
boolean
    Choices:
  • no ←
  • yes
Removes member from the zone if True
name
string / required
name of the zone
remove
boolean
    Choices:
  • no ←
  • yes
Deletes the zone if True
zoneset
list / elements=dictionary
List of zoneset options for the vsan
action
string
    Choices:
  • activate
  • deactivate
activates/de-activates the zoneset
members
list / elements=dictionary
Members of the zoneset that needs to be removed or added
name
string / required
name of the zone that needs to be added to the zoneset or removed from the zoneset
remove
boolean
    Choices:
  • no ←
  • yes
Removes zone member from the zoneset
name
string / required
name of the zoneset
remove
boolean
    Choices:
  • no ←
  • yes
Removes zoneset if True

Note

  • Tested against Cisco MDS NX-OS 8.4(1)
- name: Test that zone/zoneset module works
  cisco.nxos.nxos_zone_zoneset:
    zone_zoneset_details:
      - mode: enhanced
        vsan: 22
        zone:
          - members:
              - pwwn: 31314874576271
              - device_alias: test123
              - pwwn: '61:61:62:62:12:12:12:12'
                remove: true
            name: zoneA
          - members:
              - pwwn: 28515514576271
              - pwwn: '62:62:62:62:21:21:21:21'
            name: zoneB
          - name: zoneC
            remove: true
        zoneset:
          - action: activate
            members:
              - name: zoneA
              - name: zoneB
              - name: zoneC
                remove: true
            name: zsetname1
          - action: deactivate
            name: zsetTestExtra
            remove: true
      - mode: basic
        smart_zoning: true
        vsan: 21
        zone:
          - members:
              - devtype: both
                pwwn: 31314874576271
              - pwwn: '62:62:62:62:12:12:12:12'
              - devtype: both
                pwwn: '92:62:62:62:12:12:1a:1a'
                remove: true
            name: zone21A
          - members:
              - pwwn: 28515514576271
              - pwwn: '62:62:62:62:21:21:21:21'
            name: zone21B
        zoneset:
          - action: activate
            members:
              - name: zone21A
              - name: zone21B
            name: zsetname212

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
commands
list
always
commands sent to the device

Sample:
['terminal dont-ask', 'zone name zoneA vsan 923', 'member pwwn 11:11:11:11:11:11:11:11', 'no member device-alias test123', 'zone commit vsan 923', 'no terminal dont-ask']
messages
list
always
debug messages

Sample:
['zone mode is already enhanced ,no change in zone mode configuration for vsan 922', "zone member '11:11:11:11:11:11:11:11' is already present in zone 'zoneA' in vsan 922 hence nothing to add", "zone member 'test123' is already present in zone 'zoneA' in vsan 922 hence nothing to add", "zone member '61:61:62:62:12:12:12:12' is not present in zone 'zoneA' in vsan 922 hence nothing to remove", "zone member '10:11:11:11:11:11:11:11' is already present in zone 'zoneB' in vsan 922 hence nothing to add", "zone member '62:62:62:62:21:21:21:21' is already present in zone 'zoneB' in vsan 922 hence nothing to add", "zone 'zoneC' is not present in vsan 922 , so nothing to remove"]


Authors