Skip to content

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.

display

Display images in a table.

The table will have the following columns:

  • Name
  • Description
  • Author
  • Updated At
  • Deployed

Minimum Plugin Version: 3.0.0

Input
  • text: the title of the table

  • images: any number of Images 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.display:
    text: Deployed Images
  load:
    images: deployed_images

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 Images.

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 Images 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 Images.

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

ppa_api.inventory.

get_by_id

Get the inventory image with the supplied ID.

Minimum Plugin Version: 4.1.0

Input
  • image_id: the ID of the image
Output

A single Image.

Example
1
2
3
- ppa_api.inventory.get_by_id:
    iamge_id: 123
  save: image

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 Images.

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 Imagess.

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 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 Images.

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

ppa_api.inventory.

Get the permalink for a deployed image.

Minimum Plugin Version: 5.3.0

This action will fail if the supplied image is not deployed!

Input

A single deployed Image.

Output

A permalink to the deployed task in PPA.

Example
1
2
3
4
- ppa_api.inventory.get_permalink:
  load:
    image: image
  save: permalink

ppa_api.inventory.

select

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

The table will have the following columns:

  • Name
  • Description
  • Author
  • Updated At
  • Deployed

Minimum Plugin Version: 3.0.0

Input
  • text: the title of the table

  • images: any number of Images to display in the table

  • minimum: the minimum number of acceptable selections

  • maximum: the maximum number of acceptable selections

Output

A Selection containing:

  • total: the number of selected Images

  • all: a list of selected Images

  • first: the first selected Image

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
- ppa_api.images.get_deployed:
  save: deployed_images

- ppa_api.images.select:
    text: Select Images
  load:
    images: deployed_images
  save: selection

- ppa_api.images.display:
    text: Selected Images
  load:
    images: selection.all

ppa_api.inventory.

select_one

Display images in a table, & prompt the task operator to select one.

The table will have the following columns:

  • Name
  • Description
  • Author
  • Updated At
  • Deployed

Minimum Plugin Version: 3.0.0

Input
  • text: the title of the table

  • images: any number of Images to display in the table

Output

A single Images.

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

- ppa_api.images.select_one:
    text: Select Image
  load:
    images: deployed_images
  save: selection