XMS Command Line Interface (CLI) Client Guide

Current document status: COMPLETED

Overview

This document summarizes installation, configuration, and usage of the XMS Command Line Interface. The CLI allows users to send remote requests to the XMS REST API. These requests can be used to communicate with XMS or to automate some of the XMS tasks in shell scripts (running, for example, from stack instances).

Installation

XMS CLI is a part of XLCloud-XMS project and can be obtained with the source of xms via git http://gitorious.ow2.org/xlcloud/xms/trees/master/cli

$ git clone http://git.gitorious.ow2.org/xlcloud/xms.git
$ cd xms/cli

To use the CLI it is necessary to use Python 2. To install dependencies run:

sudo python setup.py install

Configuration

To start using the CLI you need to define what XMS server you would like to work with. All configuration necessary can be done by editing a configuration file. The file is at first searched for in the user home directory (/.xms_cli.conf). If not found, the configuration will be loaded from the file (sdk.conf) which should be located in the same directory as the script. The file should have following content:

[XmsCli]
XMS_URL:{xms_url}
OPENAM_URL:{openam_url}
OAUTH_CLIENT_USER:{oauth_client_user}
OAUTH_CLIENT_PASS:{oauth_client_pass}

where xms_url , openam_url, oath_client_user, and oauth_client_pass can be configured by the user.

You have to configure an OAuth 2.0 client in your OpenAM realm (or use an existing client if you want). Such configuration is described here (Python SDK Guide)

How to Use

The CLI is a script allowing to execute XMS requests using commands. Each command (except authenticate) needs an auth token. It may be passes in two ways

1. as a parameter -x

$ ./main.py -x f2318123-b148-4bbc-91a0-c06433a5eea5 list-users

2. by exporting the XLCLOUD_AUTH_TOKEN environment variable

$ export XLCLOUD_AUTH_TOKEN=f2318123-b148-4bbc-91a0-c06433a5eea5
$ ./main.py list-users

To obtain the auth token you need to authenticate – this is actually the only command not requiring the auth token.

$ ./main.py authenticate -u USERNAME -p PASSWORD

Commands

If you want to see the list of CLI commands use the -h option:

./main.py -h

If you want to see detailed information about a specific command, e.g. list-applications use it with the -h option, e.g.:

./main.py list-applications -h

You can obtain important information (like your user ID, or your account ID) using the about-me command:

./main.py about-me

Detailed Help

An up-to-date detailed documentation of the CLI can be obtained using the following command:

./main.py full-help

usage: main.py [-h] [-x TOKEN] [-s]
Xms command-line interface
positional arguments:
    authenticate                     Authenticates user and returns authentication token.
    about-me                         Prints information about your user profile and
                        account.
    list-accounts                    Lists accounts.
    create-account                   Creates account
    get-account                      Gets account.
    delete-account                   Deletes account
    list-users                       Lists users.
    create-user                      Creates user. You may specify --account-id or --  group-id. In other case platform admin will be created.
    get-user                         Gets user.
    update-user                      Updates user, only password change is supported
    delete-user                      Deletes user.
    list-projects                    Lists projects. You can specify --user-id or                    --account-id. Otherwise, all projects will be listed.
    create-project      Creates project
    get-project         Gets project.
    update-project      Updates project. You have to specify --add-user or
                        --remove-user.
    delete-project      Deletes project
    list-groups         Lists groups. You have to specify --user-id or
                        --account-id.
    create-group        Creates group
    get-group           Gets group.
    update-group        Updates group. You have to specify either --add-user
                        or --remove-user.
    delete-group        Deletes group
    list-stack-blueprints
                        Lists stack blueprints.
    get-stack-blueprint
                        Gets stack blueprint.
    delete-stack-blueprint
                        Deletes stack blueprint.
    update-stack-blueprint
                        Updates stack blueprint.
    list-layer-blueprints
                        Lists layer blueprints
    get-layer-blueprint
                        Returns layer blueprint with the given id
    delete-layer-blueprint
                        Deletes layer blueprint with the given id
    export-layer-blueprint
                        Exports a stack blueprint layer to a separate and
                        independent layer blueprint.
    update-layer-blueprint
                        Updates layer blueprint.
    list-images         Lists cloud images.
    create-image        Creates image.
    upload-image        Uploads binary file of the cloud image.
    get-image           Gets cloud image.
    delete-image        Deletes image.
    list-repositories   Lists Repositories.
    create-repository   Creates Repository.
    get-repository      Gets Repository.
    delete-repository   Deletes Repository.
    list-cookbooks      Lists cookbooks. If neither -r nor -a is specified,
                        all cookbooks are listed.
    get-cookbook        Gets cookbook.
    list-recipes        List cookbook recipes.
    get-recipe          Gets recipe.
    list-stacks         Lists stacks.
    get-stack           Gets stack.
    create-stack        Creates stack from default template (or from a
                        blueprint if specified)
    create-stack-from-file
                        Creates stack from a template file
    update-stack        Updates stack with new parameters.
    delete-stack        Deletes stack.
    start-stack         Start stack
    stop-stack          Stops stack
    suspend-stack       Suspends stack
    resume-stack        Resume stack
    get-current-session
                        Gets the current session of the stack
    promote-stack       Promotes stack to a stack blueprint. If parameter
                        --account-id is specified, created blueprint will be
                        placed in the account's private catalog. Otherwise it
                        will be placed in the public catalog.
    get-network-configuration
                        Lists the subnets of a project.
    add-subnet          Adds a subnet to a project.
    remove-subnet       Removes a subnet from a project.
    create-layer        Creates new layer in the stack. By default it creates
                        blank instance. You can specify a blueprint to be a
                        base by -b.
    create-layers-with-stack
                        Creates layers and wrap it into the newly created
                        stack. You can either pass Heat template or XLCLoud
                        Layers JSON model
    get-layer           Returns layer with the given id
    promote-layer       Promotes layer to a layer blueprint. If parameter
                        --account-id is specified, created blueprint will be
                        placed in the account's private catalog. Otherwise it
                        will be placed in the public catalog.
    update-layer        Updates layer. Parameter -p allows to update with new
                        parameters. Parameter -t allows to override template.
                        One of them is required
    delete-layer        Deletes layer from the stack.
    create-instance     Creates new instance in the layer. By default it
                        creates scalable instance. Nonscalable one is created
                        with -N option.
    create-application-deployment
                        Creates application deployments
    remove-application-deployment
                        Removes application deployment
    list-application-deployments
                        Lists application deployments
    list-keypairs       Returns keypairs for user.
    get-keypair         Returns keypair of the user.
    generate-keypair    Generates keypair of the user.
    import-keypair      Import keypair of the user.
    delete-keypair      Deletes keypair of the user.
    list-tokens         Lists access tokens for the user.
    get-token           Gets the token.
    delete-token        Revokes the token.
    get-os-credentials  Returns os-credentials for user and project identified
                        by given ids.
    list-entitlements   List entitlements. You have to specify --group-id or
                        --user-id or --access-token-id.
    create-entitlement  Creates entitlements. You have to specify --group-id
                        or --user-id or --access-token-id.
    delete-entitlement  Deletes entitlement. You have to specify --group-id or
                        --user-id or --access-token-id.
    update-entitlements
                        Replaces entitlements of user, group or access-token
                        with a given list. You have to specify --group-id or
                        --user-id or --access-token-id.
    list-restrictions   Lists restrictions
    get-restriction     Gets restriction
    delete-restriction  Deletes restriction
    create-restriction  Creates restriction for an account (only predefined
                        restrictions are supported by the CLI)
    list-quotas         Lists quotas set for given account
    set-quota           Sets the value of given quota for the account
    full-help           Lists full, detailed help on all commands
optional arguments:
  -h, --help            show this help message and exit
  -x TOKEN, --token TOKEN
                        Token used in REST request.
  -s, --silent          Silent mode - does not print sent requests
--------------------------------------------------------------------------------
>> authenticate
usage: main.py authenticate [-h] -u USERNAME -p PASSWORD
Authenticates user and returns authentication token.
optional arguments:
  -h, --help            show this help message and exit
  -u USERNAME, --username USERNAME
                        Username
  -p PASSWORD, --password PASSWORD
                        Password
--------------------------------------------------------------------------------
>> about-me
usage: main.py about-me [-h]
Prints information about your user profile and account.
optional arguments:
  -h, --help  show this help message and exit
--------------------------------------------------------------------------------
>> list-accounts
usage: main.py list-accounts [-h]
Lists accounts.
optional arguments:
  -h, --help  show this help message and exit
--------------------------------------------------------------------------------
>> create-account
usage: main.py create-account [-h] -n NAME
Creates account
optional arguments:
  -h, --help            show this help message and exit
  -n NAME, --name NAME  Name of account.
--------------------------------------------------------------------------------
>> get-account
usage: main.py get-account [-h] -i ID
Gets account.
optional arguments:
  -h, --help      show this help message and exit
  -i ID, --id ID  ID of requested account.
--------------------------------------------------------------------------------
>> delete-account
usage: main.py delete-account [-h] -i ID
Deletes account
optional arguments:
  -h, --help      show this help message and exit
  -i ID, --id ID  ID of deleted account.
--------------------------------------------------------------------------------
>> list-users
usage: main.py list-users [-h] [-g GROUP_ID] [-a ACCOUNT_ID] [-p PROJECT_ID]
Lists users.
optional arguments:
  -h, --help            show this help message and exit
  -g GROUP_ID, --group-id GROUP_ID
                        ID of group which users will be shown.
  -a ACCOUNT_ID, --account-id ACCOUNT_ID
                        ID of account which users will be shown.
  -p PROJECT_ID, --project-id PROJECT_ID
                        ID of project which users will be shown.
--------------------------------------------------------------------------------
>> create-user
usage: main.py create-user [-h] -n NAME -p PASSWORD [-g GROUP_ID]
                           [-a ACCOUNT_ID]
Creates user. You may specify --account-id or --group-id. In other case
platform admin will be created.
optional arguments:
  -h, --help            show this help message and exit
  -n NAME, --name NAME  Username
  -p PASSWORD, --pass PASSWORD
                        Password
  -g GROUP_ID, --group-id GROUP_ID
                        ID of the group the created user will be assigned to.
  -a ACCOUNT_ID, --account-id ACCOUNT_ID
                        ID of the account of the newly created user.
--------------------------------------------------------------------------------
>> get-user
usage: main.py get-user [-h] -i ID
Gets user.
optional arguments:
  -h, --help      show this help message and exit
  -i ID, --id ID  ID of requested user
--------------------------------------------------------------------------------
>> update-user
usage: main.py update-user [-h] -i ID -p PASSWORD
Updates user, only password change is supported
optional arguments:
  -h, --help            show this help message and exit
  -i ID, --id ID        ID of the updated user.
  -p PASSWORD, --pass PASSWORD
                        New password.
--------------------------------------------------------------------------------
>> delete-user
usage: main.py delete-user [-h] -i ID
Deletes user.
optional arguments:
  -h, --help      show this help message and exit
  -i ID, --id ID  ID of deleted user.
--------------------------------------------------------------------------------
>> list-projects
usage: main.py list-projects [-h] [-u USER_ID] [-a ACCOUNT_ID]
Lists projects. You can specify --user-id or --account-id. Otherwise, all
projects will be listed.
optional arguments:
  -h, --help            show this help message and exit
  -u USER_ID, --user-id USER_ID
                        ID of user which projects will be shown.
  -a ACCOUNT_ID, --account-id ACCOUNT_ID
                        ID of account which projects will be shown.
--------------------------------------------------------------------------------
>> create-project
usage: main.py create-project [-h] -n NAME [-N SUBNET_NAME] [-c SUBNET_CIDR]
                              [-a ACCOUNT_ID]
Creates project
optional arguments:
  -h, --help            show this help message and exit
  -n NAME, --name NAME  Name of the project.
  -N SUBNET_NAME, --subnet-name SUBNET_NAME
                        Name of the default subnet.
  -c SUBNET_CIDR, --subnet-cidr SUBNET_CIDR
                        Default subnet's CIDR.
  -a ACCOUNT_ID, --account-id ACCOUNT_ID
                        ID of the account of the project.
--------------------------------------------------------------------------------
>> get-project
usage: main.py get-project [-h] -i ID
Gets project.
optional arguments:
  -h, --help      show this help message and exit
  -i ID, --id ID  ID of requested project.
--------------------------------------------------------------------------------
>> update-project
usage: main.py update-project [-h] -i ID [-a ADD_USER] [-r REMOVE_USER]
Updates project. You have to specify --add-user or --remove-user.
optional arguments:
  -h, --help            show this help message and exit
  -i ID, --id ID        ID of the updated project.
  -a ADD_USER, --add-user ADD_USER
                        ID of the user to be added.
  -r REMOVE_USER, --remove-user REMOVE_USER
                        ID of the user to be removed.
--------------------------------------------------------------------------------
>> delete-project
usage: main.py delete-project [-h] -i ID
Deletes project
optional arguments:
  -h, --help      show this help message and exit
  -i ID, --id ID  ID of deleted project.
--------------------------------------------------------------------------------
>> list-groups
usage: main.py list-groups [-h] [-u USER_ID] [-a ACCOUNT_ID]
Lists groups. You have to specify --user-id or --account-id.
optional arguments:
  -h, --help            show this help message and exit
  -u USER_ID, --user-id USER_ID
                        ID of user which groups will be shown.
  -a ACCOUNT_ID, --account-id ACCOUNT_ID
                        ID of account which groups will be shown.
--------------------------------------------------------------------------------
>> create-group
usage: main.py create-group [-h] -n NAME -a ACCOUNT_ID
Creates group
optional arguments:
  -h, --help            show this help message and exit
  -n NAME, --name NAME  Name of the group.
  -a ACCOUNT_ID, --account-id ACCOUNT_ID
                        ID of the account of the group.
--------------------------------------------------------------------------------
>> get-group
usage: main.py get-group [-h] -i ID
Gets group.
optional arguments:
  -h, --help      show this help message and exit
  -i ID, --id ID  ID of requested group.
--------------------------------------------------------------------------------
>> update-group
usage: main.py update-group [-h] -i ID [-a ADD_USER] [-r REMOVE_USER]
Updates group. You have to specify either --add-user or --remove-user.
optional arguments:
  -h, --help            show this help message and exit
  -i ID, --id ID        ID of the updated group.
  -a ADD_USER, --add-user ADD_USER
                        ID of the user to be added.
  -r REMOVE_USER, --remove-user REMOVE_USER
                        ID of the user to be removed.
--------------------------------------------------------------------------------
>> delete-group
usage: main.py delete-group [-h] -i ID
Deletes group
optional arguments:
  -h, --help      show this help message and exit
  -i ID, --id ID  ID of deleted group.
--------------------------------------------------------------------------------
>> list-stack-blueprints
usage: main.py list-stack-blueprints [-h] [-a ACCOUNT_ID]
Lists stack blueprints.
optional arguments:
  -h, --help            show this help message and exit
  -a ACCOUNT_ID, --account-id ACCOUNT_ID
                        ID of account which stack blueprints will be shown.
--------------------------------------------------------------------------------
>> get-stack-blueprint
usage: main.py get-stack-blueprint [-h] -i ID
Gets stack blueprint.
optional arguments:
  -h, --help      show this help message and exit
  -i ID, --id ID  ID of requested stack blueprint.
--------------------------------------------------------------------------------
>> delete-stack-blueprint
usage: main.py delete-stack-blueprint [-h] -i ID
Deletes stack blueprint.
optional arguments:
  -h, --help      show this help message and exit
  -i ID, --id ID  ID of deleted stack blueprint.
--------------------------------------------------------------------------------
>> update-stack-blueprint
usage: main.py update-stack-blueprint [-h] -i ID [-t TYPE] [-n NAME]
                                      [-l LICENSE] [-c COPYRIGHT] [-a AUTHOR]
Updates stack blueprint.
optional arguments:
  -h, --help            show this help message and exit
  -i ID, --id ID        ID of updated stack blueprint.
  -t TYPE, --type TYPE  Type
  -n NAME, --name NAME  Name
  -l LICENSE, --license LICENSE
                        License
  -c COPYRIGHT, --copyright COPYRIGHT
                        Copyright
  -a AUTHOR, --author AUTHOR
                        Author
--------------------------------------------------------------------------------
>> list-layer-blueprints
usage: main.py list-layer-blueprints [-h] [-a ACCOUNT_ID]
Lists layer blueprints
optional arguments:
  -h, --help            show this help message and exit
  -a ACCOUNT_ID, --account-id ACCOUNT_ID
                        ID of account which layer blueprints will be shown.
--------------------------------------------------------------------------------
>> get-layer-blueprint
usage: main.py get-layer-blueprint [-h] -i ID
Returns layer blueprint with the given id
optional arguments:
  -h, --help      show this help message and exit
  -i ID, --id ID  ID of the layer blueprint
--------------------------------------------------------------------------------
>> delete-layer-blueprint
usage: main.py delete-layer-blueprint [-h] -i ID
Deletes layer blueprint with the given id
optional arguments:
  -h, --help      show this help message and exit
  -i ID, --id ID  ID of the layer blueprint
--------------------------------------------------------------------------------
>> export-layer-blueprint
usage: main.py export-layer-blueprint [-h] -b BLUEPRINT_ID [-n NAME]
Exports a stack blueprint layer to a separate and independent layer blueprint.
optional arguments:
  -h, --help            show this help message and exit
  -b BLUEPRINT_ID, --blueprint-id BLUEPRINT_ID
                        ID of the stack blueprint layer.
  -n NAME, --name NAME  Name of the layer blueprint.
--------------------------------------------------------------------------------
>> update-layer-blueprint
usage: main.py update-layer-blueprint [-h] -i ID [-t TYPE] [-n NAME]
                                      [-l LICENSE] [-c COPYRIGHT] [-a AUTHOR]
Updates layer blueprint.
optional arguments:
  -h, --help            show this help message and exit
  -i ID, --id ID        ID of updated layer blueprint.
  -t TYPE, --type TYPE  Type
  -n NAME, --name NAME  Name
  -l LICENSE, --license LICENSE
                        License
  -c COPYRIGHT, --copyright COPYRIGHT
                        Copyright
  -a AUTHOR, --author AUTHOR
                        Author
--------------------------------------------------------------------------------
>> list-images
usage: main.py list-images [-h] [-a ACCOUNT_ID]
Lists cloud images.
optional arguments:
  -h, --help            show this help message and exit
  -a ACCOUNT_ID, --account-id ACCOUNT_ID
                        ID of account which images will be shown.
--------------------------------------------------------------------------------
>> create-image
usage: main.py create-image [-h] -n NAME -c CONTAINER -d DISK [-a ACCOUNT_ID]
Creates image.
optional arguments:
  -h, --help            show this help message and exit
  -n NAME, --name NAME  Name
  -c CONTAINER, --container CONTAINER
                        Disk format
  -d DISK, --disk DISK  Container format
  -a ACCOUNT_ID, --account-id ACCOUNT_ID
                        ID of the account of the newly created image.
--------------------------------------------------------------------------------
>> upload-image
usage: main.py upload-image [-h] -i ID -d DATA
Uploads binary file of the cloud image.
optional arguments:
  -h, --help            show this help message and exit
  -i ID, --id ID        ID of the image.
  -d DATA, --data DATA  Cloud image file
--------------------------------------------------------------------------------
>> get-image
usage: main.py get-image [-h] -i ID
Gets cloud image.
optional arguments:
  -h, --help      show this help message and exit
  -i ID, --id ID  ID of requested cloud image.
--------------------------------------------------------------------------------
>> delete-image
usage: main.py delete-image [-h] -i ID
Deletes image.
optional arguments:
  -h, --help      show this help message and exit
  -i ID, --id ID  ID of deleted image.
--------------------------------------------------------------------------------
>> list-repositories
usage: main.py list-repositories [-h] [-a ACCOUNT_ID]
Lists Repositories.
optional arguments:
  -h, --help            show this help message and exit
  -a ACCOUNT_ID, --account-id ACCOUNT_ID
                        ID of account which repositories will be shown.
--------------------------------------------------------------------------------
>> create-repository
usage: main.py create-repository [-h] -n NAME -u URI [-r REF] -t TYPE
                                 [-a ACCOUNT_ID]
Creates Repository.
optional arguments:
  -h, --help            show this help message and exit
  -n NAME, --name NAME  Name
  -u URI, --uri URI     Uri
  -r REF, --ref REF     Ref
  -t TYPE, --type TYPE  Type
  -a ACCOUNT_ID, --account-id ACCOUNT_ID
                        ID of the account of the newly created Repository.
--------------------------------------------------------------------------------
>> get-repository
usage: main.py get-repository [-h] -i ID
Gets Repository.
optional arguments:
  -h, --help      show this help message and exit
  -i ID, --id ID  ID of requested Repository.
--------------------------------------------------------------------------------
>> delete-repository
usage: main.py delete-repository [-h] -i ID
Deletes Repository.
optional arguments:
  -h, --help      show this help message and exit
  -i ID, --id ID  ID of the Repository to be deleted.
--------------------------------------------------------------------------------
>> list-cookbooks
usage: main.py list-cookbooks [-h] [-r REPOSITORY_ID] [-a ACCOUNT_ID]
Lists cookbooks. If neither -r nor -a is specified, all cookbooks are listed.
optional arguments:
  -h, --help            show this help message and exit
  -r REPOSITORY_ID, --repository-id REPOSITORY_ID
                        ID of repository which cookbooks will be shown.
  -a ACCOUNT_ID, --account-id ACCOUNT_ID
                        ID of account which cookbooks will be shown.
--------------------------------------------------------------------------------
>> get-cookbook
usage: main.py get-cookbook [-h] -i ID [-r]
Gets cookbook.
optional arguments:
  -h, --help       show this help message and exit
  -i ID, --id ID   ID of requested cookbook.
  -r, --recursive  Show cookbook with recursive dependencies.
--------------------------------------------------------------------------------
>> list-recipes
usage: main.py list-recipes [-h] [-c COOKBOOK_ID] [-n NAMES [NAMES ...]]
List cookbook recipes.
optional arguments:
  -h, --help            show this help message and exit
  -c COOKBOOK_ID, --cookbook-id COOKBOOK_ID
                        ID of cookbook which recipes will be shown.
  -n NAMES [NAMES ...], --names NAMES [NAMES ...]
                        List of names. Only recipes will the given names will
                        be listed
--------------------------------------------------------------------------------
>> get-recipe
usage: main.py get-recipe [-h] -i ID
Gets recipe.
optional arguments:
  -h, --help      show this help message and exit
  -i ID, --id ID  ID of requested recipe.
--------------------------------------------------------------------------------
>> list-stacks
usage: main.py list-stacks [-h] [-a ACCOUNT_ID] [-p PROJECT_ID]
Lists stacks.
optional arguments:
  -h, --help            show this help message and exit
  -a ACCOUNT_ID, --account-id ACCOUNT_ID
                        ID of account which stacks will be shown.
  -p PROJECT_ID, --project-id PROJECT_ID
                        ID of project which stack will be shown.
--------------------------------------------------------------------------------
>> get-stack
usage: main.py get-stack [-h] -i ID [-p]
Gets stack.
optional arguments:
  -h, --help        show this help message and exit
  -i ID, --id ID    ID of requested stack.
  -p, --parameters  Show stack's parameters.
--------------------------------------------------------------------------------
>> create-stack
usage: main.py create-stack [-h] -n NAME -p PROJECT_ID [-v BLUEPRINT_ID]
Creates stack from default template (or from a blueprint if specified)
optional arguments:
  -h, --help            show this help message and exit
  -n NAME, --name NAME  Name of the stack.
  -p PROJECT_ID, --project-id PROJECT_ID
                        ID of the project of the stack.
  -v BLUEPRINT_ID, --blueprint-id BLUEPRINT_ID
                        ID of the stack blueprint to be the base.
--------------------------------------------------------------------------------
>> create-stack-from-file
usage: main.py create-stack-from-file [-h] -n NAME -p PROJECT_ID -f FILE
Creates stack from a template file
optional arguments:
  -h, --help            show this help message and exit
  -n NAME, --name NAME  Name of the stack.
  -p PROJECT_ID, --project-id PROJECT_ID
                        ID of the project of the stack.
  -f FILE, --file FILE  File of the template.
--------------------------------------------------------------------------------
>> update-stack
usage: main.py update-stack [-h] -i ID [-p PARAMETERS [PARAMETERS ...]]
                            [-t TEMPLATE]
Updates stack with new parameters.
optional arguments:
  -h, --help            show this help message and exit
  -i ID, --id ID        ID of the updated stack.
  -p PARAMETERS [PARAMETERS ...], --parameters PARAMETERS [PARAMETERS ...]
                        List of updated parameters. Each of them has to be in
                        form key=value.
  -t TEMPLATE, --template TEMPLATE
                        Overrides template with the one from specified file
--------------------------------------------------------------------------------
>> delete-stack
usage: main.py delete-stack [-h] -i ID
Deletes stack.
optional arguments:
  -h, --help      show this help message and exit
  -i ID, --id ID  ID of the stack.
--------------------------------------------------------------------------------
>> start-stack
usage: main.py start-stack [-h] -i ID
Start stack
optional arguments:
  -h, --help      show this help message and exit
  -i ID, --id ID  ID of the stack to be started.
--------------------------------------------------------------------------------
>> stop-stack
usage: main.py stop-stack [-h] -i ID
Stops stack
optional arguments:
  -h, --help      show this help message and exit
  -i ID, --id ID  ID of the stack to be stopped.
--------------------------------------------------------------------------------
>> suspend-stack
usage: main.py suspend-stack [-h] -i ID
Suspends stack
optional arguments:
  -h, --help      show this help message and exit
  -i ID, --id ID  ID of the stack to be suspended.
--------------------------------------------------------------------------------
>> resume-stack
usage: main.py resume-stack [-h] -i ID
Resume stack
optional arguments:
  -h, --help      show this help message and exit
  -i ID, --id ID  ID of the stack to be resumed.
--------------------------------------------------------------------------------
>> get-current-session
usage: main.py get-current-session [-h] -i ID
Gets the current session of the stack
optional arguments:
  -h, --help      show this help message and exit
  -i ID, --id ID  ID of the stack.
--------------------------------------------------------------------------------
>> promote-stack
usage: main.py promote-stack [-h] -s STACK_ID -n NAME -t TYPE [-a ACCOUNT_ID]
                             [-A AUTHOR] [-L LICENSE] [-c COPYRIGHT]
Promotes stack to a stack blueprint. If parameter --account-id is specified,
created blueprint will be placed in the account's private catalog. Otherwise
it will be placed in the public catalog.
optional arguments:
  -h, --help            show this help message and exit
  -s STACK_ID, --stack-id STACK_ID
                        ID of the stack.
  -n NAME, --name NAME  Name of the stack blueprint.
  -t TYPE, --type TYPE  Type of the stack blueprint (e.g. 'HPC').
  -a ACCOUNT_ID, --account-id ACCOUNT_ID
                        Stack blueprint will be created in this account's
                        private catalog.
  -A AUTHOR, --author AUTHOR
                        Author of the stack blueprint.
  -L LICENSE, --license LICENSE
                        License name of the stack blueprint (e.g. 'Apache
                        License 2').
  -c COPYRIGHT, --copyright COPYRIGHT
                        Copyright for the stack blueprint.
--------------------------------------------------------------------------------
>> get-network-configuration
usage: main.py get-network-configuration [-h] -p PROJECT_ID
Lists the subnets of a project.
optional arguments:
  -h, --help            show this help message and exit
  -p PROJECT_ID, --project-id PROJECT_ID
                        ID of the project.
--------------------------------------------------------------------------------
>> add-subnet
usage: main.py add-subnet [-h] -p PROJECT_ID -n NAME -c CIDR
Adds a subnet to a project.
optional arguments:
  -h, --help            show this help message and exit
  -p PROJECT_ID, --project-id PROJECT_ID
                        ID of the project.
  -n NAME, --name NAME  Name of the subnet.
  -c CIDR, --cidr CIDR  CIDR of the subnet.
--------------------------------------------------------------------------------
>> remove-subnet
usage: main.py remove-subnet [-h] -p PROJECT_ID -u UUID
Removes a subnet from a project.
optional arguments:
  -h, --help            show this help message and exit
  -p PROJECT_ID, --project-id PROJECT_ID
                        ID of the project.
  -u UUID, --uuid UUID  UUID of the subnet.
--------------------------------------------------------------------------------
>> create-layer
usage: main.py create-layer [-h] -s STACK_ID -n NAME [-b BLUEPRINT_ID]
Creates new layer in the stack. By default it creates blank instance. You can
specify a blueprint to be a base by -b.
optional arguments:
  -h, --help            show this help message and exit
  -s STACK_ID, --stack-id STACK_ID
                        ID of the stack.
  -n NAME, --name NAME  Name of the new layer.
  -b BLUEPRINT_ID, --blueprint-id BLUEPRINT_ID
                        ID of layer blueprint to be cloned.
--------------------------------------------------------------------------------
>> create-layers-with-stack
usage: main.py create-layers-with-stack [-h] -n STACK_NAME -p PROJECT_ID
                                        [-t TEMPLATE] [-l LAYERS_FILE]
Creates layers and wrap it into the newly created stack. You can either pass
Heat template or XLCLoud Layers JSON model
optional arguments:
  -h, --help            show this help message and exit
  -n STACK_NAME, --stack-name STACK_NAME
                        Name of wrapping stack.
  -p PROJECT_ID, --project-id PROJECT_ID
                        ID of the project.
  -t TEMPLATE, --template TEMPLATE
                        File containing Heat template.
  -l LAYERS_FILE, --layers-file LAYERS_FILE
                        File containing layers model.
--------------------------------------------------------------------------------
>> get-layer
usage: main.py get-layer [-h] -i ID [-p]
Returns layer with the given id
optional arguments:
  -h, --help        show this help message and exit
  -i ID, --id ID    ID of the layer
  -p, --parameters  Show stack's parameters.
--------------------------------------------------------------------------------
>> promote-layer
usage: main.py promote-layer [-h] -l LAYER_ID -n NAME -t TYPE [-a ACCOUNT_ID]
                             [-A AUTHOR] [-L LICENSE] [-c COPYRIGHT]
Promotes layer to a layer blueprint. If parameter --account-id is specified,
created blueprint will be placed in the account's private catalog. Otherwise
it will be placed in the public catalog.
optional arguments:
  -h, --help            show this help message and exit
  -l LAYER_ID, --layer-id LAYER_ID
                        ID of the layer.
  -n NAME, --name NAME  Name of the layer blueprint.
  -t TYPE, --type TYPE  Type of the layer blueprint (e.g. 'HPC').
  -a ACCOUNT_ID, --account-id ACCOUNT_ID
                        Layer blueprint will be created in this account's
                        private catalog.
  -A AUTHOR, --author AUTHOR
                        Author of the layer blueprint.
  -L LICENSE, --license LICENSE
                        License name of the layer blueprint (e.g. 'Apache
                        License 2').
  -c COPYRIGHT, --copyright COPYRIGHT
                        Copyright for the layer blueprint.
--------------------------------------------------------------------------------
>> update-layer
usage: main.py update-layer [-h] -i ID [-p PARAMETERS [PARAMETERS ...]]
                            [-t TEMPLATE] [-l LIFECYCLE [LIFECYCLE ...]]
Updates layer. Parameter -p allows to update with new parameters. Parameter -t
allows to override template. One of them is required
optional arguments:
  -h, --help            show this help message and exit
  -i ID, --id ID        ID of the updated layer.
  -p PARAMETERS [PARAMETERS ...], --parameters PARAMETERS [PARAMETERS ...]
                        List of updated parameters. Each of them has to be in
                        form key=value.
  -t TEMPLATE, --template TEMPLATE
                        Overrides template with the one from specified file
  -l LIFECYCLE [LIFECYCLE ...], --lifecycle LIFECYCLE [LIFECYCLE ...]
                        Sets recipes for the lifecycle. First argument is the
                        phase name, other are IDs of recipes, e.g. -l setup 1
                        2
--------------------------------------------------------------------------------
>> delete-layer
usage: main.py delete-layer [-h] -s STACK_ID -l LAYER_ID
Deletes layer from the stack.
optional arguments:
  -h, --help            show this help message and exit
  -s STACK_ID, --stack-id STACK_ID
                        ID of the stack.
  -l LAYER_ID, --layer-id LAYER_ID
                        ID of the layer.
--------------------------------------------------------------------------------
>> create-instance
usage: main.py create-instance [-h] -l LAYER_ID -n NAME [-N]
Creates new instance in the layer. By default it creates scalable instance.
Nonscalable one is created with -N option.
optional arguments:
  -h, --help            show this help message and exit
  -l LAYER_ID, --layer-id LAYER_ID
                        ID of the layer.
  -n NAME, --name NAME  Name of the new instance.
  -N, --nonscalable     Creates nonscalable instance instead of scalable one.
--------------------------------------------------------------------------------
>> create-application-deployment
usage: main.py create-application-deployment [-h] -l LAYER_ID
                                             [-r RUNLIST_ATTRIBUTES]
Creates application deployments
optional arguments:
  -h, --help            show this help message and exit
  -l LAYER_ID, --layer-id LAYER_ID
                        ID of the layer
  -r RUNLIST_ATTRIBUTES, --runlist-attributes RUNLIST_ATTRIBUTES
                        Runlist attributes in the following format:
                        '{"key":"value"}'
--------------------------------------------------------------------------------
>> remove-application-deployment
usage: main.py remove-application-deployment [-h] -l LAYER_ID -a
                                             APPLICATION_DEPLOYMENT_ID
Removes application deployment
optional arguments:
  -h, --help            show this help message and exit
  -l LAYER_ID, --layer-id LAYER_ID
                        ID of the layer
  -a APPLICATION_DEPLOYMENT_ID, --application-deployment-id APPLICATION_DEPLOYMENT_ID
                        ID of the application deployment
--------------------------------------------------------------------------------
>> list-application-deployments
usage: main.py list-application-deployments [-h] -l LAYER_ID
Lists application deployments
optional arguments:
  -h, --help            show this help message and exit
  -l LAYER_ID, --layer-id LAYER_ID
                        ID of the layer
--------------------------------------------------------------------------------
>> list-keypairs
usage: main.py list-keypairs [-h] -u USER_ID
Returns keypairs for user.
optional arguments:
  -h, --help            show this help message and exit
  -u USER_ID, --user-id USER_ID
                        ID of the user.
--------------------------------------------------------------------------------
>> get-keypair
usage: main.py get-keypair [-h] -u USER_ID -n NAME
Returns keypair of the user.
optional arguments:
  -h, --help            show this help message and exit
  -u USER_ID, --user-id USER_ID
                        ID of the user.
  -n NAME, --name NAME  Name of keypair.
--------------------------------------------------------------------------------
>> generate-keypair
usage: main.py generate-keypair [-h] -u USER_ID -n NAME
Generates keypair of the user.
optional arguments:
  -h, --help            show this help message and exit
  -u USER_ID, --user-id USER_ID
                        ID of the user.
  -n NAME, --name NAME  Name of keypair.
--------------------------------------------------------------------------------
>> import-keypair
usage: main.py import-keypair [-h] -u USER_ID -n NAME -k PUBLIC_KEY
Import keypair of the user.
optional arguments:
  -h, --help            show this help message and exit
  -u USER_ID, --user-id USER_ID
                        ID of the user.
  -n NAME, --name NAME  Name of keypair.
  -k PUBLIC_KEY, --public-key PUBLIC_KEY
                        File with public key.
--------------------------------------------------------------------------------
>> delete-keypair
usage: main.py delete-keypair [-h] -u USER_ID -n NAME
Deletes keypair of the user.
optional arguments:
  -h, --help            show this help message and exit
  -u USER_ID, --user-id USER_ID
                        ID of the user.
  -n NAME, --name NAME  Name of keypair.
--------------------------------------------------------------------------------
>> list-tokens
usage: main.py list-tokens [-h] -u USER_ID
Lists access tokens for the user.
optional arguments:
  -h, --help            show this help message and exit
  -u USER_ID, --user-id USER_ID
                        ID of the user.
--------------------------------------------------------------------------------
>> get-token
usage: main.py get-token [-h] -i ID
Gets the token.
optional arguments:
  -h, --help      show this help message and exit
  -i ID, --id ID  ID of the token.
--------------------------------------------------------------------------------
>> delete-token
usage: main.py delete-token [-h] -i ID
Revokes the token.
optional arguments:
  -h, --help      show this help message and exit
  -i ID, --id ID  ID of the token.
--------------------------------------------------------------------------------
>> get-os-credentials
usage: main.py get-os-credentials [-h] -u USER_ID -p PROJECT_ID
Returns os-credentials for user and project identified by given ids.
optional arguments:
  -h, --help            show this help message and exit
  -u USER_ID, --user-id USER_ID
                        ID of the user.
  -p PROJECT_ID, --project-id PROJECT_ID
                        ID of the project.
--------------------------------------------------------------------------------
>> list-entitlements
usage: main.py list-entitlements [-h] [-u USER_ID] [-g GROUP_ID]
                                 [-a ACCESS_TOKEN_ID]
List entitlements. You have to specify --group-id or --user-id or --access-
token-id.
optional arguments:
  -h, --help            show this help message and exit
  -u USER_ID, --user-id USER_ID
                        ID of the user.
  -g GROUP_ID, --group-id GROUP_ID
                        ID of the group.
  -a ACCESS_TOKEN_ID, --access-token-id ACCESS_TOKEN_ID
                        ID of the access token.
--------------------------------------------------------------------------------
>> create-entitlement
usage: main.py create-entitlement [-h] [-u USER_ID] [-g GROUP_ID]
                                  [-a ACCESS_TOKEN_ID] -r RESOURCE -c ACTION
                                  [ACTION ...]
Creates entitlements. You have to specify --group-id or --user-id or --access-
token-id.
optional arguments:
  -h, --help            show this help message and exit
  -u USER_ID, --user-id USER_ID
                        ID of the user.
  -g GROUP_ID, --group-id GROUP_ID
                        ID of the group.
  -a ACCESS_TOKEN_ID, --access-token-id ACCESS_TOKEN_ID
                        ID of the access token.
  -r RESOURCE, --resource RESOURCE
                        Resource of the entitlement.
  -c ACTION [ACTION ...], --action ACTION [ACTION ...]
                        List of HTTP actions (GET,POST,PUT,DELETE).
--------------------------------------------------------------------------------
>> delete-entitlement
usage: main.py delete-entitlement [-h] [-u USER_ID] [-g GROUP_ID]
                                  [-a ACCESS_TOKEN_ID] -i ID
Deletes entitlement. You have to specify --group-id or --user-id or --access-
token-id.
optional arguments:
  -h, --help            show this help message and exit
  -u USER_ID, --user-id USER_ID
                        ID of the user.
  -g GROUP_ID, --group-id GROUP_ID
                        ID of the group.
  -a ACCESS_TOKEN_ID, --access-token-id ACCESS_TOKEN_ID
                        ID of the access token.
  -i ID, --id ID        ID of the entitlement.
--------------------------------------------------------------------------------
>> update-entitlements
usage: main.py update-entitlements [-h] [-u USER_ID] [-g GROUP_ID]
                                   [-a ACCESS_TOKEN_ID] -e ENTITLEMENTS
                                   [ENTITLEMENTS ...]
Replaces entitlements of user, group or access-token with a given list. You
have to specify --group-id or --user-id or --access-token-id.
optional arguments:
  -h, --help            show this help message and exit
  -u USER_ID, --user-id USER_ID
                        ID of the user.
  -g GROUP_ID, --group-id GROUP_ID
                        ID of the group.
  -a ACCESS_TOKEN_ID, --access-token-id ACCESS_TOKEN_ID
                        ID of the access token.
  -e ENTITLEMENTS [ENTITLEMENTS ...], --entitlements ENTITLEMENTS [ENTITLEMENTS ...]
                        List of updated entitlements. Each of them has to be
                        in form resource,method (separated with comma).
--------------------------------------------------------------------------------
>> list-restrictions
usage: main.py list-restrictions [-h] [-a ACCOUNT_ID]
Lists restrictions
optional arguments:
  -h, --help            show this help message and exit
  -a ACCOUNT_ID, --account-id ACCOUNT_ID
                        ID of the account.
--------------------------------------------------------------------------------
>> get-restriction
usage: main.py get-restriction [-h] -i ID
Gets restriction
optional arguments:
  -h, --help      show this help message and exit
  -i ID, --id ID  ID of the restriction.
--------------------------------------------------------------------------------
>> delete-restriction
usage: main.py delete-restriction [-h] -i ID
Deletes restriction
optional arguments:
  -h, --help      show this help message and exit
  -i ID, --id ID  ID of the restriction.
--------------------------------------------------------------------------------
>> create-restriction
usage: main.py create-restriction [-h] -a ACCOUNT_ID -t TYPE -n NAME
Creates restriction for an account (only predefined restrictions are supported
by the CLI)
optional arguments:
  -h, --help            show this help message and exit
  -a ACCOUNT_ID, --account-id ACCOUNT_ID
                        ID of the account.
  -t TYPE, --type TYPE  Type of the restriction.
  -n NAME, --name NAME  Name of the restriction.
--------------------------------------------------------------------------------
>> list-quotas
usage: main.py list-quotas [-h] -a ACCOUNT_ID
Lists quotas set for given account
optional arguments:
  -h, --help            show this help message and exit
  -a ACCOUNT_ID, --account-id ACCOUNT_ID
                        ID of the account. If not specified, quotas for your
                        account will be listed.
--------------------------------------------------------------------------------
>> set-quota
usage: main.py set-quota [-h] -a ACCOUNT_ID -q QUOTA_TYPE [-v VALUE]
Sets the value of given quota for the account
optional arguments:
  -h, --help            show this help message and exit
  -a ACCOUNT_ID, --account-id ACCOUNT_ID
                        ID of the account.
  -q QUOTA_TYPE, --quota-type QUOTA_TYPE
                        Quota type to be set.
  -v VALUE, --value VALUE
                        New value of the quota.
--------------------------------------------------------------------------------
>> full-help
usage: main.py full-help [-h]
Lists full, detailed help on all commands
optional arguments:
  -h, --help  show this help message and exit

This wiki is licensed under a Creative Commons 2.0 license
XWiki Enterprise 5.4.6 - Documentation - Legal Notice

Site maintained by