Table of Contents
Introduction
The vss-cli is a powerful command-line tool designed to help manage ITS Private Cloud resources efficiently. This guide provides an overview of how to use the vss-cli to track request status and details, manage VM change requests, and more.
Basic Usage
The primary command to start with is vss-cli request, which allows you to manage various types of VM requests. Here's the basic structure:
vss-cli request [OPTIONS] COMMAND [ARGS]...
Options
--help: Show help information and exit.
Commands
change: Manage virtual machine change requests.export: Manage virtual machine export requests.folder: Manage logical folder requests.image: Manage user-image synchronization requests.inventory: Manage virtual machine inventory requests.new: Manage new virtual machine deployment requests.restore: Manage virtual machine restore requests.retire: Manage virtual machine retirement requests.snapshot: Manage virtual machine snapshot requests.vmdk: Manage user-VMDK synchronization requests.
Managing VM New Requests
The vss-cli request new command group is dedicated to handling new virtual machine deployment requests. This group includes commands to get, list, and retry deployment requests. Below is an overview of the main commands and their usage.
Options
--help: Show help information and exit.
Commands
get: Retrieve a specific new request.ls: List VM new requests.retry: Retry a VM new request.
Listing VM New Requests
To list VM new requests, use the ls command. This command provides various options to filter, sort, and display the requests.
vss-cli request new ls [OPTIONS]
Options
-f, --filter-by TEXT: Filter the list by<field_name>=<operator>,<value>. Operators includeeq,ne,lt,le,gt,ge,like,in.Example:
status=eq,Processedfilters requests where the status is "Processed".vss-cli request new ls -f status=Processed
-s, --sort TEXT: Sort the list by<field_name>=<asc|desc>.Example:
created_on=descsorts the list by the creation date in descending order.vss-cli request new ls -s created_on=desc
-a, --show-all: Show all results without pagination.-c, --count INTEGER: Specify the number of results to display.-p, --page: Page results in a less-like format for easier viewing.--help: Show help information and exit.
Retrying a VM Request
To retry a VM request that encountered an error, use the retry command with the specific request ID:
vss-cli request new retry [OPTIONS] RID
This command attempts to reprocess a VM request that previously failed. RID is the new VM Request ID.
Managing VM Change Requests
To manage VM change requests, use the change command. Here's the basic usage:
vss-cli request change [OPTIONS] COMMAND [ARGS]...
Options
--help: Show help information and exit.
Commands
get: Retrieve a specific change request.ls: List VM change requests.retry: Retry a VM change request.set: Update a VM change request.
Listing VM Change Requests
To list VM change requests, use the ls command. This command provides various options to filter, sort, and display the requests.
vss-cli request change ls [OPTIONS]
Options
-f, --filter-by TEXT: Filter the list by<field_name>=<operator>,<value>. Operators includeeq,ne,lt,le,gt,ge,like,in.Example:
status=eq,Processedfilters requests where the status is "Processed".vss-cli request change ls -f status=Processed
-s, --sort TEXT: Sort the list by<field_name>=<asc|desc>.Example:
created_on=descsorts the list by the creation date in descending order.vss-cli request change ls -s created_on=desc
-a, --show-all: Show all results without pagination.-c, --count INTEGER: Specify the number of results to display.-p, --page: Page results in a less-like format for easier viewing.--help: Show help information and exit.
Example Commands
Listing All Change Requests
vss-cli request change ls
Filtering Change Requests by Status
vss-cli request change ls -f status=eq,Processed
Sorting Change Requests by Creation Date
vss-cli request change ls -s created_on=desc
Displaying All Results
vss-cli request change ls -a
Specifying the Number of Results
vss-cli request change ls -c 10
Paging Results for Easier Viewing
vss-cli request change ls -p
Getting VM Change Requests Details
The vss-cli request change get command allows you to get various attributes for a VM change request.
Usage
vss-cli request change get RID
RID: The request ID of the change request you want to update.
Options
--help: Show help information and exit.
Retrying a VM Change Request
To retry a VM request that encountered an error, use the retry command with the specific request ID:
vss-cli request change retry RID
This command attempts to reprocess a VM request that previously failed. RID is the change request ID.
Updating VM Change Requests
The vss-cli request change set command allows you to set various attributes for a VM change request.
Usage
vss-cli request change set [OPTIONS] RID COMMAND [ARGS]...
RID: The request ID of the change request you want to update.
Options
--help: Show help information and exit.
Commands
schedule: Update scheduling settings for the VM change request.
Example: Updating Scheduling Settings
To update the scheduling settings for a VM change request, use the schedule command. Here's the basic usage:
vss-cli request change set RID schedule [OPTIONS]
Options
-c, --cancel: Cancel the scheduling.-d, --date-time [%Y-%m-%dT%H:%M:%S|%Y-%m-%d %H:%M]: Update the date and time of the scheduling in the formatYYYY-MM-DD HH:MM.
Example Commands
Setting a New Schedule
vss-cli request change set 1234 schedule -d "2024-07-15 14:30"
This command sets the schedule for the change request with ID 1234 to July 15, 2024, at 14:30.
Canceling a Schedule
vss-cli request change set 1234 schedule -c
This command cancels the scheduling for the change request with ID 1234.