DaanHoogland commented on code in PR #6803:
URL: https://github.com/apache/cloudstack/pull/6803#discussion_r1088833950
##########
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:
I am not sure, let's deal with it when we encounter problems with it. This
is mostly run in standalone lab envs, so we can do with it for now. just a
heads-up.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]