mirror of
https://github.com/xcat2/confluent.git
synced 2026-04-24 17:51:29 +00:00
Fix some issues with remote video forwarding
This commit is contained in:
@@ -1166,7 +1166,7 @@ async def handle_node_request(configmanager, inputdata, operation,
|
||||
if pathcomponents == ['console', 'ikvm']:
|
||||
if not vinz:
|
||||
import confluent.vinzmanager as vinz
|
||||
vinz.assure_vinz()
|
||||
await vinz.assure_vinz()
|
||||
manager = nodeattr[node].get('collective.manager', {}).get(
|
||||
'value', None)
|
||||
if manager:
|
||||
|
||||
@@ -142,19 +142,20 @@ async def send_grant(conn, nodename, rqtype):
|
||||
bmcuser = bmcuser.decode()
|
||||
if not isinstance(bmcpass, str):
|
||||
bmcpass = bmcpass.decode()
|
||||
rsp = wc.grab_json_response_with_status(
|
||||
rsp = await wc.grab_json_response_with_status(
|
||||
'/login', {'data': [bmcuser, bmcpass]},
|
||||
headers={'Content-Type': 'application/json',
|
||||
'Accept': 'application/json'})
|
||||
cookies['SESSION'] = wc.cookies['SESSION']
|
||||
cookies['XSRF-TOKEN'] = wc.cookies['XSRF-TOKEN']
|
||||
for cky in wc.cookies:
|
||||
if cky.key == 'SESSION' or cky.key == 'XSRF-TOKEN':
|
||||
cookies[cky.key] = cky.value
|
||||
if rqtype == 1:
|
||||
# unfortunately, the original protocol failed to
|
||||
# provide a means for separate tracking bmc side
|
||||
# and confluent side
|
||||
# chances are pretty good still
|
||||
sessionid = wc.cookies['SESSION']
|
||||
sessiontok = wc.cookies['XSRF-TOKEN']
|
||||
sessionid = cookies['SESSION']
|
||||
sessiontok = cookies['XSRF-TOKEN']
|
||||
protos.append(sessiontok)
|
||||
_usersessions[sessionid] = {
|
||||
'webclient': wc,
|
||||
|
||||
Reference in New Issue
Block a user