Skip to content

Commit

Permalink
sanity fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alaa-bish committed Oct 31, 2023
1 parent 46ca173 commit 5c94380
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 5 deletions.
8 changes: 5 additions & 3 deletions plugins/inventory/ntnx_prism_vm_inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,11 @@ def parse(self, inventory, loader, path, cache=True):

for key, value in entity["status"]["resources"].items():
self.inventory.set_variable(vm_name, key, value)

if 'metadata' in entity and 'categories' in entity['metadata']:
self.inventory.set_variable(vm_name, 'ntnx_categories', entity['metadata']['categories'])

if "metadata" in entity and "categories" in entity["metadata"]:
self.inventory.set_variable(
vm_name, "ntnx_categories", entity["metadata"]["categories"]
)

# Add variables created by the user's Jinja2 expressions to the host
self._set_composite_vars(
Expand Down
15 changes: 13 additions & 2 deletions plugins/modules/ntnx_ndb_database_clone_refresh.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
- timestamp for point in time database cone refresh
- format is 'yyyy-mm-dd hh:mm:ss'
type: str
latest_snapshot:
description:
- write
type: bool
extends_documentation_fragment:
- nutanix.ncp.ntnx_ndb_base_module
- nutanix.ncp.ntnx_operations
Expand Down Expand Up @@ -301,7 +305,7 @@ def get_module_spec():
snapshot_uuid=dict(type="str", required=False),
timezone=dict(type="str", default="Asia/Calcutta", required=False),
pitr_timestamp=dict(type="str", required=False),
latest_snapshot=dict(type="bool", required=False)
latest_snapshot=dict(type="bool", required=False),
)
return module_args

Expand Down Expand Up @@ -346,7 +350,14 @@ def run_module():
module = NdbBaseModule(
argument_spec=get_module_spec(),
supports_check_mode=True,
required_if=[("state", "present", ("snapshot_uuid", "pitr_timestamp", "latest_snapshot"), True)],
required_if=[
(
"state",
"present",
("snapshot_uuid", "pitr_timestamp", "latest_snapshot"),
True,
)
],
mutually_exclusive=mutually_exclusive_list,
)
remove_param_with_none_value(module.params)
Expand Down
4 changes: 4 additions & 0 deletions plugins/modules/ntnx_ndb_database_clones.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@
description:
- timestamp for create clone from point in time
type: str
latest_snapshot:
description:
- write
type: bool
postgres:
description:
- postgres database related config
Expand Down

0 comments on commit 5c94380

Please sign in to comment.