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_org.pyo

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

short_description: Manages UCS Organizations for UCS Manager

description:
  - Manages UCS Organizations for UCS Manager.
  - Examples can be used with the UCS Platform Emulator U(https://cs.co/ucspe).

extends_documentation_fragment: ucs

options:
    state:
        description:
        - If C(absent), will remove organization.
        - If C(present), will create or update organization.
        choices: [absent, present]
        default: present
        type: str

    org_name:
        description:
        - The name of the organization.
        - Enter up to 16 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: [ name ]
        type: str

    parent_org_path:
        description:
        - A forward slash / separated hierarchical path from the root organization to the parent of the organization to be added or updated.
        - UCS Manager supports a hierarchical structure of organizations up to five levels deep not including the root organization.
        - For example the parent_org_path for an organization named level5 could be root/level1/level2/level3/level4/level5
        default: root
        type: str

    description:
        description:
        - A user-defined description of the organization.
        - 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 ]
        type: str

    delegate_to:
        description:
        - Where the module will be run
        default: localhost
        type: str

requirements:
    - ucsmsdk

author:
    - John McDonough (@movinalot)
    - CiscoUcs (@CiscoUcs)
version_added: "2.8"
s�
- name: Add UCS Organization
  ucs_org:
    hostname: "{{ ucs_hostname }}"
    username: "{{ ucs_username }}"
    password: "{{ ucs_password }}"
    org_name: test
    description: testing org
    state: present
    delegate_to: localhost

- name: Update UCS Organization
  ucs_org:
    hostname: "{{ ucs_hostname }}"
    username: "{{ ucs_username }}"
    password: "{{ ucs_password }}"
    org_name: test
    description: Testing org
    state: present
    delegate_to: localhost

- name: Add UCS Organization
  ucs_org:
    hostname: "{{ ucs_hostname }}"
    username: "{{ ucs_username }}"
    password: "{{ ucs_password }}"
    org_name: level1
    parent_org_path: root
    description: level1 org
    state: present
    delegate_to: localhost

- name: Add UCS Organization
  ucs_org:
    hostname: "{{ ucs_hostname }}"
    username: "{{ ucs_username }}"
    password: "{{ ucs_password }}"
    org_name: level2
    parent_org_path: root/level1
    description: level2 org
    state: present

- name: Add UCS Organization
  ucs_org:
    hostname: "{{ ucs_hostname }}"
    username: "{{ ucs_username }}"
    password: "{{ ucs_password }}"
    org_name: level3
    parent_org_path: root/level1/level2
    description: level3 org
    state: present

- name: Remove UCS Organization
  ucs_org:
    hostname: "{{ ucs_hostname }}"
    username: "{{ ucs_username }}"
    password: "{{ ucs_password }}"
    org_name: level2
    parent_org_path: root/level1/
    state: absent
s
#
(t
AnsibleModule(t	UCSModuletucs_argument_speccC`s�t}|jdtddddg�dtdddd�d	tdddd
g�dtddddd
ddg�dtdddd��t|dtddddggg�}t|�}ddlm}t}t}|j	d}t�}|j	d	dk	r|j	d	|d
<nyKd|j	djdd�}|d|j	d}	|jj
|	�}
|
r�|dkr�|
j|�s�t}q�q�n|dkr�t}n|
r�|dkr�t}n|ra|jra|dkr�|jj|
�nd||d<|j	d|d<|j	d	dk	r/|j	d	|d
<n||�}
|jj|
dt�|jj�nWn0tk
r�}t}dt|�|jd<nX||jd<|r�|j|j�n|j|j�dS(Ntorg_namettypetstrtaliasestnametparent_org_pathtdefaulttroottdescriptiontdescrtstatetpresenttchoicestabsenttdelegate_tot	localhosttsupports_check_modetrequired_ifi(tOrgOrgsorg-t/s/org-tparent_mo_or_dntmodify_presentssetup error: %s tmsgtchanged(R
tupdatetdictRtTrueR	tucsmsdk.mometa.org.OrgOrgRtFalsetparamstNonetreplacetlogin_handletquery_dntcheck_prop_matcht
check_modet	remove_motadd_motcommitt	ExceptionR
tresultt	fail_jsont	exit_json(t
argument_spectmoduletucsRterrR"trequested_statetkwargst
parent_org_dntdntmote((sQ/usr/lib/python2.7/site-packages/ansible/modules/remote_management/ucs/ucs_org.pytmain�s`	!
			

t__main__N(t
__future__RRRRt
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtansible.module_utils.basicRt*ansible.module_utils.remote_management.ucsR	R
R@t__name__(((sQ/usr/lib/python2.7/site-packages/ansible/modules/remote_management/ucs/ucs_org.pyt<module>s


>>	P

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