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

Without subnet it is impossible to create a Network Interface #536

Closed

Conversation

catap
Copy link

@catap catap commented Mar 6, 2016

When try use without this commit, I receive error from azure api server:

....
  File "/Library/Python/2.7/site-packages/msrestazure/azure_operation.py", line 629, in result
    raise self._exception
msrestazure.azure_exceptions.CloudError: Subnet reference is required for ipconfiguration /subscriptions/49d0145c-3194-47eb-81d8-0845a97f3377/resourceGroups/jEugene-je/providers/Microsoft.Network/networkInterfaces/jEugene-je/ipConfigurations/default.

When try use without this commit, I receive error from azure api server:
```
....
  File "/Library/Python/2.7/site-packages/msrestazure/azure_operation.py", line 629, in result
    raise self._exception
msrestazure.azure_exceptions.CloudError: Subnet reference is required for ipconfiguration /subscriptions/49d0145c-3194-47eb-81d8-0845a97f3377/resourceGroups/jEugene-je/providers/Microsoft.Network/networkInterfaces/jEugene-je/ipConfigurations/default.
```
@lmazuel
Copy link
Member

lmazuel commented Mar 7, 2016

Hi,

Thank you for the bug report! I will not merge the PR, because this part of the code is auto-generated and we need to fix the problem at the source. But we will try to figure this out asap.

@annatisch could you please take a look?
The swagger file is here:
https://github.com/Azure/azure-rest-api-specs/blob/master/arm-network/2015-06-15/swagger/network.json

@lmazuel
Copy link
Member

lmazuel commented Mar 7, 2016

@annatisch this is an autorest bug. This commit
catap@13060f8

is the generated code with the same file using autorest 02/27 and last one. Could you fix this asap that I can regenerate the file?

Thank you!

@lmazuel
Copy link
Member

lmazuel commented Mar 7, 2016

As a workaround you can do (is we assume that you have a dict with your parameters)

conf = NetworkInterfaceIPConfiguration(**myargs)
conf.subnet = myargs['subnet']

since subnet is a public attribute

@catap
Copy link
Author

catap commented Mar 8, 2016

@lmazuel thanks, I did it.

@lmazuel
Copy link
Member

lmazuel commented Mar 28, 2016

I just released 2.0.0rc2 which fixes the bug. Please feel free to re-open if you experience any trouble.

Thank you again for your report!

@lmazuel lmazuel closed this Mar 28, 2016
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