:return: The full report data.
:rtype: dict[str, Any]
+
+ :raises cherrypy.HTTPError 404: If the passed hostname is not found.
"""
- return self.mgr.node_proxy.fullreport(**kw)
+ try:
+ results = self.mgr.node_proxy.fullreport(**kw)
+ except KeyError:
+ raise cherrypy.HTTPError(404, f"{kw.get('hostname')} not found.")
+ return results
@cherrypy.expose
@cherrypy.tools.allow(methods=['GET'])
:return: Critical information data.
:rtype: dict[str, Any]
+
+ :raises cherrypy.HTTPError 404: If the passed hostname is not found.
"""
- return self.mgr.node_proxy.criticals(**kw)
+ try:
+ results = self.mgr.node_proxy.criticals(**kw)
+ except KeyError:
+ raise cherrypy.HTTPError(404, f"{kw.get('hostname')} not found.")
+ return results
@cherrypy.expose
@cherrypy.tools.allow(methods=['GET'])
:return: Summary information data.
:rtype: dict[str, Any]
+
+ :raises cherrypy.HTTPError 404: If the passed hostname is not found.
"""
- return self.mgr.node_proxy.summary(**kw)
+ try:
+ results = self.mgr.node_proxy.summary(**kw)
+ except KeyError:
+ raise cherrypy.HTTPError(404, f"{kw.get('hostname')} not found.")
+ return results
@cherrypy.expose
@cherrypy.tools.allow(methods=['GET'])
:return: Specific information data.
:rtype: dict[str, Any]
+
+ :raises cherrypy.HTTPError 404: If the passed hostname is not found.
"""
- return self.mgr.node_proxy.common('memory', **kw)
+ try:
+ results = self.mgr.node_proxy.common('memory', **kw)
+ except KeyError:
+ raise cherrypy.HTTPError(404, f"{kw.get('hostname')} not found.")
+ return results
@cherrypy.expose
@cherrypy.tools.allow(methods=['GET'])
:return: Specific information data.
:rtype: dict[str, Any]
+
+ :raises cherrypy.HTTPError 404: If the passed hostname is not found.
"""
- return self.mgr.node_proxy.common('network', **kw)
+ try:
+ results = self.mgr.node_proxy.common('network', **kw)
+ except KeyError:
+ raise cherrypy.HTTPError(404, f"{kw.get('hostname')} not found.")
+ return results
@cherrypy.expose
@cherrypy.tools.allow(methods=['GET'])
:return: Specific information data.
:rtype: dict[str, Any]
+
+ :raises cherrypy.HTTPError 404: If the passed hostname is not found.
"""
- return self.mgr.node_proxy.common('processors', **kw)
+ try:
+ results = self.mgr.node_proxy.common('processors', **kw)
+ except KeyError:
+ raise cherrypy.HTTPError(404, f"{kw.get('hostname')} not found.")
+ return results
@cherrypy.expose
@cherrypy.tools.allow(methods=['GET'])
:return: Specific information data.
:rtype: dict[str, Any]
+
+ :raises cherrypy.HTTPError 404: If the passed hostname is not found.
"""
- return self.mgr.node_proxy.common('storage', **kw)
+ try:
+ results = self.mgr.node_proxy.common('storage', **kw)
+ except KeyError:
+ raise cherrypy.HTTPError(404, f"{kw.get('hostname')} not found.")
+ return results
@cherrypy.expose
@cherrypy.tools.allow(methods=['GET'])
:return: Specific information data.
:rtype: dict[str, Any]
+
+ :raises cherrypy.HTTPError 404: If the passed hostname is not found.
"""
- return self.mgr.node_proxy.common('power', **kw)
+ try:
+ results = self.mgr.node_proxy.common('power', **kw)
+ except KeyError:
+ raise cherrypy.HTTPError(404, f"{kw.get('hostname')} not found.")
+ return results
@cherrypy.expose
@cherrypy.tools.allow(methods=['GET'])
:return: Specific information data.
:rtype: dict[str, Any]
+
+ :raises cherrypy.HTTPError 404: If the passed hostname is not found.
"""
- return self.mgr.node_proxy.common('fans', **kw)
+ try:
+ results = self.mgr.node_proxy.common('fans', **kw)
+ except KeyError:
+ raise cherrypy.HTTPError(404, f"{kw.get('hostname')} not found.")
+ return results
@cherrypy.expose
@cherrypy.tools.allow(methods=['GET'])
:return: Firmware information data.
:rtype: dict[str, Any]
+
+ :raises cherrypy.HTTPError 404: If the passed hostname is not found.
"""
- return self.mgr.node_proxy.firmwares(**kw)
+ try:
+ results = self.mgr.node_proxy.firmwares(**kw)
+ except KeyError:
+ raise cherrypy.HTTPError(404, f"{kw.get('hostname')} not found.")
+ return results
class HostData(Server):