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

Implement SDT Module #69

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Implement SDT Module #69

wants to merge 1 commit into from

Conversation

RayLiu7
Copy link

@RayLiu7 RayLiu7 commented Oct 30, 2024

Description

Implement SDT Module

  • Managing SDT on PowerFlex storage system:
    creating new SDT, getting details of SDT, managing IP/role of SDT,
    modifying attributes of SDT, and deleting SDT.

Checklist:

  • I have performed a self-review of my own code to ensure there are no formatting, pep8, linting, or security issues
  • I have performed Ansible Sanity test using --docker default
  • 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
  • Backward compatibility is not broken

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration

  • Unit Tests

@ansible-collections-svc
Copy link
Collaborator

Can one of the admins verify this patch?

@codecov-commenter
Copy link

codecov-commenter commented Oct 30, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 95.03386% with 22 lines in your changes missing coverage. Please review.

Project coverage is 92.05%. Comparing base (27ecbd2) to head (7858383).
Report is 15 commits behind head on main.

Files with missing lines Patch % Lines
plugins/modules/sdt.py 92.22% 9 Missing and 13 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #69      +/-   ##
==========================================
+ Coverage   91.95%   92.05%   +0.09%     
==========================================
  Files          49       52       +3     
  Lines        7311     7791     +480     
  Branches      919      961      +42     
==========================================
+ Hits         6723     7172     +449     
- Misses        309      325      +16     
- Partials      279      294      +15     
Flag Coverage Δ
units 92.05% <95.03%> (+0.09%) ⬆️

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.

@RayLiu7 RayLiu7 force-pushed the sdt-module branch 3 times, most recently from 8ac8a88 to 052aff3 Compare October 30, 2024 08:50
@RayLiu7 RayLiu7 force-pushed the sdt-module branch 3 times, most recently from 0d2df65 to 0bf699a Compare November 4, 2024 08:16
plugins/modules/sdt.py Outdated Show resolved Hide resolved
@sachin-apa
Copy link
Collaborator

run e2e

plugins/modules/sdt.py Outdated Show resolved Hide resolved
plugins/modules/sdt.py Outdated Show resolved Hide resolved
plugins/modules/sdt.py Outdated Show resolved Hide resolved
plugins/modules/sdt.py Outdated Show resolved Hide resolved
plugins/modules/sdt.py Outdated Show resolved Hide resolved
plugins/modules/sdt.py Outdated Show resolved Hide resolved
plugins/modules/sdt.py Outdated Show resolved Hide resolved
sdt_ip_list = copy.deepcopy(sdt_params["sdt_ip_list"])
if sdt_params["state"] == "present" and not sdt_details:
if sdt_params["sdt_new_name"] or sdt_params["maintenance_mode"]:
error_msg = "sdt_new_name and maintenance_mode are not supported during SDT creation"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to add support for renaming the sdt while create

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Bhavneet-Sharma, we had a agreement with Shrinidhi and Sachin to move modifying operations (like enter maintenance mode and rename) out of creation during the spike demo session, considering user usually have a sequence of steps to do in a playbook, so it's better to keep the atomicity of operations.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @RayLiu7,
We had review comment from Anupam to not to through an error message when rename parameter is passed while creating the object.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RayLiu7 its all about Declrative behavior, If we have enough data to perform an operation we should go ahead with it, instead of showing error, if it requires you to ignore certian paramters you can do that.
SO i think we need to remove this part to show error and just ignore the params not applicable for create.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sachin-apa @Bhavneet-Sharma ok, I'll remove the error display and ignore the params not applicable for create.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sachin-apa Just to confirm, by ignoring the params not for create, we don't perform the rename or mode change in the this task, right?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

plugins/modules/sdt.py Show resolved Hide resolved
plugins/modules/sdt.py Outdated Show resolved Hide resolved
@RayLiu7
Copy link
Author

RayLiu7 commented Nov 8, 2024

plugins/modules/sdt.py Outdated Show resolved Hide resolved
tests/unit/plugins/module_utils/mock_sdt_api.py Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants