Skip package section from input parameters
Sometimes package section can be provided with input parameters from Cloud Foundry. We need to skip it to prevent various errors. Change-Id: I181d4227d05d90f7bccf723e6b04957227ebbfd4 Closes-Bug: #1517035
This commit is contained in:

committed by
Victor Ryzhenkin

parent
66f682ef42
commit
faa19db02b
@@ -21,7 +21,7 @@ from oslo_log import log as logging
|
||||
import six
|
||||
from webob import response
|
||||
|
||||
from murano.common.i18n import _LI
|
||||
from murano.common.i18n import _LI, _LW
|
||||
from murano.common import wsgi
|
||||
from murano.db.catalog import api as db_api
|
||||
from murano.db.services import cf_connections as db_cf
|
||||
@@ -137,8 +137,16 @@ class Controller(object):
|
||||
service = self._make_service(space_guid, package, plan_id)
|
||||
db_cf.set_instance_for_service(instance_id, service['?']['id'],
|
||||
environment_id, tenant)
|
||||
|
||||
# NOTE(Kezar): Here we are going through JSON and add ids where
|
||||
# it's necessary
|
||||
# it's necessary. Before that we need to drop '?' key from parameters
|
||||
# dictionary as far it contains murano package related info which is
|
||||
# necessary in our scenario
|
||||
if '?' in parameters.keys():
|
||||
parameters.pop('?', None)
|
||||
LOG.warning(_LW("Incorrect input parameters. Package related "
|
||||
"parameters shouldn't be passed through Cloud "
|
||||
"Foundry"))
|
||||
params = [parameters]
|
||||
while params:
|
||||
a = params.pop()
|
||||
|
Reference in New Issue
Block a user