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

Fixed VM Migration Bug #38

Merged
merged 3 commits into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
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.4
version: 1.1.5

# 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.4
version_added: 1.1.5
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.4
version_added: 1.1.5
description:
- The **CohesityHints** utils module provides standard methods for returning query data
from Cohesity Platforms.
Expand Down Expand Up @@ -627,7 +627,7 @@ def unregister_source(module, self):
headers = {
"Accept": "application/json",
"Authorization": "Bearer " + token,
"user-agent": "cohesity-ansible/v1.1.4",
"user-agent": "cohesity-ansible/v1.1.5",
}

response = open_url(
Expand Down Expand Up @@ -701,7 +701,7 @@ def check__protection_group__exists(module, self):
headers = {
"Accept": "application/json",
"Authorization": "Bearer " + self["token"],
"user-agent": "cohesity-ansible/v1.1.4",
"user-agent": "cohesity-ansible/v1.1.5",
}
response = open_url(
url=uri,
Expand Down Expand Up @@ -760,7 +760,7 @@ def get_resource_pool_id(module, self):
headers = {
"Accept": "application/json",
"Authorization": "Bearer " + token,
"user-agent": "cohesity-ansible/v1.1.4",
"user-agent": "cohesity-ansible/v1.1.5",
}
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.4
version_added: 1.1.5
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.4",
"user-agent": "cohesity-ansible/v1.1.5",
}
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.4",
"user-agent": "cohesity-ansible/v1.1.5",
}
else:
uri = module.params.get("download_uri")
headers = {
"Accept": "application/octet-stream",
"user-agent": "cohesity-ansible/v1.1.4",
"user-agent": "cohesity-ansible/v1.1.5",
}

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.4",
"user-agent": "cohesity-ansible/v1.1.5",
}
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.4",
"user-agent": "cohesity-ansible/v1.1.5",
}
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.4
version_added: 1.1.5
"""

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.4",
"user-agent": "cohesity-ansible/v1.1.5",
}
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.4",
"user-agent": "cohesity-ansible/v1.1.5",
}
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.4
version_added: 1.1.5
"""


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.4"
base_controller.global_headers["user-agent"] = "cohesity-ansible/v1.1.5"
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.4
version_added: 1.1.5
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.4
version_added: 1.1.5
"""

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.4",
"user-agent": "cohesity-ansible/v1.1.5",
}
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.4
version_added: 1.1.5
"""

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.4",
"user-agent": "cohesity-ansible/v1.1.5",
}
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.4",
"user-agent": "cohesity-ansible/v1.1.5",
}
response = open_url(
url=uri,
Expand Down Expand Up @@ -670,7 +670,7 @@ def get_view_storage_domain_id(module, self):
headers = {
"Accept": "application/json",
"Authorization": "Bearer " + token,
"user-agent": "cohesity-ansible/v1.1.4",
"user-agent": "cohesity-ansible/v1.1.5",
}
response = open_url(
url=uri,
Expand Down Expand Up @@ -735,7 +735,7 @@ def register_job(module, self):
headers = {
"Accept": "application/json",
"Authorization": "Bearer " + token,
"user-agent": "cohesity-ansible/v1.1.4",
"user-agent": "cohesity-ansible/v1.1.5",
}
payload = self.copy()

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

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

payload = dict(deleteSnapshots=self["deleteSnapshots"])
Expand Down
Loading
Loading