mirror of
https://github.com/xcat2/confluent.git
synced 2026-07-17 16:06:50 +00:00
Merge pull request #241 from Obihoernchen/ipv6fix
Preserve scoped IPv6 console addresses
This commit is contained in:
@@ -77,7 +77,7 @@ class OpenBmcConsole(conapi.Console):
|
||||
self.password = connparams['passphrase']
|
||||
self.bmc = connparams['bmc']
|
||||
self.origbmc = connparams['bmc']
|
||||
if ':' in self.bmc:
|
||||
if ':' in self.bmc and not self.bmc.startswith('['):
|
||||
self.bmc = '[{0}]'.format(self.bmc)
|
||||
self.datacallback = None
|
||||
self.nodeconfig = config
|
||||
@@ -112,10 +112,6 @@ class OpenBmcConsole(conapi.Console):
|
||||
raise cexc.TargetEndpointUnreachable(str(e))
|
||||
if rsp[1] > 400:
|
||||
raise cexc.TargetEndpointBadCredentials
|
||||
bmc = self.bmc
|
||||
if '%' in self.bmc:
|
||||
prefix = self.bmc.split('%')[0]
|
||||
bmc = prefix + ']'
|
||||
self.ssl = CustomVerifier(kv)
|
||||
self.clisess = aiohttp.ClientSession(cookie_jar=wc.cookies)
|
||||
protos = []
|
||||
|
||||
@@ -78,7 +78,7 @@ class TsmConsole(conapi.Console):
|
||||
self.password = connparams['passphrase']
|
||||
self.bmc = connparams['bmc']
|
||||
self.origbmc = connparams['bmc']
|
||||
if ':' in self.bmc:
|
||||
if ':' in self.bmc and not self.bmc.startswith('['):
|
||||
self.bmc = '[{0}]'.format(self.bmc)
|
||||
self.datacallback = None
|
||||
self.nodeconfig = config
|
||||
@@ -115,10 +115,6 @@ class TsmConsole(conapi.Console):
|
||||
await rc.await_redirect()
|
||||
except Exception as e:
|
||||
raise cexc.TargetEndpointUnreachable(str(e))
|
||||
bmc = self.bmc
|
||||
if '%' in self.bmc:
|
||||
prefix = self.bmc.split('%')[0]
|
||||
bmc = prefix + ']'
|
||||
self.ssl = CustomVerifier(kv)
|
||||
self.clisess = aiohttp.ClientSession(cookie_jar=rc.oem.wc.cookies)
|
||||
self.ws = await self.clisess.ws_connect(
|
||||
|
||||
@@ -115,10 +115,8 @@ class PmxConsole(conapi.Console):
|
||||
self.datacallback = callback
|
||||
kv = util.TLSCertVerifier(
|
||||
self.nodeconfig, self.node, 'pubkeys.tls_hardwaremanager').verify_cert
|
||||
bmc = self.bmc
|
||||
if '%' in self.bmc:
|
||||
prefix = self.bmc.split('%')[0]
|
||||
bmc = prefix + ']'
|
||||
if ':' in self.bmc and not self.bmc.startswith('['):
|
||||
self.bmc = '[{0}]'.format(self.bmc)
|
||||
self.ssl = CustomVerifier(kv)
|
||||
ticket = self.consdata['ticket']
|
||||
user = self.consdata['user']
|
||||
|
||||
Reference in New Issue
Block a user