except Exception as ex:
LOG.exception(u"%s: Could not show list of versions." % __name__)
- return ex.message, 500
+ return str(ex), 500
class NovaVersionShow(Resource):
except Exception as ex:
LOG.exception(u"%s: Could not show list of versions." % __name__)
- return ex.message, 500
+ return str(ex), 500
class NovaListServersApi(Resource):
except Exception as ex:
LOG.exception(
u"%s: Could not retrieve the list of servers." % __name__)
- return ex.message, 500
+ return str(ex), 500
def post(self, id):
"""
except Exception as ex:
LOG.exception(u"%s: Could not create the server." % __name__)
- return ex.message, 500
+ return str(ex), 500
class NovaListServersAndPortsApi(Resource):
except Exception as ex:
LOG.exception(
u"%s: Could not retrieve the list of servers." % __name__)
- return ex.message, 500
+ return str(ex), 500
class NovaListServersDetailed(Resource):
except Exception as ex:
LOG.exception(
u"%s: Could not retrieve the list of servers." % __name__)
- return ex.message, 500
+ return str(ex), 500
class NovaListFlavors(Resource):
except Exception as ex:
LOG.exception(
u"%s: Could not retrieve the list of servers." % __name__)
- return ex.message, 500
+ return str(ex), 500
def post(self, id):
LOG.debug("API CALL: %s POST" % str(self.__class__.__name__))
except Exception as ex:
LOG.exception(
u"%s: Could not retrieve the list of servers." % __name__)
- return ex.message, 500
+ return str(ex), 500
def post(self, id):
LOG.debug("API CALL: %s POST" % str(self.__class__.__name__))
except Exception as ex:
LOG.exception(u"%s: Could not retrieve flavor with id %s" %
(__name__, flavorid))
- return ex.message, 500
+ return str(ex), 500
def delete(self, id, flavorid):
"""
except Exception as ex:
LOG.exception(
u"%s: Could not retrieve the list of images." % __name__)
- return ex.message, 500
+ return str(ex), 500
class NovaListImagesDetails(Resource):
except Exception as ex:
LOG.exception(
u"%s: Could not retrieve the list of images." % __name__)
- return ex.message, 500
+ return str(ex), 500
class NovaListImageById(Resource):
except Exception as ex:
LOG.exception(u"%s: Could not retrieve image with id %s." %
(__name__, imageid))
- return ex.message, 500
+ return str(ex), 500
def delete(self, id, imageid):
"""
except Exception as ex:
LOG.exception(
u"%s: Could not retrieve the server details." % __name__)
- return ex.message, 500
+ return str(ex), 500
def delete(self, id, serverid):
"""
except Exception as ex:
LOG.exception(u"%s: Could not create the server." % __name__)
- return ex.message, 500
+ return str(ex), 500
class NovaInterfaceToServer(Resource):
except Exception as ex:
LOG.exception(
u"%s: Could not add interface to the server." % __name__)
- return ex.message, 500
+ return str(ex), 500
class NovaShowAndDeleteInterfaceAtServer(Resource):
except Exception as ex:
LOG.exception(
u"%s: Could not detach interface from the server." % __name__)
- return ex.message, 500
+ return str(ex), 500
class NovaLimits(Resource):
except Exception as ex:
LOG.exception(
u"%s: Could not retrieve the list of images." % __name__)
- return ex.message, 500
+ return str(ex), 500