MRN-511 - exception raised when arguments from workflow merged with stack arguments taken from Heat
Change-Id: Ie6988b650b828b2165017fccda8b9d89b8ea0ad7
This commit is contained in:
parent
e3a34f0246
commit
14f7d3cfe3
@ -59,8 +59,8 @@ class HeatExecutor(CommandBase):
|
||||
if command == 'CreateOrUpdate':
|
||||
return self._execute_create_update(
|
||||
kwargs['template'],
|
||||
kwargs.get('mappings') or {},
|
||||
kwargs.get('arguments') or {},
|
||||
conductor.helpers.str2unicode(kwargs.get('mappings') or {}),
|
||||
conductor.helpers.str2unicode(kwargs.get('arguments') or {}),
|
||||
callback)
|
||||
elif command == 'Delete':
|
||||
return self._execute_delete(callback)
|
||||
|
@ -13,8 +13,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import types
|
||||
import deep
|
||||
import types
|
||||
|
||||
|
||||
def transform_json(json, mappings):
|
||||
@ -87,3 +87,16 @@ def find(f, seq):
|
||||
return item, index
|
||||
index += 1
|
||||
return None, -1
|
||||
|
||||
|
||||
def str2unicode(obj):
|
||||
if isinstance(obj, str):
|
||||
return unicode(obj)
|
||||
elif isinstance(obj, types.DictionaryType):
|
||||
result = {}
|
||||
for key, value in obj.items():
|
||||
result[str2unicode(key)] = str2unicode(value)
|
||||
return result
|
||||
elif isinstance(obj, types.ListType):
|
||||
return [str2unicode(t) for t in obj]
|
||||
return obj
|
||||
|
Loading…
Reference in New Issue
Block a user