reader = HeatParser(self.api.compute)
if isinstance(stack_dict['template'], str) or isinstance(
- stack_dict['template'], unicode):
+ stack_dict['template'], bytes):
stack_dict['template'] = json.loads(stack_dict['template'])
if not reader.parse_input(
stack_dict['template'], stack, self.api.compute.dc.label):
except Exception as ex:
LOG.exception("Heat: Create Stack exception.")
- return ex.message, 500
+ return str(ex), 500
def get(self, tenant_id):
"""
status=200, mimetype="application/json")
except Exception as ex:
LOG.exception("Heat: List Stack exception.")
- return ex.message, 500
+ return str(ex), 500
class HeatShowStack(Resource):
except Exception as ex:
LOG.exception("Heat: Show stack exception.")
- return ex.message, 500
+ return str(ex), 500
class HeatShowStackTemplate(Resource):
except Exception as ex:
LOG.exception("Heat: Show stack template exception.")
- return ex.message, 500
+ return str(ex), 500
class HeatShowStackResources(Resource):
except Exception as ex:
LOG.exception("Heat: Show stack template exception.")
- return ex.message, 500
+ return str(ex), 500
class HeatUpdateStack(Resource):
reader = HeatParser(self.api.compute)
if isinstance(stack_dict['template'], str) or isinstance(
- stack_dict['template'], unicode):
+ stack_dict['template'], bytes):
stack_dict['template'] = json.loads(stack_dict['template'])
if not reader.parse_input(
stack_dict['template'], stack, self.api.compute.dc.label, stack_update=True):
except Exception as ex:
LOG.exception("Heat: Update Stack exception")
- return ex.message, 500
+ return str(ex), 500
class HeatDeleteStack(Resource):
except Exception as ex:
LOG.exception("Heat: Delete Stack exception")
- return ex.message, 500
+ return str(ex), 500