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
746 changes: 0 additions & 746 deletions azure-mgmt-search/build.json

This file was deleted.

1 change: 0 additions & 1 deletion azure-mgmt-search/dev_requirements.txt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
Release History
===============

2.1.0 (2019-05-24)
++++++++++++++++++

**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
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
recursive-include tests *.py *.yaml
include *.rst
include azure/__init__.py
include azure/mgmt/__init__.py
Expand Down
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
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 @@ -40,6 +42,7 @@
HostingMode,
SearchServiceStatus,
ProvisioningState,
IdentityType,
AdminKeyKind,
)

Expand All @@ -50,6 +53,7 @@
'QueryKey',
'Sku',
'SearchService',
'Identity',
'Resource',
'OperationDisplay',
'Operation',
Expand All @@ -62,5 +66,6 @@
'HostingMode',
'SearchServiceStatus',
'ProvisioningState',
'IdentityType',
'AdminKeyKind',
]
48 changes: 48 additions & 0 deletions sdk/search/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
:param type: Required. The identity type. Possible values include: 'None',
'SystemAssigned'
:type type: str or ~azure.mgmt.search.models.IdentityType
"""

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

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

def __init__(self, **kwargs):
super(Identity, self).__init__(**kwargs)
self.principal_id = None
self.tenant_id = None
self.type = kwargs.get('type', None)
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
:param type: Required. The identity type. Possible values include: 'None',
'SystemAssigned'
:type type: str or ~azure.mgmt.search.models.IdentityType
"""

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

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

def __init__(self, *, type, **kwargs) -> None:
super(Identity, self).__init__(**kwargs)
self.principal_id = None
self.tenant_id = None
self.type = type
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)
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
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ class SkuName(str, Enum):
standard = "standard"
standard2 = "standard2"
standard3 = "standard3"
storage_optimized_l1 = "storage_optimized_l1"
storage_optimized_l2 = "storage_optimized_l2"


class HostingMode(str, Enum):
Expand All @@ -50,6 +52,12 @@ class ProvisioningState(str, Enum):
failed = "failed"


class IdentityType(str, Enum):

none = "None"
system_assigned = "SystemAssigned"


class AdminKeyKind(str, Enum):

primary = "primary"
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 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 @@ -20,10 +20,13 @@ class Sku(Model):
Shared service. 'basic': Dedicated service with up to 3 replicas.
'standard': Dedicated service with up to 12 partitions and 12 replicas.
'standard2': Similar to standard, but with more capacity per search unit.
'standard3': Offers maximum capacity per search unit with up to 12
partitions and 12 replicas (or up to 3 partitions with more indexes if you
also set the hostingMode property to 'highDensity'). Possible values
include: 'free', 'basic', 'standard', 'standard2', 'standard3'
'standard3': The largest Standard offering with up to 12 partitions and 12
replicas (or up to 3 partitions with more indexes if you also set the
hostingMode property to 'highDensity'). 'storage_optimized_l1': Supports
1TB per partition, up to 12 partitions. 'storage_optimized_l2': Supports
2TB per partition, up to 12 partitions.'. Possible values include: 'free',
'basic', 'standard', 'standard2', 'standard3', 'storage_optimized_l1',
'storage_optimized_l2'
:type name: str or ~azure.mgmt.search.models.SkuName
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@ class Sku(Model):
Shared service. 'basic': Dedicated service with up to 3 replicas.
'standard': Dedicated service with up to 12 partitions and 12 replicas.
'standard2': Similar to standard, but with more capacity per search unit.
'standard3': Offers maximum capacity per search unit with up to 12
partitions and 12 replicas (or up to 3 partitions with more indexes if you
also set the hostingMode property to 'highDensity'). Possible values
include: 'free', 'basic', 'standard', 'standard2', 'standard3'
'standard3': The largest Standard offering with up to 12 partitions and 12
replicas (or up to 3 partitions with more indexes if you also set the
hostingMode property to 'highDensity'). 'storage_optimized_l1': Supports
1TB per partition, up to 12 partitions. 'storage_optimized_l2': Supports
2TB per partition, up to 12 partitions.'. Possible values include: 'free',
'basic', 'standard', 'standard2', 'standard3', 'storage_optimized_l1',
'storage_optimized_l2'
:type name: str or ~azure.mgmt.search.models.SkuName
"""

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
Loading