From 33e1fad0ac797bcb8b75360f6f9d208bb0fefa32 Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Mon, 19 Mar 2018 14:25:09 -0400 Subject: [PATCH] Add volume-size flag to launch-node When booting servers with --boot-from-volume (vexxhost) it is helpful to also provide the size of the volume we want to use. Change-Id: I478e40ba129f267c0d2d5b54e90a6f84716018f0 Signed-off-by: Paul Belanger --- launch/launch-node.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/launch/launch-node.py b/launch/launch-node.py index 4fe75a2ac1..4f06c5ee3d 100755 --- a/launch/launch-node.py +++ b/launch/launch-node.py @@ -225,13 +225,15 @@ def bootstrap_server(server, key, name, volume_device, keep, def build_server(cloud, name, image, flavor, volume, keep, network, boot_from_volume, config_drive, - mount_path, fs_label, availability_zone, environment): + mount_path, fs_label, availability_zone, environment, + volume_size): key = None server = None create_kwargs = dict(image=image, flavor=flavor, name=name, reuse_ips=False, wait=True, boot_from_volume=boot_from_volume, + volume_size=volume_size, network=network, config_drive=config_drive) @@ -326,6 +328,9 @@ def main(): help="Create a boot volume for the server and use it.", action='store_true', default=False) + parser.add_argument("--volume-size", dest="volume_size", + help="Size of volume (GB) for --boot-from-volume", + default="50") parser.add_argument("--keep", dest="keep", help="Don't clean up or delete the server on error.", action='store_true', @@ -377,7 +382,7 @@ def main(): options.config_drive, options.mount_path, options.fs_label, options.availability_zone, - options.environment) + options.environment, options.volume_size) dns.print_dns(cloud, server) if __name__ == '__main__':