Browse Source

Add RemoteFX optional feature test

This test checks if RemoteFX feature can be turned on or off.

Co-Authored-By: Claudiu Belu <cbelu@cloudbasesolutions.com>

Change-Id: I2fbab9e43a577c5a6509df8fcca7a71de8806ad1
Alexandru Muresan 1 year ago
parent
commit
b3f383b62b

+ 4
- 0
oswin_tempest_plugin/config.py View File

@@ -52,6 +52,10 @@ HyperVGroup = [
52 52
     cfg.IntOpt('failover_sleep_interval',
53 53
                default=5,
54 54
                help='The amount of time to wait between failover checks.'),
55
+    cfg.BoolOpt('remotefx_enabled',
56
+                default=False,
57
+                help="RemoteFX feature is enabled and supported on the "
58
+                     "compute nodes."),
55 59
 ]
56 60
 
57 61
 

+ 44
- 0
oswin_tempest_plugin/tests/scenario/test_remotefx.py View File

@@ -0,0 +1,44 @@
1
+# Copyright 2017 Cloudbase Solutions SRL
2
+# All Rights Reserved.
3
+#
4
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
5
+#    not use this file except in compliance with the License. You may obtain
6
+#    a copy of the License at
7
+#
8
+#         http://www.apache.org/licenses/LICENSE-2.0
9
+#
10
+#    Unless required by applicable law or agreed to in writing, software
11
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13
+#    License for the specific language governing permissions and limitations
14
+#    under the License.
15
+
16
+from oswin_tempest_plugin import config
17
+from oswin_tempest_plugin.tests._mixins import optional_feature
18
+from oswin_tempest_plugin.tests import test_base
19
+
20
+CONF = config.CONF
21
+
22
+
23
+class RemoteFxTestCase(test_base.TestBase,
24
+                       optional_feature._OptionalFeatureMixin):
25
+    """RemoteFX test suite.
26
+
27
+    This test suit will spawn instances with RemoteFX enabled.
28
+    """
29
+
30
+    # RemoteFX is supported in Windows / Hyper-V Server 2012 R2 and newer.
31
+    _MIN_HYPERV_VERSION = 6003
32
+
33
+    _FEATURE_FLAVOR = {'extra_specs': {'os_resolution': '1920x1200',
34
+                                       'os_monitors': '1',
35
+                                       'os_vram': '1024'}}
36
+
37
+    @classmethod
38
+    def skip_checks(cls):
39
+        super(RemoteFxTestCase, cls).skip_checks()
40
+        # the CONF.hyperv.remotefx_enabled config option needs to be enabled.
41
+        if not CONF.hyperv.remotefx_enabled:
42
+            msg = ('The config option "hyperv.remotefx_enabled" is False. '
43
+                   'Skipping.')
44
+            raise cls.skipException(msg)

Loading…
Cancel
Save