Fix absent 'service type' information for created services.
Change-Id: Ic1743f9698b926512240a7d580084a0c2b9790ec Fixes: bug MRN-784.
This commit is contained in:
parent
7c36e3db58
commit
3ae6265e14
@ -234,7 +234,7 @@ def services_list(request, environment_id):
|
||||
for service_item in environment.services:
|
||||
service_data = service_item
|
||||
service_data['full_service_name'] = get_service_name(
|
||||
service_data['type'])
|
||||
service_data['slug'])
|
||||
|
||||
if service_data['id'] in reports and reports[service_data['id']]:
|
||||
last_operation = str(reports[service_data['id']].text)
|
||||
@ -254,11 +254,11 @@ def services_list(request, environment_id):
|
||||
return [bunch.bunchify(service) for service in services]
|
||||
|
||||
|
||||
def service_list_by_type(request, environment_id, service_name):
|
||||
def service_list_by_type(request, environment_id, service_type):
|
||||
services = services_list(request, environment_id)
|
||||
log.debug('Service::Instances::List')
|
||||
return [service for service in services
|
||||
if service['type'] == service_name]
|
||||
if service['type'] == service_type]
|
||||
|
||||
|
||||
def service_create(request, environment_id, parameters):
|
||||
@ -324,6 +324,6 @@ def get_deployment_descr(request, environment_id, deployment_id):
|
||||
if 'services' in descr:
|
||||
for service in descr['services']:
|
||||
service['full_service_name'] = get_service_name(
|
||||
service['type'])
|
||||
service['slug'])
|
||||
return descr
|
||||
return None
|
||||
|
@ -55,7 +55,8 @@ class Wizard(ModalFormMixin, SessionWizardView):
|
||||
|
||||
step0_data = form_list[0].cleaned_data
|
||||
slug = step0_data.get('service', '')
|
||||
attributes = {'type': get_service_client(slug)}
|
||||
attributes = {'type': get_service_client(slug),
|
||||
'slug': slug}
|
||||
|
||||
for form in form_list[1:]:
|
||||
form.extract_attributes(attributes)
|
||||
|
Loading…
Reference in New Issue
Block a user