Closed zenhack closed 6 years ago
Travis logs indicate keystone related breakage.
hmmm, it can't import memcache
. I thought installing it explicitly should fix it but it still couldn't find it in the CI.
Though, I can locally import it.
(.venv) naved:~/ci-memcached/hil$ pip install python-memcached
Collecting python-memcached
Requirement already satisfied: six>=1.4.0 in ./.venv/lib/python2.7/site-packages (from python-memcached)
Installing collected packages: python-memcached
Successfully installed python-memcached-1.58
(.venv) naved:~/ci-memcached/hil$ python
Python 2.7.12 (default, Nov 20 2017, 18:23:56)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import memcache
>>>
Edit: It's specified under extras here
I just rebased this on top of master; hopefully the tests will pass now.
This is fine but doesn't seem that useful if our error types are ambiguous.
The code here raises Blocked error for 2 cases. When writing a HIL client, if there's a network attached I would call revert_port
, and if there's a pending action I would want to wait. Checking the error_type
is of no help; I still have to look at the message.
if num_attachments != 0:
raise errors.BlockedError("Node attached to a network")
for nic in node.nics:
if nic.current_action is not None:
raise errors.BlockedError("Node has pending network actions")
Nonetheless, I am gonna approve this because the client should at least store the error type which might be useful elsewhere.
We should probably open another issue to rework the error types to be more helpful. Maybe splitting things into more types, maybe just adding fields with more info. I'm on my phone, or I'd do it now.
Fixes #919