Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

experiment manager 重构 #801

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions open-hackathon-server/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
amqp==2.5.2
aniso8601==8.0.0
APScheduler==3.0.3
attrs==19.3.0
Expand All @@ -15,7 +16,9 @@ azure-servicebus==0.20.1
azure-servicemanagement-legacy==0.20.1
azure-storage==0.20.2
Beaker==1.11.0
billiard==3.6.3.0
cachetools==4.0.0
celery==4.4.2
certifi==2019.11.28
chardet==3.0.4
click==7.1.1
Expand All @@ -30,6 +33,7 @@ idna==2.9
importlib-metadata==1.5.0
itsdangerous==1.1.0
Jinja2==2.11.1
kombu==4.6.8
kubernetes==9.0.0
lxml==4.3.0
mailthon==0.1.1
Expand Down Expand Up @@ -62,6 +66,7 @@ subprocess32==3.5.4
tzlocal==2.0.0
urllib3==1.25.8
validictory==1.0.0
vine==1.3.0
wcwidth==0.1.8
websocket-client==0.57.0
Werkzeug==0.15.3
Expand Down
32 changes: 32 additions & 0 deletions open-hackathon-server/src/hackathon/cloud_providers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
__all__ = ["Provider"]

_provider_classes = {}


class Provider:
def __init__(self, name, provider_cfg):
self.p_class = _provider_classes[name]
self.p = self.p_class(provider_cfg)

self.p.connect()

def create_expr(self, hackathon, experiment, template_content):
pass

def start_expr(self, hackathon, experiment, template_content):
# TODO
pass

def pause_expr(self, hackathon, experiment, template_content):
# TODO
pass

def delete_expr(self, hackathon, experiment, template_content):
pass

def wait_for_ready(self):
pass


def registry_provider(name, provider):
_provider_classes[name] = provider
Loading