mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-22 17:43:14 +00:00
Change ipaddr to a property for allowing logic
This commit is contained in:
parent
bdd5dddce0
commit
6f619bc896
@ -32,7 +32,7 @@ class NodeHandler(object):
|
||||
self.info = info
|
||||
self.configmanager = configmanager
|
||||
targsa = [None]
|
||||
self.ipaddr = None
|
||||
self._ipaddr = None
|
||||
self.relay_url = None
|
||||
self.relay_server = None
|
||||
self.web_ip = None
|
||||
@ -50,7 +50,7 @@ class NodeHandler(object):
|
||||
else:
|
||||
if info.get('addresses', False):
|
||||
targsa = info['addresses'][0]
|
||||
self.ipaddr = socket.getnameinfo(
|
||||
self._ipaddr = socket.getnameinfo(
|
||||
targsa, socket.NI_NUMERICHOST|socket.NI_NUMERICSERV)[0]
|
||||
|
||||
@classmethod
|
||||
@ -103,6 +103,10 @@ class NodeHandler(object):
|
||||
return user, passwd, not havecustomcreds
|
||||
|
||||
|
||||
@property
|
||||
def ipaddr(self):
|
||||
return self._ipaddr
|
||||
|
||||
@property
|
||||
def cert_fail_reason(self):
|
||||
if self._certfailreason == 1:
|
||||
|
@ -24,7 +24,7 @@ class NodeHandler(generic.NodeHandler):
|
||||
devname = 'PXE'
|
||||
|
||||
def __init__(self, info, configmanager):
|
||||
self.ipaddr = ''
|
||||
self._ipaddr = ''
|
||||
self.cfm = configmanager
|
||||
|
||||
@property
|
||||
|
Loading…
Reference in New Issue
Block a user