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

New version of NetApp module does not work with get_client_from_json_dict #16760

Closed
sschols opened this issue Feb 16, 2021 · 7 comments
Closed
Assignees
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. 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-author-feedback Workflow: More information is needed from author to address the issue. Network - Application Gateway no-recent-activity There has been no recent activity on this issue. Service Attention Workflow: This issue is responsible by Azure service team.

Comments

@sschols
Copy link

sschols commented Feb 16, 2021

  • Package Name: azure-mgmt-netapp
  • Package Version: 1.0.0
  • Operating System: MacOS 11
  • Python Version: 3.9

Describe the bug
Creating a new NetAppManagementClient via the get_client_from_json_dict function of the client factory fails:

  File "/opt/cloud/lnwcloud/operations/azure.py", line 41, in _get_az_client
    client = get_client_from_json_dict(NetAppManagementClient, config_dict)
  File "/opt/cloud/env_linux/lib/python3.9/site-packages/azure/common/client_factory.py", line 171, in get_client_from_json_dict
    return _instantiate_client(client_class, **parameters)
  File "/opt/cloud/env_linux/lib/python3.9/site-packages/azure/common/client_factory.py", line 34, in _instantiate_client
    return client_class(**kwargs)
TypeError: __init__() missing 1 required positional argument: 'credential'

To Reproduce
Steps to reproduce the behavior:

  1. Create client config JSON
  2. run get_client_from_json_dict(NetAppManagementClient, client_config_dict)
  3. Watch it fail

Expected behavior
A NetApp Management Client should be created

Additional context

There seem to have been many changes with 8fae515#diff-e0ab8e5f8b111235d15c2b525ecdf6a9531826e786d90a30c0a34fa1f1f371e4, including renaming of the credentials parameter (8fae515#diff-e0ab8e5f8b111235d15c2b525ecdf6a9531826e786d90a30c0a34fa1f1f371e4R14). The credentials parameter is the one being set by get_client_from_json_dict. This is likely the cause of this

The documentation also seems to not reflect the changes to the azure.mgmt.netapp package yet, there is no information on the NetAppManagementClient in https://docs.microsoft.com/de-de/python/api/azure-mgmt-netapp/azure.mgmt.netapp, it still refers to the AzureNetAppFilesManagementClient implementation.

@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Feb 16, 2021
@xiangyan99 xiangyan99 added bug This issue requires a change to an existing behavior in the product in order to be resolved. Mgmt This issue is related to a management-plane library. Network - Application Gateway Service Attention Workflow: This issue is responsible by Azure service team. labels Feb 16, 2021
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Feb 16, 2021
@ghost
Copy link

ghost commented Feb 16, 2021

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @appgwsuppgithub.

Issue Details
  • Package Name: azure-mgmt-netapp
  • Package Version: 1.0.0
  • Operating System: MacOS 11
  • Python Version: 3.9

Describe the bug
Creating a new NetAppManagementClient via the get_client_from_json_dict function of the client factory fails:

  File "/opt/cloud/lnwcloud/operations/azure.py", line 41, in _get_az_client
    client = get_client_from_json_dict(NetAppManagementClient, config_dict)
  File "/opt/cloud/env_linux/lib/python3.9/site-packages/azure/common/client_factory.py", line 171, in get_client_from_json_dict
    return _instantiate_client(client_class, **parameters)
  File "/opt/cloud/env_linux/lib/python3.9/site-packages/azure/common/client_factory.py", line 34, in _instantiate_client
    return client_class(**kwargs)
TypeError: __init__() missing 1 required positional argument: 'credential'

To Reproduce
Steps to reproduce the behavior:

  1. Create client config JSON
  2. run get_client_from_json_dict(NetAppManagementClient, client_config_dict)
  3. Watch it fail

Expected behavior
A NetApp Management Client should be created

Additional context

There seem to have been many changes with 8fae515#diff-e0ab8e5f8b111235d15c2b525ecdf6a9531826e786d90a30c0a34fa1f1f371e4, including renaming of the credentials parameter (8fae515#diff-e0ab8e5f8b111235d15c2b525ecdf6a9531826e786d90a30c0a34fa1f1f371e4R14). The credentials parameter is the one being set by get_client_from_json_dict. This is likely the cause of this

The documentation also seems to not reflect the changes to the azure.mgmt.netapp package yet, there is no information on the NetAppManagementClient in https://docs.microsoft.com/de-de/python/api/azure-mgmt-netapp/azure.mgmt.netapp, it still refers to the AzureNetAppFilesManagementClient implementation.

Author: sschols
Assignees: -
Labels:

Mgmt, Network - Application Gateway, Service Attention, bug, customer-reported, needs-triage, question

Milestone: -

@xiangyan99 xiangyan99 removed the question The issue doesn't require a change to the product in order to be resolved. Most issues start as that label Feb 16, 2021
@xiangyan99
Copy link
Member

Thanks for the feedback, we’ll investigate asap.

@lmazuel
Copy link
Member

lmazuel commented Feb 16, 2021

Hi @sschols
This is a duplicate of #15075

The new generation of SDK do not support this factory.

@sschols
Copy link
Author

sschols commented Feb 16, 2021

Thanks @lmazuel for the update. Are there any plans on updating the documentation accordingly? When I install the azure-mgmt-netapp module via pip right now, I get the 1.0 (beta?) version, which is not documented in the official SDK docs yet, which is very confusing.

@lmazuel
Copy link
Member

lmazuel commented Mar 12, 2021

We discussed on our team and concluded we do not want to support the JSON or file factory for security purposes, and we don't want to encourage practices that feel unsecure.
We wrote a migration guide for scenario:
https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/identity/azure-identity/migration_guide.md

Please let me know any feedback or questions related to this.

@lmazuel lmazuel added the needs-author-feedback Workflow: More information is needed from author to address the issue. label Mar 12, 2021
@lmazuel
Copy link
Member

lmazuel commented Mar 12, 2021

@sschols if the documentation is still not accurate, would you mind creating another issue about it? I like to keep issues focuses, since otherwise it ends up with many many different people and the success rate of fixes becomes low.
Thanks!

@ghost ghost added the no-recent-activity There has been no recent activity on this issue. label Mar 20, 2021
@ghost
Copy link

ghost commented Mar 20, 2021

Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!

@ghost ghost closed this as completed Apr 3, 2021
openapi-sdkautomation bot pushed a commit to AzureSDKAutomation/azure-sdk-for-python that referenced this issue Nov 17, 2021
[Hub Generated] Review request for Microsoft.BotService to add version preview/2021-05-01-preview (Azure#16760)

* rename

* change to enum

* fix bug

* fix example
openapi-sdkautomation bot pushed a commit to AzureSDKAutomation/azure-sdk-for-python that referenced this issue Nov 17, 2021
[Hub Generated] Review request for Microsoft.BotService to add version preview/2021-05-01-preview (Azure#16760)

* rename

* change to enum

* fix bug

* fix example
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. 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-author-feedback Workflow: More information is needed from author to address the issue. Network - Application Gateway no-recent-activity There has been no recent activity on this issue. Service Attention Workflow: This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

5 participants