canonical / python-libmaas

Unofficial python client library for MAAS
https://maas.io
Other
63 stars 71 forks source link

Failed to set the cpu_over_commit_ratio parameter when adding KVM pod. #265

Open SpirosStyliaras opened 2 years ago

SpirosStyliaras commented 2 years ago

Hi, The method make_payloads in the module maas.client.utils.multipart contains a bug I guess. We can not set value to cpu_over_commit_ratio parameter of Pod class. This parameter is supposed to be set with float value. When I try to create a KVM virsh pod I get the following error: AssertionError: 'cpu_over_commit_ratio' is unrecognised: <float value>

I guess we have to add the following elif condition in the make_payloads function: elif isinstance(content, float): yield make_bytes_payload(name, b"%f" % content)

github-actions[bot] commented 9 months ago

This issue is stale because it has been open for 30 days with no activity.