Skip to content

Commit

Permalink
Mac: update the mac backend to support the new things that are requir…
Browse files Browse the repository at this point in the history
…ed to spin up docker containers
  • Loading branch information
adamdoupe committed Nov 7, 2024
1 parent 780fd46 commit ed86955
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions dojo_plugin/utils/mac_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ def __init__(self, hostname=None, username=None, key_filename=None, guest_key_fi
self.networks = MacNetworkCollection(self)
self.volumes = MacVolumeCollection(self)

# this insanity is required b/c of some high level code
class MyAPIThing:
def __init__(self):
self.base_url = "localhost"
self.api = MyAPIThing()

def close(self):
pass # No persistent connection to close

Expand Down Expand Up @@ -137,6 +143,10 @@ def __init__(self, client, vm_info):
self.vm_info = vm_info
self.status = vm_info.get("status", "creating")

def attach(self, stream):
# Super hacky thing, this just needs to return [b"Initialized.\n"]
return [b"Initialized.\n"]

def remove(self, force=True):
# Kill the VM

Expand Down

0 comments on commit ed86955

Please sign in to comment.