Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[idrac_certificates]: Add CustomCertificate certificate_type (#485) #562

Merged
merged 35 commits into from
Dec 21, 2023

Conversation

KristianLamb
Copy link
Contributor

@KristianLamb KristianLamb commented Oct 5, 2023

Description

Add support for CustomCertificate certificate_type for Import/Export of DelliDRACCardService.

  • Import allows user to upload an externally generated webserver certificate and key from a passphrase protected PKCS12 format.
  • Export allows user to export the x509 leaf certificate to specified certificate_path for a previously imported CustomCertificate

GitHub Issues

List the GitHub issues impacted by this PR:

GitHub Issue #
#485

ISSUE TYPE

  • Feature Pull Request
COMPONENT NAME

idrac_certificates

OUTPUT
$ cat ssl_cert_deploy.yml 
---
- hosts: r5_ips
  connection: local
  gather_facts: False

  collections: 
  - dellemc.openmanage

  tasks:
    - name: Deploy SSL Certificate
      idrac_certificates:
        idrac_ip: "{{ inventory_hostname }}"
        idrac_user: "{{ bmc_user }}"
        idrac_password: "{{ bmc_pass }}"
        validate_certs: False
        command: "import"
        certificate_type: "CUSTOMCERTIFICATE"
        certificate_path: "/src/omam/omam-demo/idrac-wc.pfx"
        passphrase: "{{ pkcs_pass }}"
        reset: false
EOF

$ ansible-playbook -i inventory.ini ssl_cert_deploy.yml 

PLAY [r5_ips] ******************************************************************************************************************************************************************************************************************************************

TASK [Deploy SSL Certificate] **************************************************************************************************************************************************************************************************************************
changed: [192.168.10.81]

PLAY RECAP *********************************************************************************************************************************************************************************************************************************************
192.168.10.81              : ok=1    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   

ADDITIONAL INFORMATION

Checklist:

  • I have performed a self-review of my own code to ensure there are no formatting, vetting, linting, or security issues
  • I have verified that new and existing unit tests pass locally with my changes
  • I have not allowed coverage numbers to degenerate
  • I have maintained at least 90% code coverage
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have maintained backward compatibility

@ansible-collections-svc
Copy link
Collaborator

Can one of the admins verify this patch?

@codecov-commenter
Copy link

codecov-commenter commented Oct 5, 2023

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (9340653) 93.00% compared to head (e555fa8) 93.05%.

Files Patch % Lines
plugins/modules/idrac_certificates.py 95.19% 2 Missing and 3 partials ⚠️
Additional details and impacted files
@@               Coverage Diff               @@
##           collections     #562      +/-   ##
===============================================
+ Coverage        93.00%   93.05%   +0.04%     
===============================================
  Files              191      191              
  Lines            30507    30574      +67     
  Branches          4798     4809      +11     
===============================================
+ Hits             28374    28450      +76     
+ Misses            1309     1304       -5     
+ Partials           824      820       -4     
Flag Coverage Δ
units 93.05% <97.04%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

plugins/modules/idrac_certificates.py Outdated Show resolved Hide resolved
plugins/modules/idrac_certificates.py Outdated Show resolved Hide resolved
@jagadeeshnv jagadeeshnv force-pushed the feature/idrac_certificates branch from afea125 to da0d283 Compare December 11, 2023 06:59
@rajshekarp87 rajshekarp87 added this to the v8.6.0 milestone Dec 20, 2023
ShivamSh3
ShivamSh3 previously approved these changes Dec 20, 2023
@ShivamSh3 ShivamSh3 added validation/completed Validation is completed and removed validation/in-progress Validation is in progress labels Dec 20, 2023
plugins/modules/idrac_certificates.py Outdated Show resolved Hide resolved
plugins/modules/idrac_certificates.py Outdated Show resolved Hide resolved
plugins/modules/idrac_certificates.py Outdated Show resolved Hide resolved
plugins/modules/idrac_certificates.py Outdated Show resolved Hide resolved
plugins/modules/idrac_certificates.py Outdated Show resolved Hide resolved
docs/modules/idrac_certificates.rst Outdated Show resolved Hide resolved
docs/modules/idrac_certificates.rst Show resolved Hide resolved
@sachin-apa sachin-apa merged commit 2bdc3e1 into dell:collections Dec 21, 2023
68 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
validation/completed Validation is completed
Projects
Development

Successfully merging this pull request may close these issues.

[BUG]: email_address required in idrac_certificates module [QUESTION]: import cert to idrac
10 participants