PPA API PPA API: Inventory

Summary

This module contains actions for viewing images in the PPA Inventory page.

PPA Version

The actions in this module require PPA v2.7.x or newer.

Actions

ppa_api.inventory.

get_all

Get all versions of each inventory image visible to the current user.

Minimum Plugin Version: 2.0.0

Input

This action takes no inputs.

Output

A list of Image dictionaries.

Example
1
2
- ppa_api.inventory.get_all:
  save: all_images

ppa_api.inventory.

get_all_by_name

Get all versions of an image with the supplied name.

The image must be visible to the current user.

Minimum Plugin Version: 2.0.0

Input

This action takes no inputs.

Output

Either a list of Image dictionaries or null.

Example
1
2
3
- ppa_api.inventory.get_all_by_name:
    name: Local Group Audit
  save: images

ppa_api.inventory.

get_all_undeployed

Get all undeployed inventory images visible to the current user.

Minimum Plugin Version: 2.0.0

Input

This action takes no inputs.

Output

A list of Image dictionaries.

Example
1
2
- ppa_api.inventory.get_all_undeployed:
  save: all_undeployed_images

ppa_api.inventory.

get_deployed

Get all deployed inventory images visible to the current user.

Minimum Plugin Version: 2.0.0

Input

This action takes no inputs.

Output

A list of Image dictionaries.

Example
1
2
- ppa_api.inventory.get_deployed:
  save: deployed_images

ppa_api.inventory.

get_latest

Get the latest version of each inventory image visible to the current user.

Minimum Plugin Version: 2.0.0

Input

This action takes no inputs.

Output

A list of Image dictionaries.

Example
1
2
- ppa_api.inventory.get_latest:
  save: latest_images

ppa_api.inventory.

get_latest_by_name

Get the latest version of an image with the supplied name.

The image must be visible to the current user.

Minimum Plugin Version: 2.0.0

Input

This action takes no inputs.

Output

Either a single Image dictionary or null.

Example
1
2
3
- ppa_api.inventory.get_latest_by_name:
    name: Local Group Audit
  save: image

ppa_api.inventory.

get_latest_undeployed

Get the latest version of each undeployed inventory image visible to the current user.

Minimum Plugin Version: 2.0.0

Input

This action takes no inputs.

Output

A list of Image dictionaries.

Example
1
2
- ppa_api.inventory.get_latest_undeployed:
  save: latest_undeployed_images

ppa_api.inventory.

input_table

Display images in a table, & allow the task operator to make a selection.

The table will have the following columns:

  • Name
  • Description
  • Author
  • Updated At
  • Deployed

Minimum Plugin Version: 2.0.0

Input
  • text: the title of the table

  • images: a single or list of Image dictionaries to display in the table

  • minimum: the minimum number of acceptable selections

  • maximum: the maximum number of acceptable selections

Output

A single or list of Image dictionaries.

Tip
  • If neither a minimum or maximum is provided, the task operator will be able to submit 0 selections.
  • If minimum or maximum are provided, the operation will repeat until the task operator makes a valid number of selections.
Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
- ppa_api.images.get_deployed:
  save: deployed_images

- ppa_api.images.input:
    text: Select Image
    minimum: 1
    maximum: 1
  load:
    images: deployed_images
  save: selected_image

- ppa_api.tasks.start:
  load:
    name: selected_image.name

ppa_api.inventory.

output_table

Display images in a table.

The table will have the following columns:

  • Name
  • Description
  • Author
  • Updated At
  • Deployed

Minimum Plugin Version: 2.0.0

Input
  • text: the title of the table

  • images: a single or list of Image dictionaries to display in the table

Output

Nothing is outputted by this action.

Example
1
2
3
4
5
6
7
- ppa_api.images.get_deployed:
  save: deployed_images

- ppa_api.images.output_table:
    text: Deployed Images
  load:
    images: deployed_images