Detect node deletion and exit.

* Use OpenCenterEndpoint.whoami()
* Restructure registration.
pep8
Merge pull request #249 from hughsaunders/de106

Merged automatically by jenkins after successful gate test