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

Removed the modules using deprecated v4 sdks #536

Merged
merged 5 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
146 changes: 0 additions & 146 deletions plugins/modules/ntnx_volume_groups_categories_info_v2.py

This file was deleted.

39 changes: 3 additions & 36 deletions plugins/modules/ntnx_volume_groups_iscsi_clients_info_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@
)
from ..module_utils.v4.volumes.api_client import ( # noqa: E402
get_iscsi_client_api_instance,
get_vg_api_instance,
)


Expand All @@ -131,35 +130,6 @@ def get_module_spec():
return module_args


def get_vg_iscsi_clients(module, result):
vgs = get_vg_api_instance(module)
volume_group_ext_id = module.params.get("volume_group_ext_id")

sg = SpecGenerator(module)
kwargs, err = sg.get_info_spec(attr=module.params)

if err:
result["error"] = err
module.fail_json(msg="Failed generating info Spec", **result)

try:
resp = vgs.list_external_iscsi_attachments_by_volume_group_id(
volumeGroupExtId=volume_group_ext_id, **kwargs
)
except Exception as e:
raise_api_exception(
module=module,
exception=e,
msg="Api Exception raised while fetching ISCSI clients attached to VGs",
)

result["volume_group_ext_id"] = volume_group_ext_id
resp = strip_internal_attributes(resp.to_dict()).get("data")
if not resp:
resp = []
result["response"] = resp


def get_iscsi_client(module, result):
clients = get_iscsi_client_api_instance(module)
ext_id = module.params.get("ext_id")
Expand Down Expand Up @@ -214,13 +184,10 @@ def run_module():
)
remove_param_with_none_value(module.params)
result = {"changed": False, "error": None, "response": None}
if module.params.get("volume_group_ext_id"):
get_vg_iscsi_clients(module, result)
if module.params.get("ext_id"):
get_iscsi_client(module, result)
else:
if module.params.get("ext_id"):
get_iscsi_client(module, result)
else:
get_iscsi_clients(module, result)
get_iscsi_clients(module, result)

module.exit_json(**result)

Expand Down
147 changes: 0 additions & 147 deletions plugins/modules/ntnx_volume_groups_vms_info_v2.py

This file was deleted.

Loading
Loading