Make script paths work in docker and locally for config_app
This commit is contained in:
parent
d5db3462b9
commit
e9d24dc5ff
26 changed files with 79 additions and 2248 deletions
|
@ -4,7 +4,7 @@ import pathvalidate
|
|||
from flask import request, jsonify
|
||||
|
||||
from config_app.config_endpoints.exception import InvalidRequest
|
||||
from config_app.config_endpoints.api import resource, ApiResource, verify_not_prod, nickname
|
||||
from config_app.config_endpoints.api import resource, ApiResource, nickname
|
||||
from config_app.config_util.ssl import load_certificate, CertInvalidException
|
||||
from config_app.c_app import app, config_provider
|
||||
|
||||
|
@ -19,7 +19,6 @@ class SuperUserCustomCertificate(ApiResource):
|
|||
""" Resource for managing a custom certificate. """
|
||||
|
||||
@nickname('uploadCustomCertificate')
|
||||
@verify_not_prod
|
||||
def post(self, certpath):
|
||||
uploaded_file = request.files['file']
|
||||
if not uploaded_file:
|
||||
|
@ -58,7 +57,6 @@ class SuperUserCustomCertificate(ApiResource):
|
|||
return '', 204
|
||||
|
||||
@nickname('deleteCustomCertificate')
|
||||
@verify_not_prod
|
||||
def delete(self, certpath):
|
||||
cert_full_path = config_provider.get_volume_path(EXTRA_CA_DIRECTORY, certpath)
|
||||
config_provider.remove_volume_file(cert_full_path)
|
||||
|
@ -70,7 +68,6 @@ class SuperUserCustomCertificates(ApiResource):
|
|||
""" Resource for managing custom certificates. """
|
||||
|
||||
@nickname('getCustomCertificates')
|
||||
@verify_not_prod
|
||||
def get(self):
|
||||
has_extra_certs_path = config_provider.volume_file_exists(EXTRA_CA_DIRECTORY)
|
||||
extra_certs_found = config_provider.list_volume_directory(EXTRA_CA_DIRECTORY)
|
||||
|
@ -107,7 +104,6 @@ class SuperUserCustomCertificates(ApiResource):
|
|||
}
|
||||
|
||||
|
||||
# TODO(config) port this endpoint when (https://github.com/quay/quay/pull/3055) merged to ensure no conflicts
|
||||
@resource('/v1/superuser/keys')
|
||||
class SuperUserServiceKeyManagement(ApiResource):
|
||||
""" Resource for managing service keys."""
|
||||
|
@ -142,7 +138,6 @@ class SuperUserServiceKeyManagement(ApiResource):
|
|||
},
|
||||
}
|
||||
|
||||
@verify_not_prod
|
||||
@nickname('listServiceKeys')
|
||||
def get(self):
|
||||
keys = pre_oci_model.list_all_service_keys()
|
||||
|
|
Reference in a new issue