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

�
�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_storage_profile
short_description: Configures storage profiles on Cisco UCS Manager
description:
- Configures storage profiles on Cisco UCS Manager.
- Examples can be used with the L(UCS Platform Emulator,https://communities.cisco.com/ucspe).
extends_documentation_fragment: ucs
options:
  state:
    description:
    - If C(present), will verify that the storage profile is present and will create if needed.
    - If C(absent), will verify that the storage profile is absent and will delete if needed.
    choices: [ absent, present ]
    default: present
  name:
    description:
    - The name of the storage profile.
    - 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 profile is created.
    required: yes
  description:
    description:
    - The user-defined description of the storage profile.
    - 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 ]
  local_luns:
    description:
    - List of Local LUNs used by the storage profile.
    suboptions:
      name:
        description:
        - The name of the local LUN.
        required: yes
      size:
        description:
        - Size of this LUN in GB.
        - The size can range from 1 to 10240 GB.
        default: '1'
      auto_deploy:
        description:
        - Whether the local LUN should be automatically deployed or not.
        choices: [ auto-deploy, no-auto-deploy ]
        default: auto-deploy
      expand_to_avail:
        description:
        - Specifies that this LUN can be expanded to use the entire available disk group.
        - For each service profile, only one LUN can use this option.
        - Expand To Available option is not supported for already deployed LUN.
        type: bool
        default: 'no'
      fractional_size:
        description:
        - Fractional size of this LUN in MB.
        default: '0'
      disk_policy_name:
        description:
        - The disk group configuration policy to be applied to this local LUN.
      state:
        description:
        - If C(present), will verify local LUN is present on profile.
          If C(absent), will verify local LUN is absent on profile.
        choices: [ absent, present ]
        default: present
  org_dn:
    description:
    - The distinguished name (dn) of the organization where the resource is assigned.
    default: org-root
requirements:
- ucsmsdk
author:
- Sindhu Sudhir (@sisudhir)
- David Soper (@dsoper2)
- CiscoUcs (@CiscoUcs)
version_added: '2.7'
s�
- name: Configure Storage Profile
  ucs_storage_profile:
    hostname: 172.16.143.150
    username: admin
    password: password
    name: DEE-StgProf
    local_luns:
    - name: Boot-LUN
      size: '60'
      disk_policy_name: DEE-DG
    - name: Data-LUN
      size: '200'
      disk_policy_name: DEE-DG

- name: Remove Storage Profile
  ucs_storage_profile:
    hostname: 172.16.143.150
    username: admin
    password: password
    name: DEE-StgProf
    state: absent

- name: Remove Local LUN from Storage Profile
  ucs_storage_profile:
    hostname: 172.16.143.150
    username: admin
    password: password
    name: DEE-StgProf
    local_luns:
    - name: Data-LUN
      state: absent
s
#
(t
AnsibleModule(t	UCSModuletucs_argument_speccC`stdtdddt�dtddddddd	g�d
tdddd�dtdddd
dd
dg�dtdddddddg�dtdddd�dtdddd��}t}|jdtdddd�dtdddt�dtddddgdd�dtddddd|�dtddddddd	g��t|d t�}t|�}t}d!d"lm}d!d#l	m
}t|jd$<y	t}t}|jdd%|jd}	|j
j|	�}
|
r�t}n|jdd	krF|r�|js3|j
j|
�|j
j�nt|jd$<q�ng|rptd|jd�}|
j|�rp|jjd�s�t}qmx�|jdD]�}|	d&|d}
|j
j|
�}|dd	kr�|rft}Pqfq�|r_td
t|d
��}|d|d<|d|d<t|d�|d<|d|d'<|j|�rft}qfq�t}Pq�Wqpn|s�|js�|d(|jdd|jdd|jd�}
|jjd�rzx�|jdD]�}|dd	kr|	d&|d}
|j
j|
�}|j
j|�q�|d(|
d|dd
t|d
�d|dd|ddt|d�d'|d�}q�Wn|j
j|
t�|j
j�nt|jd$<nWn0tk
r�}t}d)t|�|jd*<nX|r�|j|j�n|j|j�dS(+Ntnamettypetstrtrequiredtstatetdefaulttpresenttchoicestabsenttsizet1tauto_deploysauto-deploysno-auto-deploytexpand_to_availtnotyestfractional_sizet0tdisk_policy_namettorg_dnsorg-roottdescriptiontaliasestdescrt
local_lunstlisttelementstdicttoptionstsupports_check_modei(tLstorageProfile(tLstorageDasScsiLuntchangeds	/profile-s/das-scsi-lun-tlocal_disk_policy_nametparent_mo_or_dnssetup error: %s tmsg(R%tTrueR
tupdateRR	tFalset'ucsmsdk.mometa.lstorage.LstorageProfileR(t*ucsmsdk.mometa.lstorage.LstorageDasScsiLunR)tresulttparamstlogin_handletquery_dnt
check_modet	remove_motcommittcheck_prop_matchtgetR
tadd_mot	Exceptiont	fail_jsont	exit_json(t	local_lunt
argument_spectmoduletucsterrR(R)t	mo_existstprops_matchtdntmotkwargstluntchild_dntmo_1te((s]/usr/lib/python2.7/site-packages/ansible/modules/remote_management/ucs/ucs_storage_profile.pytmain�s�!!!	"	
				




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


P"	v

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