From 9656b3138b4aa499cc0ca3a2c69b5fa4091cd1ab Mon Sep 17 00:00:00 2001 From: Nigel Metheringham Date: Thu, 19 Mar 2020 03:55:48 +0000 Subject: [PATCH] Add --network-quota to vdc create (#427) Adds --network-quota integer option to the vcd vdc create command, which sets the network_quota setting in the underlying call to org.create_org_vdc - this is the Maximum number of network objects that can be deployed in this vdc. The default value is zero (like the underlying call), which (unike all the similar settings) means that *no* network objects can be created within the vdc. Signed-off-by: Nigel Metheringham Co-authored-by: Nigel Metheringham --- vcd_cli/vdc.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/vcd_cli/vdc.py b/vcd_cli/vdc.py index 15e1d65e..8a415314 100644 --- a/vcd_cli/vdc.py +++ b/vcd_cli/vdc.py @@ -242,8 +242,15 @@ def use(ctx, name): metavar='', type=click.INT, help='Capacity limit relative to the value specified for Allocation.') +@click.option( + '--network-quota', + required=False, + default=0, + metavar='', + type=click.INT, + help='Maximum number of network objects that can be deployed in this vdc.') def create(ctx, name, pvdc_name, network_pool_name, allocation_model, sp_name, - sp_limit, description, cpu_allocated, cpu_limit): + sp_limit, description, cpu_allocated, cpu_limit, network_quota): try: restore_session(ctx) client = ctx.obj['client'] @@ -265,6 +272,7 @@ def create(ctx, name, pvdc_name, network_pool_name, allocation_model, sp_name, cpu_allocated=cpu_allocated, cpu_limit=cpu_limit, storage_profiles=storage_profiles, + network_quota=network_quota, uses_fast_provisioning=True, is_thin_provision=True) stdout(vdc_resource.Tasks.Task[0], ctx)