python nova binding exception

asked 2018-02-13 05:55:02 -0500

uffe gravatar image

updated 2018-02-13 05:55:12 -0500

Hi

I'm trying to fetch information via python novaclient for an instance that don't exists.

ret = nova.servers.get(uuid)

But how I don't understand from the documentation how I am supposed to handle the 404:

RESP BODY: {"itemNotFound": {"message": "Instance a1b8b24f-0103-45f5-8f0c-073d0c269068 could not be found.", "code": 404}}

I tried to catch all exceptions but that does not seems to work.

edit retag flag offensive close merge delete

Comments

Bump, no takers?

uffe gravatar imageuffe ( 2018-02-21 05:24:55 -0500 )edit