2929# Configurable options
3030# Organization ID. Replace this with your actual organization ID.
3131organization_id = 'YOUR ORG ID HERE' # Use your own organization ID.
32+ product_type = 'appliance'
3233time_delta_in_days = 30 # Max is 1 month per the firmware upgrades endpoint docs
3334actions_per_batch = 100 # Max number of actions to submit in a batch. 100 is the maximum. Bigger batches take longer.
3435wait_factor = 0.33 # Wait factor for action batches when the action batch queue is full.
3536
3637# Firmware IDs; not needed for rescheduling, only for upgrading. If you plan to use this for upgrading, then you should
3738# first GET the availableVersions IDs and use those here instead, since they have probably changed from the time this
3839# was published.
39- mx_new_firmware_id = 2128 # Did you update this to your actual FW ID by GETing your availableFirmwareVersions?
40- mx_old_firmware_id = 2009 # Did you update this to your actual FW ID by GETing your availableFirmwareVersions?
40+ new_firmware_id = 2128 # Did you update this to your actual FW ID by GETing your availableFirmwareVersions?
41+ old_firmware_id = 2009 # Did you update this to your actual FW ID by GETing your availableFirmwareVersions?
4142
4243
4344def time_formatter (date_time_stamp ):
@@ -54,7 +55,7 @@ def time_formatter(date_time_stamp):
5455
5556action_reschedule_existing = {
5657 "products" : {
57- "appliance " :
58+ f" { product_type } " :
5859 {
5960 "nextUpgrade" : {
6061 "time" : utc_future_formatted
@@ -67,12 +68,12 @@ def time_formatter(date_time_stamp):
6768# immediately. IMPORTANT: See API docs for more info before using this.
6869action_schedule_new_upgrade = {
6970 "products" : {
70- "appliance " :
71+ f" { product_type } " :
7172 {
7273 "nextUpgrade" : {
7374 "time" : utc_future_formatted ,
7475 "toVersion" : {
75- "id" : mx_new_firmware_id
76+ "id" : new_firmware_id
7677 }
7778 }
7879 }
0 commit comments