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

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

---
module: ucs_lan_connectivity
short_description: Configures LAN Connectivity Policies on Cisco UCS Manager
description:
- Configures LAN 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 LAN Connectivity Policies are present and will create if needed.
    - If C(absent), will verify LAN Connectivity Policies are absent and will delete if needed.
    choices: [present, absent]
    default: present
  name:
    description:
    - The name of the LAN 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 LAN Connectivity 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 ]
  vnic_list:
    description:
    - List of vNICs used by the LAN Connectivity Policy.
    - vNICs used by the LAN Connectivity Policy must be created from a vNIC template.
    suboptions:
      name:
        description:
        - The name of the vNIC.
        required: yes
      vnic_template:
        description:
        - The name of the vNIC template.
        required: yes
      adapter_policy:
        description:
        - The name of the Ethernet adapter policy.
        - A user defined policy can be used, or one of the system defined policies.
      order:
        description:
        - String specifying the vNIC assignment order (e.g., '1', '2').
        default: 'unspecified'
      state:
        description:
        - If C(present), will verify vnic is configured within policy.
          If C(absent), will verify vnic is absent from policy.
        choices: [ present, absent ]
        default: present
    version_added: '2.8'
  iscsi_vnic_list:
    description:
    - List of iSCSI vNICs used by the LAN Connectivity Policy.
    suboptions:
      name:
        description:
        - The name of the iSCSI vNIC.
        required: yes
      overlay_vnic:
        description:
        - The LAN vNIC associated with this iSCSI vNIC.
      iscsi_adapter_policy:
        description:
        - The iSCSI adapter policy associated with this iSCSI vNIC.
      mac_address:
        description:
        - The MAC address associated with this iSCSI vNIC.
        - If the MAC address is not set, Cisco UCS Manager uses a derived MAC address.
        default: derived
      vlan_name:
        description:
        - The VLAN used for the iSCSI vNIC.
        default: default
      state:
        description:
        - If C(present), will verify iscsi vnic is configured within policy.
          If C(absent), will verify iscsi vnic is absent from policy.
        choices: [ present, absent ]
        default: present
    version_added: '2.8'
  org_dn:
    description:
    - Org dn (distinguished name)
    default: org-root
requirements:
- ucsmsdk
author:
- David Soper (@dsoper2)
- CiscoUcs (@CiscoUcs)
version_added: '2.5'
sU
- name: Configure LAN Connectivity Policy
  ucs_lan_connectivity:
    hostname: 172.16.143.150
    username: admin
    password: password
    name: Cntr-FC-Boot
    vnic_list:
    - name: eno1
      vnic_template: Cntr-Template
      adapter_policy: Linux
    - name: eno2
      vnic_template: Container-NFS-A
      adapter_policy: Linux
    - name: eno3
      vnic_template: Container-NFS-B
      adapter_policy: Linux
    iscsi_vnic_list:
    - name: iSCSIa
      overlay_vnic: eno1
      iscsi_adapter_policy: default
      vlan_name: Container-MGMT-VLAN
    - name: iSCSIb
      overlay_vnic: eno3
      iscsi_adapter_policy: default
      vlan_name: Container-TNT-A-NFS

- name: Remove LAN Connectivity Policy
  ucs_lan_connectivity:
    hostname: 172.16.143.150
    username: admin
    password: password
    name: Cntr-FC-Boot
    state: absent
s
#
(t
AnsibleModule(t	UCSModuletucs_argument_specc
C`ssddlm}ddlm}ddlm}ddlm}|jsby�|d|j	dd|j	dd	|j	d
�}|j	j
d�r6x�|j	dD]�}|dd
kr�|d|d}	|jj|	�}
|
r/|jj
|
�q/q�|ddd|d|dd|dd|dd|d�}
q�Wn|j	j
d�rx�|j	dD]�}|dd
kr�|d|d}	|jj|	�}
|
r�|jj
|
�q�qV|d|d|dd|dd|dd|d�}
|d|
d|d�qVWn|jj|t�|jj�Wqbtk
r^}dt|�|jd<|j|j�qbXnt|jd<dS( Ni(tVnicLanConnPolicy(t	VnicEther(tVnicIScsiLCP(tVnicVlantparent_mo_or_dntorg_dntnametdescrtdescriptiont	vnic_listtstatetabsents/ether-taddrtderivedtadaptor_profile_nametadapter_policyt
nw_templ_namet
vnic_templatetordertiscsi_vnic_lists/iscsi-tiscsi_adapter_policyt	vnic_nametoverlay_vnictmac_addresst	vlan_namessetup error: %s tmsgtchanged(t%ucsmsdk.mometa.vnic.VnicLanConnPolicyRtucsmsdk.mometa.vnic.VnicEtherRt ucsmsdk.mometa.vnic.VnicIScsiLCPR
tucsmsdk.mometa.vnic.VnicVlanRt
check_modetparamstgettlogin_handletquery_dnt	remove_motadd_motTruetcommitt	Exceptiontstrtresultt	fail_json(
tucstmoduletdnRRR
Rtmotvnictchild_dntmo_1t
iscsi_vnicte((s^/usr/lib/python2.7/site-packages/ansible/modules/remote_management/ucs/ucs_lan_connectivity.pytconfigure_lan_connectivity�s\	








cC`s�t}|jjd�r�x�|jdD]�}|d|d}|jj|�}|r�|ddkrpt}Pq�td|d�}|d|d<|d	|d
<|j|�s�t}Pq�q&|ddkr&t}Pq&q&Wn|S(NRs/ether-RRRRRRRRtpresent(R1R+R,R-R.tFalsetdicttcheck_prop_match(R7R8R9tprops_matchR;R<R=tkwargs((s^/usr/lib/python2.7/site-packages/ansible/modules/remote_management/ucs/ucs_lan_connectivity.pytcheck_vnic_props�s&c	C`s1t}|jjd�r-x|jdD]}|d|d}|jj|�}|r|ddkrpt}Pq&td|d�}|d|d	<|d
|d<|j|�r|d}|jj|�}|r	td
|d
�}|j|�s�t}Pq�q	q&t}Pq&|ddkr&t}Pq&q&Wn|S(NRs/iscsi-RRRR R!RRR"Rs/vlanR#RA(R1R+R,R-R.RBRCRD(	R7R8R9RER>R<R=RFtmo_2((s^/usr/lib/python2.7/site-packages/ansible/modules/remote_management/ucs/ucs_lan_connectivity.pytcheck_iscsi_vnic_props�s4

cC`s_t}td|jd�}|j|�r[t|||�}|r[t|||�}q[n|S(NRR(RBRCR+RDRGRI(R7R8R:R9RERF((s^/usr/lib/python2.7/site-packages/ansible/modules/remote_management/ucs/ucs_lan_connectivity.pytcheck_lan_connecivity_propsscC`s�tdtdddt�dtdddt�dtdddd�d	tdddd
�dtddddd
ddg��}tdtdddt�dtdddd�dtdddd�dtdddd�dtdddd�dtddddd
ddg��}t}|jdtdddd�dtdddt�dtddddgdd�dtddddd|�dtddddd|�dtddddd
ddg��t|dt�}t|�}t|jd <t}|jdd!|jd}|j	j
|�}|r�|jddkrq|jsa|j	j|�|j	j
�nt|jd <q�t||||�}n|jddkr�|r�t|||�n|j|j�dS("NRttypeR4trequiredRRtdefaulttRtunspecifiedRRAtchoicesRR!RR"RR#Rsorg-rootRtaliasesRRtlisttelementsRCtoptionsRtsupports_check_modeR%s/lan-conn-pol-(RCR1R
tupdateRR	RBR5R+R-R.R*R/R2RJR@t	exit_json(R;R>t
argument_specR8R7RER9R:((s^/usr/lib/python2.7/site-packages/ansible/modules/remote_management/ucs/ucs_lan_connectivity.pytmain)sN$$	"	
	t__main__N(t
__future__RRRRKt
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtansible.module_utils.basicRt*ansible.module_utils.remote_management.ucsR	R
R@RGRIRJRYt__name__(((s^/usr/lib/python2.7/site-packages/ansible/modules/remote_management/ucs/ucs_lan_connectivity.pyt<module>s 


d$	=		$		9

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