API modifies power_address with special chars
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Invalid
|
Undecided
|
Unassigned |
Bug Description
MAAS version: 2.7.0 (8232-g.
When using Rest API to provide power_parameters special chars (+) seems to be replaced by white space.
The problem occurs when for a power_address using "qemu+ssh://"
Example :
PUT /MAAS/api/
Accept-Encoding: identity
Content-Length: 137
Connection: close
Accept: application/json
User-Agent: ansible-httpget
Host: XXXXX:5240
Content-Type: application/
Authorization: OAuth oauth_consumer_
hostname=
When using the GUI to see the result, power_address has been rewritten as "qemu ssh://root@
And of course the commisioning is not working.
The result should be "qemu+ssh:
Whereas configuring this power_address through GUI is working fine.
Workaround found by using unicode %2B instead of "+" in the power_address value.
Payload need to be : power_type= virsh;power_ parameters= {"power_ address" :"qemu% 2Bssh:/ /root@XXXXX/ system" , "power_id":"XXXXX"}