Skip to content
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: 9 additions & 1 deletion azure-mgmt-search/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
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 @@ -24,7 +32,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: 0 additions & 19 deletions azure-mgmt-search/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,6 @@ 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: 3 additions & 0 deletions azure-mgmt-search/azure/mgmt/search/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
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 @@ -27,6 +28,7 @@
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 @@ -50,6 +52,7 @@
'QueryKey',
'Sku',
'SearchService',
'Identity',
'Resource',
'OperationDisplay',
'Operation',
Expand Down
48 changes: 48 additions & 0 deletions azure-mgmt-search/azure/mgmt/search/models/identity.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class Identity(Model):
"""Identity for the resource.

Variables are only populated by the server, and will be ignored when
sending a request.

All required parameters must be populated in order to send to Azure.

:ivar principal_id: The principal ID of resource identity.
:vartype principal_id: str
:ivar tenant_id: The tenant ID of resource.
:vartype tenant_id: str
:ivar type: Required. The identity type. Default value: "SystemAssigned" .
:vartype type: str
"""

_validation = {
'principal_id': {'readonly': True},
'tenant_id': {'readonly': True},
'type': {'required': True, 'constant': True},
}

_attribute_map = {
'principal_id': {'key': 'principalId', 'type': 'str'},
'tenant_id': {'key': 'tenantId', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
}

type = "SystemAssigned"

def __init__(self, **kwargs):
super(Identity, self).__init__(**kwargs)
self.principal_id = None
self.tenant_id = None
48 changes: 48 additions & 0 deletions azure-mgmt-search/azure/mgmt/search/models/identity_py3.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class Identity(Model):
"""Identity for the resource.

Variables are only populated by the server, and will be ignored when
sending a request.

All required parameters must be populated in order to send to Azure.

:ivar principal_id: The principal ID of resource identity.
:vartype principal_id: str
:ivar tenant_id: The tenant ID of resource.
:vartype tenant_id: str
:ivar type: Required. The identity type. Default value: "SystemAssigned" .
:vartype type: str
"""

_validation = {
'principal_id': {'readonly': True},
'tenant_id': {'readonly': True},
'type': {'required': True, 'constant': True},
}

_attribute_map = {
'principal_id': {'key': 'principalId', 'type': 'str'},
'tenant_id': {'key': 'tenantId', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
}

type = "SystemAssigned"

def __init__(self, **kwargs) -> None:
super(Identity, self).__init__(**kwargs)
self.principal_id = None
self.tenant_id = None
4 changes: 4 additions & 0 deletions azure-mgmt-search/azure/mgmt/search/models/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ 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 @@ -46,6 +48,7 @@ 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 @@ -55,3 +58,4 @@ 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: 5 additions & 1 deletion azure-mgmt-search/azure/mgmt/search/models/resource_py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ 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 @@ -46,12 +48,14 @@ 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, **kwargs) -> None:
def __init__(self, *, location: str=None, tags=None, identity=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: 3 additions & 0 deletions azure-mgmt-search/azure/mgmt/search/models/search_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ 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 @@ -101,6 +103,7 @@ 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,6 +32,8 @@ 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 @@ -101,6 +103,7 @@ 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 @@ -110,8 +113,8 @@ class SearchService(Resource):
'sku': {'key': 'sku', 'type': 'Sku'},
}

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)
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)
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['Content-Type'] = 'application/json; charset=utf-8'
header_parameters['Accept'] = 'application/json'
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)
response = self._client.send(request, header_parameters, stream=False, **operation_config)
request = self._client.post(url, query_parameters, header_parameters)
response = self._client.send(request, 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['Content-Type'] = 'application/json; charset=utf-8'
header_parameters['Accept'] = 'application/json'
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)
response = self._client.send(request, header_parameters, stream=False, **operation_config)
request = self._client.post(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
exp = CloudError(response)
Expand Down
7 changes: 3 additions & 4 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['Content-Type'] = 'application/json; charset=utf-8'
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
Expand All @@ -77,9 +77,8 @@ 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)
response = self._client.send(
request, header_parameters, stream=False, **operation_config)
request = self._client.get(url, query_parameters, header_parameters)
response = self._client.send(request, 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['Content-Type'] = 'application/json; charset=utf-8'
header_parameters['Accept'] = 'application/json'
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)
response = self._client.send(request, header_parameters, stream=False, **operation_config)
request = self._client.post(url, query_parameters, header_parameters)
response = self._client.send(request, 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['Content-Type'] = 'application/json; charset=utf-8'
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
Expand All @@ -178,9 +178,8 @@ 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)
response = self._client.send(
request, header_parameters, stream=False, **operation_config)
request = self._client.get(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
exp = CloudError(response)
Expand Down Expand Up @@ -249,7 +248,6 @@ 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 @@ -260,8 +258,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)
response = self._client.send(request, header_parameters, stream=False, **operation_config)
request = self._client.delete(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)

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