commit | 4500a5f69e3bb6a66a18b78f4523f49f36dabd2e | [log] [tgz] |
---|---|---|
author | koder aka kdanilov <kdanilov@mirantis.com> | Fri Apr 17 16:55:17 2015 +0300 |
committer | koder aka kdanilov <kdanilov@mirantis.com> | Fri Apr 17 16:55:24 2015 +0300 |
tree | 969029f77eeea424e594a9ffdf95031d777e7040 | |
parent | 69339acf1f162d6df50366d3aa60da52182667c8 [diff] [blame] |
fixing bugs
diff --git a/nodes/node.py b/nodes/node.py index 138d123..fad4f29 100644 --- a/nodes/node.py +++ b/nodes/node.py
@@ -1,3 +1,6 @@ +import urlparse + + class Node(object): def __init__(self, conn_url, roles): @@ -5,6 +8,9 @@ self.conn_url = conn_url self.connection = None + def get_ip(self): + return urlparse.urlparse(self.conn_url).hostname + def __str__(self): templ = "<Node: url={conn_url!r} roles={roles}" + \ " connected={is_connected}>"