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

Feat/volume groups #305

Open
wants to merge 58 commits into
base: main
Choose a base branch
from
Open

Feat/volume groups #305

wants to merge 58 commits into from

Conversation

Gevorg-Khachatryan-97
Copy link
Contributor

No description provided.

plugins/module_utils/prism/volume_groups.py Outdated Show resolved Hide resolved
plugins/module_utils/prism/volume_groups.py Outdated Show resolved Hide resolved

if module.check_mode:
result["response"] = spec
result["response"]["disks"] = module.params.get("disks")
Copy link
Collaborator

Choose a reason for hiding this comment

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

disks, vms and clients in check mode can be ignored as module.params[] doesn't specifiy the spec we are using for creating them

Copy link
Collaborator

Choose a reason for hiding this comment

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

Create spec is different from module params for this entities

plugins/modules/ntnx_volume_groups.py Outdated Show resolved Hide resolved
plugins/modules/ntnx_volume_groups.py Outdated Show resolved Hide resolved
plugins/modules/ntnx_volume_groups.py Outdated Show resolved Hide resolved

result["detached_clients"] = detached_clients

def detach_vms():
Copy link
Collaborator

Choose a reason for hiding this comment

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

We can detach multiple VMs and iscsi clients in delete ops. If every single vm or iscsi detachment is independent operation then we need to handle case where detachments of all entities should be attempted and should fail at last incase some ops on some entities fail in between. Suppose 1 VM detachment fails in between then we can error out after ops on all VMs have been done.

plugins/modules/ntnx_volume_groups.py Show resolved Hide resolved
@staticmethod
def _build_spec_vdisk(module, payload, vdisk):

disk_size_bytes = vdisk["size_gb"] * 1024 * 1024 * 1024
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can create a convert func in utils which can be used by other modules as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants