summaryrefslogtreecommitdiff
path: root/oswin_tempest_plugin/config.py
blob: 4782a13b67ba12b6106d2667cf663adfea131e71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# Copyright 2017 Cloudbase Solutions SRL
# All Rights Reserved.
#
#    Licensed under the Apache License, Version 2.0 (the "License"); you may
#    not use this file except in compliance with the License. You may obtain
#    a copy of the License at
#
#         http://www.apache.org/licenses/LICENSE-2.0
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#    License for the specific language governing permissions and limitations
#    under the License.

from oslo_config import cfg
from oslo_config import types
from tempest import config

CONF = config.CONF


hyperv_group = cfg.OptGroup(name='hyperv',
                            title='Hyper-V Driver Tempest Options')

HyperVGroup = [
    cfg.IntOpt('hypervisor_version',
               default=0,
               help="Compute nodes' hypervisor version, used to determine "
                    "which tests to run. It must have following value: "
                    "major_version * 1000 + minor_version"
                    "For example, Windows / Hyper-V Server 2012 R2 would have "
                    "the value 6003"),
    cfg.StrOpt('vhd_image_ref',
               help="Valid VHD image reference to be used in tests."),
    cfg.StrOpt('vhdx_image_ref',
               help="Valid VHDX image reference to be used in tests."),
    cfg.StrOpt('gen2_image_ref',
               help="Valid Generation 2 VM VHDX image reference to be used "
                    "in tests."),
    cfg.StrOpt('secure_boot_image_ref',
               help="Valid secure boot VM VHDX image reference to be used "
                    "in tests."),
    cfg.StrOpt('secure_boot_image_ssh_user',
               help='User for secure boot image to be used in tests.'),
    cfg.BoolOpt('cluster_enabled',
                default=False,
                help="The compute nodes are joined into a Hyper-V Cluster."),
    cfg.IntOpt('failover_timeout',
               default=120,
               help='The maximum amount of time to wait for a failover to '
                    'occur.'),
    cfg.IntOpt('failover_sleep_interval',
               default=5,
               help='The amount of time to wait between failover checks.'),
    cfg.BoolOpt('remotefx_enabled',
                default=False,
                help="RemoteFX feature is enabled and supported on the "
                     "compute nodes."),
    cfg.IntOpt('available_numa_nodes',
               default=1,
               help="The maximum number of NUMA cells the compute nodes "
                    "have. If it's less than 2, resize negative tests for "
                    "vNUMA will be skipped."),
    cfg.ListOpt('collected_metrics',
                item_type=types.String(
                    choices=('cpu', 'network.outgoing.bytes',
                             'disk.read.bytes')),
                default=[],
                help="The ceilometer metrics to check. If this config value "
                     "is empty, the telemetry tests are skipped. This config "
                     "option assumes that the compute nodes are configured "
                     "and capable of collecting ceilometer metrics. WARNING: "
                     "neutron-ovs-agent is not capable of enabling network "
                     "metrics collection."),
    cfg.IntOpt('polled_metrics_delay',
               default=620,
               help="The number of seconds to wait for the metrics to be "
                    "published by the compute node's ceilometer-polling "
                    "agent. The value must be greater by ~15-20 seconds "
                    "than the agent's publish interval, defined in its "
                    "pipeline.yaml file (typically, the intervals are 600 "
                    "seconds)."),
]

hyperv_host_auth_group = cfg.OptGroup(name='hyperv_host_auth',
                                      title='Hyper-V host '
                                            'authentication options')

hyperv_host_auth_opts = [
    cfg.StrOpt('username',
               help="The username of the Hyper-V hosts."),
    cfg.StrOpt('password',
               secret=True,
               help='The password of the Hyper-V hosts.'),
    cfg.StrOpt('cert_pem_path',
               default=None,
               help='SSL certificate for WinRM remote PS connection.'),
    cfg.StrOpt('cert_key_pem_path',
               default=None,
               help='SSL key paired with cert_pem_path for WinRM remote PS '
                    'connection.'),
    cfg.StrOpt('transport_method',
               default='plaintext',
               choices=('ssl', 'ntlm', 'plaintext'),
               help='The method that should be used to establish a connection '
                    'to a Hyper-V host.')
]

_opts = [
    (hyperv_group, HyperVGroup),
    (hyperv_host_auth_group, hyperv_host_auth_opts),
]


def list_opts():
    return _opts