Packet Cloud Module Using Packet's Python API Client

The Packet cloud module is used to control access to the Packet VPS system.

Use of this module only requires the token parameter.

Set up the cloud configuration at /etc/salt/cloud.providers or /etc/salt/cloud.providers.d/packet.conf:

The Packet profile requires size, image, location, project_id

Optional profile parameters:

  • storage_size - min value is 10, defines Gigabytes of storage that will be attached to device.

  • storage_tier - storage_1 - Standard Plan, storage_2 - Performance Plan

  • snapshot_count - int

  • snapshot_frequency - string - possible values:

    • 1min

    • 15min

    • 1hour

    • 1day

    • 1week

    • 1month

    • 1year

This driver requires Packet's client library:

    driver: packet
    token: ewr23rdf35wC8oNjJrhmHa87rjSXzJyi
    private_key: /root/.ssh/id_rsa

    provider: packet-provider
    size: baremetal_0
    image: ubuntu_16_04_image
    location: ewr1
    project_id: a64d000b-d47c-4d26-9870-46aac43010a6
    storage_size: 10
    storage_tier: storage_1
    storage_snapshot_count: 1
    storage_snapshot_frequency: 15min

Return available Packet os images.

CLI Example:

salt-cloud --list-images packet-provider
salt-cloud -f avail_images packet-provider

Return available Packet datacenter locations.

CLI Example:

salt-cloud --list-locations packet-provider
salt-cloud -f avail_locations packet-provider

Return available Packet projects.

CLI Example:

salt-cloud -f avail_projects packet-provider

Return available Packet sizes.

CLI Example:

salt-cloud --list-sizes packet-provider
salt-cloud -f avail_sizes packet-provider

Create a single Packet VM., call=None)

Destroys a Packet device by name.


The hostname of VM to be be destroyed.

CLI Example:

salt-cloud -d name

Return the first configured instance., vm_)

Return the image object to use, vm_)

Return the VM's size object

Returns a list of devices, keeping only a brief listing. CLI Example:

salt-cloud -Q
salt-cloud --query
salt-cloud -f list_nodes packet-provider

List devices, with all available information.

CLI Example:

salt-cloud -F
salt-cloud --full-query
salt-cloud -f list_nodes_full packet-provider

Return a list of the VMs that are on the provider. Only a list of VM names and their state is returned. This is the minimum amount of information needed to check for existing VMs.

New in version 2015.8.0.

CLI Example:

salt-cloud -f list_nodes_min packet-provider
salt-cloud --function list_nodes_min packet-provider

Return a list of the VMs that are on the provider, with select fields.

Return the script deployment object, call=None)

Show the details from the provider concerning an instance