
    Vh                     z    d dl mZmZmZ eZdZdZdZd dl	m
Z
 d dlmZmZ  G d de      Zd	 Zed
k(  r e        yy)    )absolute_importdivisionprint_functiona(  
---
module: psu_info
version_added: "1.0.0"
author:
    - WangBaoshan (@ieisystem)
short_description: Get psu information
description:
   - Get psu information on ieisystem Server.
notes:
   - Supports C(check_mode).
options: {}
extends_documentation_fragment:
    - ieisystem.inmanage.inmanage
a8  
- name: Psu test
  hosts: inmanage
  connection: local
  gather_facts: false
  vars:
    inmanage:
      host: "{{ ansible_ssh_host }}"
      username: "{{ username }}"
      password: "{{ password }}"

  tasks:

  - name: "Get psu information"
    ieisystem.inmanage.psu_info:
      provider: "{{ inmanage }}"
a1  
message:
    description: Messages returned after module execution.
    returned: always
    type: str
state:
    description: Status after module execution.
    returned: always
    type: str
changed:
    description: Check to see if a change was made on the device.
    returned: always
    type: bool
)AnsibleModule)inmanage_argument_specget_connectionc                   *    e Zd Zd Zd Zd Zd Zd Zy)Psuc                 ^    || _         d | _        | j                          t               | _        y N)specmoduleinit_moduledictresults)selfargument_specs     o/home/dcms/DCMS/lib/python3.12/site-packages/ansible_collections/ieisystem/inmanage/plugins/modules/psu_info.py__init__zPsu.__init__A   s%    !	v    c                 <    t        | j                  d      | _        y)zInit module objectT)r   supports_check_modeN)r   r   r   r   s    r   r   zPsu.init_moduleG   s     $))?r   c                 j    d| j                   j                  d<   t        | j                         | _        y )Ngetpsu
subcommand)r   paramsr   r   r   s    r   run_commandzPsu.run_commandM   s&    +3<(%dkk2r   c                 P     | j                   j                  di | j                   y)zShow resultN )r   	exit_jsonr   r   s    r   show_resultzPsu.show_resultQ   s    --r   c                 D    | j                          | j                          y)WorkerN)r   r"   r   s    r   workzPsu.workU   s    r   N)__name__
__module____qualname__r   r   r   r"   r%   r    r   r   r
   r
   @   s    ?3.r   r
   c                  x    t               } | j                  t               t        |       }|j	                          y r   )r   updater   r
   r%   )r   psu_objs     r   mainr,   [   s+    FM/0- GLLNr   __main__N)
__future__r   r   r   type__metaclass__DOCUMENTATIONEXAMPLESRETURNansible.module_utils.basicr   Dansible_collections.ieisystem.inmanage.plugins.module_utils.inmanager   r   objectr
   r,   r&   r    r   r   <module>r7      sU    C B $
 5 y& 6 zF r   