Fix LogicalSubnetworks IPConfiguration references
This commit is contained in:
parent
0a901e394c
commit
5b2ffe68e1
@ -515,8 +515,9 @@ class LogicalSubnetworks(_BaseHNVModel):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def from_raw_data(cls, raw_data):
|
def from_raw_data(cls, raw_data):
|
||||||
"""Create a new model using raw API response."""
|
"""Create a new model using raw API response."""
|
||||||
ip_pools = []
|
|
||||||
properties = raw_data["properties"]
|
properties = raw_data["properties"]
|
||||||
|
|
||||||
|
ip_pools = []
|
||||||
for raw_content in properties.get("ipPools", []):
|
for raw_content in properties.get("ipPools", []):
|
||||||
raw_content["parentResourceID"] = raw_data["resourceId"]
|
raw_content["parentResourceID"] = raw_data["resourceId"]
|
||||||
raw_content["grandParentResourceID"] = raw_data["parentResourceID"]
|
raw_content["grandParentResourceID"] = raw_data["parentResourceID"]
|
||||||
@ -524,10 +525,9 @@ class LogicalSubnetworks(_BaseHNVModel):
|
|||||||
properties["ipPools"] = ip_pools
|
properties["ipPools"] = ip_pools
|
||||||
|
|
||||||
ip_configurations = []
|
ip_configurations = []
|
||||||
raw_settings = properties.get("ipConfigurations", [])
|
for raw_content in properties.get("ipConfigurations", []):
|
||||||
for raw_configuration in raw_settings:
|
resource = Resource.from_raw_data(raw_content)
|
||||||
ip_configuration = IPConfiguration.from_raw_data(raw_configuration)
|
ip_configurations.append(resource)
|
||||||
ip_configurations.append(ip_configuration)
|
|
||||||
properties["ipConfigurations"] = ip_configurations
|
properties["ipConfigurations"] = ip_configurations
|
||||||
|
|
||||||
network_interfaces = []
|
network_interfaces = []
|
||||||
|
Loading…
x
Reference in New Issue
Block a user