This repository has been archived by the owner on Mar 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Submit PNP models for Device Update GA+ (#549)
Co-authored-by: Rido <[email protected]>
- Loading branch information
1 parent
29a0a70
commit 8b8b3bc
Showing
3 changed files
with
204 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
] | ||
} |