Skip to content

Commit

Permalink
Update from master
Browse files Browse the repository at this point in the history
  • Loading branch information
SDK Automation committed May 15, 2020
1 parent f152b5f commit e870835
Show file tree
Hide file tree
Showing 65 changed files with 1,861 additions and 2,966 deletions.
4 changes: 0 additions & 4 deletions sdk/iothub/azure-mgmt-iothubprovisioningservices/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
recursive-include tests *.py *.yaml
include *.md
include azure/__init__.py
include azure/mgmt/__init__.py

48 changes: 37 additions & 11 deletions sdk/iothub/azure-mgmt-iothubprovisioningservices/README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,47 @@
# Microsoft Azure SDK for Python
## Microsoft Azure SDK for Python

This is the Microsoft Azure IoTHub Provisioning Services Client Library.
This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8.
For a more complete view of Azure libraries, see the [Github repo](https://github.com/Azure/azure-sdk-for-python/)

Azure Resource Manager (ARM) is the next generation of management APIs
that replace the old Azure Service Management (ASM).

# Usage
This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7.

For code examples, see [IoTHub Provisioning Services](https://docs.microsoft.com/python/api/overview/azure/iot)
on docs.microsoft.com.
For the older Azure Service Management (ASM) libraries, see
[azure-servicemanagement-legacy](https://pypi.python.org/pypi/azure-servicemanagement-legacy)
library.

For a more complete set of Azure libraries, see the
[azure](https://pypi.python.org/pypi/azure) bundle package.

# Provide Feedback
## Compatibility

If you encounter any bugs or have suggestions, please file an issue in the
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
section of the project.
**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:

``` shell
pip freeze
```

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

``` shell
pip uninstall azure
```

## Usage

For code examples, see [IoTHub Provisioning
Services](https://docs.microsoft.com/python/api/overview/azure/iot) on
docs.microsoft.com.

## Provide Feedback

If you encounter any bugs or have suggestions, please file an issue in
the [Issues](https://github.com/Azure/azure-sdk-for-python/issues)
section of the project.

![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-iothubprovisioningservices%2FREADME.png)
![image](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-iothubprovisioningservices%2FREADME.png)
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
# regenerated.
# --------------------------------------------------------------------------

from .iot_dps_client import IotDpsClient
from .version import VERSION
from ._configuration import IotDpsClientConfiguration
from ._iot_dps_client import IotDpsClient
__all__ = ['IotDpsClient', 'IotDpsClientConfiguration']

__all__ = ['IotDpsClient']
from .version import VERSION

__version__ = VERSION

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 msrestazure import AzureConfiguration

from .version import VERSION


class IotDpsClientConfiguration(AzureConfiguration):
"""Configuration for IotDpsClient
Note that all parameters used to create this instance are saved as instance
attributes.
:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: The subscription identifier.
:type subscription_id: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):

if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
if not base_url:
base_url = 'https://management.azure.com'

super(IotDpsClientConfiguration, self).__init__(base_url)

# Starting Autorest.Python 4.0.64, make connection pool activated by default
self.keep_alive = True

self.add_user_agent('azure-mgmt-iothubprovisioningservices/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')

self.credentials = credentials
self.subscription_id = subscription_id
Original file line number Diff line number Diff line change
Expand Up @@ -9,49 +9,17 @@
# regenerated.
# --------------------------------------------------------------------------

from msrest.service_client import ServiceClient
from msrest.service_client import SDKClient
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
from .operations.operations import Operations
from .operations.dps_certificate_operations import DpsCertificateOperations
from .operations.iot_dps_resource_operations import IotDpsResourceOperations
from . import models


class IotDpsClientConfiguration(AzureConfiguration):
"""Configuration for IotDpsClient
Note that all parameters used to create this instance are saved as instance
attributes.
:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: The subscription identifier.
:type subscription_id: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):

if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
if not base_url:
base_url = 'https://management.azure.com'

super(IotDpsClientConfiguration, self).__init__(base_url)

self.add_user_agent('azure-mgmt-iothubprovisioningservices/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')

self.credentials = credentials
self.subscription_id = subscription_id
from ._configuration import IotDpsClientConfiguration
from .operations import Operations
from .operations import DpsCertificateOperations
from .operations import IotDpsResourceOperations
from . import models


class IotDpsClient(object):
class IotDpsClient(SDKClient):
"""API for using the Azure IoT Hub Device Provisioning Service features.
:ivar config: Configuration for client.
Expand All @@ -76,7 +44,7 @@ def __init__(
self, credentials, subscription_id, base_url=None):

self.config = IotDpsClientConfiguration(credentials, subscription_id, base_url)
self._client = ServiceClient(self.config.credentials, self.config)
super(IotDpsClient, self).__init__(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '2018-01-22'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,56 +10,56 @@
# --------------------------------------------------------------------------

try:
from .error_messsage_py3 import ErrorMesssage
from .async_operation_result_py3 import AsyncOperationResult
from .certificate_properties_py3 import CertificateProperties
from .certificate_response_py3 import CertificateResponse
from .certificate_list_description_py3 import CertificateListDescription
from .certificate_body_description_py3 import CertificateBodyDescription
from .iot_dps_sku_info_py3 import IotDpsSkuInfo
from .iot_hub_definition_description_py3 import IotHubDefinitionDescription
from .shared_access_signature_authorization_rule_access_rights_description_py3 import SharedAccessSignatureAuthorizationRuleAccessRightsDescription
from .iot_dps_properties_description_py3 import IotDpsPropertiesDescription
from .provisioning_service_description_py3 import ProvisioningServiceDescription
from .resource_py3 import Resource
from .operation_display_py3 import OperationDisplay
from .operation_py3 import Operation
from .error_details_py3 import ErrorDetails, ErrorDetailsException
from .iot_dps_sku_definition_py3 import IotDpsSkuDefinition
from .operation_inputs_py3 import OperationInputs
from .name_availability_info_py3 import NameAvailabilityInfo
from .tags_resource_py3 import TagsResource
from .verification_code_response_properties_py3 import VerificationCodeResponseProperties
from .verification_code_response_py3 import VerificationCodeResponse
from .verification_code_request_py3 import VerificationCodeRequest
from ._models_py3 import AsyncOperationResult
from ._models_py3 import CertificateBodyDescription
from ._models_py3 import CertificateListDescription
from ._models_py3 import CertificateProperties
from ._models_py3 import CertificateResponse
from ._models_py3 import ErrorDetails, ErrorDetailsException
from ._models_py3 import ErrorMesssage
from ._models_py3 import IotDpsPropertiesDescription
from ._models_py3 import IotDpsSkuDefinition
from ._models_py3 import IotDpsSkuInfo
from ._models_py3 import IotHubDefinitionDescription
from ._models_py3 import NameAvailabilityInfo
from ._models_py3 import Operation
from ._models_py3 import OperationDisplay
from ._models_py3 import OperationInputs
from ._models_py3 import ProvisioningServiceDescription
from ._models_py3 import Resource
from ._models_py3 import SharedAccessSignatureAuthorizationRuleAccessRightsDescription
from ._models_py3 import TagsResource
from ._models_py3 import VerificationCodeRequest
from ._models_py3 import VerificationCodeResponse
from ._models_py3 import VerificationCodeResponseProperties
except (SyntaxError, ImportError):
from .error_messsage import ErrorMesssage
from .async_operation_result import AsyncOperationResult
from .certificate_properties import CertificateProperties
from .certificate_response import CertificateResponse
from .certificate_list_description import CertificateListDescription
from .certificate_body_description import CertificateBodyDescription
from .iot_dps_sku_info import IotDpsSkuInfo
from .iot_hub_definition_description import IotHubDefinitionDescription
from .shared_access_signature_authorization_rule_access_rights_description import SharedAccessSignatureAuthorizationRuleAccessRightsDescription
from .iot_dps_properties_description import IotDpsPropertiesDescription
from .provisioning_service_description import ProvisioningServiceDescription
from .resource import Resource
from .operation_display import OperationDisplay
from .operation import Operation
from .error_details import ErrorDetails, ErrorDetailsException
from .iot_dps_sku_definition import IotDpsSkuDefinition
from .operation_inputs import OperationInputs
from .name_availability_info import NameAvailabilityInfo
from .tags_resource import TagsResource
from .verification_code_response_properties import VerificationCodeResponseProperties
from .verification_code_response import VerificationCodeResponse
from .verification_code_request import VerificationCodeRequest
from .operation_paged import OperationPaged
from .provisioning_service_description_paged import ProvisioningServiceDescriptionPaged
from .iot_dps_sku_definition_paged import IotDpsSkuDefinitionPaged
from .shared_access_signature_authorization_rule_access_rights_description_paged import SharedAccessSignatureAuthorizationRuleAccessRightsDescriptionPaged
from .iot_dps_client_enums import (
from ._models import AsyncOperationResult
from ._models import CertificateBodyDescription
from ._models import CertificateListDescription
from ._models import CertificateProperties
from ._models import CertificateResponse
from ._models import ErrorDetails, ErrorDetailsException
from ._models import ErrorMesssage
from ._models import IotDpsPropertiesDescription
from ._models import IotDpsSkuDefinition
from ._models import IotDpsSkuInfo
from ._models import IotHubDefinitionDescription
from ._models import NameAvailabilityInfo
from ._models import Operation
from ._models import OperationDisplay
from ._models import OperationInputs
from ._models import ProvisioningServiceDescription
from ._models import Resource
from ._models import SharedAccessSignatureAuthorizationRuleAccessRightsDescription
from ._models import TagsResource
from ._models import VerificationCodeRequest
from ._models import VerificationCodeResponse
from ._models import VerificationCodeResponseProperties
from ._paged_models import IotDpsSkuDefinitionPaged
from ._paged_models import OperationPaged
from ._paged_models import ProvisioningServiceDescriptionPaged
from ._paged_models import SharedAccessSignatureAuthorizationRuleAccessRightsDescriptionPaged
from ._iot_dps_client_enums import (
IotDpsSku,
State,
AllocationPolicy,
Expand All @@ -69,28 +69,28 @@
)

__all__ = [
'ErrorMesssage',
'AsyncOperationResult',
'CertificateBodyDescription',
'CertificateListDescription',
'CertificateProperties',
'CertificateResponse',
'CertificateListDescription',
'CertificateBodyDescription',
'ErrorDetails', 'ErrorDetailsException',
'ErrorMesssage',
'IotDpsPropertiesDescription',
'IotDpsSkuDefinition',
'IotDpsSkuInfo',
'IotHubDefinitionDescription',
'SharedAccessSignatureAuthorizationRuleAccessRightsDescription',
'IotDpsPropertiesDescription',
'ProvisioningServiceDescription',
'Resource',
'OperationDisplay',
'NameAvailabilityInfo',
'Operation',
'ErrorDetails', 'ErrorDetailsException',
'IotDpsSkuDefinition',
'OperationDisplay',
'OperationInputs',
'NameAvailabilityInfo',
'ProvisioningServiceDescription',
'Resource',
'SharedAccessSignatureAuthorizationRuleAccessRightsDescription',
'TagsResource',
'VerificationCodeResponseProperties',
'VerificationCodeResponse',
'VerificationCodeRequest',
'VerificationCodeResponse',
'VerificationCodeResponseProperties',
'OperationPaged',
'ProvisioningServiceDescriptionPaged',
'IotDpsSkuDefinitionPaged',
Expand Down
Loading

0 comments on commit e870835

Please sign in to comment.