From e1130fb4536974ae637d629ed9cd6952403ca744 Mon Sep 17 00:00:00 2001 From: long-pham-ts Date: Mon, 9 Jun 2025 23:17:07 +0700 Subject: [PATCH 1/2] fix: Correct public IP prefixes reference in NATGatewaysManager and remove autoscale_settings from VMScaleSetsManager Signed-off-by: long-pham-ts --- src/plugin/manager/nat_gateways/instance_manager.py | 2 +- src/plugin/manager/vm_scale_sets/scale_set_manager.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugin/manager/nat_gateways/instance_manager.py b/src/plugin/manager/nat_gateways/instance_manager.py index a6df374..842d1d2 100644 --- a/src/plugin/manager/nat_gateways/instance_manager.py +++ b/src/plugin/manager/nat_gateways/instance_manager.py @@ -107,7 +107,7 @@ def create_cloud_service(self, options, secret_data, schema): nat_gateway_dict.update( { "public_ip_prefixes_count": len( - nat_gateway_dict["public_ip_addresses"] + nat_gateway_dict["public_ip_prefixes"] ) } ) diff --git a/src/plugin/manager/vm_scale_sets/scale_set_manager.py b/src/plugin/manager/vm_scale_sets/scale_set_manager.py index 93857e8..cfa77b2 100644 --- a/src/plugin/manager/vm_scale_sets/scale_set_manager.py +++ b/src/plugin/manager/vm_scale_sets/scale_set_manager.py @@ -221,6 +221,8 @@ def create_cloud_service(self, options, secret_data, schema): } ) + vm_scale_set_dict.pop("autoscale_settings") + self.set_region_code(vm_scale_set_dict["location"]) cloud_services.append( From a8d28eb42abec015259501b6f2623f26d12e2550 Mon Sep 17 00:00:00 2001 From: long-pham-ts Date: Thu, 12 Jun 2025 21:37:45 +0700 Subject: [PATCH 2/2] fix: Convert nested dict field notifications Signed-off-by: long-pham-ts --- src/plugin/manager/vm_scale_sets/scale_set_manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugin/manager/vm_scale_sets/scale_set_manager.py b/src/plugin/manager/vm_scale_sets/scale_set_manager.py index cfa77b2..b3e240f 100644 --- a/src/plugin/manager/vm_scale_sets/scale_set_manager.py +++ b/src/plugin/manager/vm_scale_sets/scale_set_manager.py @@ -378,7 +378,7 @@ def list_virtual_machine_scale_set_power_state(self, autoscale_obj_list): ), # profiles_list "enabled": autoscale_setting.enabled, "name": autoscale_setting.name, - "notifications": autoscale_setting.notifications, + "notifications": [self.convert_nested_dictionary(notification) for notification in autoscale_setting.notifications], "target_resource_uri": autoscale_setting.target_resource_uri, "tags": autoscale_setting.tags, }