salt.cloud.clouds.packet

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: https://pypi.python.org/pypi/packet-python

packet-provider:
    minion:
        master: 192.168.50.10
    driver: packet
    token: ewr23rdf35wC8oNjJrhmHa87rjSXzJyi
    private_key: /root/.ssh/id_rsa

packet-profile:
    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
salt.cloud.clouds.packet.avail_images(call=None)

Return available Packet os images.

CLI Example:

salt-cloud --list-images packet-provider
salt-cloud -f avail_images packet-provider
salt.cloud.clouds.packet.avail_locations(call=None)

Return available Packet datacenter locations.

CLI Example:

salt-cloud --list-locations packet-provider
salt-cloud -f avail_locations packet-provider
salt.cloud.clouds.packet.avail_projects(call=None)

Return available Packet projects.

CLI Example:

salt-cloud -f avail_projects packet-provider
salt.cloud.clouds.packet.avail_sizes(call=None)

Return available Packet sizes.

CLI Example:

salt-cloud --list-sizes packet-provider
salt-cloud -f avail_sizes packet-provider
salt.cloud.clouds.packet.create(vm_)

Create a single Packet VM.

salt.cloud.clouds.packet.destroy(name, call=None)

Destroys a Packet device by name.

name

The hostname of VM to be be destroyed.

CLI Example:

salt-cloud -d name
salt.cloud.clouds.packet.get_configured_provider()

Return the first configured instance.

salt.cloud.clouds.packet.get_devices_by_token()
salt.cloud.clouds.packet.get_image(conn, vm_)

Return the image object to use

salt.cloud.clouds.packet.get_size(conn, vm_)

Return the VM's size object

salt.cloud.clouds.packet.is_profile_configured(vm_)
salt.cloud.clouds.packet.list_nodes(call=None)

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
salt.cloud.clouds.packet.list_nodes_full(call=None)

List devices, with all available information.

CLI Example:

salt-cloud -F
salt-cloud --full-query
salt-cloud -f list_nodes_full packet-provider
salt.cloud.clouds.packet.list_nodes_min(call=None)

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
salt.cloud.clouds.packet.list_nodes_select(call=None)

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

salt.cloud.clouds.packet.script(vm_)

Return the script deployment object

salt.cloud.clouds.packet.show_instance(name, call=None)

Show the details from the provider concerning an instance