Skip to content
This repository was archived by the owner on Mar 6, 2024. It is now read-only.

Commit 9656b31

Browse files
authored
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 <[email protected]> Co-authored-by: Nigel Metheringham <[email protected]>
1 parent 9bc1026 commit 9656b31

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

vcd_cli/vdc.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,15 @@ def use(ctx, name):
242242
metavar='<cpu-limit>',
243243
type=click.INT,
244244
help='Capacity limit relative to the value specified for Allocation.')
245+
@click.option(
246+
'--network-quota',
247+
required=False,
248+
default=0,
249+
metavar='<network-quota>',
250+
type=click.INT,
251+
help='Maximum number of network objects that can be deployed in this vdc.')
245252
def create(ctx, name, pvdc_name, network_pool_name, allocation_model, sp_name,
246-
sp_limit, description, cpu_allocated, cpu_limit):
253+
sp_limit, description, cpu_allocated, cpu_limit, network_quota):
247254
try:
248255
restore_session(ctx)
249256
client = ctx.obj['client']
@@ -265,6 +272,7 @@ def create(ctx, name, pvdc_name, network_pool_name, allocation_model, sp_name,
265272
cpu_allocated=cpu_allocated,
266273
cpu_limit=cpu_limit,
267274
storage_profiles=storage_profiles,
275+
network_quota=network_quota,
268276
uses_fast_provisioning=True,
269277
is_thin_provision=True)
270278
stdout(vdc_resource.Tasks.Task[0], ctx)

0 commit comments

Comments
 (0)