Browse Source

Support server groups with launch-node.py

If a cloud is setup to use server groups, then select it based on the
group we pass via the CLI.

Change-Id: I2662af9daa39024a306d6e60eb8c71a450b67701
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
changes/85/657085/1
Paul Belanger 3 years ago
parent
commit
9077742fd4
  1. 5
      launch/launch-node.py

5
launch/launch-node.py

@ -113,6 +113,9 @@ def build_server(cloud, name, group, image, flavor,
volume_size, timeout):
key = None
server = None
_group = None
if group:
_group = cloud.get_server_group(group)
create_kwargs = dict(image=image, flavor=flavor, name=name,
reuse_ips=False, wait=True,
@ -120,7 +123,7 @@ def build_server(cloud, name, group, image, flavor,
volume_size=volume_size,
network=network,
config_drive=config_drive,
timeout=timeout)
timeout=timeout, group=_group)
if availability_zone:
create_kwargs['availability_zone'] = availability_zone

Loading…
Cancel
Save