fix: no longer crash when an instance is unregistered.
ClosedPublic

Authored by roshi on Sep 24 2015, 8:11 PM.

Details

Summary
No longer crashes during 'instance list' when an instance
is no longer registered with libvirt.

Cleaned up some bits. Added logging if configured in
settings.py.
Test Plan
Basic usage and py.test.

Diff Detail

Repository
rTCLOUD testcloud
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
roshi retitled this revision from to fix: no longer crash when an instance is unregistered..
roshi updated this object.
roshi edited the test plan for this revision. (Show Details)
roshi added a reviewer: tflink.
tflink accepted this revision.Sep 24 2015, 8:15 PM
tflink added inline comments.
testcloud/instance.py
112

If this ends up being used anywhere else, I don't think having a string like this is a good idea. it needs to be a const, enum or something that isn't statically listed in 50 places.

This revision is now accepted and ready to land.Sep 24 2015, 8:15 PM
roshi added a comment.Sep 24 2015, 9:15 PM

You mean the warning or the 'state?'

In D600#11350, @roshi wrote:

You mean the warning or the 'state?'

The state

This revision was automatically updated to reflect the committed changes.