How-to track requests with the ITS Command Line Interface vss-cli

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 include eq, ne, lt, le, gt, ge, like, in.

    • Example: status=eq,Processed filters 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=desc sorts the list by the creation date in descending order.

  • -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:

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:

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.

Options

  • -f, --filter-by TEXT: Filter the list by <field_name>=<operator>,<value>. Operators include eq, ne, lt, le, gt, ge, like, in.

    • Example: status=eq,Processed filters requests where the status is "Processed".

  • -s, --sort TEXT: Sort the list by <field_name>=<asc|desc>.

    • Example: created_on=desc sorts the list by the creation date in descending order.

  • -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

  1. Listing All Change Requests

  2. Filtering Change Requests by Status

  3. Sorting Change Requests by Creation Date

  4. Displaying All Results

  5. Specifying the Number of Results

  6. Paging Results for Easier Viewing

     

Getting VM Change Requests Details

The vss-cli request change get command allows you to get various attributes for a VM change request.

Usage

  • 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:

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

  • 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:

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 format YYYY-MM-DD HH:MM.

Example Commands

  1. Setting a New Schedule

    This command sets the schedule for the change request with ID 1234 to July 15, 2024, at 14:30.

  2. Canceling a Schedule

    This command cancels the scheduling for the change request with ID 1234.

 

Related articles

University of Toronto - Since 1827