Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

Commit

Permalink
Submit PNP models for Device Update GA+ (#549)
Browse files Browse the repository at this point in the history
Co-authored-by: Rido <[email protected]>
  • Loading branch information
renatobalestrin-msft and rido-min authored Nov 7, 2023
1 parent 29a0a70 commit 8b8b3bc
Show file tree
Hide file tree
Showing 3 changed files with 204 additions and 0 deletions.
167 changes: 167 additions & 0 deletions dtmi/azure/iot/deviceupdate-2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
{
"@context": "dtmi:dtdl:context;2",
"@id": "dtmi:azure:iot:deviceUpdate;2",
"@type": "Interface",
"displayName": "Device Update Interface version 2",
"description": "Device Update interface version 2 is used to send update action and metadata to devices and receive update status from devices.",
"contents": [
{
"@type": "Property",
"name": "agent",
"schema": "dtmi:azure:iot:deviceUpdate:agentMetadata;2"
},
{
"@type": "Property",
"name": "service",
"schema": "dtmi:azure:iot:deviceUpdate:serviceMetadata;2",
"writable": true
}
],
"schemas": [
{
"@id": "dtmi:azure:iot:deviceUpdate:agentMetadata;2",
"@type": "Object",
"fields": [
{
"name": "state",
"schema": "integer"
},
{
"name": "installedUpdateId",
"schema": "string"
},
{
"name": "workflow",
"schema": "dtmi:azure:iot:deviceUpdate:workflowMetadata;2"
},
{
"name": "lastInstallResult",
"schema": "dtmi:azure:iot:deviceUpdate:installResultMetadata;2"
},
{
"name": "compatPropertyNames",
"schema": "string"
},
{
"name": "deviceProperties",
"schema": {
"@type": "Map",
"mapKey": {
"name": "devicePropertyName",
"schema": "string"
},
"mapValue": {
"name": "devicePropertyValue",
"schema": "string"
}
}
}
]
},
{
"@id": "dtmi:azure:iot:deviceUpdate:serviceMetadata;2",
"@type": "Object",
"fields": [
{
"name": "workflow",
"schema": "dtmi:azure:iot:deviceUpdate:workflowMetadata;2"
},
{
"name": "rootKeyPackageUrl",
"schema": "string"
},
{
"name": "updateManifest",
"schema": "string"
},
{
"name": "updateManifestSignature",
"schema": "string"
},
{
"name": "fileUrls",
"schema": {
"@type": "Map",
"mapKey": {
"name": "fileId",
"schema": "string"
},
"mapValue": {
"name": "downloadUri",
"schema": "string"
}
}
}
]
},
{
"@id": "dtmi:azure:iot:deviceUpdate:workflowMetadata;2",
"@type": "Object",
"fields": [
{
"name": "action",
"schema": "integer"
},
{
"name": "id",
"schema": "string"
},
{
"name": "retryTimestamp",
"schema": "dateTime"
}
]
},
{
"@id": "dtmi:azure:iot:deviceUpdate:installResultMetadata;2",
"@type": "Object",
"fields": [
{
"name": "resultCode",
"schema": "integer"
},
{
"name": "extendedResultCodes",
"schema": "string"
},
{
"name": "resultDetails",
"schema": "string"
},
{
"name": "stepResults",
"schema": {
"@type": "Map",
"mapKey": {
"name": "stepIndex",
"schema": "string",
"comment": "The string format is step_{index}. For example, step_0, step_1, etc."
},
"mapValue": {
"name": "stepResult",
"schema": "dtmi:azure:iot:deviceUpdate:stepResultMetadata;2"
}
}
}
]
},
{
"@id": "dtmi:azure:iot:deviceUpdate:stepResultMetadata;2",
"@type": "Object",
"fields": [
{
"name": "resultCode",
"schema": "integer"
},
{
"name": "extendedResultCodes",
"schema": "string"
},
{
"name": "resultDetails",
"schema": "string"
}
]
}
]
}
15 changes: 15 additions & 0 deletions dtmi/azure/iot/deviceupdatecontractmodel-3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"@context": "dtmi:dtdl:context;2",
"@id": "dtmi:azure:iot:deviceUpdateContractModel;3",
"@type": "Interface",
"displayName": "Device Update Base Model version 3",
"description": "Device Update Base Model version 3 supports device update interface version 2 and update manifest version 5.",
"contents": [
{
"@type": "Component",
"schema": "dtmi:azure:iot:deviceUpdate;2",
"name": "deviceUpdate",
"displayName": "Device Update Interface version 2"
}
]
}
22 changes: 22 additions & 0 deletions dtmi/azure/iot/deviceupdatemodel-3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"@context": "dtmi:dtdl:context;2",
"@id": "dtmi:azure:iot:deviceUpdateModel;3",
"@type": "Interface",
"displayName": "Device Update Model version 3",
"description": "Device Update Model version 3 supports device update contract model version 3, device information interface version 1 and diagnostic interface version 1.",
"extends": "dtmi:azure:iot:deviceUpdateContractModel;3",
"contents": [
{
"@type": "Component",
"schema": "dtmi:azure:iot:diagnosticInformation;1",
"name": "diagnosticInformation",
"displayName": "Diagnostic Information Interface version 1"
},
{
"@type": "Component",
"schema": "dtmi:azure:DeviceManagement:DeviceInformation;1",
"name": "deviceInformation",
"displayName": "Device Information"
}
]
}

0 comments on commit 8b8b3bc

Please sign in to comment.