OpenStack

Requires a pip install lftools[openstack] to activate this command. Requires qemu-img binary to upload images

Usage: lftools openstack [OPTIONS] COMMAND [ARGS]...

  Provide an interface to OpenStack.

Options:
  --os-cloud TEXT  [required]
  --help           Show this message and exit.

Commands:
  image   Command for manipulating images.
  object  Command for manipulating objects.
  server  Command for manipulating servers.
  stack   Command for manipulating stacks.
  volume  Command for manipulating volumes.

Commands

image

Usage: lftools openstack image [OPTIONS] COMMAND [ARGS]...

  Command for manipulating images.

Options:
  --help  Show this message and exit.

Commands:
  cleanup  Cleanup old images.
  list     List cloud images.
  share    Share image with another tenant.
  upload   Upload image to OpenStack cloud.

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.

Usage: lftools openstack image cleanup [OPTIONS]

  Cleanup old images.

Options:
  --ci-managed BOOLEAN   Filter only images that have the ci_managed=yes
                         metadata set.
  --days INTEGER         Find images older than or equal to days.
  --hide-public BOOLEAN  Ignore public images.
  --clouds TEXT          Clouds (as defined in clouds.yaml) to remove images
                         from. If notpassed will assume from os-cloud
                         parameter. (optional)
  --help                 Show this message and exit.

list

Usage: lftools openstack image list [OPTIONS]

  List cloud images.

Options:
  --ci-managed BOOLEAN   Filter only images that have the ci_managed=yes
                         metadata set.
  --days INTEGER         Find images older than or equal to days.
  --hide-public BOOLEAN  Ignore public images.
  --help                 Show this message and exit.

object

Command for managing objects.

Usage: lftools openstack object [OPTIONS] COMMAND [ARGS]...

  Command for manipulating objects.

Options:
  --help  Show this message and exit.

Commands:
  list-containers  List available containers.

list-containers

Usage: lftools openstack object list-containers [OPTIONS]

  List available containers.

Options:
  --help  Show this message and exit.

stack

Command for managing stacks.

Usage: lftools openstack stack [OPTIONS] COMMAND [ARGS]...

  Command for manipulating stacks.

Options:
  --help  Show this message and exit.

Commands:
  cost          Get Total Stack Cost.
  create        Create stack.
  delete        Delete stack.
  delete-stale  Delete stale stacks.

create

Create a new stack.

Usage: lftools openstack stack create [OPTIONS] NAME TEMPLATE_FILE
                                      PARAMETER_FILE

  Create stack.

Options:
  --timeout INTEGER  Stack create timeout in seconds.
  --tries INTEGER    Number of tries before giving up.
  --help             Show this message and exit.

The create command requires a parameters file in the following format in order to build out the stack:

delete

Delete existing stack.

Usage: lftools openstack stack delete [OPTIONS] NAME_OR_ID

  Delete stack.

Options:
  --force            Ignore timeout and continue with next stack.
  --timeout INTEGER  Stack delete timeout in seconds.
  --help             Show this message and exit.

cost

Get total cost of existing stack.

Usage: lftools openstack stack cost [OPTIONS] STACK_NAME

  Get Total Stack Cost.

Options:
  --help  Show this message and exit.

Return sum of costs for each member of the running stack.