diff --git a/CHANGELOG.md b/CHANGELOG.md index 88ca269..3849b77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/rubrik_cdm/data_management.py b/rubrik_cdm/data_management.py index ef53bf2..cc8fb08 100644 --- a/rubrik_cdm/data_management.py +++ b/rubrik_cdm/data_management.py @@ -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": { @@ -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): @@ -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 = [] @@ -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.