skyplane.api.dataplane#

Classes

Dataplane(clientid, topology, provisioner, ...)

A Dataplane represents a concrete Skyplane network, including topology and VMs.

DataplaneAutoDeprovision(dataplane)

class skyplane.api.dataplane.Dataplane(clientid, topology, provisioner, transfer_config, log_dir, debug=True)[source]#

Bases: object

A Dataplane represents a concrete Skyplane network, including topology and VMs.

Parameters:
  • clientid (str) – the uuid of the local host to create the dataplane

  • topology (TopologyPlan) – the calculated topology during the transfer

  • provisioner (Provisioner) – the provisioner to launch the VMs

  • transfer_config (TransferConfig) – the configuration during the transfer

auto_deprovision()[source]#

Returns a context manager that will automatically call deprovision upon exit.

Return type:

DataplaneAutoDeprovision

check_error_logs()[source]#

Get the error log from remote gateways if there is any error.

Return type:

Dict[str, List[str]]

deprovision(max_jobs=64, spinner=False)[source]#

Deprovision the remote gateways

Parameters:
  • max_jobs (int) – maximum number of jobs to deprovision the remote gateways (default: 64)

  • spinner (bool) – Whether to show the spinner during the job (default: False)

provision(allow_firewall=True, gateway_docker_image='public.ecr.aws/s6m1p0n8/skyplane:edge', authorize_ssh_pub_key=None, max_jobs=16, spinner=False)[source]#

Provision the transfer gateways.

Parameters:
  • allow_firewall (bool) – whether to apply firewall rules in the gatweway network (default: True)

  • gateway_docker_image (str) – Docker image token in github

  • authorize_ssh_pub_key (str) – authorization ssh key to the remote gateways

  • max_jobs (int) – maximum number of provision jobs to launch concurrently (default: 16)

  • spinner (bool) – whether to show the spinner during the job (default: False)its to determine how many instances to create in each region

run(jobs, hooks=None)[source]#

Start the transfer in the main thread. Wait until the transfer is complete.

Parameters:

hooks (TransferHook) – Tracks the status of the transfer

run_async(jobs, hooks=None)[source]#

Start the transfer asynchronously. The main thread will not be blocked.

Parameters:

hooks (TransferHook) – Tracks the status of the transfer

Return type:

TransferProgressTracker

sink_gateways(region_tag=None)[source]#

Returns a list of sink gateway nodes

Return type:

Dict[str, List[Server]]

source_gateways()[source]#

Returns a list of source gateway nodes

Return type:

List[Server]