openstack¶
Requires a pip install lftools-uv[openstack] to activate this command. Requires qemu-img binary to upload images
[1m [0m
[1m [0m[1;33mUsage: [0m[1mlftools-uv openstack [OPTIONS] COMMAND [ARGS]...[0m[1m [0m[1m [0m
[1m [0m
Provide an interface to OpenStack.
[2mâ•─[0m[2m Options [0m[2m───────────────────────────────────────────────────────────────────[0m[2m─╮[0m
[2m│[0m [31m*[0m [1;36m-[0m[1;36m-os[0m[1;36m-cloud[0m [1;33mTEXT[0m OpenStack cloud name [2m│[0m
[2m│[0m [2;33m[env var: OS_CLOUD] [0m [2m│[0m
[2m│[0m [2;31m[required] [0m [2m│[0m
[2m│[0m [1;36m-[0m[1;36m-help[0m [1;33m [0m Show this message and exit. [2m│[0m
[2m╰──────────────────────────────────────────────────────────────────────────────╯[0m
[2mâ•─[0m[2m Commands [0m[2m──────────────────────────────────────────────────────────────────[0m[2m─╮[0m
[2m│[0m [1;36mimage [0m[1;36m [0m Command for manipulating images. [2m│[0m
[2m│[0m [1;36mobject [0m[1;36m [0m Command for manipulating objects. [2m│[0m
[2m│[0m [1;36mserver [0m[1;36m [0m Command for manipulating servers. [2m│[0m
[2m│[0m [1;36mstack [0m[1;36m [0m Command for manipulating stacks. [2m│[0m
[2m│[0m [1;36mvolume [0m[1;36m [0m Command for manipulating volumes. [2m│[0m
[2m╰──────────────────────────────────────────────────────────────────────────────╯[0m
Commands¶
image¶
[1m [0m
[1m [0m[1;33mUsage: [0m[1mlftools-uv openstack image [OPTIONS] COMMAND [ARGS]...[0m[1m [0m[1m [0m
[1m [0m
Command for manipulating images.
[2mâ•─[0m[2m Options [0m[2m───────────────────────────────────────────────────────────────────[0m[2m─╮[0m
[2m│[0m [1;36m-[0m[1;36m-help[0m Show this message and exit. [2m│[0m
[2m╰──────────────────────────────────────────────────────────────────────────────╯[0m
[2mâ•─[0m[2m Commands [0m[2m──────────────────────────────────────────────────────────────────[0m[2m─╮[0m
[2m│[0m [1;36mcleanup [0m[1;36m [0m Cleanup old images. [2m│[0m
[2m│[0m [1;36mlist [0m[1;36m [0m List cloud images. [2m│[0m
[2m│[0m [1;36mshare [0m[1;36m [0m Share image with another tenant. [2m│[0m
[2m│[0m [1;36mupload [0m[1;36m [0m Upload image to OpenStack cloud. [2m│[0m
[2m╰──────────────────────────────────────────────────────────────────────────────╯[0m
cleanup¶
The intent of this command is to automatically cleanup old images in the cloud. The OpenDaylight project has 2 clouds, a Private Cloud and a Public cloud which needs the –clouds option to automatically remove the same images from more than one cloud simultaneously.
[1m [0m
[1m [0m[1;33mUsage: [0m[1mlftools-uv openstack image cleanup [OPTIONS][0m[1m [0m[1m [0m
[1m [0m
Cleanup old images.
[2mâ•─[0m[2m Options [0m[2m───────────────────────────────────────────────────────────────────[0m[2m─╮[0m
[2m│[0m [1;36m-[0m[1;36m-ci[0m[1;36m-managed[0m [1;33m [0m Filter only images that have the [2m│[0m
[2m│[0m ci_managed=yes metadata set. [2m│[0m
[2m│[0m [1;36m-[0m[1;36m-days[0m [1;33mINTEGER[0m Find images older than or equal to days. [2m│[0m
[2m│[0m [2m[default: 0] [0m [2m│[0m
[2m│[0m [1;36m-[0m[1;36m-hide[0m[1;36m-public[0m [1;33m [0m Ignore public images. [2m│[0m
[2m│[0m [1;36m-[0m[1;36m-clouds[0m [1;33mTEXT [0m Clouds (as defined in clouds.yaml) to remove [2m│[0m
[2m│[0m images from. If not passed will assume from [2m│[0m
[2m│[0m os-cloud parameter. (optional) [2m│[0m
[2m│[0m [1;36m-[0m[1;36m-help[0m [1;33m [0m Show this message and exit. [2m│[0m
[2m╰──────────────────────────────────────────────────────────────────────────────╯[0m
list¶
[1m [0m
[1m [0m[1;33mUsage: [0m[1mlftools-uv openstack image list [OPTIONS][0m[1m [0m[1m [0m
[1m [0m
List cloud images.
[2mâ•─[0m[2m Options [0m[2m───────────────────────────────────────────────────────────────────[0m[2m─╮[0m
[2m│[0m [1;36m-[0m[1;36m-ci[0m[1;36m-managed[0m [1;33m [0m Filter only images that have the [2m│[0m
[2m│[0m ci_managed=yes metadata set. [2m│[0m
[2m│[0m [1;36m-[0m[1;36m-days[0m [1;33mINTEGER[0m Find images older than or equal to days. [2m│[0m
[2m│[0m [2m[default: 0] [0m [2m│[0m
[2m│[0m [1;36m-[0m[1;36m-hide[0m[1;36m-public[0m [1;33m [0m Ignore public images. [2m│[0m
[2m│[0m [1;36m-[0m[1;36m-help[0m [1;33m [0m Show this message and exit. [2m│[0m
[2m╰──────────────────────────────────────────────────────────────────────────────╯[0m
cluster¶
Command for managing Container Orchestration Engine (COE) clusters.
[33mUsage: [0mlftools-uv openstack [OPTIONS] COMMAND [ARGS]...
[2mTry [0m[2;34m'lftools-uv openstack [0m[1;2;34m-[0m[1;2;34m-help[0m[2;34m'[0m[2m for help.[0m
[31mâ•─[0m[31m Error [0m[31m─────────────────────────────────────────────────────────────────────[0m[31m─╮[0m
[31m│[0m No such command 'cluster'. [31m│[0m
[31m╰──────────────────────────────────────────────────────────────────────────────╯[0m
cleanup¶
Remove orphaned COE clusters from the cloud. This command scans for Kubernetes clusters not in use by active Jenkins builds and removes them. The cleanup operation preserves managed clusters (names containing -managed-prod-k8s- or -managed-test-k8s-) as these are long-lived infrastructure.
The command queries Jenkins URLs for active builds to prevent deletion of clusters in use. Provide one or more Jenkins URLs separated by spaces.
[33mUsage: [0mlftools-uv openstack [OPTIONS] COMMAND [ARGS]...
[2mTry [0m[2;34m'lftools-uv openstack [0m[1;2;34m-[0m[1;2;34m-help[0m[2;34m'[0m[2m for help.[0m
[31mâ•─[0m[31m Error [0m[31m─────────────────────────────────────────────────────────────────────[0m[31m─╮[0m
[31m│[0m No such command 'cluster'. [31m│[0m
[31m╰──────────────────────────────────────────────────────────────────────────────╯[0m
Example usage:
# Cleanup orphaned clusters, checking two Jenkins instances
lftools-uv openstack --os-cloud mycloud cluster cleanup \
--jenkins "https://jenkins.example.org https://jenkins.example.io"
list¶
List all COE clusters on the specified cloud with their current status.
[33mUsage: [0mlftools-uv openstack [OPTIONS] COMMAND [ARGS]...
[2mTry [0m[2;34m'lftools-uv openstack [0m[1;2;34m-[0m[1;2;34m-help[0m[2;34m'[0m[2m for help.[0m
[31mâ•─[0m[31m Error [0m[31m─────────────────────────────────────────────────────────────────────[0m[31m─╮[0m
[31m│[0m No such command 'cluster'. [31m│[0m
[31m╰──────────────────────────────────────────────────────────────────────────────╯[0m
object¶
Command for managing objects.
[1m [0m
[1m [0m[1;33mUsage: [0m[1mlftools-uv openstack object [OPTIONS] COMMAND [ARGS]...[0m[1m [0m[1m [0m
[1m [0m
Command for manipulating objects.
[2mâ•─[0m[2m Options [0m[2m───────────────────────────────────────────────────────────────────[0m[2m─╮[0m
[2m│[0m [1;36m-[0m[1;36m-help[0m Show this message and exit. [2m│[0m
[2m╰──────────────────────────────────────────────────────────────────────────────╯[0m
[2mâ•─[0m[2m Commands [0m[2m──────────────────────────────────────────────────────────────────[0m[2m─╮[0m
[2m│[0m [1;36mlist [0m[1;36m [0m List available containers. [2m│[0m
[2m╰──────────────────────────────────────────────────────────────────────────────╯[0m
list-containers¶
[33mUsage: [0mlftools-uv openstack object [OPTIONS] COMMAND [ARGS]...
[2mTry [0m[2;34m'lftools-uv openstack object [0m[1;2;34m-[0m[1;2;34m-help[0m[2;34m'[0m[2m for help.[0m
[31mâ•─[0m[31m Error [0m[31m─────────────────────────────────────────────────────────────────────[0m[31m─╮[0m
[31m│[0m No such command 'list-containers'. [31m│[0m
[31m╰──────────────────────────────────────────────────────────────────────────────╯[0m
stack¶
Command for managing stacks.
[1m [0m
[1m [0m[1;33mUsage: [0m[1mlftools-uv openstack stack [OPTIONS] COMMAND [ARGS]...[0m[1m [0m[1m [0m
[1m [0m
Command for manipulating stacks.
[2mâ•─[0m[2m Options [0m[2m───────────────────────────────────────────────────────────────────[0m[2m─╮[0m
[2m│[0m [1;36m-[0m[1;36m-help[0m Show this message and exit. [2m│[0m
[2m╰──────────────────────────────────────────────────────────────────────────────╯[0m
[2mâ•─[0m[2m Commands [0m[2m──────────────────────────────────────────────────────────────────[0m[2m─╮[0m
[2m│[0m [1;36mcreate [0m[1;36m [0m Create stack. [2m│[0m
[2m│[0m [1;36mdelete [0m[1;36m [0m Delete stack. [2m│[0m
[2m│[0m [1;36mcost [0m[1;36m [0m Get Total Stack Cost. [2m│[0m
[2m│[0m [1;36mdelete-stale [0m[1;36m [0m Delete stale stacks. [2m│[0m
[2m╰──────────────────────────────────────────────────────────────────────────────╯[0m
create¶
Create a new stack.
[1m [0m
[1m [0m[1;33mUsage: [0m[1mlftools-uv openstack stack create [OPTIONS] NAME TEMPLATE_FILE[0m[1m [0m[1m [0m
[1m [0m[1m PARAMETER_FILE[0m[1m [0m[1m [0m
[1m [0m
Create stack.
[2mâ•─[0m[2m Arguments [0m[2m─────────────────────────────────────────────────────────────────[0m[2m─╮[0m
[2m│[0m [31m*[0m name [1;33mTEXT[0m Stack name [2m│[0m
[2m│[0m [2;31m[required] [0m [2m│[0m
[2m│[0m [31m*[0m template_file [1;33mTEXT[0m Template file [2m│[0m
[2m│[0m [2;31m[required] [0m [2m│[0m
[2m│[0m [31m*[0m parameter_file [1;33mTEXT[0m Parameter file [2m│[0m
[2m│[0m [2;31m[required] [0m [2m│[0m
[2m╰──────────────────────────────────────────────────────────────────────────────╯[0m
[2mâ•─[0m[2m Options [0m[2m───────────────────────────────────────────────────────────────────[0m[2m─╮[0m
[2m│[0m [1;36m-[0m[1;36m-timeout[0m [1;33mINTEGER[0m Stack create timeout in seconds. [2m│[0m
[2m│[0m [2m[default: 900] [0m [2m│[0m
[2m│[0m [1;36m-[0m[1;36m-tries[0m [1;33mINTEGER[0m Number of tries before giving up. [2m│[0m
[2m│[0m [2m[default: 2] [0m [2m│[0m
[2m│[0m [1;36m-[0m[1;36m-help[0m [1;33m [0m Show this message and exit. [2m│[0m
[2m╰──────────────────────────────────────────────────────────────────────────────╯[0m
The create command requires a parameters file in the following format to build out the stack:
delete¶
Delete existing stack.
[1m [0m
[1m [0m[1;33mUsage: [0m[1mlftools-uv openstack stack delete [OPTIONS] NAME_OR_ID[0m[1m [0m[1m [0m
[1m [0m
Delete stack.
[2mâ•─[0m[2m Arguments [0m[2m─────────────────────────────────────────────────────────────────[0m[2m─╮[0m
[2m│[0m [31m*[0m name_or_id [1;33mTEXT[0m Stack name or ID [2m│[0m
[2m│[0m [2;31m[required] [0m [2m│[0m
[2m╰──────────────────────────────────────────────────────────────────────────────╯[0m
[2mâ•─[0m[2m Options [0m[2m───────────────────────────────────────────────────────────────────[0m[2m─╮[0m
[2m│[0m [1;36m-[0m[1;36m-force[0m [1;33m [0m Ignore timeout and continue with next stack. [2m│[0m
[2m│[0m [1;36m-[0m[1;36m-timeout[0m [1;33mINTEGER[0m Stack delete timeout in seconds. [2m│[0m
[2m│[0m [2m[default: 900] [0m [2m│[0m
[2m│[0m [1;36m-[0m[1;36m-help[0m [1;33m [0m Show this message and exit. [2m│[0m
[2m╰──────────────────────────────────────────────────────────────────────────────╯[0m
cost¶
Get total cost of existing stack.
[1m [0m
[1m [0m[1;33mUsage: [0m[1mlftools-uv openstack stack cost [OPTIONS] STACK_NAME[0m[1m [0m[1m [0m
[1m [0m
Get Total Stack Cost.
[2mâ•─[0m[2m Arguments [0m[2m─────────────────────────────────────────────────────────────────[0m[2m─╮[0m
[2m│[0m [31m*[0m stack_name [1;33mTEXT[0m Stack name [2m│[0m
[2m│[0m [2;31m[required] [0m [2m│[0m
[2m╰──────────────────────────────────────────────────────────────────────────────╯[0m
[2mâ•─[0m[2m Options [0m[2m───────────────────────────────────────────────────────────────────[0m[2m─╮[0m
[2m│[0m [1;36m-[0m[1;36m-timeout[0m [1;33mINTEGER[0m Timeout in seconds for cost retrieval operations [2m│[0m
[2m│[0m (default: 60) [2m│[0m
[2m│[0m [2m[default: 60] [0m [2m│[0m
[2m│[0m [1;36m-[0m[1;36m-help[0m [1;33m [0m Show this message and exit. [2m│[0m
[2m╰──────────────────────────────────────────────────────────────────────────────╯[0m
Return sum of costs for each member of the running stack.