Merge lp:~gz/maas/accept_float_constraints_1061286 into lp:~maas-committers/maas/trunk
Proposed by
Martin Packman
Status: | Merged |
---|---|
Approved by: | Martin Packman |
Approved revision: | no longer in the source branch. |
Merged at revision: | 1165 |
Proposed branch: | lp:~gz/maas/accept_float_constraints_1061286 |
Merge into: | lp:~maas-committers/maas/trunk |
Diff against target: |
63 lines (+17/-1) 3 files modified
src/maasserver/models/node_constraint_filter.py (+3/-1) src/maasserver/tests/test_api.py (+11/-0) src/maasserver/tests/test_node_constraint_filter.py (+3/-0) |
To merge this branch: | bzr merge lp:~gz/maas/accept_float_constraints_1061286 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jeroen T. Vermeulen (community) | Approve | ||
Review via email:
|
Commit message
Tolerate decimal values for cpu_count and mem constraints
Description of the change
Simple change to make acquire work when a decimal is given for one of the integer constraints.
The default value juju uses for the 'cpu' constraint is 1.0 as EC2 has compute unit measures, and int() does not like stringified floats. There's no reason not to be a little more liberal here, even though float values don't make much sense for the current definitions of mem and cpu.
To post a comment you must log in.
Land it.