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

Commit

Permalink
Add --network-quota to vdc create (#427)
Browse files Browse the repository at this point in the history
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 <nigel.metheringham@redcentricplc.com>

Co-authored-by: Nigel Metheringham <nigel.metheringham@redcentricplc.com>
  • Loading branch information
nigelm and nigelm authored Mar 19, 2020
1 parent 9bc1026 commit 9656b31
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion vcd_cli/vdc.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,15 @@ def use(ctx, name):
metavar='<cpu-limit>',
type=click.INT,
help='Capacity limit relative to the value specified for Allocation.')
@click.option(
'--network-quota',
required=False,
default=0,
metavar='<network-quota>',
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']
Expand All @@ -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)
Expand Down

0 comments on commit 9656b31

Please sign in to comment.