Azure / azure-sdk-for-python

This repository is for active development of the Azure SDK for Python. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/python/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-python.
MIT License
4.61k stars 2.82k forks source link

How to use a newer version of NetworkManagementClient in an azure automation runbook? #3113

Closed arne21a closed 4 years ago

arne21a commented 6 years ago

the default NetworkManagementClient version in a python 2 automation runbook does not feature the attribute load_balancer_backend_address_pools.

from pydoc import help
from azure.mgmt.network import NetworkManagementClient
print help(NetworkManagementClient)

results in:

Help on class NetworkManagementClient in module azure.mgmt.network:

class NetworkManagementClient(__builtin__.object)
 |  Composite Swagger for Network Client
...
|  __init__(self, credentials, subscription_id, api_version='2017-03-01', base_url=None)
...
|  ----------------------------------------------------------------------
|  Data descriptors defined here:
...
|  express_route_service_providers
|  
|  load_balancers
|  
|  local_network_gateways
...

As documented, this version (2017-03-01) does not feature the attribute load_balancer_backend_address_pools.

My question: Is there a way to use a newer version of NetworkManagementClient in an azure runbook, without using a hybrid runner?

lmazuel commented 6 years ago

Tagging people from the Automation team: @Francisco-Gamino @vrdmr @avkaur @DeveloperTommy @Azure/azureautomation

lmazuel commented 6 years ago

To answer in terms of versionning, this is available in 2017-06-01 for the first time, which is 1.4.0 Python version. But I would suggest ideally the 2.0.0.

vrdmr commented 6 years ago

@Diastro Could you please take a look?

andyw248 commented 4 years ago

Support for Python 3.x should become available on Linux Hybrid Workers in early 2020.

andyw248 commented 4 years ago

Closing because work on updating to Python 3 is in progress, which should eliminate the issue described above.