Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/modules/network/aci/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/modules/network/aci/mso_site.pyc

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
mZddlm
Z
mZmZd
�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	communitytsupported_bys]
---
module: mso_site
short_description: Manage sites
description:
- Manage sites on Cisco ACI Multi-Site.
author:
- Dag Wieers (@dagwieers)
version_added: '2.8'
options:
  apic_password:
    description:
    - The password for the APICs.
    type: str
    required: yes
  apic_site_id:
    description:
    - The site ID of the APICs.
    type: str
    required: yes
  apic_username:
    description:
    - The username for the APICs.
    type: str
    required: yes
    default: admin
  site:
    description:
    - The name of the site.
    type: str
    required: yes
    aliases: [ name ]
  labels:
    description:
    - The labels for this site.
    - Labels that do not already exist will be automatically created.
    type: list
  location:
    description:
    - Location of the site.
    suboptions:
      latitude:
        description:
        - The latitude of the location of the site.
        type: float
      longitude:
        description:
        - The longitude of the location of the site.
        type: float
  urls:
    description:
    - A list of URLs to reference the APICs.
    type: list
  state:
    description:
    - Use C(present) or C(absent) for adding or removing.
    - Use C(query) for listing an object or multiple objects.
    type: str
    choices: [ absent, present, query ]
    default: present
extends_documentation_fragment: mso
s
- name: Add a new site
  mso_site:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    site: north_europe
    description: North European Datacenter
    apic_username: mso_admin
    apic_password: AnotherSecretPassword
    apic_site_id: 12
    urls:
    - 10.2.3.4
    - 10.2.4.5
    - 10.3.5.6
    labels:
    - NEDC
    - Europe
    - Diegem
    location:
      latitude: 50.887318
      longitude: 4.447084
    state: present
  delegate_to: localhost

- name: Remove a site
  mso_site:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    site: north_europe
    state: absent
  delegate_to: localhost

- name: Query a site
  mso_site:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    site: north_europe
    state: query
  delegate_to: localhost
  register: query_result

- name: Query all sites
  mso_site:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    state: query
  delegate_to: localhost
  register: query_result
t
(t
AnsibleModule(t	MSOModuletmso_argument_spectissubsetcC`s�tdtdd�dtdd��}t�}|jdtdddt�dtdd�d	tddd
d�dtdd
�dtddd|�dtddddg�dtddd
dddddg�dtdd
��td|dtddddggddddggg�}|jd	}|jd}|jd}|jd}|jd}|dk	r�|jdd}|jdd}	n|jd}
|jd}t|�}d}
d}|j|jdd�}|r'|j	|d|�|_
|j
r9|j
d}
djd|
�}q9n|j|�|_
|
dkrHn�|
dkr�|j
|_
|j
r�|jr~i|_
q�|j|d d!d"td#d$��|_
q�n|
dkr�|j
|_
td%|d|
d|d|d|d&|d'|�}|dk	rtd(|d)|	�|d<n|j|d*t�|j
r�t|j|j
�s�|jrg|j|_
q�|j|d d+d,|j�|_
q�q�|jr�|j|_
q�|j|d d-d,|j�|_
nd'|j
kr�d.|j
d'<n|j�dS(/Ntlatitudettypetfloatt	longitudet
apic_passwordtstrtno_logtapic_site_idt
apic_usernametdefaulttadmintlabelstlisttlocationtdicttoptionstsitetaliasestnametstatetpresenttchoicestabsenttqueryturlst
argument_spectsupports_check_modetrequired_iftsitestids
sites/{id}tmethodtDELETEtqstforcettruet
apicSiteIdtusernametpasswordtlattlongtcollatetPUTtdatatPOSTs******(RRtupdatetTrueR	tparamstNoneR
t
lookup_labelstget_objtexistingtformatt
query_objstprevioust
check_modetrequesttsanitizeRtsenttproposedt	exit_json(tlocation_arg_specR&tmoduleRRRRRR
RR R%tmsotsite_idtpathRtpayload((sH/usr/lib/python2.7/site-packages/ansible/modules/network/aci/mso_site.pytmain�s�		$






	
		-			'	$t__main__N(t
__future__RRRRt
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtansible.module_utils.basicR	t$ansible.module_utils.network.aci.msoR
RRROt__name__(((sH/usr/lib/python2.7/site-packages/ansible/modules/network/aci/mso_site.pyt<module>s


?6	j

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