You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "shwstppr (via GitHub)" <gi...@apache.org> on 2023/01/27 05:44:32 UTC
[GitHub] [cloudstack] shwstppr commented on a diff in pull request #6803: ui,server,api: resource metrics improvements
shwstppr commented on code in PR #6803:
URL: https://github.com/apache/cloudstack/pull/6803#discussion_r1088604540
##########
test/integration/smoke/test_metrics_api.py:
##########
@@ -66,11 +68,80 @@ def setUpClass(cls):
domainid=cls.domain.id
)
cls._cleanup.append(cls.account)
+ cls.hypervisorNotSupported = True
+ if cls.hypervisor.lower() != 'simulator':
+ cls.hypervisorNotSupported = False
+ cls.vm_stats_interval_cfg = Configurations.list(cls.apiclient, name='vm.stats.interval')[0].value
+ cls.vm_stats_max_retention_time_cfg = Configurations.list(cls.apiclient, name='vm.stats.max.retention.time')[0].value
+ cls.vm_stats_user_vm_only_cfg = Configurations.list(cls.apiclient, name='vm.stats.user.vm.only')[0].value
+ cls.vm_disk_stats_interval_cfg = Configurations.list(cls.apiclient, name='vm.disk.stats.interval')[0].value
+ cls.vm_disk_stats_interval_min_cfg = Configurations.list(cls.apiclient, name='vm.disk.stats.interval.min')[0].value
+ cls.vm_disk_stats_max_retention_time_cfg = Configurations.list(cls.apiclient, name='vm.disk.stats.max.retention.time')[0].value
+ cls.vm_disk_stats_retention_enabled_cfg = Configurations.list(cls.apiclient, name='vm.disk.stats.retention.enabled')[0].value
+ Configurations.update(cls.apiclient, 'vm.stats.interval', value='60000')
+ Configurations.update(cls.apiclient, 'vm.stats.max.retention.time', value='7200')
+ Configurations.update(cls.apiclient, 'vm.stats.user.vm.only', value='false')
+ Configurations.update(cls.apiclient, 'vm.disk.stats.interval', value='60')
+ Configurations.update(cls.apiclient, 'vm.disk.stats.interval.min', value='60')
+ Configurations.update(cls.apiclient, 'vm.disk.stats.max.retention.time', value='7200')
+ Configurations.update(cls.apiclient, 'vm.disk.stats.retention.enabled', value='true')
+ cls.restartServer()
@classmethod
def tearDownClass(cls):
+ if cls.hypervisor.lower() != 'simulator':
+ cls.updateConfiguration('vm.stats.interval', cls.vm_stats_interval_cfg)
+ cls.updateConfiguration('vm.stats.max.retention.time', cls.vm_stats_max_retention_time_cfg)
+ cls.updateConfiguration('vm.stats.user.vm.only', cls.vm_stats_user_vm_only_cfg)
+ cls.updateConfiguration('vm.disk.stats.interval', cls.vm_disk_stats_interval_cfg)
+ cls.updateConfiguration('vm.disk.stats.interval.min', cls.vm_disk_stats_interval_min_cfg)
+ cls.updateConfiguration('vm.disk.stats.max.retention.time', cls.vm_disk_stats_max_retention_time_cfg)
+ cls.updateConfiguration('vm.disk.stats.retention.enabled', cls.vm_disk_stats_retention_enabled_cfg)
+ cls.restartServer()
Review Comment:
@DaanHoogland what do you suggest?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org