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_vsans.pyc

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

---
module: ucs_vsans
short_description: Configures VSANs on Cisco UCS Manager
description:
- Configures VSANs 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 VSANs are present and will create if needed.
    - If C(absent), will verify VSANs are absent and will delete if needed.
    choices: [present, absent]
    default: present
  name:
    description:
    - The name assigned to the VSAN.
    - This name can be between 1 and 32 alphanumeric characters.
    - "You cannot use spaces or any special characters other than - (hyphen), \"_\" (underscore), : (colon), and . (period)."
    - You cannot change this name after the VSAN is created.
    required: yes
  vsan_id:
    description:
    - The unique identifier assigned to the VSAN.
    - The ID can be a string between '1' and '4078', or between '4080' and '4093'. '4079' is a reserved VSAN ID.
    - In addition, if you plan to use FC end-host mode, the range between '3840' to '4079' is also a reserved VSAN ID range.
    - Optional if state is absent.
    required: yes
  vlan_id:
    description:
    - The unique string identifier assigned to the VLAN used for Fibre Channel connections.
    - Note that Cisco UCS Manager uses VLAN '4048'.  See the UCS Manager configuration guide if you want to assign '4048' to a VLAN.
    - Optional if state is absent.
    required: yes
  fc_zoning:
    description:
    - Fibre Channel zoning configuration for the Cisco UCS domain.
    - "Fibre Channel zoning can be set to one of the following values:"
    - "disabled — The upstream switch handles Fibre Channel zoning, or Fibre Channel zoning is not implemented for the Cisco UCS domain."
    - "enabled — Cisco UCS Manager configures and controls Fibre Channel zoning for the Cisco UCS domain."
    - If you enable Fibre Channel zoning, do not configure the upstream switch with any VSANs that are being used for Fibre Channel zoning.
    choices: [disabled, enabled]
    default: disabled
  fabric:
    description:
    - "The fabric configuration of the VSAN.  This can be one of the following:"
    - "common - The VSAN maps to the same VSAN ID in all available fabrics."
    - "A - The VSAN maps to the a VSAN ID that exists only in fabric A."
    - "B - The VSAN maps to the a VSAN ID that exists only in fabric B."
    choices: [common, A, B]
    default: common
requirements:
- ucsmsdk
author:
- David Soper (@dsoper2)
- CiscoUcs (@CiscoUcs)
version_added: '2.5'
s!
- name: Configure VSAN
  ucs_vsans:
    hostname: 172.16.143.150
    username: admin
    password: password
    name: vsan110
    vsan_id: '110'
    vlan_id: '110'

- name: Remove VSAN
  ucs_vsans:
    hostname: 172.16.143.150
    username: admin
    password: password
    name: vsan110
s
#
(t
AnsibleModule(t	UCSModuletucs_argument_speccC`sgt}|jdtdd�dtdd�dtdd�dtddddd	dd
g�dtddddd	dd
dg�dtddddd	ddg�dtdd��t|dtdddggdddgg�}t|�}t}ddlm}t}y�|j	dr*|j	d}n|j	g}x�|D]�}t}t}	|j
d�skd|d<n|j
d�s�d|d<nd}
|ddkr�|
d|d7}
n|
d|d}|jj|�}|r�t}n|j	ddkr3|r�|j
s'|jj|�|jj�nt}q�q=|r�td|d�}
|d|
d<|d|
d<|j|
�r�t}	q�n|	s=|j
s�|d|
d|dd|dd|dd|d�}|jj|t�|jj�nt}q=q=WWn0tk
r,}t}d t|�|jd!<nX||jd"<|rS|j|j�n|j|j�dS(#Ntnamettypetstrtvsan_idtvlan_idt	fc_zoningtdefaulttdisabledtchoicestenabledtfabrictcommontAtBtstatetpresenttabsentt	vsan_listtlisttsupports_check_modetrequired_one_oftmutually_exclusivei(t
FabricVsans
fabric/sant/s/net-tidt	fcoe_vlantzoning_statetparent_mo_or_dnssetup error: %s tmsgtchanged(R
tupdatetdictRtTrueR	tFalset ucsmsdk.mometa.fabric.FabricVsanR!tparamstgettlogin_handletquery_dnt
check_modet	remove_motcommittcheck_prop_matchtadd_mot	ExceptionR
tresultt	fail_jsont	exit_json(t
argument_spectmoduletucsterrR!R(Rtvsant	mo_existstprops_matchtdn_basetdntmotkwargste((sS/usr/lib/python2.7/site-packages/ansible/modules/remote_management/ucs/ucs_vsans.pytmaincs�	!$!



			




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


<	f

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