-
Notifications
You must be signed in to change notification settings - Fork 488
/
config.py
1658 lines (1548 loc) · 77.6 KB
/
config.py
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Copyright 2012 OpenStack Foundation
# 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.
import os
import tempfile
from oslo_concurrency import lockutils
from oslo_config import cfg
from oslo_config import types
from oslo_log import log as logging
from tempest.lib import exceptions
from tempest.lib.services import clients
from tempest.test_discover import plugins
# TODO(marun) Replace use of oslo_config's global ConfigOpts
# (cfg.CONF) instance with a local instance (cfg.ConfigOpts()) once
# the cli tests move to the clients. The cli tests rely on oslo
# incubator modules that use the global cfg.CONF.
_CONF = cfg.CONF
def register_opt_group(conf, opt_group, options):
if opt_group:
conf.register_group(opt_group)
for opt in options:
conf.register_opt(opt, group=getattr(opt_group, 'name', None))
auth_group = cfg.OptGroup(name='auth',
title="Options for authentication and credentials")
AuthGroup = [
cfg.StrOpt('test_accounts_file',
help="Path to the yaml file that contains the list of "
"credentials to use for running tests. If used when "
"running in parallel you have to make sure sufficient "
"credentials are provided in the accounts file. For "
"example if no tests with roles are being run it requires "
"at least `2 * CONC` distinct accounts configured in "
" the `test_accounts_file`, with CONC == the "
"number of concurrent test processes."),
cfg.BoolOpt('use_dynamic_credentials',
default=True,
help="Allows test cases to create/destroy projects and "
"users. This option requires that OpenStack Identity "
"API admin credentials are known. If false, isolated "
"test cases and parallel execution, can still be "
"achieved configuring a list of test accounts"),
cfg.ListOpt('tempest_roles',
help="Roles to assign to all users created by tempest",
default=[]),
cfg.StrOpt('default_credentials_domain_name',
default='Default',
help="Default domain used when getting v3 credentials. "
"This is the name keystone uses for v2 compatibility."),
cfg.BoolOpt('create_isolated_networks',
default=True,
help="If use_dynamic_credentials is set to True and Neutron "
"is enabled Tempest will try to create a usable network, "
"subnet, and router when needed for each project it "
"creates. However in some neutron configurations, like "
"with VLAN provider networks, this doesn't work. So if "
"set to False the isolated networks will not be created"),
cfg.StrOpt('admin_username',
help="Username for an administrative user. This is needed for "
"authenticating requests made by project isolation to "
"create users and projects"),
cfg.StrOpt('admin_project_name',
help="Project name to use for an administrative user. This is "
"needed for authenticating requests made by project "
"isolation to create users and projects"),
cfg.StrOpt('admin_password',
help="Password to use for an administrative user. This is "
"needed for authenticating requests made by project "
"isolation to create users and projects",
secret=True),
cfg.StrOpt('admin_domain_name',
default='Default',
help="Admin domain name for authentication (Keystone V3). "
"The same domain applies to user and project if "
"admin_user_domain_name and admin_project_domain_name "
"are not specified"),
cfg.StrOpt('admin_user_domain_name',
help="Domain name that contains the admin user (Keystone V3). "
"May be different from admin_project_domain_name and "
"admin_domain_name"),
cfg.StrOpt('admin_project_domain_name',
help="Domain name that contains the project given by "
"admin_project_name (Keystone V3). May be different from "
"admin_user_domain_name and admin_domain_name"),
cfg.StrOpt('admin_system',
default=None,
help="The system scope on which an admin user has an admin "
"role assignment, if any. Valid values are 'all' or None. "
"This must be set to 'all' if using the "
"[oslo_policy]/enforce_scope=true option for the "
"identity service."),
]
identity_group = cfg.OptGroup(name='identity',
title="Keystone Configuration Options")
IdentityGroup = [
cfg.StrOpt('catalog_type',
default='identity',
help="Catalog type of the Identity service."),
cfg.BoolOpt('disable_ssl_certificate_validation',
default=False,
help="Set to True if using self-signed SSL certificates."),
cfg.StrOpt('ca_certificates_file',
default=None,
help='Specify a CA bundle file to use in verifying a '
'TLS (https) server certificate.'),
cfg.URIOpt('uri',
schemes=['http', 'https'],
deprecated_for_removal=True,
deprecated_reason='The identity v2 API tests were removed '
'and this option has no effect',
help="Full URI of the OpenStack Identity API (Keystone), v2"),
cfg.URIOpt('uri_v3',
schemes=['http', 'https'],
help='Full URI of the OpenStack Identity API (Keystone), v3'),
cfg.StrOpt('auth_version',
default='v3',
deprecated_for_removal=True,
deprecated_reason='Identity v2 API was removed and v3 is '
'the only available identity API version now',
help="Identity API version to be used for authentication "
"for API tests."),
cfg.StrOpt('region',
default='RegionOne',
help="The identity region name to use. Also used as the other "
"services' region name unless they are set explicitly. "
"If no such region is found in the service catalog, the "
"first found one is used."),
cfg.StrOpt('v2_admin_endpoint_type',
default='adminURL',
choices=['public', 'admin', 'internal',
'publicURL', 'adminURL', 'internalURL'],
deprecated_for_removal=True,
deprecated_reason='This option has no effect',
help="The admin endpoint type to use for OpenStack Identity "
"(Keystone) API v2"),
cfg.StrOpt('v2_public_endpoint_type',
default='publicURL',
choices=['public', 'admin', 'internal',
'publicURL', 'adminURL', 'internalURL'],
deprecated_for_removal=True,
deprecated_reason='This option has no effect',
help="The public endpoint type to use for OpenStack Identity "
"(Keystone) API v2"),
cfg.StrOpt('v3_endpoint_type',
default='public',
choices=['public', 'admin', 'internal',
'publicURL', 'adminURL', 'internalURL'],
help="The endpoint type to use for OpenStack Identity "
"(Keystone) API v3."),
cfg.StrOpt('admin_role',
default='admin',
help="Role required to administrate keystone."),
cfg.StrOpt('default_domain_id',
default='default',
help="ID of the default domain"),
cfg.BoolOpt('admin_domain_scope',
default=False,
help="Whether keystone identity v3 policy required "
"a domain scoped token to use admin APIs"),
# Security Compliance (PCI-DSS)
cfg.IntOpt('user_lockout_failure_attempts',
default=2,
help="The number of unsuccessful login attempts the user is "
"allowed before having the account locked. This only "
"takes effect when identity-feature-enabled."
"security_compliance is set to 'True'. For more details, "
"refer to keystone config options keystone.conf:"
"security_compliance.lockout_failure_attempts. "
"This feature is disabled by default in keystone."),
cfg.IntOpt('user_lockout_duration',
default=5,
help="The number of seconds a user account will remain "
"locked. This only takes "
"effect when identity-feature-enabled.security_compliance "
"is set to 'True'. For more details, refer to "
"keystone config options "
"keystone.conf:security_compliance.lockout_duration. "
"Setting this option will have no effect unless you also "
"set identity.user_lockout_failure_attempts."),
cfg.IntOpt('user_unique_last_password_count',
default=2,
help="The number of passwords for a user that must be unique "
"before an old password can be reused. This only takes "
"effect when identity-feature-enabled.security_compliance "
"is set to 'True'. "
"This config option corresponds to keystone.conf: "
"security_compliance.unique_last_password_count, whose "
"default value is 0 meaning disabling this feature. "
"NOTE: This config option value must be same as "
"keystone.conf: security_compliance.unique_last_password_"
"count otherwise test might fail"),
cfg.IntOpt('user_minimum_password_age',
default=0,
help="The number of days that a password must be used before "
"the user can change it. This only takes effect when "
"identity-feature-enabled.security_compliance is set to "
"'True'. For more details, refer to keystone config "
"options "
"keystone.conf:security_compliance.minimum_password_age.")
]
service_clients_group = cfg.OptGroup(name='service-clients',
title="Service Clients Options")
ServiceClientsGroup = [
cfg.IntOpt('http_timeout',
default=60,
help='Timeout in seconds to wait for the http request to '
'return'),
cfg.StrOpt('proxy_url',
help='Specify an http proxy to use.')
]
identity_feature_group = cfg.OptGroup(name='identity-feature-enabled',
title='Enabled Identity Features')
IdentityFeatureGroup = [
cfg.BoolOpt('trust',
default=True,
help='Does the identity service have delegation and '
'impersonation enabled'),
cfg.BoolOpt('api_v2',
default=False,
deprecated_for_removal=True,
deprecated_reason='The identity v2 API tests were removed '
'and this option has no effect',
help='Is the v2 identity API enabled'),
cfg.BoolOpt('api_v2_admin',
default=True,
deprecated_for_removal=True,
deprecated_reason='The identity v2 API tests were removed '
'and this option has no effect',
help="Is the v2 identity admin API available?"),
cfg.BoolOpt('api_v3',
default=True,
deprecated_for_removal=True,
deprecated_reason='Identity v2 API was removed and v3 is '
'the only available identity API version '
'now',
help='Is the v3 identity API enabled'),
cfg.ListOpt('api_extensions',
default=['all'],
help="A list of enabled identity extensions with a special "
"entry all which indicates every extension is enabled. "
"Empty list indicates all extensions are disabled. "
"To get the list of extensions run: "
"'openstack extension list --identity'"),
cfg.BoolOpt('domain_specific_drivers',
default=False,
help='Are domain specific drivers enabled? '
'This configuration value should be same as '
'[identity]->domain_specific_drivers_enabled '
'in keystone.conf.'),
cfg.BoolOpt('security_compliance',
default=False,
help='Does the environment have the security compliance '
'settings enabled?'),
cfg.BoolOpt('access_rules',
default=True,
deprecated_for_removal=True,
deprecated_reason='Access rules for application credentials '
'is a default feature since Train',
help='Does the environment have access rules enabled?'),
cfg.BoolOpt('immutable_user_source',
default=False,
help='Set to True if the environment has a read-only '
'user source. This will skip all tests that attempt to '
'create, delete, or modify users. This should not be set '
'to True if using dynamic credentials')
]
compute_group = cfg.OptGroup(name='compute',
title='Compute Service Options')
ComputeGroup = [
cfg.StrOpt('image_ref',
help="Valid primary image reference to be used in tests. "
"This is a required option"),
cfg.StrOpt('image_ref_alt',
help="Valid secondary image reference to be used in tests. "
"This is a required option, but if only one image is "
"available duplicate the value of image_ref above"),
cfg.StrOpt('certified_image_ref',
help="Valid image reference to be used in image certificate "
"validation tests when enabled. This image must also "
"have the required img_signature_* properties set. "
"Additional details available within the following Nova "
"documentation: https://docs.openstack.org/nova/latest/"
"user/certificate-validation.html"),
cfg.ListOpt('certified_image_trusted_certs',
help="A list of trusted certificates to be used when the "
"image certificate validation compute feature is "
"enabled."),
cfg.StrOpt('flavor_ref',
default="1",
help="Valid primary flavor to use in tests."),
cfg.StrOpt('flavor_ref_alt',
default="2",
help='Valid secondary flavor to be used in tests.'),
cfg.IntOpt('build_interval',
default=1,
help="Time in seconds between build status checks."),
cfg.IntOpt('build_timeout',
default=300,
help="Timeout in seconds to wait for an instance to build. "
"Other services that do not define build_timeout will "
"inherit this value."),
cfg.IntOpt('ready_wait',
default=0,
help="Additional wait time for clean state, when there is "
"no OS-EXT-STS extension available"),
cfg.StrOpt('fixed_network_name',
help="Name of the fixed network that is visible to all test "
"projects. If multiple networks are available for a "
"project, this is the network which will be used for "
"creating servers if tempest does not create a network or "
"a network is not specified elsewhere. It may be used for "
"ssh validation only if floating IPs are disabled."),
cfg.StrOpt('catalog_type',
default='compute',
help="Catalog type of the Compute service."),
cfg.StrOpt('region',
default='',
help="The compute region name to use. If empty, the value "
"of identity.region is used instead. If no such region "
"is found in the service catalog, the first found one is "
"used."),
cfg.StrOpt('endpoint_type',
default='publicURL',
choices=['public', 'admin', 'internal',
'publicURL', 'adminURL', 'internalURL'],
help="The endpoint type to use for the compute service."),
cfg.StrOpt('volume_device_name',
default='vdb',
help="Expected device name when a volume is attached to "
"an instance. Not all hypervisors guarantee that they "
"will respect the user defined device name, tests may "
"fail if inappropriate device name is set."),
cfg.IntOpt('shelved_offload_time',
default=0,
help='Time in seconds before a shelved instance is eligible '
'for removing from a host. -1 never offload, 0 offload '
'when shelved. This configuration value should be same as '
'nova.conf: DEFAULT.shelved_offload_time, and '
'some tests will run for as long as the time.'),
cfg.IntOpt('min_compute_nodes',
default=1,
help=('The minimum number of compute nodes expected. This will '
'be utilized by some multinode specific tests to ensure '
'that requests match the expected size of the cluster '
'you are testing with.')),
cfg.StrOpt('hypervisor_type',
default=None,
help="Hypervisor type of the test target on heterogeneous "
"compute environment. The value can be 'QEMU', 'xen' or "
"something."),
cfg.StrOpt('min_microversion',
default=None,
help="Lower version of the test target microversion range. "
"The format is 'X.Y', where 'X' and 'Y' are int values. "
"Tempest selects tests based on the range between "
"min_microversion and max_microversion. "
"If both values are not specified, Tempest avoids tests "
"which require a microversion. Valid values are string "
"with format 'X.Y' or string 'latest'"),
cfg.StrOpt('max_microversion',
default=None,
help="Upper version of the test target microversion range. "
"The format is 'X.Y', where 'X' and 'Y' are int values. "
"Tempest selects tests based on the range between "
"min_microversion and max_microversion. "
"If both values are not specified, Tempest avoids tests "
"which require a microversion. Valid values are string "
"with format 'X.Y' or string 'latest'"),
cfg.StrOpt('compute_volume_common_az',
default=None,
help='AZ to be used for Cinder and Nova. Set this parameter '
'when the cloud has nova.conf: cinder.cross_az_attach '
'set to false. Which means volumes attached to an '
'instance must be in the same availability zone in Cinder '
'as the instance availability zone in Nova. Set the '
'common availability zone in this config which will be '
'used to boot an instance as well as creating a volume. '
'NOTE: If that AZ is not in Cinder (or '
'allow_availability_zone_fallback=False in cinder.conf), '
'the volume create request will fail and the instance '
'will fail the build request.'),
cfg.StrOpt('migration_source_host',
default=None,
help="Specify source host for live-migration, cold-migration"
" and resize tests. If option is not set tests will use"
" host automatically."),
cfg.StrOpt('migration_dest_host',
default=None,
help="Specify destination host for live-migration and cold"
" migration. If option is not set tests will use host"
" automatically."),
]
placement_group = cfg.OptGroup(name='placement',
title='Placement Service Options')
PlacementGroup = [
cfg.StrOpt('endpoint_type',
default='public',
choices=['public', 'admin', 'internal'],
help="The endpoint type to use for the placement service."),
cfg.StrOpt('catalog_type',
default='placement',
help="Catalog type of the Placement service."),
cfg.StrOpt('region',
default='',
help="The placement region name to use. If empty, the value "
"of [identity]/region is used instead. If no such region "
"is found in the service catalog, the first region found "
"is used."),
cfg.StrOpt('min_microversion',
default=None,
help="Lower version of the test target microversion range. "
"The format is 'X.Y', where 'X' and 'Y' are int values. "
"Valid values are string with format 'X.Y' or string "
"'latest'"),
cfg.StrOpt('max_microversion',
default=None,
help="Upper version of the test target microversion range. "
"The format is 'X.Y', where 'X' and 'Y' are int values. "
"Valid values are string with format 'X.Y' or string "
"'latest'"),
]
compute_features_group = cfg.OptGroup(name='compute-feature-enabled',
title="Enabled Compute Service Features")
ComputeFeaturesGroup = [
cfg.BoolOpt('disk_config',
default=True,
help="If false, skip disk config tests"),
# TODO(pkesav): Make it True by default once wallaby
# is oldest supported stable for Tempest.
cfg.BoolOpt('hostname_fqdn_sanitization',
default=False,
help="If false, skip fqdn instance sanitization tests. "
"Nova started sanitizing the instance name by replacing "
"the '.' with '-' to comply with fqdn hostname. Nova "
"changed that in Wallaby cycle, if your cloud is older "
"than wallaby then you can keep/make it False."),
cfg.BoolOpt('change_password',
default=False,
help="Does the test environment support changing the admin "
"password?"),
cfg.BoolOpt('console_output',
default=True,
help="Does the test environment support obtaining instance "
"serial console output?"),
cfg.BoolOpt('resize',
default=False,
help="Does the test environment support resizing? When you "
"enable this feature, 'flavor_ref_alt' should be set and "
"it should refer to a larger flavor than 'flavor_ref' "
"one."),
cfg.BoolOpt('pause',
default=True,
help="Does the test environment support pausing?"),
cfg.BoolOpt('shelve',
default=True,
help="Does the test environment support shelving/unshelving?"),
cfg.BoolOpt('shelve_migrate',
default=False,
help="Does the test environment support "
"cold migration of unshelved server?"),
cfg.BoolOpt('suspend',
default=True,
help="Does the test environment support suspend/resume?"),
cfg.BoolOpt('cold_migration',
default=True,
help="Does the test environment support cold migration?"),
cfg.BoolOpt('live_migration',
default=True,
help="Does the test environment support live migration?"),
cfg.BoolOpt('live_migrate_back_and_forth',
default=False,
help="Does the test environment support live migrating "
"VM back and forth between different versions of "
"nova-compute?"),
cfg.BoolOpt('metadata_service',
default=True,
help="Does the test environment support metadata service? "
"Ignored unless validation.run_validation=true."),
cfg.BoolOpt('block_migration_for_live_migration',
default=False,
help="Does the test environment use block devices for live "
"migration"),
cfg.BoolOpt('can_migrate_between_any_hosts',
default=True,
help="Does the test environment support migrating between "
"any hosts? In environments with non-homogeneous compute "
"nodes you can set this to False so that it will select "
"destination host for migrating automatically"),
cfg.BoolOpt('vnc_console',
default=False,
help='Enable VNC console. This configuration value should '
'be same as nova.conf: vnc.enabled'),
cfg.BoolOpt('spice_console',
default=False,
help='Enable Spice console. This configuration value should '
'be same as nova.conf: spice.enabled',
deprecated_for_removal=True,
deprecated_reason="This config option is not being used "
"in Tempest, we can add it back when "
"adding the test cases."),
cfg.BoolOpt('serial_console',
default=False,
help='Enable serial console. This configuration value '
'should be the same as '
'nova.conf: serial_console.enabled'),
cfg.BoolOpt('rescue',
default=True,
help='Does the test environment support instance rescue '
'mode?'),
cfg.BoolOpt('stable_rescue',
default=False,
help='Does the test environment support stable device '
'instance rescue mode?'),
cfg.BoolOpt('enable_instance_password',
default=True,
help='Enables returning of the instance password by the '
'relevant server API calls such as create, rebuild '
'or rescue. This configuration value should be same as '
'nova.conf: DEFAULT.enable_instance_password'),
cfg.BoolOpt('interface_attach',
default=True,
help='Does the test environment support dynamic network '
'interface attachment?'),
cfg.BoolOpt('snapshot',
default=True,
help='Does the test environment support creating snapshot '
'images of running instances?'),
cfg.BoolOpt('personality',
default=False,
help='Does the test environment support server personality'),
cfg.BoolOpt('attach_encrypted_volume',
default=True,
help='Does the test environment support attaching an '
'encrypted volume to a running server instance? This may '
'depend on the combination of compute_driver in nova and '
'the volume_driver(s) in cinder.'),
cfg.BoolOpt('config_drive',
default=True,
help='Enable special configuration drive with metadata.'),
cfg.ListOpt('scheduler_enabled_filters',
default=["AvailabilityZoneFilter", "ComputeFilter",
"ComputeCapabilitiesFilter", "ImagePropertiesFilter",
"ServerGroupAntiAffinityFilter",
"ServerGroupAffinityFilter"],
help="A list of enabled filters that Nova will accept as "
"hints to the scheduler when creating a server. If the "
"default value is overridden in nova.conf by the test "
"environment (which means that a different set of "
"filters is enabled than what is included in Nova by "
"default), then this option must be configured to "
"contain the same filters that Nova uses in the test "
"environment. A special entry 'all' indicates all "
"filters that are included with Nova are enabled. If "
"using 'all', be sure to enable all filters in "
"nova.conf, as tests can fail in unpredictable ways if "
"Nova's and Tempest's enabled filters don't match. "
"Empty list indicates all filters are disabled. The "
"full list of enabled filters is in nova.conf: "
"filter_scheduler.enabled_filters.",
deprecated_opts=[cfg.DeprecatedOpt(
'scheduler_available_filters',
group='compute-feature-enabled')]),
cfg.BoolOpt('swap_volume',
default=False,
help='Does the test environment support in-place swapping of '
'volumes attached to a server instance?'),
cfg.BoolOpt('volume_backed_live_migration',
default=False,
help='Does the test environment support volume-backed live '
'migration?'),
cfg.BoolOpt('volume_multiattach',
default=False,
help='Does the test environment support attaching a volume to '
'more than one instance? This depends on hypervisor and '
'volume backend/type and compute API version 2.60.'),
cfg.BoolOpt('ide_bus',
default=True,
help='Does the test environment support attaching devices '
'using an IDE bus to the instance?'),
cfg.BoolOpt('unified_limits',
default=False,
help='Does the test environment support unified limits?'),
]
image_group = cfg.OptGroup(name='image',
title="Image Service Options")
ImageGroup = [
cfg.StrOpt('catalog_type',
default='image',
help='Catalog type of the Image service.'),
cfg.StrOpt('region',
default='',
help="The image region name to use. If empty, the value "
"of identity.region is used instead. If no such region "
"is found in the service catalog, the first found one is "
"used."),
cfg.StrOpt('endpoint_type',
default='publicURL',
choices=['public', 'admin', 'internal',
'publicURL', 'adminURL', 'internalURL'],
help="The endpoint type to use for the image service."),
cfg.StrOpt('alternate_image_endpoint',
default=None,
help="Alternate endpoint name for cross-worker testing"),
cfg.StrOpt('alternate_image_endpoint_type',
default='publicURL',
choices=['public', 'admin', 'internal',
'publicURL', 'adminURL', 'internalURL'],
help=("The endpoint type to use for the alternate image "
"service.")),
cfg.BoolOpt('image_caching_enabled',
default=False,
help=("Flag to enable if caching is enabled by image "
"service, operator should set this parameter to True "
"if 'image_cache_dir' is set in glance-api.conf")),
cfg.StrOpt('http_image',
default='http://download.cirros-cloud.net/0.6.2/'
'cirros-0.6.2-x86_64-uec.tar.gz',
help='http accessible image'),
cfg.StrOpt('http_qcow2_image',
default='http://download.cirros-cloud.net/0.6.2/'
'cirros-0.6.2-x86_64-disk.img',
help='http qcow2 accessible image which will be used '
'for image conversion if enabled.'),
cfg.IntOpt('build_timeout',
default=300,
help="Timeout in seconds to wait for an image to "
"become available."),
cfg.IntOpt('build_interval',
default=1,
help="Time in seconds between image operation status "
"checks."),
cfg.ListOpt('container_formats',
default=['ami', 'ari', 'aki', 'bare', 'ovf', 'ova'],
help="A list of image's container formats "
"users can specify."),
cfg.ListOpt('disk_formats',
default=['ami', 'ari', 'aki', 'vhd', 'vmdk', 'raw', 'qcow2',
'vdi', 'iso', 'vhdx'],
help="A list of image's disk formats "
"users can specify.")
]
image_feature_group = cfg.OptGroup(name='image-feature-enabled',
title='Enabled image service features')
ImageFeaturesGroup = [
cfg.BoolOpt('api_v2',
default=True,
help="Is the v2 image API enabled",
deprecated_for_removal=True,
deprecated_reason='Glance v1 APIs are deprecated and v2 APIs '
'are current one. In future, Tempest will '
'test v2 APIs only so this config option '
'will be removed.'),
cfg.BoolOpt('import_image',
default=True,
help="Is image import feature enabled",
deprecated_for_removal=True,
deprecated_reason='Issue with image import in WSGI mode was '
'fixed in Victoria, and this feature works '
'in any deployment architecture now.'),
cfg.BoolOpt('os_glance_reserved',
default=True,
help="Should we check that os_glance namespace is reserved",
deprecated_for_removal=True,
deprecated_reason='os_glance namespace is always reserved '
'since Wallaby'),
cfg.BoolOpt('manage_locations',
default=False,
help=('Is show_multiple_locations enabled in glance. '
'Note that at least one http store must be enabled as '
'well, because we use that location scheme to test.')),
]
network_group = cfg.OptGroup(name='network',
title='Network Service Options')
ProfileType = types.Dict(types.List(types.String(), bounds=True))
NetworkGroup = [
cfg.StrOpt('catalog_type',
default='network',
help='Catalog type of the Neutron service.'),
cfg.StrOpt('region',
default='',
help="The network region name to use. If empty, the value "
"of identity.region is used instead. If no such region "
"is found in the service catalog, the first found one is "
"used."),
cfg.StrOpt('endpoint_type',
default='publicURL',
choices=['public', 'admin', 'internal',
'publicURL', 'adminURL', 'internalURL'],
help="The endpoint type to use for the network service."),
cfg.StrOpt('project_network_cidr',
default="10.100.0.0/16",
help="The cidr block to allocate project ipv4 subnets from"),
cfg.IntOpt('project_network_mask_bits',
default=28,
help="The mask bits for project ipv4 subnets"),
cfg.StrOpt('project_network_v6_cidr',
default="2001:db8::/48",
help="The cidr block to allocate project ipv6 subnets from"),
cfg.IntOpt('project_network_v6_mask_bits',
default=64,
help="The mask bits for project ipv6 subnets"),
cfg.BoolOpt('project_networks_reachable',
default=False,
help="Whether project networks can be reached directly from "
"the test client. This must be set to True when the "
"'fixed' connect_method is selected."),
cfg.StrOpt('public_network_id',
default="",
help="Id of the public network that provides external "
"connectivity"),
cfg.StrOpt('floating_network_name',
help="Default floating network name. Used to allocate floating "
"IPs when neutron is enabled."),
cfg.StrOpt('subnet_id',
default="",
help="Subnet id of subnet which is used for allocation of "
"floating IPs. Specify when two or more subnets are "
"present in network."),
cfg.StrOpt('public_router_id',
default="",
help="Id of the public router that provides external "
"connectivity. This should only be used when Neutron's "
"'allow_overlapping_ips' is set to 'False' in "
"neutron.conf. usually not needed past 'Grizzly' release"),
cfg.IntOpt('build_timeout',
default=300,
help="Timeout in seconds to wait for network operation to "
"complete."),
cfg.IntOpt('build_interval',
default=1,
help="Time in seconds between network operation status "
"checks."),
cfg.StrOpt('port_vnic_type',
choices=[None, 'normal', 'direct', 'macvtap', 'direct-physical',
'baremetal', 'virtio-forwarder'],
help="vnic_type to use when launching instances"
" with pre-configured ports."
" Supported ports are:"
" ['normal', 'direct', 'macvtap', 'direct-physical', "
"'baremetal', 'virtio-forwarder']"),
cfg.Opt('port_profile',
type=ProfileType,
default={},
help="port profile to use when launching instances"
" with pre-configured ports."),
cfg.ListOpt('default_network',
default=["1.0.0.0/16", "2.0.0.0/16"],
help="List of ip pools"
" for subnetpools creation"),
cfg.BoolOpt('shared_physical_network',
default=False,
help="The environment does not support network separation "
"between tenants."),
]
network_feature_group = cfg.OptGroup(name='network-feature-enabled',
title='Enabled network service features')
NetworkFeaturesGroup = [
cfg.BoolOpt('ipv6',
default=True,
help="Allow the execution of IPv6 tests."),
cfg.ListOpt('api_extensions',
default=['all'],
help="A list of enabled network extensions with a special "
"entry all which indicates every extension is enabled. "
"Empty list indicates all extensions are disabled. "
"To get the list of extensions run: "
"'openstack extension list --network'"),
cfg.ListOpt('available_features',
default=['all'],
help="A list of available network features with a special "
"entry all that indicates every feature is available. "
"Empty list indicates all features are disabled. "
"This list can contain features that are not "
"discoverable through the API."),
cfg.BoolOpt('ipv6_subnet_attributes',
default=False,
help="Allow the execution of IPv6 subnet tests that use "
"the extended IPv6 attributes ipv6_ra_mode "
"and ipv6_address_mode."
),
cfg.BoolOpt('port_admin_state_change',
default=True,
help="Does the test environment support changing "
"port admin state?"),
cfg.BoolOpt('port_security',
default=False,
help="Does the test environment support port security?"),
cfg.BoolOpt('floating_ips',
default=True,
help='Does the test environment support floating_ips?'),
cfg.StrOpt('qos_placement_physnet', default=None,
help='Name of the physnet for placement based minimum '
'bandwidth allocation.'),
cfg.StrOpt('provider_net_base_segmentation_id', default='3000',
help='Base segmentation ID to create provider networks. '
'This value will be increased in case of conflict.'),
cfg.BoolOpt('qos_min_bw_and_pps', default=False,
help='Does the test environment have minimum bandwidth and '
'packet rate inventories configured?'),
]
dashboard_group = cfg.OptGroup(name="dashboard",
title="Dashboard options")
DashboardGroup = [
cfg.URIOpt('dashboard_url',
default='http://localhost/',
schemes=['http', 'https'],
help="Where the dashboard can be found"),
cfg.BoolOpt('disable_ssl_certificate_validation',
default=False,
help="Set to True if using self-signed SSL certificates."),
]
validation_group = cfg.OptGroup(name='validation',
title='SSH Validation options')
ValidationGroup = [
cfg.BoolOpt('run_validation',
default=True,
help='Enable ssh on created servers and creation of additional'
' validation resources to enable remote access.'
' In case the guest does not support ssh set it'
' to false'),
cfg.BoolOpt('security_group',
default=True,
help='Enable/disable security groups.'),
cfg.BoolOpt('security_group_rules',
default=True,
help='Enable/disable security group rules.'),
cfg.StrOpt('connect_method',
default='floating',
choices=[('fixed',
'uses the first IP belonging to the fixed network'),
('floating',
'creates and uses a floating IP')],
help='Default IP type used for validation'),
cfg.StrOpt('auth_method',
default='keypair',
choices=['keypair'],
help='Default authentication method to the instance. '
'Only ssh via keypair is supported for now. '
'Additional methods will be handled in a separate spec.'),
cfg.IntOpt('ip_version_for_ssh',
default=4,
help='Default IP version for ssh connections.'),
cfg.IntOpt('ping_timeout',
default=120,
help='Timeout in seconds to wait for ping to succeed.'),
cfg.IntOpt('connect_timeout',
default=60,
help='Timeout in seconds to wait for the TCP connection to be '
'successful.'),
cfg.IntOpt('ssh_timeout',
default=300,
help='Timeout in seconds to wait for the ssh banner.'),
cfg.StrOpt('image_ssh_user',
default="root",
help="User name used to authenticate to an instance."),
cfg.StrOpt('image_alt_ssh_user',
default="root",
help="User name used to authenticate to an alt instance."),
cfg.StrOpt('image_ssh_password',
default="password",
help="Password used to authenticate to an instance.",
secret=True),
cfg.StrOpt('image_alt_ssh_password',
default="password",
help="Password used to authenticate to an alt instance.",
secret=True),
cfg.StrOpt('ssh_shell_prologue',
default="set -eu -o pipefail; PATH=$$PATH:/sbin:/usr/sbin;",
help="Shell fragments to use before executing a command "
"when sshing to a guest."),
cfg.IntOpt('ping_size',
default=56,
help="The packet size for ping packets originating "
"from remote linux hosts"),
cfg.IntOpt('ping_count',
default=1,
help="The number of ping packets originating from remote "
"linux hosts"),
cfg.StrOpt('floating_ip_range',
default='10.0.0.0/29',
help='Unallocated floating IP range, which will be used to '
'test the floating IP bulk feature for CRUD operation. '
'This block must not overlap an existing floating IP '
'pool.'),
cfg.StrOpt('network_for_ssh',
default='public',
help="Network used for SSH connections. Ignored if "
"connect_method=floating."),
cfg.StrOpt('ssh_key_type',
default='ecdsa',
choices=['ecdsa', 'rsa'],
help='Type of key to use for ssh connections.'),
cfg.FloatOpt('allowed_network_downtime',
default=5.0,
help="Allowed VM network connection downtime during live "
"migration, in seconds. "
"When the measured downtime exceeds this value, an "
"exception is raised."),
]
volume_group = cfg.OptGroup(name='volume',
title='Block Storage Options')
VolumeGroup = [
cfg.IntOpt('build_interval',
default=1,
help='Time in seconds between volume availability checks.'),
cfg.IntOpt('build_timeout',
default=300,
help='Timeout in seconds to wait for a volume to become '
'available.'),
cfg.StrOpt('catalog_type',
default='volumev3',
help="Catalog type of the Volume Service"),
cfg.StrOpt('region',
default='',
help="The volume region name to use. If empty, the value "
"of identity.region is used instead. If no such region "
"is found in the service catalog, the first found one is "
"used."),
cfg.StrOpt('endpoint_type',
default='publicURL',
choices=['public', 'admin', 'internal',
'publicURL', 'adminURL', 'internalURL'],
help="The endpoint type to use for the volume service."),
cfg.StrOpt('backup_driver',
default='ceph',
choices=['ceph', 'swift', 'nfs', 'glusterfs', 'posix', 'google',
's3'],
help="What kind of backup_driver does cinder use?"
"https://docs.openstack.org/cinder/latest/configuration/"
"block-storage/backup-drivers.html"),
cfg.ListOpt('backend_names',
default=['BACKEND_1', 'BACKEND_2'],
help='A list of backend names separated by comma. '
'The backend name must be declared in cinder.conf'),
cfg.StrOpt('volume_type',
default='',
help='Volume type to be used while creating volume.'),
cfg.StrOpt('volume_type_multiattach',
default='',
help='Multiattach volume type used while creating multiattach '
'volume.'),
cfg.StrOpt('storage_protocol',
default='iSCSI',
help='Backend protocol to target when creating volume types'),
cfg.StrOpt('vendor_name',
default='Open Source',
help='Backend vendor to target when creating volume types'),
cfg.StrOpt('disk_format',
default='raw',
help='Disk format to use when copying a volume to image'),