From 2dcc1920eb922edcd68a9c6b62b82bac003ee16d Mon Sep 17 00:00:00 2001 From: rebbuh <35743270+rebbuh@users.noreply.github.com> Date: Mon, 30 Jan 2023 14:11:35 +0100 Subject: [PATCH] Adds attributes DataSource.object_type, DataSource.resource_uri and friendly_name to BackupInstance (#11) --- hybridcloud/backends/azureblob.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/hybridcloud/backends/azureblob.py b/hybridcloud/backends/azureblob.py index accaf5f..04f9c02 100644 --- a/hybridcloud/backends/azureblob.py +++ b/hybridcloud/backends/azureblob.py @@ -230,17 +230,20 @@ def create_or_update_bucket(self, namespace, name, spec): backup_properties = BackupInstanceResource( properties=BackupInstance( - policy_info=PolicyInfo( - policy_id=policy_id - ), data_source_info=Datasource( datasource_type="Microsoft.Storage/storageAccounts/blobServices", + object_type="Datasource", resource_id=storage_account.id, + resource_location=self._location, resource_name=storage_account.name, resource_type="Microsoft.Storage/storageAccounts", - resource_location=self._location, + resource_uri="" ), + friendly_name=bucket_name, object_type="BackupInstance", + policy_info=PolicyInfo( + policy_id=policy_id + ) ) )