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, debug=False)[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 (ReplicationTopology) – the calculated topology during the transfer
provisioner (Provisioner) – the provisioner to launch the VMs
transfer_config (TransferConfig) – the configuration during the transfer
debug (bool, optional) – whether to enable debug mode, defaults to False
- 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', gateway_log_dir=None, 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
gateway_log_dir (PathLike) – path to the log directory in the remote gatweways
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)
- queue_copy(src, dst, recursive=False)[source]#
Add a copy job to job list. Return the uuid of the job.
- run(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(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: