Tempest plugin for os-win project.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

config.py 4.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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. from oslo_config import cfg
  16. from oslo_config import types
  17. from tempest import config
  18. CONF = config.CONF
  19. hyperv_group = cfg.OptGroup(name='hyperv',
  20. title='Hyper-V Driver Tempest Options')
  21. HyperVGroup = [
  22. cfg.IntOpt('hypervisor_version',
  23. default=0,
  24. help="Compute nodes' hypervisor version, used to determine "
  25. "which tests to run. It must have following value: "
  26. "major_version * 1000 + minor_version"
  27. "For example, Windows / Hyper-V Server 2012 R2 would have "
  28. "the value 6003"),
  29. cfg.StrOpt('vhd_image_ref',
  30. help="Valid VHD image reference to be used in tests."),
  31. cfg.StrOpt('vhdx_image_ref',
  32. help="Valid VHDX image reference to be used in tests."),
  33. cfg.StrOpt('gen2_image_ref',
  34. help="Valid Generation 2 VM VHDX image reference to be used "
  35. "in tests."),
  36. cfg.StrOpt('secure_boot_image_ref',
  37. help="Valid secure boot VM VHDX image reference to be used "
  38. "in tests."),
  39. cfg.StrOpt('secure_boot_image_ssh_user',
  40. help='User for secure boot image to be used in tests.'),
  41. cfg.BoolOpt('cluster_enabled',
  42. default=False,
  43. help="The compute nodes are joined into a Hyper-V Cluster."),
  44. cfg.IntOpt('failover_timeout',
  45. default=120,
  46. help='The maximum amount of time to wait for a failover to '
  47. 'occur.'),
  48. cfg.IntOpt('failover_sleep_interval',
  49. default=5,
  50. help='The amount of time to wait between failover checks.'),
  51. cfg.BoolOpt('remotefx_enabled',
  52. default=False,
  53. help="RemoteFX feature is enabled and supported on the "
  54. "compute nodes."),
  55. cfg.IntOpt('available_numa_nodes',
  56. default=1,
  57. help="The maximum number of NUMA cells the compute nodes "
  58. "have. If it's less than 2, resize negative tests for "
  59. "vNUMA will be skipped."),
  60. cfg.ListOpt('collected_metrics',
  61. item_type=types.String(
  62. choices=('cpu', 'network.outgoing.bytes',
  63. 'disk.read.bytes')),
  64. default=[],
  65. help="The ceilometer metrics to check. If this config value "
  66. "is empty, the telemetry tests are skipped. This config "
  67. "option assumes that the compute nodes are configured "
  68. "and capable of collecting ceilometer metrics. WARNING: "
  69. "neutron-ovs-agent is not capable of enabling network "
  70. "metrics collection."),
  71. cfg.IntOpt('polled_metrics_delay',
  72. default=620,
  73. help="The number of seconds to wait for the metrics to be "
  74. "published by the compute node's ceilometer-polling "
  75. "agent. The value must be greater by ~15-20 seconds "
  76. "than the agent's publish interval, defined in its "
  77. "pipeline.yaml file (typically, the intervals are 600 "
  78. "seconds)."),
  79. ]
  80. hyperv_host_auth_group = cfg.OptGroup(name='hyperv_host_auth',
  81. title='Hyper-V host '
  82. 'authentication options')
  83. hyperv_host_auth_opts = [
  84. cfg.StrOpt('username',
  85. help="The username of the Hyper-V hosts."),
  86. cfg.StrOpt('password',
  87. secret=True,
  88. help='The password of the Hyper-V hosts.'),
  89. cfg.StrOpt('cert_pem_path',
  90. default=None,
  91. help='SSL certificate for WinRM remote PS connection.'),
  92. cfg.StrOpt('cert_key_pem_path',
  93. default=None,
  94. help='SSL key paired with cert_pem_path for WinRM remote PS '
  95. 'connection.'),
  96. cfg.StrOpt('transport_method',
  97. default='plaintext',
  98. choices=('ssl', 'ntlm', 'plaintext'),
  99. help='The method that should be used to establish a connection '
  100. 'to a Hyper-V host.')
  101. ]
  102. _opts = [
  103. (hyperv_group, HyperVGroup),
  104. (hyperv_host_auth_group, hyperv_host_auth_opts),
  105. ]
  106. def list_opts():
  107. return _opts