Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement POST /api/v1/relay #3425

Merged
merged 5 commits into from
May 31, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions lib/pbench/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class API(Enum):
DATASETS_VALUES = "datasets_values"
ENDPOINTS = "endpoints"
KEY = "key"
RELAY = "relay"
SERVER_AUDIT = "server_audit"
SERVER_SETTINGS = "server_settings"
UPLOAD = "upload"
Expand Down
9 changes: 8 additions & 1 deletion lib/pbench/server/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@
SampleValues,
)
from pbench.server.api.resources.query_apis.datasets_search import DatasetsSearch
from pbench.server.api.resources.relay import Relay
from pbench.server.api.resources.server_audit import ServerAudit
from pbench.server.api.resources.server_settings import ServerSettings
from pbench.server.api.resources.upload_api import Upload
from pbench.server.api.resources.upload import Upload
import pbench.server.auth.auth as Auth
from pbench.server.database import init_db
from pbench.server.database.database import Database
Expand Down Expand Up @@ -146,6 +147,12 @@ def register_endpoints(api: Api, app: Flask, config: PbenchServerConfig):
endpoint="server_settings",
resource_class_args=(config,),
)
api.add_resource(
Relay,
f"{base_uri}/relay/<path:uri>",
endpoint="relay",
resource_class_args=(config,),
)
api.add_resource(
Upload,
f"{base_uri}/upload/<string:filename>",
Expand Down
Loading