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

update changed api endpoints #287

Open
wants to merge 2 commits into
base: devel
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

### Fixed
- Fix MSSQL Recovery Point timestamp validation on Windows OS Python 2 & 3 ([Issue 268](https://github.com/rubrikinc/rubrik-sdk-for-python/issues/268))
- Fix Undefined API when calling volume_group/hosts apis ([Issue 286](https://github.com/rubrikinc/rubrik-sdk-for-python/issues/286))

## v2.0.10

Expand Down
8 changes: 4 additions & 4 deletions rubrik_cdm/data_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ def object_id(self, object_name, object_type, host_os=None, hostname=None, share
"api_endpoint": "/oracle/hierarchy/root/children?name={}".format(object_name)
},
"volume_group": {
"api_version": "internal",
"api_version": "v1",
"api_endpoint": "/volume_group?is_relic=false"
},
"archival_location": {
Expand Down Expand Up @@ -940,7 +940,7 @@ def assign_sla(self, object_name, sla_name, object_type, log_backup_frequency_in
self.log("assign_sla: Getting a list of all volumes on the '{}' Windows host.".format(
windows_host))
host_volumes = self.get(
"internal", "/host/{}/volume".format(physical_host_id), timeout=timeout)
"v1", "/host/{}/volume".format(physical_host_id), timeout=timeout)

# If the object_name (volumes to assign to the SLA) is a string, create a list for processing
if not isinstance(object_name, list):
Expand All @@ -966,7 +966,7 @@ def assign_sla(self, object_name, sla_name, object_type, log_backup_frequency_in
self.log(
"assign_sla: Getting details of the current volume group on the Windows host.")
volume_group_details = self.get(
"internal", "/volume_group/{}".format(volume_group_id), timeout=timeout)
"v1", "/volume_group/{}".format(volume_group_id), timeout=timeout)

# Create a config of the current volume sla settings
current_volumes_included_in_snapshot = []
Expand All @@ -992,7 +992,7 @@ def assign_sla(self, object_name, sla_name, object_type, log_backup_frequency_in
else:
self.log("assign_sla: Assigning the vSphere VM '{}' to the '{}' SLA Domain.".format(
object_name, sla_name))
return self.patch("internal", "/volume_group/{}".format(volume_group_id), config, timeout=timeout)
return self.patch("v1", "/volume_group/{}".format(volume_group_id), config, timeout=timeout)

def vsphere_live_mount(self, vm_name, date='latest', time='latest', host='current', remove_network_devices=False, power_on=True, timeout=15): # pylint: ignore
"""Live Mount a vSphere VM from a specified snapshot. If a specific date and time is not provided, the last snapshot taken will be used.
Expand Down