skyplane.api.dataplane#
Classes
|
A Dataplane represents a concrete Skyplane network, including topology and VMs. |
|
- 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
- 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: