跳到主要内容

Image Management Command: image

List all images: ls

Entry:

lbg image ls

Summary:

usage: lbg image ls [-h] [-q] [-fa] [-s] [-pd] [-c] [-d] [-p PLATFORM] [-f FORMAT] [--csv] [--json] [--yaml] [--table] [--noheader]

options:
-h, --help show this help message and exit
-q, --quiet only show node id
-fa, --failed only show failed image
-s, --scheduling only show scheduling image
-pd, --pending only show pending image
-c, --completed only show completed image
-d, --deleted only show deleted image
-p PLATFORM, --platform PLATFORM
only show selected platform image
-f FORMAT, --format FORMAT
change header format
--csv output with csv format
--json output with json format
--yaml output with yaml format
--table output with table format
--noheader does not print header information

Parameter Description:

ParameterAbbreviationDescriptionRequired
--quiet-qOnly show Image IDNo
--failed-faOnly show failed imagesNo
--scheduling-sOnly show scheduling imagesNo
--pending-pdOnly show pending imagesNo
--completed-cOnly show completed imagesNo
--platform-pOnly show images available under this platformNo

Example:

$ lbg image ls
$ lbg image ls -p ali # Only display images with the platform ali

Snapshot to image: release

Entry:

lbg image release

Summary:

usage: lbg image release [-h] [-n NAME] [-c COMMENT] image_id

positional arguments:
image_id id of the image

options:
-h, --help show this help message and exit
-n NAME, --name NAME image name
-c COMMENT, --comment COMMENT
image comment

Parameter Description:

ParameterAbbreviationDescriptionRequired
--name-nImage nameNo
--comment-cImage descriptionNo

Example:

$ lbg image release -n dpgen -c "dpgen backup" 253 # Convert snapshot id 253 to a custom image named dpgen with a description of "dpgen backup"

Delete snapshot/image: rm

Entry:

lbg image rm

Summary:

usage: lbg image rm [-h] [-f] image_id [image_id ...]

positional arguments:
image_id id of the image

options:
-h, --help show this help message and exit
-f, --force force delete the image

Parameter Description:

ParameterAbbreviationDescriptionRequired
--force-fNo promptNo
image_id-Image id to be deletedNo

Example:

$ lbg image rm 546 213 # Delete image id 546 and 213