Skip to content

Commit d18b522

Browse files
committed
fix: update lock_duration and prefill_fixed_levels to use float values
CMK-28891 Change-Id: Ib9a8229f5d34fd655ac8f60d6c8d615a5a0803e9
1 parent abe1198 commit d18b522

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

packages/cmk-plugins/cmk/plugins/proxmox_ve/agent_based/proxmox_ve_vm_info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,6 @@ def check_proxmox_ve_vm_info(
181181
check_ruleset_name="proxmox_ve_vm_info",
182182
check_default_parameters={
183183
"required_vm_status": "",
184-
"lock_duration": ("fixed", (15 * 60, 30 * 60)),
184+
"lock_duration": ("fixed", (15 * 60.0, 30 * 60.0)),
185185
},
186186
)

packages/cmk-plugins/cmk/plugins/proxmox_ve/rulesets/proxmox_ve_vm_info_params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def _parameter_valuespec_proxmox_ve_vm_info():
4747
TimeMagnitude.MINUTE,
4848
]
4949
),
50-
prefill_fixed_levels=DefaultValue(value=(15 * 60, 30 * 60)),
50+
prefill_fixed_levels=DefaultValue(value=(15 * 60.0, 30 * 60.0)),
5151
),
5252
),
5353
},

packages/cmk-plugins/tests/cmk/plugins/proxmox_ve/agent_based/test_proxmox_ve_vm_info.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def test_check_proxmox_ve_vm_info_parse_function(info_section_model: SectionVMIn
6868
(
6969
{
7070
"required_vm_status": "",
71-
"lock_duration": ("fixed", (15 * 60, 30 * 60)),
71+
"lock_duration": ("fixed", (15 * 60.0, 30 * 60.0)),
7272
},
7373
VM_DATA,
7474
{},
@@ -85,7 +85,7 @@ def test_check_proxmox_ve_vm_info_parse_function(info_section_model: SectionVMIn
8585
(
8686
{
8787
"required_vm_status": None,
88-
"lock_duration": ("fixed", (15 * 60, 30 * 60)),
88+
"lock_duration": ("fixed", (15 * 60.0, 30 * 60.0)),
8989
},
9090
VM_DATA_WITH_LOCK,
9191
{
@@ -111,7 +111,7 @@ def test_check_proxmox_ve_vm_info_parse_function(info_section_model: SectionVMIn
111111
(
112112
{
113113
"required_vm_status": None,
114-
"lock_duration": ("fixed", (15 * 60, 30 * 60)),
114+
"lock_duration": ("fixed", (15 * 60.0, 30 * 60.0)),
115115
},
116116
VM_DATA_WITH_LOCK,
117117
{
@@ -133,7 +133,7 @@ def test_check_proxmox_ve_vm_info_parse_function(info_section_model: SectionVMIn
133133
(
134134
{
135135
"required_vm_status": "idle",
136-
"lock_duration": ("fixed", (15 * 60, 30 * 60)),
136+
"lock_duration": ("fixed", (15 * 60.0, 30 * 60.0)),
137137
},
138138
VM_DATA,
139139
{},

0 commit comments

Comments
 (0)