Skip to content

Commit

Permalink
Updated version 1.1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
naveena-maplelabs committed Jan 12, 2024
1 parent 87f51b4 commit 6a23415
Show file tree
Hide file tree
Showing 27 changed files with 81 additions and 361 deletions.
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace: cohesity
name: dataprotect

# The version of the collection. Must be compatible with semantic versioning
version: 1.1.6
version: 1.1.7

# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: README.md
Expand Down
2 changes: 1 addition & 1 deletion plugins/module_utils/cohesity_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
module_utils: cohesity_auth
short_description: The **CohesityAuth** utils module provides the authentication token manage
for Cohesity Platforms.
version_added: 1.1.6
version_added: 1.1.7
description:
- The **CohesityAuth** utils module provides the authentication token manage
for Cohesity Platforms.
Expand Down
8 changes: 4 additions & 4 deletions plugins/module_utils/cohesity_hints.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
module_utils: cohesity_hints
short_description: The **CohesityHints** utils module provides standard methods for returning query data
from Cohesity Platforms.
version_added: 1.1.6
version_added: 1.1.7
description:
- The **CohesityHints** utils module provides standard methods for returning query data
from Cohesity Platforms.
Expand Down Expand Up @@ -640,7 +640,7 @@ def unregister_source(module, self):
headers = {
"Accept": "application/json",
"Authorization": "Bearer " + token,
"user-agent": "cohesity-ansible/v1.1.6",
"user-agent": "cohesity-ansible/v1.1.7",
}

response = open_url(
Expand Down Expand Up @@ -714,7 +714,7 @@ def check__protection_group__exists(module, self):
headers = {
"Accept": "application/json",
"Authorization": "Bearer " + self["token"],
"user-agent": "cohesity-ansible/v1.1.6",
"user-agent": "cohesity-ansible/v1.1.7",
}
response = open_url(
url=uri,
Expand Down Expand Up @@ -773,7 +773,7 @@ def get_resource_pool_id(module, self):
headers = {
"Accept": "application/json",
"Authorization": "Bearer " + token,
"user-agent": "cohesity-ansible/v1.1.6",
"user-agent": "cohesity-ansible/v1.1.7",
}
response = open_url(
url=uri,
Expand Down
2 changes: 1 addition & 1 deletion plugins/module_utils/cohesity_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
module_utils: cohesity_utilities
short_description: The **CohesityUtilities** utils module provides the authentication token manage
for Cohesity Platforms.
version_added: 1.1.6
version_added: 1.1.7
description:
- The **CohesityUtilities** utils module provides the authentication token manage
for Cohesity Platforms.
Expand Down
10 changes: 5 additions & 5 deletions plugins/modules/cohesity_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ def download_agent(module, path):
headers = {
"Accept": "application/octet-stream",
"Authorization": "Bearer " + token,
"user-agent": "cohesity-ansible/v1.1.6",
"user-agent": "cohesity-ansible/v1.1.7",
}
elif not module.params.get("download_uri"):
os_type = "Linux"
Expand Down Expand Up @@ -334,13 +334,13 @@ def download_agent(module, path):
headers = {
"Accept": "application/octet-stream",
"Authorization": "Bearer " + token,
"user-agent": "cohesity-ansible/v1.1.6",
"user-agent": "cohesity-ansible/v1.1.7",
}
else:
uri = module.params.get("download_uri")
headers = {
"Accept": "application/octet-stream",
"user-agent": "cohesity-ansible/v1.1.6",
"user-agent": "cohesity-ansible/v1.1.7",
}

agent = open_url(
Expand Down Expand Up @@ -612,7 +612,7 @@ def get_source_details(module, source_id):
headers = {
"Accept": "application/json",
"Authorization": "Bearer " + token,
"user-agent": "cohesity-ansible/v1.1.6",
"user-agent": "cohesity-ansible/v1.1.7",
}
response = open_url(
url=uri,
Expand Down Expand Up @@ -664,7 +664,7 @@ def update_agent(module):
headers = {
"Accept": "application/json",
"Authorization": "Bearer " + token,
"user-agent": "cohesity-ansible/v1.1.6",
"user-agent": "cohesity-ansible/v1.1.7",
}
payload = {"agentIds": [source_details["agent"]["id"]]}
open_url(
Expand Down
6 changes: 3 additions & 3 deletions plugins/modules/cohesity_cancel_migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
extends_documentation_fragment:
- cohesity.dataprotect.cohesity
short_description: Cancel the VM migration
version_added: 1.1.6
version_added: 1.1.7
"""

EXAMPLES = """
Expand Down Expand Up @@ -129,7 +129,7 @@ def check__protection_restore__exists(module, self):
headers = {
"Accept": "application/json",
"Authorization": "Bearer " + token,
"user-agent": "cohesity-ansible/v1.1.6",
"user-agent": "cohesity-ansible/v1.1.7",
}
response = open_url(
url=uri,
Expand Down Expand Up @@ -176,7 +176,7 @@ def cancel_migration(module, task_id):
headers = {
"Accept": "application/json",
"Authorization": "Bearer " + token,
"user-agent": "cohesity-ansible/v1.1.6",
"user-agent": "cohesity-ansible/v1.1.7",
}
response = open_url(
url=uri,
Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/cohesity_clone_vm.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
extends_documentation_fragment:
- cohesity.dataprotect.cohesity
short_description: "Management of Cohesity VM Clone"
version_added: 1.1.6
version_added: 1.1.7
"""


Expand Down Expand Up @@ -506,7 +506,7 @@ def main():

global cohesity_client
base_controller = BaseController()
base_controller.global_headers["user-agent"] = "cohesity-ansible/v1.1.6"
base_controller.global_headers["user-agent"] = "cohesity-ansible/v1.1.7"
cohesity_client = get_cohesity_client(module)
clone_exists, clone_details = get_clone_task(module, False)

Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/cohesity_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
short_description: Gather facts about a Cohesity Cluster.
description:
- Gather facts about Cohesity Clusters.
version_added: 1.1.6
version_added: 1.1.7
author: "Naveena (@naveena-maplelabs)"
options:
cluster:
Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/cohesity_finalize_migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
extends_documentation_fragment:
- cohesity.dataprotect.cohesity
short_description: Finalize the VM migration
version_added: 1.1.6
version_added: 1.1.7
"""

EXAMPLES = """
Expand Down Expand Up @@ -154,7 +154,7 @@ def finalize_migration(module, self):
headers = {
"Accept": "application/json",
"Authorization": "Bearer " + token,
"user-agent": "cohesity-ansible/v1.1.6",
"user-agent": "cohesity-ansible/v1.1.7",
}
body = {
"restoreTaskId": self["task_id"],
Expand Down
20 changes: 10 additions & 10 deletions plugins/modules/cohesity_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@
extends_documentation_fragment:
- cohesity.dataprotect.cohesity
short_description: "Management of Cohesity Protection Jobs"
version_added: 1.1.6
version_added: 1.1.7
"""

EXAMPLES = """
Expand Down Expand Up @@ -586,7 +586,7 @@ def get_vmware_ids(module, job_meta_data, job_details, vm_names):
headers = {
"Accept": "application/json",
"Authorization": "Bearer " + token,
"user-agent": "cohesity-ansible/v1.1.6",
"user-agent": "cohesity-ansible/v1.1.7",
}
response = open_url(
url=uri,
Expand Down Expand Up @@ -624,7 +624,7 @@ def get_vmware_vm_ids(module, job_meta_data, job_details, vm_names):
headers = {
"Accept": "application/json",
"Authorization": "Bearer " + token,
"user-agent": "cohesity-ansible/v1.1.6",
"user-agent": "cohesity-ansible/v1.1.7",
}
response = open_url(
url=uri,
Expand Down Expand Up @@ -669,7 +669,7 @@ def get_view_storage_domain_id(module, self):
headers = {
"Accept": "application/json",
"Authorization": "Bearer " + token,
"user-agent": "cohesity-ansible/v1.1.6",
"user-agent": "cohesity-ansible/v1.1.7",
}
response = open_url(
url=uri,
Expand Down Expand Up @@ -734,7 +734,7 @@ def register_job(module, self):
headers = {
"Accept": "application/json",
"Authorization": "Bearer " + token,
"user-agent": "cohesity-ansible/v1.1.6",
"user-agent": "cohesity-ansible/v1.1.7",
}
payload = self.copy()

Expand Down Expand Up @@ -839,7 +839,7 @@ def start_job(module, self):
headers = {
"Accept": "application/json",
"Authorization": "Bearer " + token,
"user-agent": "cohesity-ansible/v1.1.6",
"user-agent": "cohesity-ansible/v1.1.7",
}
source_ids = payload.get("sourceIds", [])
payload = dict()
Expand Down Expand Up @@ -898,7 +898,7 @@ def update_job(module, job_details, update_source_ids=None):
headers = {
"Accept": "application/json",
"Authorization": "Bearer " + token,
"user-agent": "cohesity-ansible/v1.1.6",
"user-agent": "cohesity-ansible/v1.1.7",
}
payload = job_details.copy()
del payload["token"]
Expand Down Expand Up @@ -960,7 +960,7 @@ def get_prot_job_details(self, module):
headers = {
"Accept": "application/json",
"Authorization": "Bearer " + token,
"user-agent": "cohesity-ansible/v1.1.6",
"user-agent": "cohesity-ansible/v1.1.7",
}
response = open_url(
url=uri,
Expand Down Expand Up @@ -1021,7 +1021,7 @@ def stop_job(module, self):
headers = {
"Accept": "application/json",
"Authorization": "Bearer " + token,
"user-agent": "cohesity-ansible/v1.1.6",
"user-agent": "cohesity-ansible/v1.1.7",
}
payload = self.copy()

Expand Down Expand Up @@ -1085,7 +1085,7 @@ def unregister_job(module, self):
headers = {
"Accept": "application/json",
"Authorization": "Bearer " + token,
"user-agent": "cohesity-ansible/v1.1.6",
"user-agent": "cohesity-ansible/v1.1.7",
}

payload = dict(deleteSnapshots=self["deleteSnapshots"])
Expand Down
26 changes: 14 additions & 12 deletions plugins/modules/cohesity_migrate_vm.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@
description:
- Specifies a folder name where the VMs should be restored.
type: str
job_vm_pair:
description:
- Key value pair with job names as key and list of Virtual Machines to
Expand All @@ -175,7 +177,7 @@
extends_documentation_fragment:
- cohesity.dataprotect.cohesity
short_description: Migrate one or more Virtual Machines from Cohesity Migrate Jobs
version_added: 1.1.6
version_added: 1.1.7
"""

EXAMPLES = """
Expand Down Expand Up @@ -288,7 +290,7 @@ def get_source_details(module):
headers = {
"Accept": "application/json",
"Authorization": "Bearer " + token,
"user-agent": "cohesity-ansible/v1.1.6",
"user-agent": "cohesity-ansible/v1.1.7",
}
response = open_url(
url=uri,
Expand Down Expand Up @@ -338,7 +340,7 @@ def get_vm_folder_id(module, source_id, resource_pool_id):
headers = {
"Accept": "application/json",
"Authorization": "Bearer " + token,
"user-agent": "cohesity-ansible/v1.1.6",
"user-agent": "cohesity-ansible/v1.1.7",
}
response = open_url(
url=uri,
Expand Down Expand Up @@ -388,7 +390,7 @@ def get_resource_pool_id(module, source_id):
headers = {
"Accept": "application/json",
"Authorization": "Bearer " + token,
"user-agent": "cohesity-ansible/v1.1.6",
"user-agent": "cohesity-ansible/v1.1.7",
}
response = open_url(
url=uri,
Expand Down Expand Up @@ -449,7 +451,7 @@ def get_datastore_id(module, source_id, resource_pool_id):
headers = {
"Accept": "application/json",
"Authorization": "Bearer " + token,
"user-agent": "cohesity-ansible/v1.1.6",
"user-agent": "cohesity-ansible/v1.1.7",
}
response = open_url(
url=uri,
Expand Down Expand Up @@ -498,7 +500,7 @@ def get_network_id(module, source_id, resource_pool_id):
headers = {
"Accept": "application/json",
"Authorization": "Bearer " + token,
"user-agent": "cohesity-ansible/v1.1.6",
"user-agent": "cohesity-ansible/v1.1.7",
}
response = open_url(
url=uri,
Expand Down Expand Up @@ -545,7 +547,7 @@ def get_backup_job_run_id(module, job_id):
headers = {
"Accept": "application/json",
"Authorization": "Bearer " + token,
"user-agent": "cohesity-ansible/v1.1.6",
"user-agent": "cohesity-ansible/v1.1.7",
}
response = open_url(
url=uri,
Expand Down Expand Up @@ -585,7 +587,7 @@ def get_backup_job_ids(module, job_names):
headers = {
"Accept": "application/json",
"Authorization": "Bearer " + token,
"user-agent": "cohesity-ansible/v1.1.6",
"user-agent": "cohesity-ansible/v1.1.7",
}
response = open_url(
url=uri,
Expand Down Expand Up @@ -629,7 +631,7 @@ def get_vmware_source_objects(module, source_id):
headers = {
"Accept": "application/json",
"Authorization": "Bearer " + token,
"user-agent": "cohesity-ansible/v1.1.6",
"user-agent": "cohesity-ansible/v1.1.7",
}

response = open_url(
Expand Down Expand Up @@ -691,7 +693,7 @@ def start_restore(module, uri, self):
headers = {
"Accept": "application/json",
"Authorization": "Bearer " + token,
"user-agent": "cohesity-ansible/v1.1.6",
"user-agent": "cohesity-ansible/v1.1.7",
}
payload = self.copy()

Expand Down Expand Up @@ -733,7 +735,7 @@ def create_migration_task(module, body):
headers = {
"Accept": "application/json",
"Authorization": "Bearer " + token,
"user-agent": "cohesity-ansible/v1.1.6",
"user-agent": "cohesity-ansible/v1.1.7",
}
# module.fail_json(msg=body)
response = open_url(
Expand Down Expand Up @@ -823,7 +825,7 @@ def get_protection_groups(module):
headers = {
"Accept": "application/json",
"Authorization": "Bearer " + token,
"user-agent": "cohesity-ansible/v1.1.6",
"user-agent": "cohesity-ansible/v1.1.7",
}
response = open_url(
url=uri,
Expand Down
Loading

0 comments on commit 6a23415

Please sign in to comment.