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

Specifying network_api_version with azure-mgmt-network==28.0.0 #38507

Open
r4victor opened this issue Nov 13, 2024 · 3 comments
Open

Specifying network_api_version with azure-mgmt-network==28.0.0 #38507

r4victor opened this issue Nov 13, 2024 · 3 comments
Assignees
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue is related to a management-plane library. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team Network question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@r4victor
Copy link

The 28.0.0 release introduced a breaking change:

This package now only targets the latest Api-Version available on Azure and removes APIs of other Api-Version. After this change, the package can have much smaller size. If your application requires a specific and non-latest Api-Version, it's recommended to pin this package to the previous released version; If your application always only use latest Api-Version, please ingore this change.

This breaks code that specified network_api_version like so:

network_profile=NetworkProfile(
    network_api_version=network_mgmt.NetworkManagementClient.DEFAULT_API_VERSION,
)

Now gives an error type object 'NetworkManagementClient' has no attribute 'DEFAULT_API_VERSION'.

My question is how do we create models like NetworkProfile() starting with azure-mgmt-network==28.0.0. Apparently, it requires specifying network_api_version since if I omit it or specify None, I get an error response:

 azure.core.exceptions.HttpResponseError:                   
                    (NetworkApiVersionMustBeSpecifiedWithNetworkInterfaceConfig
                    urations) Network api version in network profile of virtual
                    machine

More details: dstackai/dstack#1987

@github-actions github-actions bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Nov 13, 2024
@xiangyan99 xiangyan99 added Network Mgmt This issue is related to a management-plane library. and removed needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. labels Nov 13, 2024
@github-actions github-actions bot added the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Nov 13, 2024
@xiangyan99
Copy link
Member

Thanks for the feedback, we’ll investigate asap.

@msyyc
Copy link
Member

msyyc commented Nov 14, 2024

@r4victor I don't see a property named "network_api_version" in all models of network. Could you please share more context?

@r4victor
Copy link
Author

@msyyc, I was referring to a NetworkProfile model:

:ivar network_api_version: specifies the Microsoft.Network API version used when creating
networking resources in the Network Interface Configurations. "2020-11-01"

Although it's a model from compute, it expects a network API version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue is related to a management-plane library. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team Network question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

3 participants