Provisions massive upgrades
George Chelidze
george.chelidze at magticom.ge
Fri May 11 01:35:31 EDT 2018
Hi Arkan,
Yes it's possible, I ended up with the following setup with Dan's and
Zaid's help:
Provision firmware-upgrade:
-- BEGIN --
const TAG_UPGRADE = "Tags.upgrade";
const TAG_UPGRADING = "Tags.upgrading";
const REQ_VERSION = "V3.2.0-B20180412.1617";
if (declare(TAG_UPGRADE, {value: 1}).value !== undefined) {
// remove upgrade tag
declare(TAG_UPGRADE, null, {value: false});
commit();
// retrieve CPE software version
let REP_VERSION =
declare("InternetGatewayDevice.DeviceInfo.SoftwareVersion", {value:
Date.now()}).value[0];
// make sure versions do not match
if (REP_VERSION !== REQ_VERSION) {
// append upgrading tag (will be removed in firmware-upgrade-complete)
declare(TAG_UPGRADING, null, {value: true});
commit();
// request upgrade
declare("Downloads.[FileType:1 Firmware Upgrade Image]", {path:
1}, {path: 1});
declare("Downloads.[FileType:1 Firmware Upgrade Image].FileName",
{value: 1}, {value: REQ_VERSION + ".web"});
declare("Downloads.[FileType:1 Firmware Upgrade Image].Download",
{value: 1}, {value: Date.now()});
}
}
-- END --
Provision firmware-upgrade-complete:
-- BEGIN --
const TAG_UPGRADING = "Tags.upgrading";
declare(TAG_UPGRADING, null, {value: false});
-- END --
Preset firmware-upgrade:
Events: 1 BOOT, -7 TRANSFER COMPLETE
Precondition: Tag = upgrade
Configurations: Provision name: firmware-upgrade
Preset firmware-upgrade-complete:
Events: 7 TRANSFER COMPLETE
Precondition: Tag = upgrading
Configurations: Provision name: firmware-upgrade-complete
Upload file with the following parameters:
Name: V3.2.0-B20180412.1617.web
Type: 1 Firmware Upgrade Image
OUI: <your devices' mac OUI here>
Product class: <your devices' product class here>
Version: V3.2.0-B20180412.1617
Put "upgrade" tag on any device you want to upgrade and wait until it
boots up. That's it.
Best regards,
George Chelidze
On 05/10/2018 10:38 PM, Arkan Add wrote:
> Hello Everyone,
>
> I'm trying to do an automated software upgrade using Provisions
> Tab in GenieACS-GUI, but without success. Is it possible to do it?
> I need to compare the device actual sw and do a sw upgrade if it
> was different from what is needed.
> I did a preset to add a tag for upgraded and not upgraded devices
> and maybe i just need to read these tags and start the upgrade to not
> upgraded devices.
>
>
> Kind Regards,
>
>
> _______________________________________________
> Users mailing list
> Users at lists.genieacs.com
> http://lists.genieacs.com/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genieacs.com/pipermail/users/attachments/20180511/dcefe7aa/attachment.html>
More information about the Users
mailing list