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

[ReleasePR track2_azure-iot-deviceupdate] Enable SDK automation for track-2 SDKs #20425

Closed
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
1 change: 1 addition & 0 deletions sdk/deviceupdate/azure-iot-deviceupdate/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include _meta.json
recursive-include tests *.py
recursive-include samples *.py *.md
include *.md
11 changes: 11 additions & 0 deletions sdk/deviceupdate/azure-iot-deviceupdate/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"autorest": "3.4.5",
"use": [
"@autorest/python@5.8.4",
"@autorest/modelerfour@4.19.2"
],
"commit": "cde7f150e8d3bf3af2418cc347cae0fb2baed6a7",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/deviceupdate/data-plane/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5",
"readme": "specification/deviceupdate/data-plane/readme.md"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
{
"chosen_version": "2020-09-01",
"total_api_version_list": ["2020-09-01"],
"client": {
"name": "DeviceUpdateClient",
"filename": "_device_update_client",
"description": "Device Update for IoT Hub is an Azure service that enables customers to publish update for their IoT devices to the cloud, and then deploy that update to their devices (approve updates to groups of devices managed and provisioned in IoT Hub). It leverages the proven security and reliability of the Windows Update platform, optimized for IoT devices. It works globally and knows when and how to update devices, enabling customers to focus on their business goals and let Device Update for IoT Hub handle the updates.",
"base_url": null,
"custom_base_url": "\u0027https://{accountEndpoint}\u0027",
"azure_arm": false,
"has_lro_operations": false,
"client_side_validation": false,
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.core\": [\"PipelineClient\"]}, \"local\": {\"._configuration\": [\"DeviceUpdateClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}",
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.core\": [\"AsyncPipelineClient\"]}, \"local\": {\"._configuration\": [\"DeviceUpdateClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
},
"global_parameters": {
"sync": {
"credential": {
"signature": "credential, # type: \"TokenCredential\"",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials.TokenCredential",
"required": true
},
"account_endpoint": {
"signature": "account_endpoint, # type: str",
"description": "Account endpoint.",
"docstring_type": "str",
"required": true
},
"instance_id": {
"signature": "instance_id, # type: str",
"description": "Account instance identifier.",
"docstring_type": "str",
"required": true
}
},
"async": {
"credential": {
"signature": "credential: \"AsyncTokenCredential\",",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
"required": true
},
"account_endpoint": {
"signature": "account_endpoint: str,",
"description": "Account endpoint.",
"docstring_type": "str",
"required": true
},
"instance_id": {
"signature": "instance_id: str,",
"description": "Account instance identifier.",
"docstring_type": "str",
"required": true
}
},
"constant": {
},
"call": "credential, account_endpoint, instance_id",
"service_client_specific": {
"sync": {
"api_version": {
"signature": "api_version=None, # type: Optional[str]",
"description": "API version to use if no profile is provided, or if missing in profile.",
"docstring_type": "str",
"required": false
},
"profile": {
"signature": "profile=KnownProfiles.default, # type: KnownProfiles",
"description": "A profile definition, from KnownProfiles to dict.",
"docstring_type": "azure.profiles.KnownProfiles",
"required": false
}
},
"async": {
"api_version": {
"signature": "api_version: Optional[str] = None,",
"description": "API version to use if no profile is provided, or if missing in profile.",
"docstring_type": "str",
"required": false
},
"profile": {
"signature": "profile: KnownProfiles = KnownProfiles.default,",
"description": "A profile definition, from KnownProfiles to dict.",
"docstring_type": "azure.profiles.KnownProfiles",
"required": false
}
}
}
},
"config": {
"credential": true,
"credential_scopes": ["https://api.adu.microsoft.com/.default"],
"credential_default_policy_type": "BearerTokenCredentialPolicy",
"credential_default_policy_type_has_async_version": true,
"credential_key_header_name": null,
"sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}",
"async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}"
},
"operation_groups": {
"updates": "UpdatesOperations",
"devices": "DevicesOperations",
"deployments": "DeploymentsOperations"
}
}
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None:
def get_all_deployments(
self,
filter: Optional[str] = None,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.PageableListOfDeployments"]:
"""Gets a list of deployments.
@@ -119,7 +119,7 @@ async def get_next(next_link=None):
async def get_deployment(
self,
deployment_id: str,
**kwargs
**kwargs: Any
) -> "_models.Deployment":
"""Gets the properties of a deployment.
@@ -173,7 +173,7 @@ async def create_or_update_deployment(
self,
deployment_id: str,
deployment: "_models.Deployment",
**kwargs
**kwargs: Any
) -> "_models.Deployment":
"""Creates or updates a deployment.
@@ -233,7 +233,7 @@ async def create_or_update_deployment(
async def delete_deployment(
self,
deployment_id: str,
**kwargs
**kwargs: Any
) -> None:
"""Deletes a deployment.
@@ -281,7 +281,7 @@ async def delete_deployment(
async def get_deployment_status(
self,
deployment_id: str,
**kwargs
**kwargs: Any
) -> "_models.DeploymentStatus":
"""Gets the status of a deployment including a breakdown of how many devices in the deployment are
in progress, completed, or failed.
@@ -336,7 +336,7 @@ def get_deployment_devices(
self,
deployment_id: str,
filter: Optional[str] = None,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.PageableListOfDeploymentDeviceStates"]:
"""Gets a list of devices in a deployment along with their state. Useful for getting a list of
failed devices.
@@ -417,7 +417,7 @@ async def get_next(next_link=None):
async def cancel_deployment(
self,
deployment_id: str,
**kwargs
**kwargs: Any
) -> "_models.Deployment":
"""Cancels a deployment.
@@ -472,7 +472,7 @@ async def cancel_deployment(
async def retry_deployment(
self,
deployment_id: str,
**kwargs
**kwargs: Any
) -> "_models.Deployment":
"""Retries a deployment with failed devices.
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ def __init__(self, client, config, serializer, deserializer) -> None:

def get_all_device_classes(
self,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.PageableListOfDeviceClasses"]:
"""Gets a list of all device classes (unique combinations of device manufacturer and model) for
all devices connected to Device Update for IoT Hub.
@@ -114,7 +114,7 @@ async def get_next(next_link=None):
async def get_device_class(
self,
device_class_id: str,
**kwargs
**kwargs: Any
) -> "_models.DeviceClass":
"""Gets the properties of a device class.
@@ -167,7 +167,7 @@ async def get_device_class(
def get_device_class_device_ids(
self,
device_class_id: str,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.PageableListOfStrings"]:
"""Gets a list of device identifiers in a device class.
@@ -242,7 +242,7 @@ async def get_next(next_link=None):
def get_device_class_installable_updates(
self,
device_class_id: str,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.PageableListOfUpdateIds"]:
"""Gets a list of installable updates for a device class.
@@ -317,7 +317,7 @@ async def get_next(next_link=None):
def get_all_devices(
self,
filter: Optional[str] = None,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.PageableListOfDevices"]:
"""Gets a list of devices connected to Device Update for IoT Hub.
@@ -392,7 +392,7 @@ async def get_next(next_link=None):
async def get_device(
self,
device_id: str,
**kwargs
**kwargs: Any
) -> "_models.Device":
"""Gets the device properties and latest deployment status for a device connected to Device Update
for IoT Hub.
@@ -445,7 +445,7 @@ async def get_device(

async def get_update_compliance(
self,
**kwargs
**kwargs: Any
) -> "_models.UpdateCompliance":
"""Gets the breakdown of how many devices are on their latest update, have new updates available,
or are in progress receiving new updates.
@@ -495,7 +495,7 @@ async def get_update_compliance(

def get_all_device_tags(
self,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.PageableListOfDeviceTags"]:
"""Gets a list of available group device tags for all devices connected to Device Update for IoT
Hub.
@@ -567,7 +567,7 @@ async def get_next(next_link=None):
async def get_device_tag(
self,
tag_name: str,
**kwargs
**kwargs: Any
) -> "_models.DeviceTag":
"""Gets a count of how many devices have a device tag.
@@ -619,7 +619,7 @@ async def get_device_tag(

def get_all_groups(
self,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.PageableListOfGroups"]:
"""Gets a list of all device groups.
@@ -690,7 +690,7 @@ async def get_next(next_link=None):
async def get_group(
self,
group_id: str,
**kwargs
**kwargs: Any
) -> "_models.Group":
"""Gets the properties of a group.
@@ -744,7 +744,7 @@ async def create_or_update_group(
self,
group_id: str,
group: "_models.Group",
**kwargs
**kwargs: Any
) -> "_models.Group":
"""Create or update a device group.
@@ -804,7 +804,7 @@ async def create_or_update_group(
async def delete_group(
self,
group_id: str,
**kwargs
**kwargs: Any
) -> None:
"""Deletes a device group.
@@ -852,7 +852,7 @@ async def delete_group(
async def get_group_update_compliance(
self,
group_id: str,
**kwargs
**kwargs: Any
) -> "_models.UpdateCompliance":
"""Get group update compliance information such as how many devices are on their latest update,
how many need new updates, and how many are in progress on receiving a new update.
@@ -907,7 +907,7 @@ def get_group_best_updates(
self,
group_id: str,
filter: Optional[str] = None,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.PageableListOfUpdatableDevices"]:
"""Get the best available updates for a group and a count of how many devices need each update.
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None:
async def import_update(
self,
update_to_import: "_models.ImportUpdateInput",
**kwargs
**kwargs: Any
) -> None:
"""Import new update version.
@@ -104,7 +104,7 @@ async def get_update(
name: str,
version: str,
access_condition: Optional["_models.AccessCondition"] = None,
**kwargs
**kwargs: Any
) -> Optional["_models.Update"]:
"""Get a specific update version.
@@ -175,7 +175,7 @@ async def delete_update(
provider: str,
name: str,
version: str,
**kwargs
**kwargs: Any
) -> None:
"""Delete a specific update version.
@@ -232,7 +232,7 @@ async def delete_update(

def get_providers(
self,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.PageableListOfStrings"]:
"""Get a list of all update providers that have been imported to Device Update for IoT Hub.
@@ -303,7 +303,7 @@ async def get_next(next_link=None):
def get_names(
self,
provider: str,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.PageableListOfStrings"]:
"""Get a list of all update names that match the specified provider.
@@ -379,7 +379,7 @@ def get_versions(
self,
provider: str,
name: str,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.PageableListOfStrings"]:
"""Get a list of all update versions that match the specified provider and name.
@@ -460,7 +460,7 @@ def get_files(
provider: str,
name: str,
version: str,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.PageableListOfStrings"]:
"""Get a list of all update file identifiers for the specified version.
@@ -547,7 +547,7 @@ async def get_file(
version: str,
file_id: str,
access_condition: Optional["_models.AccessCondition"] = None,
**kwargs
**kwargs: Any
) -> Optional["_models.File"]:
"""Get a specific update file from the version.
@@ -620,7 +620,7 @@ def get_operations(
self,
filter: Optional[str] = None,
top: Optional[int] = None,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.PageableListOfOperations"]:
"""Get a list of all import update operations. Completed operations are kept for 7 days before
auto-deleted. Delete operations are not returned by this API version.
@@ -704,7 +704,7 @@ async def get_operation(
self,
operation_id: str,
access_condition: Optional["_models.AccessCondition"] = None,
**kwargs
**kwargs: Any
) -> Optional["_models.Operation"]:
"""Retrieve operation status.