Project

General

Profile

Actions

Bug #16636

open

VM Autostart attribute ("compute_attributes":{"start":"1"}) requires value as a string, not boolean or number.

Added by Daniel Horak over 7 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
API
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

There seems to be some inconsistency in the value of parameter "compute_attributes":{"start":"1"} during host creation.
This parameter accepts only string containing number ("1") and not boolean parameter True or number 1. Which is quite inconsistent behaviour in comparison with other boolean parameters.

I'm trying it via python-foreman library from python with this host configuration:

{'build': True,
'comment': 'Testing VM test',
'compute_attributes': {'start': '1'},
'compute_profile_id': 5,
'compute_resource_id': 1,
'domain_id': 2,
'enabled': True,
'hostgroup_id': 5,
'interfaces_attributes': [{'ip': '192.168.123.2',
'mac': '',
'managed': True,
'primary': True,
'provision': True,
'type': 'interface'}],
'location_id': 1,
'managed': True,
'medium_id': 9,
'name': 'test',
'operatingsystem_id': 1,
'provision_method': 'build',
'root_pass': 'abeceda123'}

When I set compute_attributes - start to 1 (number) or True (boolean) it is ignored and the Host is not started.

Environment: RHEL 7, foreman-1.12.2-1.el7.noarch


Related issues 1 (0 open1 closed)

Related to Hammer CLI - Bug #3780: "true" boolean value for "start" key inside --compute-attributes is not correctly interpretedRejectedActions
Actions #1

Updated by Dominic Cleal over 7 years ago

  • Related to Bug #3780: "true" boolean value for "start" key inside --compute-attributes is not correctly interpreted added
Actions

Also available in: Atom PDF