def clone_type_param(*args, **kwargs): kwargs.setdefault("help", "clone type") kwargs.setdefault("type", click.Choice(["Runtime", "AbsoluteCopy"])) return positional_option(*args, **kwargs)
def container_id_param(*args, **kwargs): kwargs.setdefault('help', 'container name or ID (as returned by Container List)') kwargs.setdefault('type', ContainerParam()) return positional_option(*args, **kwargs)
def oci_id_param(*args, **kwargs): kwargs.setdefault("help", "OCI name or ID (as returned by OCI List)") kwargs.setdefault("type", OCIParam()) return positional_option(*args, **kwargs)
def oci_class_param(*args, **kwargs): kwargs.setdefault("help", "OCI class (as returned by OCI Classes), e.g. v1.standard-1.09") return positional_option(*args, **kwargs)
def path_param(*args, **kwargs): kwargs.setdefault('help', 'path inside container') return positional_option(*args, **kwargs)
def template_id_param(*args, **kwargs): kwargs.setdefault("help", "template ID (as returned by OCI Templates)") kwargs.setdefault("type", click.INT) return positional_option(*args, **kwargs)
def db_name_param(*args, **kwargs): kwargs.setdefault('help', 'logical database name') return positional_option(*args, **kwargs)
def container_param(*args, **kwargs): kwargs.setdefault('help', 'container name') return positional_option(*args, **kwargs)
def address_pool_param(*args, **kwargs): kwargs.setdefault('help', 'address class (default: 10.0.0.0/24)') kwargs.setdefault('type', click.Choice(['10.0.0.0/24', '192.168.0.0/24'])) kwargs.setdefault('default', '10.0.0.0/24') return positional_option(*args, **kwargs)
def ordb_id_param(*args, **kwargs): kwargs.setdefault('help', 'ORDB instance name or ID (as returned by ORDB List)') kwargs.setdefault('type', ORDBParam()) return positional_option(*args, **kwargs)
def opn_id_param(*args, **kwargs): kwargs.setdefault('help', 'OPN name or ID (as returned by OPN List)') kwargs.setdefault('type', OPNParam()) return positional_option(*args, **kwargs)
def tier_param(*args, **kwargs): kwargs.setdefault('help', 'OVS volume tier (1...5, default 1)') kwargs.setdefault('type', click.IntRange(min=1, max=5)) kwargs.setdefault('default', 1) return positional_option(*args, **kwargs)
def capacity_param(*args, **kwargs): kwargs.setdefault('help', 'OVS volume size in GB') kwargs.setdefault('type', click.INT) return positional_option(*args, **kwargs)
def ovs_id_param(*args, **kwargs): kwargs.setdefault('help', 'OVS name or id (as returned by OVS List)') kwargs.setdefault('type', OVSParam()) return positional_option(*args, **kwargs)
def ovs_name_param(*args, **kwargs): kwargs.setdefault('help', 'OVS volume name') return positional_option(*args, **kwargs)