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_ip_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_ip_pool
short_description: Configures IP address pools on Cisco UCS Manager
description:
- Configures IP address pools and blocks of IP addresses 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 IP pool is present and will create if needed.
    - If C(absent), will verify IP pool is absent and will delete if needed.
    choices: [present, absent]
    default: present
  name:
    description:
    - The name of the IP address 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 IP address pool is created.
    required: yes
  description:
    description:
    - The user-defined description of the IP address 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, descrption ]
  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 IPv4 address in the IPv4 addresses block.
    - This is the From field in the UCS Manager Add IPv4 Blocks menu.
  last_addr:
    description:
    - The last IPv4 address in the IPv4 addresses block.
    - This is the To field in the UCS Manager Add IPv4 Blocks menu.
  subnet_mask:
    description:
    - The subnet mask associated with the IPv4 addresses in the block.
    default: 255.255.255.0
  default_gw:
    description:
    - The default gateway associated with the IPv4 addresses in the block.
    default: 0.0.0.0
  primary_dns:
    description:
    - The primary DNS server that this block of IPv4 addresses should access.
    default: 0.0.0.0
  secondary_dns:
    description:
    - The secondary DNS server that this block of IPv4 addresses should access.
    default: 0.0.0.0
  ipv6_first_addr:
    description:
    - The first IPv6 address in the IPv6 addresses block.
    - This is the From field in the UCS Manager Add IPv6 Blocks menu.
  ipv6_last_addr:
    description:
    - The last IPv6 address in the IPv6 addresses block.
    - This is the To field in the UCS Manager Add IPv6 Blocks menu.
  ipv6_prefix:
    description:
    - The network address prefix associated with the IPv6 addresses in the block.
    default: '64'
  ipv6_default_gw:
    description:
    - The default gateway associated with the IPv6 addresses in the block.
    default: '::'
  ipv6_primary_dns:
    description:
    - The primary DNS server that this block of IPv6 addresses should access.
    default: '::'
  ipv6_secondary_dns:
    description:
    - The secondary DNS server that this block of IPv6 addresses should access.
    default: '::'
  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 IPv4 address pools
  ucs_ip_pool:
    hostname: 172.16.143.150
    username: admin
    password: password
    name: ip-A
    order: sequential
    first_addr: 192.168.0.10
    last_addr: 192.168.0.19
    subnet_mask: 255.255.255.0
    default_gw: 192.168.0.1
    primary_dns: 172.16.143.136
- name: Configure IPv6 address pools
  ucs_ip_pool:
    hostname: 172.16.143.150
    username: admin
    password: password
    name: ipv6-B
    ipv6_first_addr: fe80::1cae:7992:d7a1:ed07
    ipv6_last_addr: fe80::1cae:7992:d7a1:edfe
    ipv6_default_gw: fe80::1cae:7992:d7a1:ecff

- name: Remove IPv4 address pools
  ucs_ip_pool:
    hostname: 172.16.143.150
    username: admin
    password: password
    name: ip-A
    state: absent
- name: Remove IPv6 address pools
  ucs_ip_pool:
    hostname: 172.16.143.150
    username: admin
    password: password
    name: ipv6-B
    state: absent
s
#
(t
AnsibleModule(t	UCSModuletucs_argument_specc*C`s)t}|jdtdddd�dtdddt�dtdddd	d
ddg�d
tdddddddg�dtdd�dtdd�dtdddd�dtdddd�dtdddd�dtdddd�dtdd�dtdd�dtdddd�dtdddd�dtdddd�dtdddd�d tdddd!dd!d"g��t|d#t�}t|�}t}d$d%lm}d$d&l	m
}d$d'lm}t}y�t}t}	|j
dd(|j
d}
|jj|
�}|r't}n|j
d d"kru|r�|jsi|jj|�|jj�nt}q�nF|rOtd)|j
d
�}|j
d|d<|j|�rO|j
drn|j
drn|
d*|j
dd+|j
d}
|jj|
�}|rttd,|j
d�}|j
d|d-<|j
d|d.<|j
d|d/<|j|�rkt}	qkqtnt}	|	rL|j
drL|j
drL|
d0|j
dj�d+|j
dj�}
|jj|
�}|r@td1|j
d�}|j
d|d-<|j
d|d.<|j
d|d/<|j|�rFt}	qFqIt}	qLqOn|	s�|js�|d2|j
dd|j
dd|j
dd)|j
d
�}|j
dr|j
dr|d2|d3|j
dd4|j
dd,|j
dd-|j
dd.|j
dd/|j
d�}n|j
dr�|j
dr�|d2|d3|j
dd4|j
dd1|j
dd-|j
dd.|j
dd/|j
d�}n|jj|t�|jj�nt}nWn0tk
r�}t}d5t|�|jd6<nX||jd7<|r|j|j�n|j|j�dS(8Ntorg_dnttypetstrtdefaultsorg-roottnametrequiredtdescrttaliasest
descrptiontdescriptiontordertchoicest
sequentialt
first_addrt	last_addrtsubnet_masks
255.255.255.0t
default_gws0.0.0.0tprimary_dnst
secondary_dnstipv6_first_addrtipv6_last_addrtipv6_prefixt64tipv6_default_gws::tipv6_primary_dnstipv6_secondary_dnststatetpresenttabsenttsupports_check_modei(t
IppoolPool(tIppoolBlock(tIppoolIpV6Blocks	/ip-pool-tassignment_orders/block-t-tsubnettdef_gwtprim_dnstsec_dnss	/v6block-tprefixtparent_mo_or_dnttotr_fromssetup error: %s tmsgtchanged(R
tupdatetdicttTrueRR	tFalset ucsmsdk.mometa.ippool.IppoolPoolR*t!ucsmsdk.mometa.ippool.IppoolBlockR+t%ucsmsdk.mometa.ippool.IppoolIpV6BlockR,tparamstlogin_handletquery_dnt
check_modet	remove_motcommittcheck_prop_matchtlowertadd_mot	ExceptionR
tresultt	fail_jsont	exit_json(t
argument_spectmoduletucsterrR*R+R,R8t	mo_existstprops_matchtdntmotkwargstblock_dntmo_1te((sU/usr/lib/python2.7/site-packages/ansible/modules/remote_management/ucs/ucs_ip_pool.pytmain�s�	!!"			$ 0	














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


a'	�

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