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
12 changes: 9 additions & 3 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,21 @@ Release History

**IoT Central updates**

* add support to run root/interface level device commands.
* add support to get command history for root/interface level device commands.
* interface_id parameter for commands "device command run" , "device command history" run changed to optional.
* Adds support to run root/interface level device commands.
* Adds support to get command history for root/interface level device commands.
* The --interface-id parameter for commands "device command run" , "device command history" changed to optional.

**IoT Hub updates**

* Fix for "az iot hub c2d-message receive" - the command will use the "ContentEncoding" header value (which indicates the message body encoding)
or fallback to utf-8 to decode the received message body.

* Changes to Edge validation for set-modules and edge deployment creation:

By default only properties of system modules $edgeAgent and $edgeHub are validated against schemas installed with the IoT extension.
This can be disabled by using the --no-validation switch.


**Azure Digital Twins updates**

* Addition of the following commands
Expand Down
6 changes: 6 additions & 0 deletions azext_iot/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -919,6 +919,9 @@
long-summary: |
Modules content is json and in the form of {"modulesContent":{...}} or {"content":{"modulesContent":{...}}}.

By default properties of system modules $edgeAgent and $edgeHub are validated against schemas installed with the IoT extension.
This can be disabled by using the --no-validation switch.

Note: Upon execution the command will output the collection of modules applied to the device.
examples:
- name: Test edge modules while in development by setting modules on a target device.
Expand All @@ -941,6 +944,9 @@
long-summary: |
Deployment content is json and in the form of {"modulesContent":{...}} or {"content":{"modulesContent":{...}}}.

By default properties of system modules $edgeAgent and $edgeHub are validated against schemas installed with the IoT extension.
This can be disabled by using the --no-validation switch.

Edge deployments can be created with user defined metrics for on demand evaluation.
User metrics are json and in the form of {"queries":{...}} or {"metrics":{"queries":{...}}}.
examples:
Expand Down
239 changes: 239 additions & 0 deletions azext_iot/assets/azure-iot-edgeagent-deployment-1.0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,239 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"title": "JSON schema for Azure IoT EdgeAgent Deployment version 1.0",
"required": [
"$edgeAgent"
],
"properties": {
"$edgeAgent": {
"type": "object",
"title": "Configuration for the edgeAgent module",
"required": [
"properties.desired"
],
"properties": {
"properties.desired": {
"type": "object",
"required": [
"schemaVersion",
"runtime",
"systemModules",
"modules"
],
"properties": {
"schemaVersion": {
"type": "string",
"pattern": "1.0"
},
"runtime": {
"type": "object",
"required": [
"type",
"settings"
],
"properties": {
"type": {
"$ref": "#/definitions/moduleType"
},
"settings": {
"type": "object",
"properties": {
"minDockerVersion": {
"type": "string",
"examples": [
"v1.25"
]
},
"loggingOptions": {
"type": "string"
},
"registryCredentials": {
"type": "object",
"patternProperties": {
"^.+$": {
"type": "object",
"required": [
"username",
"password",
"address"
],
"properties": {
"username": {
"type": "string"
},
"password": {
"type": "string"
},
"address": {
"type": "string",
"pattern": "^[^\\s]+$"
}
}
}
},
"additionalProperties": false
}
}
}
}
},
"systemModules": {
"type": "object",
"required": [
"edgeAgent",
"edgeHub"
],
"properties": {
"edgeAgent": {
"type": "object",
"required": [
"type",
"settings"
],
"properties": {
"type": {
"$ref": "#/definitions/moduleType"
},
"settings": {
"$ref": "#/definitions/moduleSettings"
},
"env": {
"$ref": "#/definitions/env"
}
}
},
"edgeHub": {
"type": "object",
"title": "The Edgehub Schema",
"required": [
"type",
"settings",
"status",
"restartPolicy"
],
"properties": {
"type": {
"$ref": "#/definitions/moduleType"
},
"settings": {
"$ref": "#/definitions/moduleSettings"
},
"env": {
"$ref": "#/definitions/env"
},
"status": {
"$ref": "#/definitions/status"
},
"restartPolicy": {
"$ref": "#/definitions/restartPolicy"
}
}
}
},
"additionalProperties": false
},
"modules": {
"type": "object",
"patternProperties": {
"^[a-zA-Z0-9_-]+$": {
"type": "object",
"required": [
"type",
"status",
"restartPolicy",
"settings"
],
"properties": {
"version": {
"type": "string",
"examples": [
"1.0"
]
},
"type": {
"$ref": "#/definitions/moduleType"
},
"status": {
"$ref": "#/definitions/status"
},
"restartPolicy": {
"$ref": "#/definitions/restartPolicy"
},
"env": {
"$ref": "#/definitions/env"
},
"settings": {
"$ref": "#/definitions/moduleSettings"
}
}
}
},
"additionalProperties": false
}
}
}
}
}
},
"additionalProperties": false,
"definitions": {
"moduleType": {
"enum": [
"docker"
]
},
"status": {
"enum": [
"running",
"stopped"
]
},
"restartPolicy": {
"enum": [
"never",
"on-failure",
"on-unhealthy",
"always"
]
},
"moduleSettings": {
"type": "object",
"required": [
"image"
],
"properties": {
"image": {
"type": "string",
"examples": [
"mcr.microsoft.com/azureiotedge-agent:1.0"
]
},
"createOptions": {
"$ref": "#/definitions/createOptions"
}
}
},
"env": {
"type": "object",
"patternProperties": {
"^[^\\+#$\\s\\.]+$": {
"type": "object",
"required": [
"value"
],
"properties": {
"value": {
"type": ["number", "string", "boolean"]
}
}
}
},
"additionalProperties": false
},
"createOptions": {
"type": "string",
"contentMediaType": "application/json"
}
}
}
Loading