�
�Udac @` s� d d l m Z m Z m Z e Z i d d 6d g d 6d d 6Z d Z d Z d
Z d d l
m Z d d l m
Z
m Z d
� Z e d k r� e � n d S( i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont previewt statust certifiedt supported_bysZ
---
module: ucs_san_connectivity
short_description: Configures SAN Connectivity Policies on Cisco UCS Manager
description:
- Configures SAN Connectivity Policies on Cisco UCS Manager.
- Examples can be used with the UCS Platform Emulator U(https://communities.cisco.com/ucspe).
extends_documentation_fragment: ucs
options:
state:
description:
- If C(present), will verify SAN Connectivity Policies are present and will create if needed.
- If C(absent), will verify SAN Connectivity Policies are absent and will delete if needed.
choices: [present, absent]
default: present
name:
description:
- The name of the SAN Connectivity Policy.
- This name can be between 1 and 16 alphanumeric characters.
- "You cannot use spaces or any special characters other than - (hyphen), \"_\" (underscore), : (colon), and . (period)."
- You cannot change this name after the policy is created.
required: yes
description:
description:
- A description of the policy.
- Cisco recommends including information about where and when to use the policy.
- Enter up to 256 characters.
- "You can use any characters or spaces except the following:"
- "` (accent mark), \ (backslash), ^ (carat), \" (double quote), = (equal sign), > (greater than), < (less than), or ' (single quote)."
aliases: [ descr ]
wwnn_pool:
description:
- Name of the WWNN pool to use for WWNN assignment.
default: default
vhba_list:
description:
- List of vHBAs used by the SAN Connectivity Policy.
- vHBAs used by the SAN Connectivity Policy must be created from a vHBA template.
- "Each list element has the following suboptions:"
- "= name"
- " The name of the virtual HBA (required)."
- "= vhba_template"
- " The name of the virtual HBA template (required)."
- "- adapter_policy"
- " The name of the Fibre Channel adapter policy."
- " A user defined policy can be used, or one of the system defined policies (default, Linux, Solaris, VMware, Windows, WindowsBoot)"
- " [Default: default]"
- "- order"
- " String specifying the vHBA assignment order (e.g., '1', '2')."
- " [Default: unspecified]"
org_dn:
description:
- Org dn (distinguished name)
default: org-root
requirements:
- ucsmsdk
author:
- David Soper (@dsoper2)
- CiscoUcs (@CiscoUcs)
version_added: '2.5'
s'
- name: Configure SAN Connectivity Policy
ucs_san_connectivity:
hostname: 172.16.143.150
username: admin
password: password
name: Cntr-FC-Boot
wwnn_pool: WWNN-Pool
vhba_list:
- name: Fabric-A
vhba_template: vHBA-Template-A
adapter_policy: Linux
- name: Fabric-B
vhba_template: vHBA-Template-B
adapter_policy: Linux
- name: Remove SAN Connectivity Policy
ucs_san_connectivity:
hostname: 172.16.143.150
username: admin
password: password
name: Cntr-FC-Boot
state: absent
s
#
( t
AnsibleModule( t UCSModulet ucs_argument_specc C` s� t } | j d t d d d d � d t d d � d t d d � d t d d d d � d t d d
� d t d d d d d
d d g � d t d d
� � t | d t d d d g g d d d g g �} t | � } t } d d l m } d d l m
} d d l m } d d l
m } t } yh| j d r?| j d } n | j g } x8| D]0}
t } t } |
j d � s�d |
d <n |
j d � s�d |
d <n |
j d � r�xM |
d D]>