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

Revert "[AutoPR] search/resource-manager" #4497

Merged
merged 1 commit into from
Mar 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions azure-mgmt-search/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,6 @@
Release History
===============

2.1.0 (2019-02-19)
++++++++++++++++++

**Features**

- Model SearchService has a new parameter identity
- Model Resource has a new parameter identity

2.0.0 (2018-05-21)
++++++++++++++++++

Expand All @@ -32,7 +24,7 @@ This version uses a next-generation code generator that *might* introduce breaki

- Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same.
- Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used.
- The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`,
- The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`,
without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`.
- New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`,
the response of the initial call will be returned without polling.
Expand Down
19 changes: 19 additions & 0 deletions azure-mgmt-search/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,25 @@ For the older Azure Service Management (ASM) libraries, see
For a more complete set of Azure libraries, see the `azure <https://pypi.python.org/pypi/azure>`__ bundle package.


Compatibility
=============

**IMPORTANT**: If you have an earlier version of the azure package
(version < 1.0), you should uninstall it before installing this package.

You can check the version using pip:

.. code:: shell

pip freeze

If you see azure==0.11.0 (or any version below 1.0), uninstall it first:

.. code:: shell

pip uninstall azure


Usage
=====

Expand Down
3 changes: 0 additions & 3 deletions azure-mgmt-search/azure/mgmt/search/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
from .query_key_py3 import QueryKey
from .sku_py3 import Sku
from .search_service_py3 import SearchService
from .identity_py3 import Identity
from .resource_py3 import Resource
from .operation_display_py3 import OperationDisplay
from .operation_py3 import Operation
Expand All @@ -28,7 +27,6 @@
from .query_key import QueryKey
from .sku import Sku
from .search_service import SearchService
from .identity import Identity
from .resource import Resource
from .operation_display import OperationDisplay
from .operation import Operation
Expand All @@ -52,7 +50,6 @@
'QueryKey',
'Sku',
'SearchService',
'Identity',
'Resource',
'OperationDisplay',
'Operation',
Expand Down
48 changes: 0 additions & 48 deletions azure-mgmt-search/azure/mgmt/search/models/identity.py

This file was deleted.

48 changes: 0 additions & 48 deletions azure-mgmt-search/azure/mgmt/search/models/identity_py3.py

This file was deleted.

4 changes: 0 additions & 4 deletions azure-mgmt-search/azure/mgmt/search/models/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ class Resource(Model):
:type location: str
:param tags: Tags to help categorize the resource in the Azure portal.
:type tags: dict[str, str]
:param identity: The identity of the resource.
:type identity: ~azure.mgmt.search.models.Identity
"""

_validation = {
Expand All @@ -48,7 +46,6 @@ class Resource(Model):
'type': {'key': 'type', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'identity': {'key': 'identity', 'type': 'Identity'},
}

def __init__(self, **kwargs):
Expand All @@ -58,4 +55,3 @@ def __init__(self, **kwargs):
self.type = None
self.location = kwargs.get('location', None)
self.tags = kwargs.get('tags', None)
self.identity = kwargs.get('identity', None)
6 changes: 1 addition & 5 deletions azure-mgmt-search/azure/mgmt/search/models/resource_py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ class Resource(Model):
:type location: str
:param tags: Tags to help categorize the resource in the Azure portal.
:type tags: dict[str, str]
:param identity: The identity of the resource.
:type identity: ~azure.mgmt.search.models.Identity
"""

_validation = {
Expand All @@ -48,14 +46,12 @@ class Resource(Model):
'type': {'key': 'type', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'identity': {'key': 'identity', 'type': 'Identity'},
}

def __init__(self, *, location: str=None, tags=None, identity=None, **kwargs) -> None:
def __init__(self, *, location: str=None, tags=None, **kwargs) -> None:
super(Resource, self).__init__(**kwargs)
self.id = None
self.name = None
self.type = None
self.location = location
self.tags = tags
self.identity = identity
3 changes: 0 additions & 3 deletions azure-mgmt-search/azure/mgmt/search/models/search_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ class SearchService(Resource):
:type location: str
:param tags: Tags to help categorize the resource in the Azure portal.
:type tags: dict[str, str]
:param identity: The identity of the resource.
:type identity: ~azure.mgmt.search.models.Identity
:param replica_count: The number of replicas in the Search service. If
specified, it must be a value between 1 and 12 inclusive for standard SKUs
or between 1 and 3 inclusive for basic SKU. Default value: 1 .
Expand Down Expand Up @@ -103,7 +101,6 @@ class SearchService(Resource):
'type': {'key': 'type', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'identity': {'key': 'identity', 'type': 'Identity'},
'replica_count': {'key': 'properties.replicaCount', 'type': 'int'},
'partition_count': {'key': 'properties.partitionCount', 'type': 'int'},
'hosting_mode': {'key': 'properties.hostingMode', 'type': 'HostingMode'},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ class SearchService(Resource):
:type location: str
:param tags: Tags to help categorize the resource in the Azure portal.
:type tags: dict[str, str]
:param identity: The identity of the resource.
:type identity: ~azure.mgmt.search.models.Identity
:param replica_count: The number of replicas in the Search service. If
specified, it must be a value between 1 and 12 inclusive for standard SKUs
or between 1 and 3 inclusive for basic SKU. Default value: 1 .
Expand Down Expand Up @@ -103,7 +101,6 @@ class SearchService(Resource):
'type': {'key': 'type', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'identity': {'key': 'identity', 'type': 'Identity'},
'replica_count': {'key': 'properties.replicaCount', 'type': 'int'},
'partition_count': {'key': 'properties.partitionCount', 'type': 'int'},
'hosting_mode': {'key': 'properties.hostingMode', 'type': 'HostingMode'},
Expand All @@ -113,8 +110,8 @@ class SearchService(Resource):
'sku': {'key': 'sku', 'type': 'Sku'},
}

def __init__(self, *, location: str=None, tags=None, identity=None, replica_count: int=1, partition_count: int=1, hosting_mode="default", sku=None, **kwargs) -> None:
super(SearchService, self).__init__(location=location, tags=tags, identity=identity, **kwargs)
def __init__(self, *, location: str=None, tags=None, replica_count: int=1, partition_count: int=1, hosting_mode="default", sku=None, **kwargs) -> None:
super(SearchService, self).__init__(location=location, tags=tags, **kwargs)
self.replica_count = replica_count
self.partition_count = partition_count
self.hosting_mode = hosting_mode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def get(

# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
Expand All @@ -93,8 +93,8 @@ def get(
header_parameters['x-ms-client-request-id'] = self._serialize.header("client_request_id", client_request_id, 'str')

# Construct and send request
request = self._client.post(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)
request = self._client.post(url, query_parameters)
response = self._client.send(request, header_parameters, stream=False, **operation_config)

if response.status_code not in [200]:
exp = CloudError(response)
Expand Down Expand Up @@ -163,7 +163,7 @@ def regenerate(

# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
Expand All @@ -174,8 +174,8 @@ def regenerate(
header_parameters['x-ms-client-request-id'] = self._serialize.header("client_request_id", client_request_id, 'str')

# Construct and send request
request = self._client.post(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)
request = self._client.post(url, query_parameters)
response = self._client.send(request, header_parameters, stream=False, **operation_config)

if response.status_code not in [200]:
exp = CloudError(response)
Expand Down
7 changes: 4 additions & 3 deletions azure-mgmt-search/azure/mgmt/search/operations/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def internal_paging(next_link=None, raw=False):

# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
Expand All @@ -77,8 +77,9 @@ def internal_paging(next_link=None, raw=False):
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)
request = self._client.get(url, query_parameters)
response = self._client.send(
request, header_parameters, stream=False, **operation_config)

if response.status_code not in [200]:
exp = CloudError(response)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def create(

# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
Expand All @@ -96,8 +96,8 @@ def create(
header_parameters['x-ms-client-request-id'] = self._serialize.header("client_request_id", client_request_id, 'str')

# Construct and send request
request = self._client.post(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)
request = self._client.post(url, query_parameters)
response = self._client.send(request, header_parameters, stream=False, **operation_config)

if response.status_code not in [200]:
exp = CloudError(response)
Expand Down Expand Up @@ -167,7 +167,7 @@ def internal_paging(next_link=None, raw=False):

# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
Expand All @@ -178,8 +178,9 @@ def internal_paging(next_link=None, raw=False):
header_parameters['x-ms-client-request-id'] = self._serialize.header("client_request_id", client_request_id, 'str')

# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)
request = self._client.get(url, query_parameters)
response = self._client.send(
request, header_parameters, stream=False, **operation_config)

if response.status_code not in [200]:
exp = CloudError(response)
Expand Down Expand Up @@ -248,6 +249,7 @@ def delete(

# Construct headers
header_parameters = {}
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
Expand All @@ -258,8 +260,8 @@ def delete(
header_parameters['x-ms-client-request-id'] = self._serialize.header("client_request_id", client_request_id, 'str')

# Construct and send request
request = self._client.delete(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)
request = self._client.delete(url, query_parameters)
response = self._client.send(request, header_parameters, stream=False, **operation_config)

if response.status_code not in [200, 204, 404]:
exp = CloudError(response)
Expand Down
Loading