Shared SSL POST not working
Change-Id: Id7fad085b7ee01a42e14b31bd45c270c5ddb63ce
This commit is contained in:
@@ -155,6 +155,11 @@ class DefaultServicesController(base.ServicesController):
|
||||
service_obj = service.Service.init_from_dict(service_json)
|
||||
service_id = service_obj.service_id
|
||||
|
||||
# validate the service
|
||||
service_json = service_obj.to_dict()
|
||||
schema = service_schema.ServiceSchema.get_schema("service", "POST")
|
||||
validators.is_valid_service_configuration(service_json, schema)
|
||||
|
||||
# deal with shared ssl domains
|
||||
for domain in service_obj.domains:
|
||||
if domain.protocol == 'https' and domain.certificate == 'shared':
|
||||
@@ -162,11 +167,6 @@ class DefaultServicesController(base.ServicesController):
|
||||
domain.domain
|
||||
)
|
||||
|
||||
# validate the service
|
||||
service_json = service_obj.to_dict()
|
||||
schema = service_schema.ServiceSchema.get_schema("service", "POST")
|
||||
validators.is_valid_service_configuration(service_json, schema)
|
||||
|
||||
try:
|
||||
self.storage_controller.create(
|
||||
project_id,
|
||||
@@ -207,6 +207,7 @@ class DefaultServicesController(base.ServicesController):
|
||||
u'Service {0} neither deployed nor failed'.format(service_id))
|
||||
|
||||
# Fixing the operator_url domain for ssl
|
||||
# for schema validation
|
||||
existing_shared_domains = {}
|
||||
for domain in service_old.domains:
|
||||
if domain.protocol == 'https' and domain.certificate == 'shared':
|
||||
|
||||
Reference in New Issue
Block a user