Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[azure][fix] Fix model and remove useless resources #1809

Merged
merged 4 commits into from
Oct 26, 2023

Conversation

aquamatthias
Copy link
Member

Description

  • Remove useless resources
  • Fix overlapping properties

To-Dos

  • Add test coverage for new or updated functionality
  • Lint and test with tox

Code of Conduct

By submitting this pull request, I agree to follow the code of conduct.

@@ -3238,7 +3242,7 @@ class AzureExpressRoutePort(AzureResource):
"ether_type": S("properties", "etherType"),
"identity": S("identity") >> Bend(AzureManagedServiceIdentity.mapping),
"links": S("properties", "links") >> ForallBend(AzureExpressRouteLink.mapping),
"mtu_string": S("properties", "mtu"), # TODO: check if this string is actually an int?
"mtu_string": S("properties", "mtu"), # TODO: check if this string is actually an int?
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I saw, this property have a string type.

https://learn.microsoft.com/en-us/rest/api/expressroute/express-route-ports/list?tabs=HTTP#expressrouteport

properties.mtu string Maximum transmission unit of the physical port pair(s).

And in example json response we can also see a string type of mtu property

 "properties": {
      ...
      "mtu": "1500",
      ...
  }

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let us convert this string into a number.

@@ -3487,7 +3491,7 @@ class AzureFirewallPolicy(AzureResource):
>> Bend(AzureFirewallPolicyIntrusionDetection.mapping),
"provisioning_state": S("properties", "provisioningState"),
"rule_collection_groups": S("properties") >> S("ruleCollectionGroups", default=[]) >> ForallBend(S("id")),
"size_string": S("properties", "size"), # TODO: check if this is actually an int?
"size_string": S("properties", "size"), # TODO: check if this is actually an int?
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This property also have a string type

https://learn.microsoft.com/en-us/rest/api/virtualnetwork/firewall-policies/list-all?tabs=HTTP#firewallpolicy

properties.size string A read-only string that represents the size of the FirewallPolicyPropertiesFormat in MB. (ex 0.5MB)

@aquamatthias aquamatthias merged commit 827a778 into main Oct 26, 2023
7 checks passed
@aquamatthias aquamatthias deleted the mv/azure_network_resources branch October 26, 2023 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants