-
Notifications
You must be signed in to change notification settings - Fork 43
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
Adding protection policies and protected resources module dev&tests #591
base: release/2.1
Are you sure you want to change the base?
Conversation
Adding module docs for volume group categories
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some comments in Dev Code
elements: dict | ||
required: true | ||
suboptions: | ||
source_location_label: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this label name means ? Can you share example ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Label of the source location from the replication locations list
It could be any unique name
- The external identifier of the category. | ||
type: str | ||
required: false | ||
name: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please verify once if name, uris and entity type is required for associating categories ? What is significance of this attributes in association when external ID is enough to attach to a vg.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are not required fields and we are not using them in the tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some comments in Test code
tests/integration/targets/ntnx_protection_policies_v2/tasks/protection_policies.yml
Outdated
Show resolved
Hide resolved
tests/integration/targets/ntnx_protection_policies_v2/tasks/protection_policies.yml
Outdated
Show resolved
Hide resolved
tests/integration/targets/ntnx_protection_policies_v2/tasks/protection_policies.yml
Outdated
Show resolved
Hide resolved
tests/integration/targets/ntnx_protection_policies_v2/tasks/protection_policies.yml
Outdated
Show resolved
Hide resolved
tests/integration/targets/ntnx_protection_policies_v2/tasks/protection_policies.yml
Outdated
Show resolved
Hide resolved
success_msg: "VM restored successfully" | ||
fail_msg: "VM restore failed" | ||
|
||
- name: Promote VG |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How can we make sure till this point the VG is protected or not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can't, there is no attribute to tell if VG is protected or not in the response that's why we added delay
|
||
- name: Generate spec for updating linear retention protection policy using check mode | ||
nutanix.ncp.ntnx_protection_policies_v2: | ||
ext_id: "{{ todelete[0] }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use direct values in check mode test cases
tests/integration/targets/ntnx_protection_policies_v2/tasks/protection_policies.yml
Outdated
Show resolved
Hide resolved
tests/integration/targets/ntnx_protection_policies_v2/tasks/protection_policies.yml
Outdated
Show resolved
Hide resolved
register: result | ||
ignore_errors: true | ||
|
||
- name: Status for disassociating category from first VG |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way we can check if it is disassociated or not?
Protection policies and protected resources V4 modules that support these operations