Fix error case in uploading tar, more comments

This commit is contained in:
Sam Chow 2018-06-22 13:21:44 -04:00
parent d6d0bb640a
commit 872be8605a
6 changed files with 37 additions and 17 deletions

View file

@ -1,11 +1,13 @@
import logging
import pathvalidate
import os
from flask import request, jsonify
from config_app.config_endpoints.exception import InvalidRequest
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 config_provider
from config_app.c_app import app, config_provider
from config_app.config_endpoints.api.superuser_models_pre_oci import pre_oci_model
@ -45,6 +47,15 @@ class SuperUserCustomCertificate(ApiResource):
logger.exception('Got IO error for cert %s', certpath)
return '', 204
# TODO(QUAY-991): properly install the custom certs provided by user
# Call the update script to install the certificate immediately.
# if not app.config['TESTING']:
# logger.debug('Calling certs_install.sh')
# if os.system('/conf/init/certs_install.sh') != 0:
# raise Exception('Could not install certificates')
#
# logger.debug('certs_install.sh completed')
return '', 204
@nickname('deleteCustomCertificate')