laniakea.core.providers.packet package¶
Submodules¶
Packet Bare Metal API
-
class
laniakea.core.providers.packet.manager.PacketConfiguration(conf)¶ Bases:
objectPacket configuration class.
-
validate()¶ Perform some basic configuration validation.
-
-
class
laniakea.core.providers.packet.manager.PacketManager(conf)¶ Bases:
objectPacketManager base class.
-
attach_volume_to_device(volume_id, device_id)¶ Attaches the created Volume to a Device.
-
create_demand(project_id, facility, plan, operating_system, tags=None, userdata='', hostname=None, count=1)¶ Create a new on demand device under the given project.
-
create_spot(project_id, facility, plan, operating_system=None, spot_price_max=-1, tags=None, userdata='', hostname=None, count=1)¶ Create a new spot device under the given project.
-
create_volume(project_id, plan, size, facility, label='')¶ Creates a new volume.
-
static
filter(criterias, devices)¶ Filter a device by criterias on the root level of the dictionary.
-
static
get_public_ip(addresses, version=4)¶ Return either the devices public IPv4 or IPv6 address.
-
static
get_random_hostname()¶ Unique identifier for hostnames.
-
list_devices(project_id, conditions=None, params=None)¶ Retrieve list of devices in a project by one of more conditions.
-
list_facilities(params=None)¶ Retrieve list of available facilities.
-
list_operating_systems(params=None)¶ Retrieve list of available operating systems.
-
list_plans(params=None)¶ Retrieve list of available plans.
-
list_projects(params=None)¶ Retrieve list of available projects.
-
list_spot_prices()¶ Retrieve list of current spot market prices.
-
pprint(data)¶ Pretty print JSON.
-
print_devices(devices)¶ Print method for devices.
-
print_facilities(facilities)¶ Print method for facilities.
-
print_operating_systems(operating_systems)¶ Print method for operating systems.
-
print_plans(plans)¶ Print method for plans.
-
print_projects(projects)¶ Print method for projects.
-
print_spot_prices(spot_prices)¶ Print method for spot prices.
-
reboot(devices)¶ Reboot one or more devices.
-
stop(devices)¶ Power-Off one or more running devices.
-
terminate(devices)¶ Terminate one or more running or stopped instances.
-
validate_capacity(servers)¶ Validates if a deploy can be fulfilled.
-
-
exception
laniakea.core.providers.packet.manager.PacketManagerException¶ Bases:
ExceptionException class for Packet Manager.
Module contents¶
Packet Bare Metal CLI
-
class
laniakea.core.providers.packet.PacketCommandLine¶ Bases:
objectSub command-line interface for the Packet provider.
-
HOME= '/home/travis/build/MozillaSecurity/laniakea/laniakea/core/providers/packet'¶
-
VERSION= 0.1¶
-
classmethod
add_arguments(subparsers, dirs)¶ Argument parser of this module.
-
classmethod
main(args, settings=None, userdata=None)¶ Main entry point of this module.
-