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

Addition of clone_mode to creation of vapp from catalog #375

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion vcd_cli/vapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,9 +353,17 @@ def list_vapps(ctx, name):
is_flag=True,
default=False,
help='Accept all EULAs')
@click.option(
'-z',
'--clone_mode',
'clone_mode',
required=False,
default=None,
metavar='name',
help='Clone mode')
def create(ctx, name, description, catalog, template, network, memory, cpu,
disk_size, ip_allocation_mode, vm_name, hostname, storage_profile,
accept_all_eulas):
accept_all_eulas, clone_mode):
try:
restore_session(ctx, vdc_required=True)
client = ctx.obj['client']
Expand All @@ -367,6 +375,15 @@ def create(ctx, name, description, catalog, template, network, memory, cpu,
description=description,
network=network,
accept_all_eulas=accept_all_eulas)
elif clone_mode == 'exact_copy':
vapp_resource = vdc.instantiate_vapp(
name,
catalog,
template,
description=description,
network=network,
accept_all_eulas=accept_all_eulas,
clone_mode=clone_mode)
else:
vapp_resource = vdc.instantiate_vapp(
name,
Expand Down