Skip to content

Commit 9c1e470

Browse files
committed
Refactor AzureLoadBalancer to simplify private IP address retrieval; update test case for frontend_ip_configurations
1 parent 495116e commit 9c1e470

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

src/modules/get_azure_lb.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,6 @@ def get_private_ip_from_config(config):
246246
private_ip = (
247247
config.get("private_ip_address")
248248
or config.get("privateIpAddress")
249-
or config.get("properties", {}).get("private_ip_address")
250-
or config.get("properties", {}).get("privateIpAddress")
251249
)
252250
return private_ip
253251

tests/modules/get_azure_lb_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ def __init__(self):
247247
self.name = "nested-lb"
248248
self.location = "test"
249249
self.frontend_ip_configurations = [
250-
{"properties": {"private_ip_address": "10.0.0.5"}}
250+
{"private_ip_address": "10.0.0.5"}
251251
]
252252
self.load_balancing_rules = []
253253
self.probes = []

0 commit comments

Comments
 (0)