Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/modules/remote_management/ucs/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/modules/remote_management/ucs/ucs_vhba_template.pyo

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
mZddlm
Z
mZd
�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	certifiedtsupported_bysu

---
module: ucs_vhba_template
short_description: Configures vHBA templates on Cisco UCS Manager
description:
- Configures vHBA templates 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 vHBA templates are present and will create if needed.
    - If C(absent), will verify vHBA templates are absent and will delete if needed.
    choices: [present, absent]
    default: present
  name:
    description:
    - The name of the virtual HBA template.
    - 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 template is created.
    required: yes
  description:
    description:
    - A user-defined description of the template.
    - 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 ]
  fabric:
    description:
    - The Fabric ID field.
    - The name of the fabric interconnect that vHBAs created with this template are associated with.
    choices: [A, B]
    default: A
  redundancy_type:
    description:
    - The Redundancy Type used for template pairing from the Primary or Secondary redundancy template.
    - "primary — Creates configurations that can be shared with the Secondary template."
    - Any other shared changes on the Primary template are automatically synchronized to the Secondary template.
    - "secondary — All shared configurations are inherited from the Primary template."
    - "none - Legacy vHBA template behavior. Select this option if you do not want to use redundancy."
    choices: [none, primary, secondary]
    default: none
  vsan:
    description:
    - The VSAN to associate with vHBAs created from this template.
    default: default
  template_type:
    description:
    - The Template Type field.
    - "This can be one of the following:"
    - "initial-template — vHBAs created from this template are not updated if the template changes."
    - "updating-template - vHBAs created from this template are updated if the template changes."
    choices: [initial-template, updating-template]
    default: initial-template
  max_data:
    description:
    - The Max Data Field Size field.
    - The maximum size of the Fibre Channel frame payload bytes that the vHBA supports.
    - Enter an string between '256' and '2112'.
    default: '2048'
  wwpn_pool:
    description:
    - The WWPN pool that a vHBA created from this template uses to derive its WWPN address.
    default: default
  qos_policy:
    description:
    - The QoS policy that is associated with vHBAs created from this template.
  pin_group:
    description:
    - The SAN pin group that is associated with vHBAs created from this template.
  stats_policy:
    description:
    - The statistics collection policy that is associated with vHBAs created from this template.
    default: default
  org_dn:
    description:
    - Org dn (distinguished name)
    default: org-root
requirements:
- ucsmsdk
author:
- David Soper (@dsoper2)
- CiscoUcs (@CiscoUcs)
version_added: '2.5'
sg
- name: Configure vHBA template
  ucs_vhba_template:
    hostname: 172.16.143.150
    username: admin
    password: password
    name: vHBA-A
    fabric: A
    vsan: VSAN-A
    wwpn_pool: WWPN-Pool-A

- name: Remote vHBA template
  ucs_vhba_template:
    hostname: 172.16.143.150
    username: admin
    password: password
    name: vHBA-A
    state: absent
s
#
(t
AnsibleModule(t	UCSModuletucs_argument_specc"C`s�t}|jdtdddd�dtdd�dtdd�dtdddd	d
d	dg�dtdddd
d
d
ddg�dtdddd�dtddddd
ddg�dtdddd�dtdddd�dtdd�dtdd�dtdddd�dtddddd
ddg�dtdd��t|dtd ddggd!ddgg�}t|�}t}d"d#lm}d"d$l	m
}t}y�|jdr�|jd}n|jg}xm|D]e}t}	t}
|jd�sd%|d<n|jd�s0d	|d<n|jd�sLd
|d<n|jd�shd|d<n|jd�s�d|d<n|jd�s�d|d<n|jd�s�d|d<n|jd�s�d%|d<n|jd�s�d%|d<n|jd�sd|d<n|jdd&|d}|j
j|�}|r/t}	td|d�}
|d|
d'<|d|
d(<|d|
d)<|d|
d*<|d|
d+<|d|
d,<|d|
d-<|d|
d.<|j|
�r/|d/}|j
j|�}|r,td|d�}
|j|
�r)t}
q)q,q/n|jddkr}|	rK|jsq|j
j|�|j
j�nt}qKq�|
s�|jsB|d0|jdd|dd|dd'|dd(|dd)|dd*|dd+|dd,|dd-|dd.|d�}|d0|d|d�}|j
j|t�|j
j�nt}q�q�WWn0tk
r�}t}d1t|�|jd2<nX||jd3<|r�|j|j�n|j|j�dS(4Ntorg_dnttypetstrtdefaultsorg-roottnametdescrtfabrictAtchoicestBtredundancy_typetnonetprimaryt	secondarytvsant
template_typesinitial-templatesupdating-templatetmax_datat2048t	wwpn_poolt
qos_policyt	pin_grouptstats_policytstatetpresenttabsenttvhba_template_listtlisttsupports_check_modetrequired_one_oftmutually_exclusivei(tVnicSanConnTempl(tVnicFcIfts/san-conn-templ-t	switch_idtredundancy_pair_typet
templ_typetmax_data_field_sizetident_pool_nametqos_policy_nametpin_to_group_nametstats_policy_names/if-defaulttparent_mo_or_dnssetup error: %s tmsgtchanged(R
tupdatetdictRtTrueR	tFalset$ucsmsdk.mometa.vnic.VnicSanConnTemplR)tucsmsdk.mometa.vnic.VnicFcIfR*tparamstgettlogin_handletquery_dntcheck_prop_matcht
check_modet	remove_motcommittadd_mot	ExceptionR
tresultt	fail_jsont	exit_json(t
argument_spectmoduletucsterrR)R*R6R$t
vhba_templatet	mo_existstprops_matchtdntmotkwargstchild_dntmo_1te((s[/usr/lib/python2.7/site-packages/ansible/modules/remote_management/ucs/ucs_vhba_template.pytmain�s�	!$!!












		












t__main__N(t
__future__RRRRt
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtansible.module_utils.basicRt*ansible.module_utils.remote_management.ucsR	R
RWt__name__(((s[/usr/lib/python2.7/site-packages/ansible/modules/remote_management/ucs/ucs_vhba_template.pyt<module>s


X	�

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]