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_wwn_pool.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_wwn_pool
short_description: Configures WWNN or WWPN pools on Cisco UCS Manager
description:
- Configures WWNNs or WWPN pools 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 WWNNs/WWPNs are present and will create if needed.
    - If C(absent), will verify WWNNs/WWPNs are absent and will delete if needed.
    choices: [present, absent]
    default: present
  name:
    description:
    - The name of the World Wide Node Name (WWNN) or World Wide Port Name (WWPN) pool.
    - 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 WWNN or WWPN pool is created.
    required: yes
  purpose:
    description:
    - Specify whether this is a node (WWNN) or port (WWPN) pool.
    - Optional if state is absent.
    choices: [node, port]
    required: yes
  description:
    description:
    - A description of the WWNN or WWPN pool.
    - 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 ]
  order:
    description:
    - The Assignment Order field.
    - "This can be one of the following:"
    - "default - Cisco UCS Manager selects a random identity from the pool."
    - "sequential - Cisco UCS Manager selects the lowest available identity from the pool."
    choices: [default, sequential]
    default: default
  first_addr:
    description:
    - The first initiator in the World Wide Name (WWN) block.
    - This is the From field in the UCS Manager Add WWN Blocks menu.
  last_addr:
    description:
    - The last initiator in the World Wide Name (WWN) block.
    - This is the To field in the UCS Manager Add WWN Blocks menu.
    - For WWxN pools, the pool size must be a multiple of ports-per-node + 1.
    - For example, if there are 7 ports per node, the pool size must be a multiple of 8.
    - If there are 63 ports per node, the pool size must be a multiple of 64.
  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 WWNN/WWPN pools
  ucs_wwn_pool:
    hostname: 172.16.143.150
    username: admin
    password: password
    name: WWNN-Pool
    purpose: node
    first_addr: 20:00:00:25:B5:48:00:00
    last_addr: 20:00:00:25:B5:48:00:0F
- ucs_wwn_pool:
    hostname: 172.16.143.150
    username: admin
    password: password
    name: WWPN-Pool-A
    purpose: port
    order: sequential
    first_addr: 20:00:00:25:B5:48:0A:00
    last_addr: 20:00:00:25:B5:48:0A:0F

- name: Remove WWNN/WWPN pools
  ucs_wwn_pool:
    hostname: 172.16.143.150
    username: admin
    password: password
    name: WWNN-Pool
    state: absent
- ucs_wwn_pool:
    hostname: 172.16.143.150
    username: admin
    password: password
    name: WWPN-Pool-A
    state: absent
s
#
(t
AnsibleModule(t	UCSModuletucs_argument_speccC`st}|jdtdddd�dtdd�dtdddd	d
g�dtdd�dtddddddd
g�dtdd�dtdd�dtdddddddg�dtdd��	t|dtdddggdddgg�}t|�}t}ddlm}ddl	m
}t}y}|jdrU|jd}n|jg}xM|D]E}t}	t}
|jd�s�d|d<n|jd�s�d|d<n|jdd|d}|j
j|�}|r�t}	n|jddkr:|	r�|js.|j
j|�|j
j�nt}q�qh|dd}
|	r�td|d�}|d|d<|
|d<|j|�r�d|kr�d|kr�|d|dj�d |dj�}|j
j|�}|r�t}
q�q�t}
q�n|
sh|js�|d!|jdd|dd|dd|dd|
�}d|kr�d|kr�|d!|d"|dd#|d�}n|j
j|t�|j
j�nt}qhqhWWn0tk
r�}t}d$t|�|jd%<nX||jd&<|r|j|j�n|j|j�dS('Ntorg_dnttypetstrtdefaultsorg-roottnametpurposetchoicestnodetporttdescrtordert
sequentialt
first_addrt	last_addrtstatetpresenttabsenttwwn_listtlisttsupports_check_modetrequired_one_oftmutually_exclusivei(tFcpoolInitiators(tFcpoolBlockts
/wwn-pool-s-wwn-assignmenttassignment_orders/block-t-tparent_mo_or_dnttotr_fromssetup error: %s tmsgtchanged(R
tupdatetdictRtTrueR	tFalset&ucsmsdk.mometa.fcpool.FcpoolInitiatorsR!t!ucsmsdk.mometa.fcpool.FcpoolBlockR"tparamstgettlogin_handletquery_dnt
check_modet	remove_motcommittcheck_prop_matchtuppertadd_mot	ExceptionR
tresultt	fail_jsont	exit_json(t
argument_spectmoduletucsterrR!R"R*Rtwwnt	mo_existstprops_matchtdntmot
purpose_paramtkwargstblock_dntmo_1te((sV/usr/lib/python2.7/site-packages/ansible/modules/remote_management/ucs/ucs_wwn_pool.pytmainzs�	!!



		
*	



	

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


B#	t

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