Skip to content

Commit

Permalink
Fallback to 0 minimum compute when no nova-compute units
Browse files Browse the repository at this point in the history
Tempests can be used on deployments without nova-compute, testing only
control plane APIs. Fallback to a value when no nova-compute units is
found.

Signed-off-by: Guillaume Boutry <[email protected]>
  • Loading branch information
gboutry committed Oct 18, 2024
1 parent 891761d commit 7543dfd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion zaza/openstack/charm_tests/tempest/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,10 @@ def _add_nova_config(ctxt, keystone_session, missing_fatal=True):
ctxt['flavor_ref'] = flavor.id
if flavor.name == TEMPEST_ALT_FLAVOR_NAME:
ctxt['flavor_ref_alt'] = flavor.id
ctxt['min_compute_nodes'] = len(model.get_units('nova-compute'))
try:
ctxt['min_compute_nodes'] = len(model.get_units('nova-compute'))
except KeyError:
ctxt['min_compute_nodes'] = 0


def _add_neutron_config(ctxt, keystone_session, missing_fatal=True):
Expand Down

0 comments on commit 7543dfd

Please sign in to comment.