
    Vhf                        d dl mZmZmZ eZdZdZdZd dl	Z	d dl
Z
d dlZd dlZd dlmZ d dlmZmZ d dlmZmZ d d	lmZmZ d d
lmZ dZdZdZdZdZdZdZdZ dZ!dZ"dZ#e dZ$dZ%dZ&dZ'dZ(e dZ)e dZ*e dZ+e dZ,dZ-d Z.d!Z/d"e d#d$e d%ee+d&e d'd(e d)d*e d+d,e d-d.e d/ee)d0e*d1e dd2e d3iZ0d4d5d6iiZ1d7d7d8Z2d9d:d9d:d;Z3d<d=d>d?d@dAdBdCdDZ4i eeeeedEeeeeedEd4d1id;Z5d4e(ie)e)e)e)e)dFe+e+e+e+e+dFd4e,id;Z6d4dGdHdIdJdKZ7dL Z8dM Z9dN Z:e8e8e8e8e8dEZ;dO Z<dP Z=dQ Z>dR Z?dS Z@dT ZAdU ZBdV ZCdW ZDdX ZEdY ZFdZ ZGd[ ZHeId\k(  r eH        yy)]    )absolute_importdivisionprint_functiona  
---
module: idrac_certificates
short_description: Configure certificates for iDRAC
version_added: "5.5.0"
description:
  - This module allows to generate certificate signing request, import, and export certificates on iDRAC.
extends_documentation_fragment:
  - dellemc.openmanage.idrac_x_auth_options
options:
  command:
    description:
      - "C(generate_csr), generate CSR. This requires I(cert_params) and I(certificate_path).
      This is applicable only for C(HTTPS)"
      - C(import), import the certificate file. This requires I(certificate_path).
      - C(export), export the certificate. This requires I(certificate_path).
      - C(reset), reset the certificate to default settings. This is applicable only for C(HTTPS).
    type: str
    choices: [import, export, generate_csr, reset]
    default: 'generate_csr'
  certificate_type:
    description:
      - Type of the iDRAC certificate.
      - C(HTTPS) The Dell self-signed SSL certificate.
      - C(CA) Certificate Authority(CA) signed SSL certificate.
      - C(CUSTOMCERTIFICATE) The custom PKCS12 certificate and private key. Export of custom certificate is supported only on iDRAC firmware version 7.00.00.00
        and above.
      - C(CSC) The custom signing SSL certificate.
      - C(CLIENT_TRUST_CERTIFICATE) Client trust certificate.
    type: str
    choices: [HTTPS, CA, CUSTOMCERTIFICATE, CSC, CLIENT_TRUST_CERTIFICATE]
    default: 'HTTPS'
  certificate_path:
    description:
      - Absolute path of the certificate file if I(command) is C(import).
      - Directory path with write permissions if I(command) is C(generate_csr) or C(export).
    type: path
  passphrase:
    description: The passphrase string if the certificate to be imported is passphrase protected.
    type: str
  ssl_key:
    description:
    - Absolute path of the private or SSL key file.
    - This is applicable only when I(command) is C(import) and I(certificate_type) is C(HTTPS).
    - Uploading the SSL key to iDRAC is supported on firmware version 6.00.02.00 and above.
    type: path
    version_added: 8.6.0
  cert_params:
    description: Certificate parameters to generate signing request.
    type: dict
    suboptions:
      common_name:
        description: The common name of the certificate.
        type: str
        required: true
      organization_unit:
        description: The name associated with an organizational unit. For example department name.
        type: str
        required: true
      locality_name:
        description: The city or other location where the entity applying for certification is located.
        type: str
        required: true
      state_name:
        description: The state where the entity applying for certification is located.
        type: str
        required: true
      country_code:
        description: The country code of the country where the entity applying for certification is located.
        type: str
        required: true
      email_address:
        description: The email associated with the CSR.
        type: str
      organization_name:
        description: The name associated with an organization.
        type: str
        required: true
      subject_alt_name:
        description: The alternative domain names associated with the request.
        type: list
        elements: str
        default: []
  resource_id:
    description: Redfish ID of the resource.
    type: str
  reset:
    description:
      - To reset the iDRAC after the certificate operation.
      - This is applicable when I(command) is C(import) or C(reset).
    type: bool
    default: true
  wait:
    description:
      - Maximum wait time for iDRAC to start after the reset, in seconds.
      - This is applicable when I(command) is C(import) or C(reset) and I(reset) is C(true).
    type: int
    default: 300
requirements:
  - "python >= 3.9.6"
author:
  - "Jagadeesh N V(@jagadeeshnv)"
  - "Rajshekar P(@rajshekarp87)"
  - "Kristian Lamb V(@kristian_lamb)"
notes:
    - The certificate operations are supported on iDRAC firmware version 6.10.80.00 and above.
    - Run this module from a system that has direct access to Dell iDRAC.
    - This module supports C(check_mode).
    - This module supports IPv4 and IPv6 addresses.
a
  
---
- name: Generate HTTPS certificate signing request
  dellemc.openmanage.idrac_certificates:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    command: "generate_csr"
    certificate_type: "HTTPS"
    certificate_path: "/home/omam/mycerts"
    cert_params:
      common_name: "sample.domain.com"
      organization_unit: "OrgUnit"
      locality_name: "Bangalore"
      state_name: "Karnataka"
      country_code: "IN"
      email_address: "admin@domain.com"
      organization_name: "OrgName"
      subject_alt_name:
        - 192.198.2.1

- name: Import a HTTPS certificate.
  dellemc.openmanage.idrac_certificates:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    command: "import"
    certificate_type: "HTTPS"
    certificate_path: "/path/to/cert.pem"

- name: Import an HTTPS certificate along with its private key.
  dellemc.openmanage.idrac_certificates:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    command: "import"
    certificate_type: "HTTPS"
    certificate_path: "/path/to/cert.pem"
    ssl_key: "/path/to/private_key.pem"

- name: Export a HTTPS certificate.
  dellemc.openmanage.idrac_certificates:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    command: "export"
    certificate_type: "HTTPS"
    certificate_path: "/home/omam/mycert_dir"

- name: Import a CSC certificate.
  dellemc.openmanage.idrac_certificates:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    command: "import"
    certificate_type: "CSC"
    certificate_path: "/path/to/cert.pem"

- name: Import a custom certificate with a passphrase.
  dellemc.openmanage.idrac_certificates:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    command: "import"
    certificate_type: "CUSTOMCERTIFICATE"
    certificate_path: "/path/to/idrac_cert.p12"
    passphrase: "cert_passphrase"
    reset: false

- name: Export a Client trust certificate.
  dellemc.openmanage.idrac_certificates:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    command: "export"
    certificate_type: "CLIENT_TRUST_CERTIFICATE"
    certificate_path: "/home/omam/mycert_dir"
a  
---
msg:
  type: str
  description: Status of the certificate configuration operation.
  returned: always
  sample: "Successfully performed the 'generate_csr' certificate operation."
certificate_path:
  type: str
  description: The csr or exported certificate file path
  returned: when I(command) is C(export) or C(generate_csr)
  sample: "/home/ansible/myfiles/cert.pem"
error_info:
  description: Details of the HTTP Error.
  returned: on HTTP error
  type: dict
  sample: {
    "error": {
      "code": "Base.1.0.GeneralError",
      "message": "A general error has occurred. See ExtendedInfo for more information.",
      "@Message.ExtendedInfo": [
        {
          "MessageId": "GEN1234",
          "RelatedProperties": [],
          "Message": "Unable to process the request because an error occurred.",
          "MessageArgs": [],
          "Severity": "Critical",
          "Resolution": "Retry the operation. If the issue persists, contact your system administrator."
        }
      ]
    }
  }
N)datetime)iDRACRedfishAPIIdracAnsibleModule)URLError	HTTPError)ConnectionErrorSSLValidationError)reset_idracz*#DelliDRACCardService.ImportSSLCertificatez*#DelliDRACCardService.ExportSSLCertificatezC/redfish/v1/Managers/{res_id}/Oem/Dell/DelliDRACCardService/ActionszYCertificate '{operation}' not supported for the specified certificate type '{cert_type}'.z=Successfully performed the '{command}' certificate operation.zPSuccessfully performed the SSL key upload and '{command}' certificate operation.zNo changes found to be applied.zChanges found to be applied.z>The value for the `wait` parameter cannot be negative or zero.zSystem.Embedded.1ziDRAC.Embedded.1z/DelliDRACCardService.z/redfish/v1/Systemsz/redfish/v1/Managersz;/redfish/v1/Managers/{res_id}/Oem/Dell/DelliDRACCardServicezE/redfish/v1/CertificateService/Actions/CertificateService.GenerateCSRz*/DelliDRACCardService.ImportSSLCertificatez"/DelliDRACCardService.UploadSSLKeyz*/DelliDRACCardService.ExportSSLCertificatez!/DelliDRACCardService.SSLResetCfgz3/redfish/v1/Managers/{res_id}/Actions/Manager.ResetzU/redfish/v1/CertificateService/Actions/Oem/DellCertificateService.GetLastGeneratedCSRzr/redfish/v1/Managers/iDRAC.Embedded.1/Oem/Dell/DellAttributes/iDRAC.Embedded.1?$select=Security.1.ConfigCertStatusz'#DelliDRACCardService.DeleteCertificatez'/DelliDRACCardService.DeleteCertificatez'#DelliDRACCardService.ExportCertificatez'/DelliDRACCardService.ExportCertificatez;#DelliDRACCardService.FactoryIdentityCertificateGenerateCSRz;/DelliDRACCardService.FactoryIdentityCertificateGenerateCSRz6#DelliDRACCardService.FactoryIdentityExportCertificatez6/DelliDRACCardService.FactoryIdentityExportCertificatez6#DelliDRACCardService.FactoryIdentityImportCertificatez6/DelliDRACCardService.FactoryIdentityImportCertificatez%#DelliDRACCardService.GenerateSEKMCSRz%/DelliDRACCardService.GenerateSEKMCSRz'#DelliDRACCardService.ImportCertificatez'/DelliDRACCardService.ImportCertificate"#DelliDRACCardService.UploadSSLKeyz!#DelliDRACCardService.SSLResetCfgz #DelliDRACCardService.iDRACResetz /DelliDRACCardService.iDRACResetServer	@odata.idzH/redfish/v1/Managers/iDRAC.Embedded.1/NetworkProtocol/HTTPS/Certificatescertificate_path)	CSRStringCertificateFileFT)generate_csrimportexportreset
CommonNameOrganizationalUnitCityStateCountryEmailOrganizationAlternativeNamescommon_nameorganization_unitlocality_name
state_namecountry_codeemail_addressorganization_namesubject_alt_name)r   CACustomCertificateCSCClientTrustCertificate)r   r)   CUSTOMCERTIFICATEr+   r,   r)   r*   r+   r,   HTTPSr)   r-   r+   CLIENT_TRUST_CERTIFICATEc                     i }d}|dk(  rt        | |      }||fS |dk(  rd|i}||fS |dk(  rt        | |      }||fS |dk(  rd}||fS )NPOSTr   r   SSLCertTyper   r   z{})_build_import_payload_build_generate_csr_payload)module	operation	cert_typepayloadmethods        y/home/dcms/DCMS/lib/python3.12/site-packages/ansible_collections/dellemc/openmanage/plugins/modules/idrac_certificates.pyget_ssl_payloadr<   X  s    GFH'	: F? 
h	 ), F? 
n	$-fi@ F? 
g	F?    c                    d|i}| j                   j                  d      r| j                   j                  d      |d<   | j                   j                  d      }	 t        |      j                         j	                  d      s(t        |      j                         j	                  d      rJt        |d      5 }|j                         }t        j                  |      j                  d      }d d d        n%t        |d	      5 }|j                         }d d d        |d<   |S # 1 sw Y   xY w# 1 sw Y   xY w# t        $ r&}| j                  t        |      d
       Y d }~Id }~ww xY w)NCertificateType
passphrase
Passphraser   z.p12z.pfxrbasciirTmsgfailedSSLCertificateFile)paramsgetstrlowerendswithopenreadbase64encodebytesdecodeOSError	exit_json)r6   r8   r9   	cert_path	cert_filecert_contentcert_file_content
file_errors           r;   r4   r4   h  sE    ),G}}& & 1 1, ?!!"45I	;y>!**62c)n6J6J6L6U6UV\6]i& U)(~~/$*$6$6|$D$K$KG$T!U U i% 5$-NN$4!5
 %6G !NU U5 5 ;S_T::;sI   AD8 65D +D8  D,D8  D)%D8 ,D51D8 8	E'E""E'c                 v   i }| j                   j                  d      }t        j                         D ]W  \  }}|j                  |      |dk(  r'dj	                  |j                  |            }|g||<   D|j                  |      ||<   Y t
        j                  |      rt
        j                  |      |d<   |S )Ncert_paramsr   ,CertificateCollection)rI   rJ   csr_transformitemsjoinrfish_cert_coll)r6   r8   r9   r[   keyvalueforming_strings          r;   r5   r5   ~  s    G--##M2K#))+ 6
U??3+**!$+//#*>!?"0!1!,!56 9%+:+>+>y+I'(Nr=   c                 :   d }dt         i}	 | j                  |j                  |t              d      }|j                  j                  d      }|d   j                  d      }|j                  d      d   }|S # t        $ r |j                  |t               }Y |S w xY w)Nr   GETMembersr   r   /)
MANAGER_IDinvoke_requestrJ   MANAGERS_URI	json_datasplit	Exception)idracr8   respcert_mapmembsres_urires_ids          r;   
get_res_idrv     s    D*%H5##HLLL$I5Q""9-(,,{+s#B' M  5i4M5s   A)A7 7BBc                     d }| j                  t         d| d      }|j                  }|d   d   d   d   }|j                  dt        j                  |            }|S )	Nrh   rf   LinksOemDellDelliDRACCardServicer   ru   )rk   rl   rm   rJ   IDRAC_SERVICEformat)rp   ru   rq   	srvc_data	dell_srvcsrvcs         r;   get_idrac_servicer     sj    D<.& :EBDI'"5)&12HII==m&:&:&&:&IJDKr=   c                     d }t         }	 | j                  |d      }|j                  }t        d |j	                  d      j                         D              }|S # t        $ r
 t         }Y |S w xY w)Nrf   c              3   H   K   | ]  \  }}||j                  d       f  yw)targetN)rJ   ).0kvs      r;   	<genexpr>z"get_actions_map.<locals>.<genexpr>  s!     Y1155?+Ys    "Actions)idrac_service_actionsrk   rm   dictrJ   r_   ro   )rp   idrac_service_urirq   actionsr   s        r;   get_actions_mapr     sq    D#G(##$5u=NN	Y	i8P8V8V8XYY N  ('N(s   AA A,+A,c                     t         j                  |      j                  |      }| j                  |      }|s$t        j                  |      j                  |      }|r|j                  |      }|S )Nr|   )action_url_maprJ   dflt_url_mapr~   )r   r7   r8   ru   	idrac_keydynurls         r;   get_cert_urlr     sa    ""9-11)<I[[#F!!),00;f-Mr=   c                 0   t         j                  j                  |      rt         j                  j                  |      r| j	                  d| dd       	 t        |d      5 }|j                         }d d d        | j                  sQ|j                  d      }|s| j	                  dd       i }	d	i}	|j                  |j                  |
      d|	       y y # 1 sw Y   gxY w# t        $ r&}| j	                  t        |      d       Y d }~d }~ww xY w)Nz%Unable to locate the SSL key file at .TrE   rD   r   zUpload of SSL key not supported)rG   SSLKeyStringr|   r2   data)ospathexistsisdirrT   rN   rO   rS   rK   
check_moderJ   rk   r~   )
r6   rp   r   ssl_keyru   file
scert_fileerr
upload_urlr9   s
             r;   upload_ssl_keyr     s   77>>'"bggmmG&<DWIQOX\]4'3 	%4J	%
 [[!EF
>tL!:.Z..f.=vGT 	% 	% 4SXd334s0   C& #C4C& C#C& &	D/DDc           	         t        ||||      }|s@| j                  t        j                  || j                  j                  d                   t        j                  |      | ||      \  }}t        | ||||||       y )Ncertificate_type)r7   r8   rF   )r   rT   NOT_SUPPORTED_ACTIONr~   rI   rJ   payload_mapexit_certificates)	r6   rp   r   r7   r8   ru   cert_urlcert_payloadr:   s	            r;   certificate_actionr     s{    GY	6BH1889X^XeXeXiXij|X}8~&??95fiSL&feX|VYPVWr=   c                    dddddd}| j                   j                  d      }t        j                  j	                  |      s6t        j                  j                  |      s| j                  d| dd       t        j                  |t        j                        s| j                  d| d	d       t        j                         }| j                   j                  d
      dk(  rd}n*|j                  | j                   j                  d            }| j                   d    d|j                  d       d| j                   j                  d       | }t        j                  j                  ||      }|j                  |d       }	t        |d      5 }
|
j                  |	       d d d        ||t         j                  |      <   y # 1 sw Y   "xY w)Nz.pemz.crtr.   r   zProvided directory path 'z' is not valid.TrE   zD' is not writable. Please check if you have appropriate permissions.commandr   z.txtr   idrac_ip_z%Y%m%d_%H%M%Sw)rI   rJ   r   r   r   r   rT   accessW_OKr   nowstrftimer`   poprN   
writelinesout_file_path)r6   	cert_datadkeyf_extr   dextcert_file_name	file_name
write_datafps              r;   write_to_filer     s   FPVtz{E==/0DGGNN4 BGGMM$$78oNW[\99T277#8 ?= =EI 	 	KA}}#~5ii))*<=>j12!AJJ4O3PPQRXR_R_RcRcdvRwQxy|x}~NT>2ItT*J	i	 "
j!")2Im%&" "s   GGc                     |j                         }|j                         }|D ]<  }d|j                         v r|j                  |d        |t        v s0t        | ||       > |j                  dd        |S )Nmessager]   )copykeysrL   r   r   r   )r6   r   cpklistr   s        r;   format_outputr     so    		BGGIE 0	!MM!T"&)Q/	0
 MM)40r=   c                     	 | j                  t        j                  |      dd|i      }|j                  }|j                  d      S # t        $ r ddi}Y  w xY w)Nr|   r2   r3   r   r    )rk   
EXPORT_SSLr~   rm   ro   rJ   )rp   r8   ru   rq   r   s        r;   get_export_datar      si    ,##J$5$5V$5$DfTaclSm#nNN	 ==*++  ,&+	,s   6A	 	AAc                     d }d}d}|sn|dkD  ri| j                  t        d      }|j                  j                  d      j                  d      dk(  rdnd}t	        j
                  d	       |d
z  }|s|dkD  ri|S )NF   r   rf   
AttributeszSecurity.1.ConfigCertStatus   T      )rk   CERT_STATUSrm   rJ   timesleep)rp   rq   	generatedcounts       r;   check_csr_generatedr   	  s~    DIEEAI##K7 NN..|<@@A^_cddDjo	

1
	 EAI
 r=   c                    d }	 | j                  |||d      }|S # t        $ r}t        j                  |      }|j	                  d      j	                  d      d   j	                  d      }|j
                  dk(  r3|dv r/d	t        d
   i}	t        |       r6| j                  t        d|	      }n|j                  d|t        |             Y d }~|S d }~ww xY w)N<   )r   api_timeouterrorz@Message.ExtendedInfor   	MessageIdi  )zIDRAC.2.9.SYS537zIDRAC.2.8.SYS537r]   r   r2   r   T)rG   
error_inforF   )rk   r
   jsonloadrJ   codera   r   GET_LAST_GENERATED_CSRrT   rK   )
rp   r   r:   r   r6   rq   r   json_errmsg_idbodys
             r;   "perform_operation_and_download_csrr     s    D
M##Hf<UW#X K  M99S>g&**+BCAFJJ;W88s?v)QQ+_X-FGD"5)++,BFQU+VDX3s8LKMs    	CB&CCc                     d }| j                   j                  d      }t        j                  |      }	t        j                  |      xr | j                   j                  d      }
d|	i}d}|	rd}| j                   j                  d      dk(  r6t        |||      }|j                  d      |v r| j	                  t
               | j                  r|	r| j	                  t        |		       | j                   j                  d      dk(  r|d
k(  r|j                  |||d      }nt        |||||       }|j                  }t        | |      }|j                  |       |
r*t        || j                   j                  d      |      \  }
}}|dk(  rJ|d
k(  rE| j                   j                  d      r*dj                  t        j                  |      |      |d<   n)dj                  t         j                  |      |      |d<    | j                  di | y )Nr   r   changedr   zkReset iDRAC to apply the new certificate. Until the iDRAC is reset, the old certificate will remain active.r   rH   r   )rF   r   r   F)r   dumpwaitr   z{0} {1})r   rF   z{0}{1} )rI   rJ   changed_mapr   rT   NO_CHANGES_MSGr   CHANGES_MSGrk   r   rm   r   updater   r~   SUCCESS_MSG_SSLSUCCESS_MSG)r6   rp   r   r   r:   r8   ru   rq   cmdr   r   result	reset_msgexport_certr   cert_outputtrack_faileds                    r;   r   r   &  s   D
--

I
&Cooc"GOOC ?V]]%6%6w%?E!FIY	}}#x/%eY?01[@0W[':}}#w.93H##Hf<e#T1%6<Y_`I	2K
MM+)4UFMM<M<Mf<UW])^&|Y
h90V]]5F5Fy5Q!(()?)?)?)LiXu (:(:3(:(GSuFvr=   c                     ddg ddddg ddddiddidd	d
ddd	ddd	ddd	ddd	ddd	dddidd	dddg dddddidd	ddddd	} t        | g dg dg dgd	      }	 t        |j                        5 }t        j	                  |j                  j	                  d            }|j                  j	                  d      }|j                  j	                  d      }|st        ||      }t        ||      }t        ||      }|dv rP|j                  j	                  d      r5|j                  j	                  d      d k  r|j                  t        d	!       |j                  j	                  d"      }|d#k(  r||d$k(  rt        |||||       t        ||||||       d d d        y # 1 sw Y   y xY w# t        $ r:}	|j                  t        |	      t        j                  |	      d	%       Y d }	~	y d }	~	wt         $ r&}	|j                  t        |	      d	&       Y d }	~	y d }	~	wt"        t$        t&        t(        t*        t,        t.        t0        f$ r&}
|j                  t        |
      d	!       Y d }
~
y d }
~
ww xY w)'NrK   r   )r   r   r   r   )typedefaultchoicesr/   r.   r   r   T)r   no_logr   )r   requiredlist)r   elementsr   r    )r   optionsbool)r   r   inti,  )	r   r   r   r   r@   r[   resource_idr   r   )r   r   )r[   r   )r   r   r   )r   r   r  )argument_specrequired_ifsupports_check_moder   r   r  )r   r   r   r   r   rE   r   r   r   )rF   r   rG   )rF   unreachable)r   r   rI   certype_maprJ   rv   r   r   rT   WAIT_NEGATIVE_OR_ZERO_MSGr   r   r
   rK   r   r   r	   ImportError
ValueErrorRuntimeErrorr   r   KeyError	TypeError
IndexError)specsr6   rp   r8   r7   ru   r   actions_mapr   r   es              r;   mainr  F  s   !nLN%*w(oq#V,F#$5 &$)t<*/T!B&+>#(d;%*=$e_*/T!B)/Ur R	4
 	  T23/)E.  M88

 !"F2V]]+ 	Yu#(9(9:L(MNI)))4I]]&&}5F#E95 1% @)%1BCK//FMM4E4Eg4NSYS`S`SdSdekSlpqSq  %>t Lmm''	2GH$)<hAVvuk7FKvuk9iQWX	Y 	Y 	Y  OSX$))C.NN 9SX488\3EXy*> 2SVD112sO   $F3 9D%F'F3 'F0,F3 0F3 3	I4<0G11I4=H0I4I//I4__main__)J
__future__r   r   r   r   __metaclass__DOCUMENTATIONEXAMPLESRETURNr   r   rP   r   r   Iansible_collections.dellemc.openmanage.plugins.module_utils.idrac_redfishr   r   +ansible.module_utils.six.moves.urllib.errorr	   r
   ansible.module_utils.urlsr   r   Aansible_collections.dellemc.openmanage.plugins.module_utils.utilsr   IMPORT_SSL_CERTIFICATEEXPORT_SSL_CERTIFICATEIDRAC_CARD_SERVICE_ACTION_URIr   r   r   r   r   r  	SYSTEM_IDrj   ACTIONS_PFIXSYSTEMS_URIrl   r}   CSR_SSL
IMPORT_SSL
UPLOAD_SSLr   	RESET_SSLIDRAC_RESETr   r   r   ra   r   r   r^   r   r   r  r<   r4   r5   r   rv   r   r   r   r   r   r   r   r   r   r   r   r  __name__r   r=   r;   <module>r.     s
   C Bm^Sj 
D    	  y K I YE E  e r Md2,\ 	
/00FG#%M
Q-..XY
-..PQ
-..XY
,--NO	Cp  C .2O1PPw/x-2O1PPw/xJA(
))de<(
))_`<(
))_`+0M/NNs-t-2O1PPw/xJ(*',I+JJk)l&+H*IIi(j $ [  1$68$PTU ,&:"(&!*")&4%79 #%'=#92H$:7M	O
 (>#92H$:7M	O
 %&IJL "*7 3%/!+0:",5?	A
 &0!+0:",5?	A
 #I.0 !CV_d+CE ,$ )$$3%)8	:
	U(X3*	,
 @62r zF r=   