mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-22 17:43:14 +00:00
Merge pull request #58 from zhougj4/master
[merge-LXCA] Add support for graphical consoles
This commit is contained in:
commit
9b7a40a358
@ -349,6 +349,10 @@ def _init_core():
|
||||
'pluginattrs': ['hardwaremanagement.method'],
|
||||
'default': 'ipmi',
|
||||
}),
|
||||
'graphical': PluginRoute({
|
||||
'pluginattrs': ['hardwaremanagement.method'],
|
||||
'default': 'ipmi',
|
||||
}),
|
||||
},
|
||||
'description': PluginRoute({
|
||||
'pluginattrs': ['hardwaremanagement.method'],
|
||||
|
@ -1791,6 +1791,19 @@ class License(ConfluentMessage):
|
||||
else:
|
||||
self.kvpairs = {name: {'License': kv}}
|
||||
|
||||
class GraphicalConsole(ConfluentMessage):
|
||||
readonly = True
|
||||
|
||||
def __init__(self, name=None, mime=None, data=None):
|
||||
self.notnode = name is None
|
||||
self.desc = 'Graphical console launcher'
|
||||
|
||||
kv = []
|
||||
kv.append({'mime': mime, 'data': data})
|
||||
if self.notnode:
|
||||
self.kvpairs = {'Launcher': kv}
|
||||
else:
|
||||
self.kvpairs = {name: {'Launcher': kv}}
|
||||
|
||||
class CryptedAttributes(Attributes):
|
||||
defaulttype = 'password'
|
||||
|
@ -580,6 +580,8 @@ class IpmiHandler(object):
|
||||
self.decode_alert()
|
||||
elif self.element == ['console', 'license']:
|
||||
self.handle_license()
|
||||
elif self.element == ['console', 'graphical']:
|
||||
self.handle_graphical_console()
|
||||
elif self.element == ['support', 'servicedata']:
|
||||
self.handle_servicedata_fetch()
|
||||
elif self.element == ['description']:
|
||||
@ -1570,6 +1572,12 @@ class IpmiHandler(object):
|
||||
dsc = self.ipmicmd.get_description()
|
||||
self.output.put(msg.KeyValueData(dsc, self.node))
|
||||
|
||||
def handle_graphical_console(self):
|
||||
args = self.ipmicmd.get_graphical_console()
|
||||
m = msg.GraphicalConsole(self.node, *args)
|
||||
self.output.put(m)
|
||||
return
|
||||
|
||||
|
||||
def _str_health(health):
|
||||
if isinstance(health, str):
|
||||
|
Loading…
Reference in New Issue
Block a user