Skip to content
This repository has been archived by the owner on Feb 17, 2021. It is now read-only.

Commit

Permalink
fix(fota): use upgrade instead of update
Browse files Browse the repository at this point in the history
This replaces all instances which deal with FOTA to use
upgrade instead of update (where possible).

These terms are often used interchangeably but their meaning
is different: upgrades improve capabilities, updates changes
values (like a counter in a variable).
  • Loading branch information
coderbyheart committed Dec 9, 2020
1 parent e24d780 commit 6520ba9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion azuredeploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@
}
},
{
"name": "[concat(parameters('appName'), 'fota','/default/updates')]",
"name": "[concat(parameters('appName'), 'fota','/default/upgrades')]",
"type": "Microsoft.Storage/storageAccounts/blobServices/containers",
"apiVersion": "2019-06-01",
"properties": {
Expand Down
12 changes: 6 additions & 6 deletions cli/iot/fota.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
* @see https://docs.microsoft.com/en-us/azure/iot-hub/tutorial-firmware-update
*/
export enum Status {
// There is no pending firmware update. currentFwVersion should match fwVersion from desired properties.
// There is no pending firmware upgrade. currentFwVersion should match fwVersion from desired properties.
CURRENT = 'current',
// Firmware update image is downloading.
// Firmware upgrade image is downloading.
DOWNLOADING = 'downloading',
// Verifying image file checksum and any other validations.
VERIFYING = 'verifying',
// Update to the new image file is in progress.
// Upgrade to the new image file is in progress.
APPLYING = 'applying',
// Device is rebooting as part of update process.
// Device is rebooting as part of upgrade process.
REBOOTING = 'rebooting',
// An error occurred during the update process. Additional details should be specified in fwUpdateSubstatus.
// An error occurred during the upgrade process. Additional details should be specified in fwUpdateSubstatus.
ERROR = 'error',
// Update rolled back to the previous version due to an error.
// Upgrade rolled back to the previous version due to an error.
ROLLEDBACK = 'rolledback',
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
"name": "res"
}
],
"scriptFile": "../dist/storeDeviceUpdate/storeDeviceUpdate.js"
"scriptFile": "../dist/storeDeviceUpgrade/storeDeviceUpgrade.js"
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const { fotaStorageAccountName, fotaStorageAccessKey } = fromEnv({
fotaStorageAccountName: 'FOTA_STORAGE_ACCOUNT_NAME',
fotaStorageAccessKey: 'FOTA_STORAGE_ACCESS_KEY',
})(process.env)
const fotaStorageContainer = 'updates'
const fotaStorageContainer = 'upgrades'

const sharedKeyCredential = new StorageSharedKeyCredential(
fotaStorageAccountName,
Expand All @@ -26,7 +26,7 @@ const containerClient = blobServiceClient.getContainerClient(
fotaStorageContainer,
)

const storeDeviceUpdate: AzureFunction = async (
const storeDeviceUpgrade: AzureFunction = async (
context: Context,
req: HttpRequest,
): Promise<void> => {
Expand Down Expand Up @@ -58,4 +58,4 @@ const storeDeviceUpdate: AzureFunction = async (
}
}

export default storeDeviceUpdate
export default storeDeviceUpgrade

0 comments on commit 6520ba9

Please sign in to comment.