PYTHON-ZUNCLIENT(1)
π
PYTHON-ZUNCLIENT β the python-zunclient 5.5.0 era β¨
okay bestie so this is the manual for python-zunclient, version 5.5.0 β like, the whole thing. buckle up, it's giving "long but iconic" π
π NAME
python-zunclient β literally just python-zunclient 5.5.0, that's it, that's the name π«Ά
β¨ CONTENTS
π§ Installation Guide
okay so first things first, at the command line:
$ pip install python-zunclient
or, if you've got virtualenvwrapper installed (fancy, love that for you):
$ mkvirtualenv python-zunclient
$ pip install python-zunclient
slay. you're installed π
πΈ Contributor's Guide
if you wanna contribute to the development of OpenStack (main character energy fr), you must follow the steps in this page:
<https://docs.openstack.org/infra/manual/developers.html>
and if you already have a good understanding of how the system works and your OpenStack accounts are all set up, you can skip straight to the development workflow section of this documentation to learn how changes to OpenStack should be submitted for review via the Gerrit tool:
<https://docs.openstack.org/infra/manual/developers.html# development-workflow>
π not me having to say this but: pull requests submitted through GitHub will be ignored. like, don't even. nope.
bugs should be filed on Launchpad, not GitHub:
<https://bugs.launchpad.net/python-zunclient>
π¦ User Documentation
π Zun CLI man page
β SYNOPSIS
so Zun operation uses the zun command, and also supports using the openstack command. two paths, same destiny β¨
zun [options] <command> [command-options]
openstack appcontainer <command> [command-options]
π DESCRIPTION
the zun command line utility interacts with the OpenStack Containers Service (Zun). it's the whole vibe, no cap π«Ά
in order to use the CLI, you must provide your OpenStack username, password, project (historically called tenant), and auth endpoint. you can use configuration options --os-username, --os-password, --os-tenant-name or --os-tenant-id, and --os-auth-url or set corresponding environment variables:
export OS_USERNAME=user
export OS_PASSWORD=pass
export OS_PROJECT_NAME=myproject
export OS_AUTH_URL=http://auth.example.com:5000/v3
export OS_USER_DOMAIN_ID=default
export OS_PROJECT_DOMAIN_ID=default
like, pick your fighter β flags or env vars, both are valid π
π OPTIONS
to get a list of available commands and options run:
zun help
to get usage and options of a command:
zun help <command>
you can also use the openstack command as follows.
to get a list of available commands run:
openstack help appcontainer
to get usage and options of a command:
openstack appcontainer <command> --help
π₯ EXAMPLES
list all the containers:
zun list
create new container:
zun run --name container01 IMAGE01
describe a specific container:
zun show container01
you can also use the openstack command as follows π
list all the containers:
openstack appcontainer list
create new container:
openstack appcontainer run --name container01 IMAGE01
describe a specific container:
openstack appcontainer show container01
ate. no crumbs π
πΈ Command List
π«Ά appcontainer action
an appcontainer action specifies the action details for a container. like, the receipts of what happened to your container π
π
appcontainer action list
list actions on a container β show me the lore bestie:
openstack appcontainer action list [-h]
[-f {csv,json,table,value,yaml}]
[-c COLUMN] [--max-width <integer>]
[--fit-width] [--print-empty]
[--noindent]
[--quote {all,minimal,none,nonnumeric}]
[--sort-column SORT_COLUMN]
<container>
<container>β ID or name of the container to list actions.-h,--helpβ show this help message and exit-f {csv,json,table,value,yaml},--format {csv,json,table,value,yaml}β the output format, defaults totable-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated--sort-column SORT_COLUMNβ specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated--max-width <integer>β Maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence.--fit-widthβ Fit the table to the display width. Implied if--max-widthgreater than 0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable--print-emptyβ Print empty table if there is no data to show.--noindentβ whether to disable indenting the JSON--quote {all,minimal,none,nonnumeric}β when to include quotes, defaults tononnumeric
π¦ appcontainer action show
shows action β one (1) specific action, very demure:
openstack appcontainer action show [-h]
[-f {json,shell,table,value,yaml}]
[-c COLUMN] [--max-width <integer>]
[--fit-width] [--print-empty]
[--noindent] [--prefix PREFIX]
<container> <request_id>
<container>β ID or name of the container to show.<request_id>β request ID of action to describe.-f {json,shell,table,value,yaml},--format {json,shell,table,value,yaml}β the output format, defaults totable-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated--max-width <integer>β Maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence.--fit-widthβ Fit the table to the display width. Implied if--max-widthgreater than 0. Set the environment variableCLIFF_FIT_WIDTH =1to always enable--print-emptyβ Print empty table if there is no data to show.--noindentβ whether to disable indenting the JSON--prefix PREFIXβ add a prefix to all variable names
π appcontainer host
an appcontainer host specifies the compute host for running containers. it's the real estate, the venue, the location tag π
π appcontainer host list
list available hosts:
openstack appcontainer host list [-h] [-f {csv,json,table,value,yaml}]
[-c COLUMN] [--max-width <integer>]
[--fit-width] [--print-empty]
[--noindent]
[--quote {all,minimal,none,nonnumeric}]
[--sort-column SORT_COLUMN]
[--marker <marker>] [--limit <limit>]
[--sort-key <sort-key>]
[--sort-dir <sort-dir>]
-h,--helpβ show this help message and exit--marker <marker>β The last host UUID of the previous page; displays list of hosts after"marker".--limit <limit>β Maximum number of hosts to return--sort-key <sort-key>β Column to sort results by--sort-dir <sort-dir>β Direction to sort."asc"or"desc".-f {csv,json,table,value,yaml},--format {csv,json,table,value,yaml}β the output format, defaults totable-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated--sort-column SORT_COLUMNβ specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated--max-width <integer>β Maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence.--fit-widthβ Fit the table to the display width. Implied if--max- widthgreater than 0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable--print-emptyβ Print empty table if there is no data to show.--noindentβ whether to disable indenting the JSON--quote {all,minimal,none,nonnumeric}β when to include quotes, defaults tononnumeric
π§ appcontainer host show
show a host β one host, front and center:
openstack appcontainer host show [-h]
[-f {json,shell,table,value,yaml}]
[-c COLUMN] [--max-width <integer>]
[--fit-width] [--print-empty]
[--noindent] [--prefix PREFIX]
<host>
<host>β ID or name of the host to show.-h,--helpβ show this help message and exit-f {json,shell,table,value,yaml},--format {json,shell,table,value,yaml}β the output format, defaults totable-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated--max-width <integer>β Maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence.--fit-widthβ Fit the table to the display width. Implied if--max- widthgreater than 0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable--print-emptyβ Print empty table if there is no data to show.--noindentβ whether to disable indenting the JSON--prefix PREFIXβ add a prefix to all variable names
π appcontainer image
an appcontainer image specifies the image for a host. the fit check for your host, basically π
π appcontainer image list
list available images:
openstack appcontainer image list [-h] [-f {csv,json,table,value,yaml}]
[-c COLUMN] [--max-width <integer>]
[--fit-width] [--print-empty]
[--noindent]
[--quote {all,minimal,none,nonnumeric}]
[--sort-column SORT_COLUMN]
[--marker <marker>] [--limit <limit>]
[--sort-key <sort-key>]
[--sort-dir <sort-dir>]
-h,--helpβ show this help message and exit--marker <marker>β The last host UUID of the previous page; displays list of hosts after"marker".--limit <limit>β Maximum number of hosts to return--sort-key <sort-key>β Column to sort results by--sort-dir <sort-dir>β Direction to sort."asc"or"desc".-f {csv,json,table,value,yaml},--format {csv,json,table,value,yaml}β the output format, defaults totable-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated--sort-column SORT_COLUMNβ specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated--max-width <integer>β the max display width, bestie.<1disables it entirely. You can also set theCLIFF_MAX_TERM_WIDTHenvironment variable, but ngl the parameter wins β it takes precedence. π--fit-widthβ squishes the table to fit your display width. It's implied if--max- widthis greater than 0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable it. β¨--print-emptyβ prints an empty table when there's literally no data to show. icon of resilience honestly π--noindentβ whether to disable indenting the JSON. that's it, that's the whole vibe π¦--quote {all,minimal,none,nonnumeric}β when to include quotes. defaults tononnumeric. periodt π
appcontainer image show
Describe a specific image. like a lil biography for your image π
openstack appcontainer image show [-h]
[-f {json,shell,table,value,yaml}]
[-c COLUMN] [--max-width <integer>]
[--fit-width] [--print-empty]
[--noindent] [--prefix PREFIX]
<uuid>
<uuid>β UUID of image to describe π-h,--helpβ show this help message and exit-f {json,shell,table,value,yaml},--format {json,shell,table,value,yaml}β the output format, defaults totable-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated--max-width <integer>β Maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence.--fit-widthβ Fit the table to the display width. Implied if--max- widthgreater than 0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable--print-emptyβ Print empty table if there is no data to show.--noindentβ whether to disable indenting the JSON--prefix PREFIXβ add a prefix to all variable names π·οΈ
appcontainer image delete
Delete specified image from a host. bye bestie ππ
openstack appcontainer image delete [-h] <uuid> <host>
<uuid>β UUID of image to describe<host>β Name or UUID of the host-h,--helpβ show this help message and exit
appcontainer image pull
Pull specified image into a host. get that image in there π«Ά
openstack appcontainer image pull [-h]
[-f {json,shell,table,value,yaml}]
[-c COLUMN] [--max-width <integer>]
[--fit-width] [--print-empty]
[--noindent] [--prefix PREFIX]
<image> <host>
<image>β Name of the image<host>β Name or UUID of the host-h,--helpβ show this help message and exit-f {json,shell,table,value,yaml},--format {json,shell,table,value,yaml}β the output format, defaults totable-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated--max-width <integer>β Maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence.--fit-widthβ Fit the table to the display width. Implied if--max- widthgreater than 0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable--print-emptyβ Print empty table if there is no data to show.--noindentβ whether to disable indenting the JSON--prefix PREFIXβ add a prefix to all variable names
appcontainer image search
Search the image repository for images. scavenger hunt but make it cloud βοΈπ
openstack appcontainer image search [-h]
[-f {csv,json,table,value,yaml}]
[-c COLUMN] [--max-width <integer>]
[--fit-width] [--print-empty]
[--noindent]
[--quote {all,minimal,none,nonnumeric}]
[--sort-column SORT_COLUMN]
[--image-driver <image-driver>]
[--exact-match]
<image_name>
<image_name>β Name of the image-h,--helpβ show this help message and exit--image-driver <image-driver>β Name of the image driver--exact-matchβ exact match image name. no fuzzy vibes allowed π―-f {csv,json,table,value,yaml},--format {csv,json,table,value,yaml}β the output format, defaults totable-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated--sort-column SORT_COLUMNβ specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated--max-width <integer>β Maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence.--fit-widthβ Fit the table to the display width. Implied if--max- widthgreater than 0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable--print-emptyβ Print empty table if there is no data to show.--noindentβ whether to disable indenting the JSON--quote {all,minimal,none,nonnumeric}β when to include quotes, defaults tononnumeric
appcontainer service
An appcontainer service specifies the zun services. it's giving org chart for your cloud π«‘
appcontainer service list
Print a list of zun services. lineup reveal β¨
openstack appcontainer service list [-h]
[-f {csv,json,table,value,yaml}]
[-c COLUMN] [--max-width <integer>]
[--fit-width] [--print-empty]
[--noindent]
[--quote {all,minimal,none,nonnumeric}]
[--sort-column SORT_COLUMN]
-h,--helpβ show this help message and exit-f {csv,json,table,value,yaml},--format {csv,json,table,value,yaml}β the output format, defaults totable-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated--sort-column SORT_COLUMNβ specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated--max-width <integer>β Maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence.--fit-widthβ Fit the table to the display width. Implied if--max- widthgreater than 0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable--print-emptyβ Print empty table if there is no data to show.--noindentβ whether to disable indenting the JSON--quote {all,minimal,none,nonnumeric}β when to include quotes, defaults tononnumeric
appcontainer service delete
Delete the Zun binaries/services. unfollowing rn π
openstack appcontainer service delete [-h] <host> <binary>
<host>β Name of host<binary>β Name of the binary to delete-h,--helpβ show this help message and exit
appcontainer service forcedown
Force the Zun service to down or up. main character energy, no consent needed π€
openstack appcontainer service forcedown [-h]
[-f {json,shell,table,value,yaml}]
[-c COLUMN]
[--max-width <integer>]
[--fit-width] [--print-empty]
[--noindent] [--prefix PREFIX]
[--unset]
<host> <binary>
<host>β Name of host<binary>β Name of the binary to forcedown-h,--helpβ show this help message and exit--unsetβ Unset the force state down of service. basically the undo button β©οΈ-f {json,shell,table,value,yaml},--format {json,shell,table,value,yaml}β the output format, defaults totable-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated--max-width <integer>β Maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence.--fit-widthβ Fit the table to the display width. Implied if--max- widthgreater than 0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable--print-emptyβ Print empty table if there is no data to show.--noindentβ whether to disable indenting the JSON--prefix PREFIXβ add a prefix to all variable names
appcontainer service enable
Enable the Zun service. we're SO back π₯
openstack appcontainer service enable [-h]
[-f {json,shell,table,value,yaml}]
[-c COLUMN]
[--max-width <integer>]
[--fit-width] [--print-empty]
[--noindent] [--prefix PREFIX]
<host> <binary>
<host>β Name of host<binary>β Name of the binary to enable-h,--helpβ show this help message and exit-f {json,shell,table,value,yaml},--format {json,shell,table,value,yaml}β the output format, defaults totable-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated--max-width <integer>β Maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence.--fit-widthβ Fit the table to the display width. Implied if--max- widthgreater than 0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable--print-emptyβ Print empty table if there is no data to show.--noindentβ whether to disable indenting the JSON--prefix PREFIXβ add a prefix to all variable names
appcontainer service disable
Disable the Zun service. π«
openstack appcontainer service disable [-h]
[-f {json,shell,table,value,yaml}]
[-c COLUMN]
[--max-width <integer>]
[--fit-width] [--print-empty]
[--noindent] [--prefix PREFIX]
[--reason <reason>]
<host> <binary>
okay so here's the deal with this one π you're telling one specific service on one specific host to take a lil nap. Here's what it wants from you:
<host>β name of the host π₯οΈ like, the actual box<binary>β name of the binary to disable, i.e. which service you're benching
β¨ the flags, bestie β¨
-h,--helpβ shows this help message and dips. classic.--reason <reason>β the reason for disabling the service. be honest, put it in writing π-f {json,shell,table,value,yaml},--format {json,shell,table,value,yaml}β the output format, defaults totableπ-c COLUMN,--column COLUMNβ specify the column(s) to include, and yes you can repeat it (spam it, go off) π--max-width <integer>β maximum display width,<1to disable. you can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but heads up β the parameter takes precedence π--fit-widthβ fit the table to the display width. it's implied if--max-widthis greater than0. set the environment variableCLIFF_FIT_WIDTH=1to always enable π«Ά--print-emptyβ print empty table if there is no data to show. no data?? still a table. iconic.--noindentβ whether to disable indenting the JSON πͺ--prefix PREFIXβ add a prefix to all variable names π·οΈ
π Reference
π« The zunclient Python API
πΈ Usage
first, create a client instance with your credentials. it's giving handshake energy π€
>>> from zunclient import client
>>> zun = client.Client(VERSION, auth_url=AUTH_URL, username=USERNAME,
... password=PASSWORD, project_name=PROJECT_NAME,
... user_domain_name='default',
... project_domain_name='default')
here VERSION can be a string or a zunclient.api_versions.APIVersion obj. if you'd rather live that string life, you can use 1 or 1.X (where X is a microversion) β¨
alternatively β and yes there's an alt route β you can create a client instance using the keystoneauth session API:
>>> from keystoneauth1 import loading
>>> from keystoneauth1 import session
>>> from zunclient import client
>>> loader = loading.get_plugin_loader('password')
>>> auth = loader.load_from_options(auth_url=AUTH_URL,
... username=USERNAME,
... password=PASSWORD,
... project_name=PROJECT_NAME,
... user_domain_name='default',
... project_domain_name='default')
>>> sess = session.Session(auth=auth)
>>> zun = client.Client(VERSION, session=sess)
if you have PROJECT_NAME instead of a PROJECT_ID, use the project_name parameter. same energy β if your cloud uses keystone v3 and you have a DOMAIN_NAME or DOMAIN_ID, provide it as user_domain_(name|id) π«‘ and if you're using a PROJECT_NAME also provide the domain information as project_domain_(name|id). lowkey important, don't skip it.
then call methods on its managers:
>>> zun.containers.list()
[<Container {...}>]
>>> zun.containers.run(name="my-container", image='nginx')
<Container {...}>
look at that. containers. slay. π₯
π Author
author name not set π (mysterious main character energy, tbh)
π Copyright
2013, OpenStack Foundation
that's the whole page, bestie β no cap, you're now fully fluent in python-zunclient π¦
version 5.5.0, dated Jan 02, 1980 (yes really, that's the date on the tin π) β go forth and containerize, periodt π β¨
π¦ where this page comes from
- nixpkgs unstable: python3.13-python-zunclient 5.5.0
- nixpkgs unstable: python3.14-python-zunclient 5.5.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms