mirror of
https://github.com/ansible/awx.git
synced 2026-01-09 23:12:08 -03:30
Add host_metrics page to the awxkit
This commit is contained in:
parent
d33573b29c
commit
598f9e2a55
@ -42,3 +42,4 @@ from .credential_input_sources import * # NOQA
|
||||
from .metrics import * # NOQA
|
||||
from .subscriptions import * # NOQA
|
||||
from .workflow_approval_templates import * # NOQA
|
||||
from .host_metrics import * # NOQA
|
||||
|
||||
18
awxkit/awxkit/api/pages/host_metrics.py
Normal file
18
awxkit/awxkit/api/pages/host_metrics.py
Normal file
@ -0,0 +1,18 @@
|
||||
from awxkit.api.resources import resources
|
||||
from . import base
|
||||
from . import page
|
||||
|
||||
|
||||
class HostMetric(base.Base):
|
||||
def get(self, **query_parameters):
|
||||
request = self.connection.get(self.endpoint, query_parameters, headers={'Accept': 'application/json'})
|
||||
return self.page_identity(request)
|
||||
|
||||
|
||||
class HostMetrics(page.PageList, HostMetric):
|
||||
pass
|
||||
|
||||
|
||||
page.register_page([resources.host_metric], HostMetric)
|
||||
|
||||
page.register_page([resources.host_metrics], HostMetrics)
|
||||
@ -44,6 +44,8 @@ class Resources(object):
|
||||
_groups = 'groups/'
|
||||
_host = r'hosts/\d+/'
|
||||
_host_groups = r'hosts/\d+/groups/'
|
||||
_host_metrics = 'host_metrics/'
|
||||
_host_metric = r'host_metrics/\d+/'
|
||||
_host_insights = r'hosts/\d+/insights/'
|
||||
_host_related_ad_hoc_commands = r'hosts/\d+/ad_hoc_commands/'
|
||||
_host_related_fact_version = r'hosts/\d+/fact_versions/\d+/'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user