Skip to content

Commit 14d1d60

Browse files
AutorestCIlmazuel
authored andcommitted
[AutoPR] eventhub/resource-manager (Azure#5682)
* Generated from e85e79801aa569c07e7ec40c2bb2a2724346dead (Azure#5681) fixed the formatting * Rebuild by Azure#5682 * Generated from 1f7ddf81f5bea4ad70d037b79228518a7dc8f9df (Azure#5871) Add missing multi-api EventHub * Remove deprecated file * Refactor default API version * ChangeLog
1 parent 0e43638 commit 14d1d60

File tree

186 files changed

+5786
-7177
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

186 files changed

+5786
-7177
lines changed

sdk/eventhub/azure-mgmt-eventhub/HISTORY.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,22 @@
33
Release History
44
===============
55

6+
3.0.0 (2019-06-18)
7+
++++++++++++++++++
8+
9+
**General Breaking changes**
10+
11+
This version uses a next-generation code generator that *might* introduce breaking changes if you were importing from the v20xx_yy_zz API folders.
12+
In summary, some modules were incorrectly visible/importable and have been renamed. This fixed several issues caused by usage of classes that were not supposed to be used in the first place.
13+
14+
- EventHubManagementClient cannot be imported from `azure.mgmt.eventhub.v20xx_yy_zz.event_hub_management_client` anymore (import from `azure.mgmt.eventhub.v20xx_yy_zz` works like before)
15+
- EventHubManagementClientConfiguration import has been moved from `azure.mgmt.eventhub.v20xx_yy_zz.event_hub_management_client` to `azure.mgmt.eventhub.v20xx_yy_zz`
16+
- A model `MyClass` from a "models" sub-module cannot be imported anymore using `azure.mgmt.eventhub.v20xx_yy_zz.models.my_class` (import from `azure.mgmt.eventhub.v20xx_yy_zz.models` works like before)
17+
- An operation class `MyClassOperations` from an `operations` sub-module cannot be imported anymore using `azure.mgmt.eventhub.v20xx_yy_zz.operations.my_class_operations` (import from `azure.mgmt.eventhub.v20xx_yy_zz.operations` works like before)
18+
19+
Last but not least, HTTP connection pooling is now enabled by default. You should always use a client as a context manager, or call close(), or use no more than one client per process.
20+
21+
622
2.6.0 (2019-04-29)
723
++++++++++++++++++
824

sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
# regenerated.
1010
# --------------------------------------------------------------------------
1111

12-
from .event_hub_management_client import EventHubManagementClient
13-
from .version import VERSION
12+
from ._configuration import EventHubManagementClientConfiguration
13+
from ._event_hub_management_client import EventHubManagementClient
14+
__all__ = ['EventHubManagementClient', 'EventHubManagementClientConfiguration']
1415

15-
__all__ = ['EventHubManagementClient']
16+
from .version import VERSION
1617

1718
__version__ = VERSION
1819

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
from msrestazure import AzureConfiguration
12+
13+
from .version import VERSION
14+
15+
16+
class EventHubManagementClientConfiguration(AzureConfiguration):
17+
"""Configuration for EventHubManagementClient
18+
Note that all parameters used to create this instance are saved as instance
19+
attributes.
20+
21+
:param credentials: Credentials needed for the client to connect to Azure.
22+
:type credentials: :mod:`A msrestazure Credentials
23+
object<msrestazure.azure_active_directory>`
24+
:param subscription_id: Subscription credentials that uniquely identify a
25+
Microsoft Azure subscription. The subscription ID forms part of the URI
26+
for every service call.
27+
:type subscription_id: str
28+
:param str base_url: Service URL
29+
"""
30+
31+
def __init__(
32+
self, credentials, subscription_id, base_url=None):
33+
34+
if credentials is None:
35+
raise ValueError("Parameter 'credentials' must not be None.")
36+
if subscription_id is None:
37+
raise ValueError("Parameter 'subscription_id' must not be None.")
38+
if not base_url:
39+
base_url = 'https://management.azure.com'
40+
41+
super(EventHubManagementClientConfiguration, self).__init__(base_url)
42+
43+
# Starting Autorest.Python 4.0.64, make connection pool activated by default
44+
self.keep_alive = True
45+
46+
self.add_user_agent('azure-mgmt-eventhub/{}'.format(VERSION))
47+
self.add_user_agent('Azure-SDK-For-Python')
48+
49+
self.credentials = credentials
50+
self.subscription_id = subscription_id

sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/event_hub_management_client.py renamed to sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/_event_hub_management_client.py

Lines changed: 3 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -11,46 +11,12 @@
1111

1212
from msrest.service_client import SDKClient
1313
from msrest import Serializer, Deserializer
14-
from msrestazure import AzureConfiguration
1514

1615
from azure.profiles import KnownProfiles, ProfileDefinition
1716
from azure.profiles.multiapiclient import MultiApiClientMixin
18-
from .version import VERSION
17+
from ._configuration import EventHubManagementClientConfiguration
1918

2019

21-
class EventHubManagementClientConfiguration(AzureConfiguration):
22-
"""Configuration for EventHubManagementClient
23-
Note that all parameters used to create this instance are saved as instance
24-
attributes.
25-
26-
:param credentials: Credentials needed for the client to connect to Azure.
27-
:type credentials: :mod:`A msrestazure Credentials
28-
object<msrestazure.azure_active_directory>`
29-
:param subscription_id: Subscription credentials that uniquely identify a
30-
Microsoft Azure subscription. The subscription ID forms part of the URI
31-
for every service call.
32-
:type subscription_id: str
33-
:param str base_url: Service URL
34-
"""
35-
36-
def __init__(
37-
self, credentials, subscription_id, base_url=None):
38-
39-
if credentials is None:
40-
raise ValueError("Parameter 'credentials' must not be None.")
41-
if subscription_id is None:
42-
raise ValueError("Parameter 'subscription_id' must not be None.")
43-
if not base_url:
44-
base_url = 'https://management.azure.com'
45-
46-
super(EventHubManagementClientConfiguration, self).__init__(base_url)
47-
48-
self.add_user_agent('azure-mgmt-eventhub/{}'.format(VERSION))
49-
self.add_user_agent('Azure-SDK-For-Python')
50-
51-
self.credentials = credentials
52-
self.subscription_id = subscription_id
53-
5420

5521
class EventHubManagementClient(MultiApiClientMixin, SDKClient):
5622
"""Azure Event Hubs client
@@ -69,7 +35,7 @@ class EventHubManagementClient(MultiApiClientMixin, SDKClient):
6935
:param credentials: Credentials needed for the client to connect to Azure.
7036
:type credentials: :mod:`A msrestazure Credentials
7137
object<msrestazure.azure_active_directory>`
72-
:param subscription_id: Subscription credentials that uniquely identify a
38+
:param subscription_id: Subscription credentials which uniquely identify
7339
Microsoft Azure subscription. The subscription ID forms part of the URI
7440
for every service call.
7541
:type subscription_id: str
@@ -84,13 +50,12 @@ class EventHubManagementClient(MultiApiClientMixin, SDKClient):
8450
_PROFILE_TAG = "azure.mgmt.eventhub.EventHubManagementClient"
8551
LATEST_PROFILE = ProfileDefinition({
8652
_PROFILE_TAG: {
87-
None: DEFAULT_API_VERSION
53+
None: DEFAULT_API_VERSION,
8854
}},
8955
_PROFILE_TAG + " latest"
9056
)
9157

9258
def __init__(self, credentials, subscription_id, api_version=None, base_url=None, profile=KnownProfiles.default):
93-
9459
self.config = EventHubManagementClientConfiguration(credentials, subscription_id, base_url)
9560
super(EventHubManagementClient, self).__init__(
9661
credentials,
@@ -99,8 +64,6 @@ def __init__(self, credentials, subscription_id, api_version=None, base_url=None
9964
profile=profile
10065
)
10166

102-
############ Generated from here ############
103-
10467
@classmethod
10568
def _models_dict(cls, api_version):
10669
return {k: v for k, v in cls.models(api_version).__dict__.items() if isinstance(v, type)}
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
# coding=utf-8
1+
# coding=utf-8
22
# --------------------------------------------------------------------------
33
# Copyright (c) Microsoft Corporation. All rights reserved.
44
# Licensed under the MIT License. See License.txt in the project root for
55
# license information.
66
# --------------------------------------------------------------------------
7-
87
from .v2017_04_01.models import *

sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2015_08_01/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
# regenerated.
1010
# --------------------------------------------------------------------------
1111

12-
from .event_hub_management_client import EventHubManagementClient
13-
from .version import VERSION
12+
from ._configuration import EventHubManagementClientConfiguration
13+
from ._event_hub_management_client import EventHubManagementClient
14+
__all__ = ['EventHubManagementClient', 'EventHubManagementClientConfiguration']
1415

15-
__all__ = ['EventHubManagementClient']
16+
from .version import VERSION
1617

1718
__version__ = VERSION
1819

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
from msrestazure import AzureConfiguration
12+
13+
from .version import VERSION
14+
15+
16+
class EventHubManagementClientConfiguration(AzureConfiguration):
17+
"""Configuration for EventHubManagementClient
18+
Note that all parameters used to create this instance are saved as instance
19+
attributes.
20+
21+
:param credentials: Credentials needed for the client to connect to Azure.
22+
:type credentials: :mod:`A msrestazure Credentials
23+
object<msrestazure.azure_active_directory>`
24+
:param subscription_id: Subscription credentials that uniquely identify a
25+
Microsoft Azure subscription. The subscription ID forms part of the URI
26+
for every service call.
27+
:type subscription_id: str
28+
:param str base_url: Service URL
29+
"""
30+
31+
def __init__(
32+
self, credentials, subscription_id, base_url=None):
33+
34+
if credentials is None:
35+
raise ValueError("Parameter 'credentials' must not be None.")
36+
if subscription_id is None:
37+
raise ValueError("Parameter 'subscription_id' must not be None.")
38+
if not base_url:
39+
base_url = 'https://management.azure.com'
40+
41+
super(EventHubManagementClientConfiguration, self).__init__(base_url)
42+
43+
# Starting Autorest.Python 4.0.64, make connection pool activated by default
44+
self.keep_alive = True
45+
46+
self.add_user_agent('azure-mgmt-eventhub/{}'.format(VERSION))
47+
self.add_user_agent('Azure-SDK-For-Python')
48+
49+
self.credentials = credentials
50+
self.subscription_id = subscription_id

sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2015_08_01/event_hub_management_client.py renamed to sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2015_08_01/_event_hub_management_client.py

Lines changed: 6 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -11,47 +11,13 @@
1111

1212
from msrest.service_client import SDKClient
1313
from msrest import Serializer, Deserializer
14-
from msrestazure import AzureConfiguration
15-
from .version import VERSION
16-
from .operations.operations import Operations
17-
from .operations.namespaces_operations import NamespacesOperations
18-
from .operations.event_hubs_operations import EventHubsOperations
19-
from .operations.consumer_groups_operations import ConsumerGroupsOperations
20-
from . import models
21-
22-
23-
class EventHubManagementClientConfiguration(AzureConfiguration):
24-
"""Configuration for EventHubManagementClient
25-
Note that all parameters used to create this instance are saved as instance
26-
attributes.
27-
28-
:param credentials: Credentials needed for the client to connect to Azure.
29-
:type credentials: :mod:`A msrestazure Credentials
30-
object<msrestazure.azure_active_directory>`
31-
:param subscription_id: Subscription credentials that uniquely identify a
32-
Microsoft Azure subscription. The subscription ID forms part of the URI
33-
for every service call.
34-
:type subscription_id: str
35-
:param str base_url: Service URL
36-
"""
37-
38-
def __init__(
39-
self, credentials, subscription_id, base_url=None):
40-
41-
if credentials is None:
42-
raise ValueError("Parameter 'credentials' must not be None.")
43-
if subscription_id is None:
44-
raise ValueError("Parameter 'subscription_id' must not be None.")
45-
if not base_url:
46-
base_url = 'https://management.azure.com'
47-
48-
super(EventHubManagementClientConfiguration, self).__init__(base_url)
4914

50-
self.add_user_agent('azure-mgmt-eventhub/{}'.format(VERSION))
51-
self.add_user_agent('Azure-SDK-For-Python')
52-
53-
self.credentials = credentials
54-
self.subscription_id = subscription_id
15+
from ._configuration import EventHubManagementClientConfiguration
16+
from .operations import Operations
17+
from .operations import NamespacesOperations
18+
from .operations import EventHubsOperations
19+
from .operations import ConsumerGroupsOperations
20+
from . import models
5521

5622

5723
class EventHubManagementClient(SDKClient):

0 commit comments

Comments
 (0)