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

All Modules under Prism namespace #571

Open
wants to merge 16 commits into
base: release/2.0
Choose a base branch
from

Conversation

abhinavbansal29
Copy link
Collaborator

Modules:

  1. ntnx_pc_unregistration_v2
  2. ntnx_pc_backup_target_info_v2
  3. ntnx_pc_backup_target_v2
  4. ntnx_pc_config_info_v2
  5. ntnx_pc_deploy_v2
  6. ntnx_pc_restore_v2
  7. ntnx_pc_restore_source_info_v2
  8. ntnx_pc_restore_source_v2

@abhinavbansal29 abhinavbansal29 changed the base branch from main to release/2.0 January 7, 2025 10:42
@abhinavbansal29 abhinavbansal29 linked an issue Jan 7, 2025 that may be closed by this pull request
14 tasks

class BaseInfoModule(BasePEModule):
"""
Base Info module class for Nutanix PC v4 list APIs based modules
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Base Info module class for Nutanix PC v4 list APIs based modules
Base Info module class for Nutanix PE v4 list APIs based modules

This method will return restore source info using external ID.
Args:
module: Ansible module
api_instance: DomainManagerBackupApi instance from ntnx_prism_py_client sdk
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
api_instance: DomainManagerBackupApi instance from ntnx_prism_py_client sdk
api_instance: DomainManagerBackupsApi instance from ntnx_prism_py_client sdk

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please remove this file

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please remove this file

This method will return backup target info using external ID.
Args:
module: Ansible module
api_instance: DomainManagerBackupApi instance from ntnx_prism_py_client sdk
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
api_instance: DomainManagerBackupApi instance from ntnx_prism_py_client sdk
api_instance: DomainManagerBackupsApi instance from ntnx_prism_py_client sdk

- Abhinav Bansal (@abhinavbansal29)
"""

EXAMPLES = r"""
Copy link
Collaborator

Choose a reason for hiding this comment

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

add examples and return

#!/usr/bin/python
# -*- coding: utf-8 -*-

# Copyright: (c) 2021, Prem Karat
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copyright: (c) 2025, Nutanix

extends_documentation_fragment:
- nutanix.ncp.ntnx_credentials
- nutanix.ncp.ntnx_operations_v2
author:
Copy link
Collaborator

Choose a reason for hiding this comment

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

author:
- Abhinav Bansal (@abhinavbansal29)

- Abhinav Bansal (@abhinavbansal29)
"""

EXAMPLES = r"""
Copy link
Collaborator

Choose a reason for hiding this comment

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

add examples and return

current_spec = get_pc_config(module, domain_manager_api, pc_ext_id)
etag_value = get_etag(data=current_spec)
if not etag_value:
module.fail_json(msg="Failed to get etag value for the PC", **result)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
module.fail_json(msg="Failed to get etag value for the PC", **result)
module.fail_json(msg="Failed to get etag value for the PC for unregistering cluster", **result)

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.

[Feat] Develop ansible module for Prism Central using v4
2 participants