Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/modules/remote_management/lxca/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/modules/remote_management/lxca/lxca_cmms.pyo

�
�Udac	@`stddlmZmZmZeZidd6dd6dgd6ZdZd	Zd
Z	ddl
Z
ddlmZdd
l
mZmZmZyddlmZWnek
r�nXdZdZdZd�Zd�Zd�Zd�Zied6ed6ed6Zededdddddg�dedd�dedd��Zd�Zd�Z e!d krpe �ndS(!i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiont	communitytsupported_bytpreviewtstatuss�
---
version_added: "2.8"
author:
  - Naval Patel (@navalkp)
  - Prashant Bhosale (@prabhosa)
module: lxca_cmms
short_description: Custom module for lxca cmms inventory utility
description:
  - This module returns/displays a inventory details of cmms

options:
  uuid:
    description:
      uuid of device, this is string with length greater than 16.

  command_options:
    description:
      options to filter nodes information
    default: cmms
    choices:
        - cmms
        - cmms_by_uuid
        - cmms_by_chassis_uuid

  chassis:
    description:
      uuid of chassis, this is string with length greater than 16.

extends_documentation_fragment:
    - lxca_common
s�
# get all cmms info
- name: get nodes data from LXCA
  lxca_cmms:
    login_user: USERID
    login_password: Password
    auth_url: "https://10.243.15.168"

# get specific cmms info by uuid
- name: get nodes data from LXCA
  lxca_cmms:
    login_user: USERID
    login_password: Password
    auth_url: "https://10.243.15.168"
    uuid: "3C737AA5E31640CE949B10C129A8B01F"
    command_options: cmms_by_uuid

# get specific cmms info by chassis uuid
- name: get nodes data from LXCA
  lxca_cmms:
    login_user: USERID
    login_password: Password
    auth_url: "https://10.243.15.168"
    chassis: "3C737AA5E31640CE949B10C129A8B01F"
    command_options: cmms_by_chassis_uuid

s�
result:
    description: cmms detail from lxca
    returned: success
    type: dict
    sample:
      cmmList:
        - machineType: ''
          model: ''
          type: 'CMM'
          uuid: '118D2C88C8FD11E4947B6EAE8B4BDCDF'
          # bunch of properties
        - machineType: ''
          model: ''
          type: 'CMM'
          uuid: '223D2C88C8FD11E4947B6EAE8B4BDCDF'
          # bunch of properties
        # Multiple cmms details
N(t
AnsibleModule(tLXCA_COMMON_ARGSt
has_pylxcatconnection_object(tcmmss4UUID of device is required for cmms_by_uuid command.s=UUID of chassis is required for cmms_by_chassis_uuid command.sSuccess %s resultcC`s
t|�S(N(R(tmoduletlxca_con((sT/usr/lib/python2.7/site-packages/ansible/modules/remote_management/lxca/lxca_cmms.pyt_cmmsoscC`s4|jds |jdt�nt||jd�S(Ntuuidtmsg(tparamst	fail_jsont
UUID_REQUIREDR(R
R((sT/usr/lib/python2.7/site-packages/ansible/modules/remote_management/lxca/lxca_cmms.pyt
_cmms_by_uuidss
cC`s7|jds |jdt�nt|d|jd�S(NtchassisR(RRtCHASSIS_UUID_REQUIREDR(R
R((sT/usr/lib/python2.7/site-packages/ansible/modules/remote_management/lxca/lxca_cmms.pyt_cmms_by_chassis_uuidys
cC`s2tt�}|jt�td|dt�}|S(sY
    this function merge argument spec and create ansible module object
    :return:
    t
argument_spectsupports_check_mode(tdictR	tupdatetINPUT_ARG_SPECRtFalse(t	args_specR
((sT/usr/lib/python2.7/site-packages/ansible/modules/remote_management/lxca/lxca_cmms.pytsetup_module_objects
Rtcmms_by_uuidtcmms_by_chassis_uuidtcommand_optionstdefaulttchoicesRRcC`s�yZt|��H}t|jd||�}|jdtdt|jdd|�WdQXWnKtk
r�}djd�|jD��}|j	d|dt
j��nXdS(	sP
    This function invoke commands
    :param module: Ansible module object
    R#tchangedRtresultNs; cs`s|]}|VqdS(N((t.0te((sT/usr/lib/python2.7/site-packages/ansible/modules/remote_management/lxca/lxca_cmms.pys	<genexpr>�st	exception(Rt	FUNC_DICTRt	exit_jsonRtSUCCESS_MSGt	ExceptiontjointargsRt	tracebackt
format_exc(R
RR'R*t	error_msg((sT/usr/lib/python2.7/site-packages/ansible/modules/remote_management/lxca/lxca_cmms.pytexecute_module�scC`s!t�}t|�t|�dS(N(R R
R4(R
((sT/usr/lib/python2.7/site-packages/ansible/modules/remote_management/lxca/lxca_cmms.pytmain�s	
t__main__("t
__future__RRRttypet
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNR1tansible.module_utils.basicRt2ansible.module_utils.remote_management.lxca.commonR	R
RtpylxcaRtImportErrorRRR-RRRR R+RtNoneRR4R5t__name__(((sT/usr/lib/python2.7/site-packages/ansible/modules/remote_management/lxca/lxca_cmms.pyt<module>sF
#
				
		

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