diff --git a/confluent_server/confluent/core.py b/confluent_server/confluent/core.py index 1816b2b5..c80f8a16 100644 --- a/confluent_server/confluent/core.py +++ b/confluent_server/confluent/core.py @@ -349,6 +349,10 @@ def _init_core(): 'pluginattrs': ['hardwaremanagement.method'], 'default': 'ipmi', }), + 'graphical': PluginRoute({ + 'pluginattrs': ['hardwaremanagement.method'], + 'default': 'ipmi', + }), }, 'description': PluginRoute({ 'pluginattrs': ['hardwaremanagement.method'], diff --git a/confluent_server/confluent/messages.py b/confluent_server/confluent/messages.py index 76f5a706..bd680dde 100644 --- a/confluent_server/confluent/messages.py +++ b/confluent_server/confluent/messages.py @@ -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' diff --git a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py index 402293f0..77dfed89 100644 --- a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py +++ b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py @@ -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):