├── .gitignore ├── .gitreview ├── .pdkignore ├── .zuul.yaml ├── CONTRIBUTING.rst ├── Gemfile ├── LICENSE ├── README.md ├── Rakefile ├── bindep.txt ├── doc └── requirements.txt ├── examples └── init.pp ├── manifests ├── cache.pp ├── concurrency.pp ├── coordination.pp ├── cors.pp ├── db.pp ├── healthcheck.pp ├── init.pp ├── key_manager.pp ├── key_manager │ ├── barbican.pp │ └── barbican │ │ └── service_user.pp ├── limit.pp ├── log.pp ├── messaging │ ├── default.pp │ ├── notifications.pp │ └── rabbit.pp ├── middleware.pp ├── os_brick.pp ├── params.pp ├── policy.pp ├── privsep.pp ├── reports.pp ├── service.pp ├── service │ ├── ssl.pp │ └── wsgi.pp └── versionedobjects.pp ├── metadata.json ├── releasenotes ├── notes │ ├── Add-use_journal-option-for-logging-e8182a1cd944ef59.yaml │ ├── add_executor_thread_pool_size-1382ff07a6808402.yaml │ ├── add_keepalive_options-3802510b6d4461e1.yaml │ ├── add_mysql_enable_ndb-option-8b82c371ad16245a.yaml │ ├── add_oslo_privsep-3f125445bce8b431.yaml │ ├── add_tls_options-9010fc5eab23dfe7.yaml │ ├── add_zmq_messaging-7ea20df747c78035.yaml │ ├── amqp_auto_delete-e2734589468a98a2.yaml │ ├── backend_package_ensure-54b4525895ce9acd.yaml │ ├── barbican_service_user-a8ac0abd364927d8.yaml │ ├── basic-auth-middleware-64bf02c8f2a710f6.yaml │ ├── bug-1988205-973ce17f355cbfce.yaml │ ├── cache-backend-expiration-time-78bd3c1ebb3ab7c5.yaml │ ├── cache-memcache-sasl-af31b10afe7ce93a.yaml │ ├── cache-memcache_pool_flush_on_reconnect-ef097a16a54d9fac.yaml │ ├── cache-package_ensure-a9d500c5681a664f.yaml │ ├── cache-redis-opts-48e5d9aed33f3318.yaml │ ├── centos-9-support-17ad74c0169c5096.yaml │ ├── coordination-aef87a77189200f1.yaml │ ├── coordination-deprecate-etcd3-2511b454b2b5e58c.yaml │ ├── coordination-manage_backend_package-d6cc78682827d2df.yaml │ ├── deprecate-amqp1-driver-18eae241ab01b487.yaml │ ├── deprecate-db-use_tpool-d4897027d3fcf788.yaml │ ├── deprecate-heartbeat_in_pthread-7f8afe949faaac23.yaml │ ├── deprecate-oslo_config-fcd5be0a4c358ba3.yaml │ ├── deprecate-watch_log_file-255b789d22db61ee.yaml │ ├── deprecate-zeromq-0200b6efd57feb5d.yaml │ ├── deprecate_allow_insecure_clients-option-bca936c587b71a40.yaml │ ├── deprecate_config_sqlite_db-1a239175d42378e3.yaml │ ├── deprecate_database_min_pool_size-option-854fd8fed2229651.yaml │ ├── deprecate_idle_timeout_parameter-90814e13548fd549.yaml │ ├── deprecate_rabbit_max_retries-813a568923f2335d.yaml │ ├── drop-fedora-d4df1af521d28163.yaml │ ├── ensure-log-debug-is-boolean-ca20c1b14f5774e7.yaml │ ├── first_release-a7268e1c8959eca3.yaml │ ├── fix_log_dir_documentation-050052366584e83e.yaml │ ├── hc-enable_by_file_paths-e5594b85140cf449.yaml │ ├── healthcheck-allowed_source_ranges-63562e58d1a96e74.yaml │ ├── healthcheck-ignore_proxied_requests-1c64c62f261882c9.yaml │ ├── healthcheck-middleware-c254827e460e7443.yaml │ ├── log-json-70816c646023e567.yaml │ ├── memcache_socket_timeout-9daa8981f42caf41.yaml │ ├── messaging-notification-retry-4080762ebe815271.yaml │ ├── os-brick-wait_mpath_device-1a7a06c717fb1fc6.yaml │ ├── os_brick-444b69e1384bc260.yaml │ ├── oslo-db-config-group-4502ce93406f57b4.yaml │ ├── oslo-db-type-50bc9f614d50689a.yaml │ ├── oslo-limit-opts-4ec9fa3880a991f4.yaml │ ├── oslo-limit-query-endpoint-options-c85c4542bc678217.yaml │ ├── oslo-privsep-section-f577879ae1dba66c.yaml │ ├── oslo_policy-enforce_scope-a65d9a5e538a05e6.yaml │ ├── oslo_reports-12002edb359451c8.yaml │ ├── policy-enforce_new_defaults-f033a2b395abb924.yaml │ ├── postgresql-590a36045748761a.yaml │ ├── privsep-opts-d3d12d20281a0ee5.yaml │ ├── puppet-8-fb094942670c2b58.yaml │ ├── pymemcache_hashclient_retrying-10a756708ad9894b.yaml │ ├── pymemcache_retrying-4fa326e3bc913a97.yaml │ ├── rabbit-queue-manager-a2ee5b50b6c46615.yaml │ ├── rabbit-quorum-queue-86ab6394546356a9.yaml │ ├── rabbit_stream_fanout-4f916e1821642b08.yaml │ ├── rabbit_transient_quorum_queue-dc8393c75feb5046.yaml │ ├── rabbitmq-enable_cancel_on_failover-267c874b7d4df486.yaml │ ├── rabbitmq-heartbeat-over-pthread-bc86d8b3a2154613.yaml │ ├── release-note-ubuntu-py3-efe7fb76645d4dab.yaml │ ├── remove-allow_insecure_clients-f722cf425ec452d4.yaml │ ├── remove-amqp1-3101b26cef9b15fb.yaml │ ├── remove-centos-8-30c2edf7b40138d4.yaml │ ├── remove-db-idel_timeout-ce2e23c94ddc58ea.yaml │ ├── remove-db-min_pool_size-425afb5b6d6fd188.yaml │ ├── remove-db-use_tpool-35c9d76af145c18e.yaml │ ├── remove-deprecated-rabbit-options-212b21d41e6d2808.yaml │ ├── remove-mongo-01c0895a76175bb4.yaml │ ├── remove-oslo_config-ee4c8b63e4226a46.yaml │ ├── remove-puppet-6-c5ee67b4060a6c5a.yaml │ ├── remove-watch_log_file-0949dfc2300af8e4.yaml │ ├── remove-zeromq-826ce00eea673739.yaml │ ├── remove_deprecated_rabbit_max_retries_option-86f90600cb43f6c1.yaml │ ├── remove_sqlite_db-8703ae2068157637.yaml │ ├── remove_verbose-0b599cd4810a8c51.yaml │ ├── secure-transport-url-d67d307cf85a16b1.yaml │ ├── service-split-31d614b24cf43a7c.yaml │ ├── system_scope-barbican_service_user-3e9cba1bba4f22b8.yaml │ ├── system_scope-keystone-limit-422cbeee81ba84c5.yaml │ ├── ubuntu-jammy-218197b44e6c915a.yaml │ ├── ubuntu-noble-8854795cecbe1e62.yaml │ └── update-amqp-opts-1f14b8d3648b2b30.yaml └── source │ ├── 2023.1.rst │ ├── 2023.2.rst │ ├── 2024.1.rst │ ├── 2024.2.rst │ ├── 2025.1.rst │ ├── _static │ └── .placeholder │ ├── conf.py │ ├── index.rst │ ├── newton.rst │ ├── ocata.rst │ ├── pike.rst │ ├── queens.rst │ ├── rocky.rst │ ├── stein.rst │ ├── train.rst │ ├── unreleased.rst │ ├── ussuri.rst │ ├── victoria.rst │ ├── wallaby.rst │ ├── xena.rst │ ├── yoga.rst │ └── zed.rst ├── setup.cfg ├── setup.py ├── spec ├── classes │ └── oslo_init_spec.rb ├── defines │ ├── oslo_cache_spec.rb │ ├── oslo_concurrency_spec.rb │ ├── oslo_coordination_spec.rb │ ├── oslo_cors_spec.rb │ ├── oslo_db_spec.rb │ ├── oslo_healthcheck_spec.rb │ ├── oslo_key_manager_barbican_service_user_spec.rb │ ├── oslo_key_manager_barbican_spec.rb │ ├── oslo_key_manager_spec.rb │ ├── oslo_limit_spec.rb │ ├── oslo_log_spec.rb │ ├── oslo_messaging_default_spec.rb │ ├── oslo_messaging_notifications_spec.rb │ ├── oslo_messaging_rabbit_spec.rb │ ├── oslo_middleware_spec.rb │ ├── oslo_os_brick_spec.rb │ ├── oslo_policy_spec.rb │ ├── oslo_privsep_spec.rb │ ├── oslo_reports_spec.rb │ ├── oslo_service_spec.rb │ ├── oslo_service_ssl_spec.rb │ ├── oslo_service_wsgi_spec.rb │ └── oslo_versionedobjects_spec.rb ├── shared_examples.rb ├── spec_helper.rb ├── spec_helper_acceptance.rb └── type_aliases │ ├── dbconn_mysql_spec.rb │ ├── dbconn_postgres_spec.rb │ ├── dbconn_spec.rb │ ├── dbconn_sqlite_spec.rb │ ├── transporturl_fake_spec.rb │ ├── transporturl_rabbit_spec.rb │ └── transporturl_spec.rb ├── tox.ini └── types ├── dbconn.pp ├── dbconn ├── mysql.pp ├── postgres.pp └── sqlite.pp ├── transporturl.pp └── transporturl ├── fake.pp └── rabbit.pp /.gitignore: -------------------------------------------------------------------------------- 1 | # Add patterns in here to exclude files created by tools integrated with this 2 | # repository, such as test frameworks from the project's recommended workflow, 3 | # rendered documentation and package builds. 4 | # 5 | # Don't add patterns to exclude files created by preferred personal tools 6 | # (editors, IDEs, your operating system itself even). These should instead be 7 | # maintained outside the repository, for example in a ~/.gitignore file added 8 | # with: 9 | # 10 | # git config --global core.excludesfile '~/.gitignore' 11 | 12 | pkg/ 13 | Gemfile.lock 14 | vendor/ 15 | spec/fixtures/ 16 | .vagrant/ 17 | .bundle/ 18 | coverage/ 19 | .idea/ 20 | *.iml 21 | /openstack 22 | /log 23 | 24 | # Files created by releasenotes build 25 | releasenotes/build 26 | .tox 27 | -------------------------------------------------------------------------------- /.gitreview: -------------------------------------------------------------------------------- 1 | [gerrit] 2 | host=review.opendev.org 3 | port=29418 4 | project=openstack/puppet-oslo.git 5 | -------------------------------------------------------------------------------- /.pdkignore: -------------------------------------------------------------------------------- 1 | # common list used in puppetlabs repos 2 | .git/ 3 | .*.sw[op] 4 | .metadata 5 | .yardoc 6 | .yardwarns 7 | *.iml 8 | /.bundle/ 9 | /.idea/ 10 | /.vagrant/ 11 | /coverage/ 12 | /bin/ 13 | /doc/ 14 | /Gemfile.local 15 | /Gemfile.lock 16 | /junit/ 17 | /log/ 18 | /pkg/ 19 | /spec/fixtures/manifests/ 20 | /spec/fixtures/modules/* 21 | /tmp/ 22 | /vendor/ 23 | /convert_report.txt 24 | /update_report.txt 25 | .DS_Store 26 | .project 27 | .envrc 28 | /inventory.yaml 29 | /spec/fixtures/litmus_inventory.yaml 30 | /.fixtures.yml 31 | /Gemfile 32 | /.gitattributes 33 | /.gitignore 34 | /.pdkignore 35 | /.puppet-lint.rc 36 | /Rakefile 37 | /rakelib/ 38 | /.rspec 39 | /..yml 40 | /.yardopts 41 | /spec/ 42 | /.vscode/ 43 | /.sync.yml 44 | /.devcontainer/ 45 | # OpenStack-specific files 46 | /bindep.txt 47 | /.gitreview 48 | /releasenotes/ 49 | /setup.cfg 50 | /setup.py 51 | /tox.ini 52 | /.zuul.yaml 53 | -------------------------------------------------------------------------------- /.zuul.yaml: -------------------------------------------------------------------------------- 1 | - project: 2 | templates: 3 | - puppet-openstack-check-jobs 4 | - puppet-openstack-module-unit-jobs 5 | - puppet-openstack-integration-jobs-all 6 | - release-notes-jobs-python3 7 | -------------------------------------------------------------------------------- /CONTRIBUTING.rst: -------------------------------------------------------------------------------- 1 | The source repository for this project can be found at: 2 | 3 | https://opendev.org/openstack/puppet-oslo 4 | 5 | Pull requests submitted through GitHub are not monitored. 6 | 7 | To start contributing to OpenStack, follow the steps in the contribution guide 8 | to set up and use Gerrit: 9 | 10 | https://docs.openstack.org/contributors/code-and-documentation/quick-start.html 11 | 12 | Bugs should be filed on Launchpad: 13 | 14 | https://bugs.launchpad.net/puppet-oslo 15 | 16 | For more specific information about contributing to this repository, see the 17 | Puppet OpenStack contributor guide: 18 | 19 | https://docs.openstack.org/puppet-openstack-guide/latest/contributor/contributing.html 20 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source ENV['GEM_SOURCE'] || "https://rubygems.org" 2 | 3 | group :development, :test, :system_tests do 4 | spec_helper_dir = '/home/zuul/src/opendev.org/openstack/puppet-openstack_spec_helper' 5 | if File.directory?(spec_helper_dir) 6 | if ENV['ZUUL_PROJECT'] == 'openstack/puppet-openstack_spec_helper' 7 | gem 'puppet-openstack_spec_helper', 8 | :path => '../..', 9 | :require => 'false' 10 | else 11 | gem 'puppet-openstack_spec_helper', 12 | :path => spec_helper_dir, 13 | :require => 'false' 14 | end 15 | else 16 | spec_helper_version = ENV['ZUUL_BRANCH'] || "master" 17 | gem 'puppet-openstack_spec_helper', 18 | :git => 'https://opendev.org/openstack/puppet-openstack_spec_helper', 19 | :ref => spec_helper_version, 20 | :require => 'false' 21 | end 22 | end 23 | 24 | if facterversion = ENV['FACTER_GEM_VERSION'] 25 | gem 'facter', facterversion, :require => false 26 | else 27 | gem 'facter', :require => false 28 | end 29 | 30 | if puppetversion = ENV['PUPPET_GEM_VERSION'] 31 | gem 'puppet', puppetversion, :require => false 32 | else 33 | gem 'puppet', :require => false 34 | end 35 | 36 | # vim:ft=ruby 37 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Team and repository tags 2 | ======================== 3 | 4 | [![Team and repository tags](https://governance.openstack.org/tc/badges/puppet-oslo.svg)](https://governance.openstack.org/tc/reference/tags/index.html) 5 | 6 | 7 | 8 | oslo 9 | ======= 10 | 11 | #### Table of Contents 12 | 13 | 1. [Overview - What is the oslo module?](#overview) 14 | 2. [Module Description - What does the module do?](#module-description) 15 | 3. [Setup - The basics of getting started with oslo](#setup) 16 | 4. [Implementation - An under-the-hood peek at what the module is doing](#implementation) 17 | 5. [Limitations - OS compatibility, etc.](#limitations) 18 | 6. [Development - Guide for contributing to the module](#development) 19 | 7. [Contributors - Those with commits](#contributors) 20 | 8. [Release Notes - Release notes for the project](#release-notes) 21 | 9. [Repository - The project source code repository](#repository) 22 | 23 | Overview 24 | -------- 25 | 26 | The oslo module is a part of [OpenStack](https://opendev.org/openstack), an effort by the OpenStack infrastructure team to provide continuous integration testing and code review for OpenStack and OpenStack community projects not part of the core software. The module its self is used to flexibly configure and manage the Puppet OpenStack common module for OpenStack. 27 | 28 | Module Description 29 | ------------------ 30 | 31 | The oslo module is a thorough attempt to make Puppet capable of managing the entirety of oslo libraries. This includes manifests to provision region specific endpoint and database connections. Types are shipped as part of the oslo module to assist in manipulation of configuration files. 32 | 33 | Setup 34 | ----- 35 | 36 | **What the oslo module affects** 37 | 38 | * [Oslo](https://wiki.openstack.org/wiki/Oslo), the oslo libraries for OpenStack. 39 | 40 | ### Installing oslo 41 | 42 | oslo is not currently in Puppet Forge, but is anticipated to be added soon. Once that happens, you'll be able to install oslo with: 43 | puppet module install openstack/oslo 44 | 45 | ### Beginning with oslo 46 | 47 | To utilize the oslo module's functionality you will need to declare multiple resources. 48 | 49 | Implementation 50 | -------------- 51 | 52 | ### oslo 53 | 54 | oslo is a combination of Puppet manifest and ruby code to delivery configuration and extra functionality through types and providers. 55 | 56 | Limitations 57 | ------------ 58 | 59 | * All the oslo types use the CLI tools and so need to be ran on the oslo node. 60 | 61 | Development 62 | ----------- 63 | 64 | Developer documentation for the entire puppet-openstack project. 65 | 66 | * https://docs.openstack.org/puppet-openstack-guide/latest/ 67 | 68 | Contributors 69 | ------------ 70 | 71 | * https://github.com/openstack/puppet-oslo/graphs/contributors 72 | 73 | Release Notes 74 | ------------- 75 | 76 | * https://docs.openstack.org/releasenotes/puppet-oslo 77 | 78 | Repository 79 | ---------- 80 | 81 | * https://opendev.org/openstack/puppet-oslo 82 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | require 'puppet-openstack_spec_helper/rake_tasks' 2 | -------------------------------------------------------------------------------- /bindep.txt: -------------------------------------------------------------------------------- 1 | # This is a cross-platform list tracking distribution packages needed by tests; 2 | # see https://docs.openstack.org/infra/bindep/ for additional information. 3 | 4 | libxml2-devel [test platform:rpm] 5 | libxml2-dev [test platform:dpkg] 6 | libxslt-devel [test platform:rpm] 7 | libxslt1-dev [test platform:dpkg] 8 | ruby-devel [test platform:rpm] 9 | ruby-dev [test platform:dpkg] 10 | zlib1g-dev [test platform:dpkg] 11 | zlib-devel [test platform:rpm] 12 | puppet [build] 13 | -------------------------------------------------------------------------------- /doc/requirements.txt: -------------------------------------------------------------------------------- 1 | # This is required for the docs build jobs 2 | sphinx>=3.5.1 # BSD 3 | openstackdocstheme>=2.2.7 # Apache-2.0 4 | 5 | # This is required for the releasenotes build jobs 6 | reno>=3.2.0 # Apache-2.0 7 | -------------------------------------------------------------------------------- /examples/init.pp: -------------------------------------------------------------------------------- 1 | # The baseline for module testing used by Puppet Inc. is that each manifest 2 | # should have a corresponding test manifest that declares that class or defined 3 | # type. 4 | # 5 | # Tests are then run by using puppet apply --noop (to check for compilation 6 | # errors and view a log of events) or by fully applying the test in a virtual 7 | # environment (to compare the resulting system state to the desired state). 8 | # 9 | # Learn more about module testing here: 10 | # https://puppet.com/docs/puppet/latest/bgtm.html#testing-your-module 11 | # 12 | include oslo 13 | -------------------------------------------------------------------------------- /manifests/concurrency.pp: -------------------------------------------------------------------------------- 1 | # == Define: oslo::concurrency 2 | # 3 | # Configure oslo_concurrency options 4 | # 5 | # This resource configures Oslo concurrency resources for an OpenStack service. 6 | # It will manage the [oslo_concurrency] section in the given config resource. 7 | # 8 | # === Parameters: 9 | # 10 | # [*disable_process_locking*] 11 | # (Optional) Enables or disables inter-process locks. (boolean value) 12 | # Defaults to $facts['os_service_default']. 13 | # 14 | # [*lock_path*] 15 | # (Optional) Directory to use for lock files. For security, the specified directory 16 | # should only be writable by the user running the processes that need locking. 17 | # If external locks are used, a lock path must be set. (string value) 18 | # Defaults to $facts['os_service_default']. 19 | # 20 | define oslo::concurrency( 21 | $disable_process_locking = $facts['os_service_default'], 22 | $lock_path = $facts['os_service_default'], 23 | ) { 24 | $concurrency_options = { 25 | 'oslo_concurrency/disable_process_locking' => { value => $disable_process_locking }, 26 | 'oslo_concurrency/lock_path' => { value => $lock_path } 27 | } 28 | 29 | create_resources($name, $concurrency_options) 30 | } 31 | -------------------------------------------------------------------------------- /manifests/coordination.pp: -------------------------------------------------------------------------------- 1 | # == Define: oslo::coordination 2 | # 3 | # Setup and configure coordination settings. 4 | # 5 | # === Parameters 6 | # 7 | # [*backend_url*] 8 | # (Optional) Coordination backend URL. 9 | # Defaults to $facts['os_service_default'] 10 | # 11 | # [*manage_backend_package*] 12 | # (Optional) Whether to install the backend package. 13 | # Defaults to true. 14 | # 15 | # [*package_ensure*] 16 | # (Optional) ensure state for package. 17 | # Defaults to 'present' 18 | # 19 | # [*manage_config*] 20 | # (Optional) Whether to manage the configuration parameters. 21 | # Defaults to true. 22 | # 23 | define oslo::coordination ( 24 | $backend_url = $facts['os_service_default'], 25 | Boolean $manage_backend_package = true, 26 | $package_ensure = 'present', 27 | Boolean $manage_config = true, 28 | ) { 29 | 30 | include oslo::params 31 | 32 | if $manage_backend_package and !is_service_default($backend_url){ 33 | case $backend_url { 34 | /^redis:\/\//: { 35 | ensure_packages('python-redis', { 36 | name => $::oslo::params::python_redis_package_name, 37 | ensure => $package_ensure, 38 | tag => ['openstack'], 39 | }) 40 | } 41 | /^etcd3\+http[s]?:\/\//: { 42 | ensure_packages('python-etcd3gw', { 43 | name => $::oslo::params::python_etcd3gw_package_name, 44 | ensure => $package_ensure, 45 | tag => ['openstack'], 46 | }) 47 | } 48 | /^memcached:\/\//: { 49 | ensure_packages('python-pymemcache', { 50 | name => $::oslo::params::python_pymemcache_package_name, 51 | ensure => $package_ensure, 52 | tag => ['openstack'], 53 | }) 54 | } 55 | /^(kazoo|zookeeper):\/\//: { 56 | ensure_packages('python-kazoo', { 57 | name => $::oslo::params::python_kazoo_package_name, 58 | ensure => $package_ensure, 59 | tag => ['openstack'], 60 | }) 61 | } 62 | default: { 63 | # Nothing to do 64 | } 65 | } 66 | } 67 | 68 | if $manage_config { 69 | $coordination_options = { 70 | 'coordination/backend_url' => { value => $backend_url, secret => true }, 71 | } 72 | create_resources($name, $coordination_options) 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /manifests/cors.pp: -------------------------------------------------------------------------------- 1 | # == Define: oslo::cors 2 | # 3 | # Configure oslo_middleware options in cors section 4 | # 5 | # This resource configures oslo.middleware cors resources for an OpenStack 6 | # service. It will manage the [cors]/[cors.$subdomain] section in the given config resource. 7 | # 8 | # === Parameters: 9 | # 10 | # [*allowed_origin*] 11 | # (Optional) Indicate whether this resource may be shared with the domain 12 | # received in the requests "origin" header. 13 | # (string value) 14 | # Defaults to $facts['os_service_default']. 15 | # 16 | # [*allow_credentials*] 17 | # (Optional) Indicate that the actual request can include user credentials. 18 | # (boolean value) 19 | # Defaults to $facts['os_service_default']. 20 | # 21 | # [*expose_headers*] 22 | # (Optional) Indicate which headers are safe to expose to the API. 23 | # (list value) 24 | # Defaults to $facts['os_service_default']. 25 | # 26 | # [*max_age*] 27 | # (Optional) Maximum cache age of CORS preflight requests. 28 | # (integer value) 29 | # Defaults to $facts['os_service_default']. 30 | # 31 | # [*allow_methods*] 32 | # (Optional) Indicate which methods can be used during the actual request. 33 | # (list value) 34 | # Defaults to $facts['os_service_default']. 35 | # 36 | # [*allow_headers*] 37 | # (Optional) Indicate which header field names may be used during the actual 38 | # request. 39 | # (list value) 40 | # Defaults to $facts['os_service_default']. 41 | # 42 | define oslo::cors( 43 | $allowed_origin = $facts['os_service_default'], 44 | $allow_credentials = $facts['os_service_default'], 45 | $expose_headers = $facts['os_service_default'], 46 | $max_age = $facts['os_service_default'], 47 | $allow_methods = $facts['os_service_default'], 48 | $allow_headers = $facts['os_service_default'], 49 | ) { 50 | 51 | $cors_options = { 52 | 'cors/allowed_origin' => { value => join(any2array($allowed_origin), ',') }, 53 | 'cors/allow_credentials' => { value => $allow_credentials }, 54 | 'cors/expose_headers' => { value => join(any2array($expose_headers), ',') }, 55 | 'cors/max_age' => { value => $max_age }, 56 | 'cors/allow_methods' => { value => join(any2array($allow_methods), ',') }, 57 | 'cors/allow_headers' => { value => join(any2array($allow_headers), ',') } 58 | } 59 | create_resources($name, $cors_options) 60 | } 61 | -------------------------------------------------------------------------------- /manifests/db.pp: -------------------------------------------------------------------------------- 1 | # == Define: oslo::db 2 | # 3 | # Configure oslo_db options 4 | # 5 | # This resource configures Oslo database configs for an OpenStack service. 6 | # It will manage the [database] section in the given config resource. 7 | # 8 | # === Parameters: 9 | # 10 | # [*config*] 11 | # (Optional) The resource type used to apply configuration parameters. 12 | # Defaults to $name 13 | # 14 | # [*config_group*] 15 | # (Optional) The configuration group to set the database configuration in. 16 | # Some OpenStack services might implement the oslo database options in another 17 | # configuration group, this makes it available to set which one to use. 18 | # Defaults to 'database' 19 | # 20 | # [*sqlite_synchronous*] 21 | # (Optional) If True, SQLite uses synchronous mode (boolean value). 22 | # Defaults to $facts['os_service_default'] 23 | # 24 | # [*backend*] 25 | # (Optional) The back end to use for the database. 26 | # Defaults to $facts['os_service_default'] 27 | # 28 | # [*manage_backend_package*] 29 | # (Optional) Whether to install the backend package. 30 | # Defaults to true. 31 | # 32 | # [*backend_package_ensure*] 33 | # (Optional) Desired ensure state of the backend database package, 34 | # accepts latest or specific versions. 35 | # Defaults to present. 36 | # 37 | # [*connection*] 38 | # (Optional) The SQLAlchemy connection string to use to connect to the database. 39 | # Defaults to $facts['os_service_default'] 40 | # 41 | # [*slave_connection*] 42 | # (Optional) The SQLAlchemy connection string to use to connect to the slave database. 43 | # Defaults to $facts['os_service_default'] 44 | # 45 | # [*mysql_sql_mode*] 46 | # (Optional) The SQL mode to be used for MySQL sessions. 47 | # Defaults to $facts['os_service_default'] 48 | # 49 | # [*connection_recycle_time*] 50 | # (Optional) Timeout before idle SQL connections are reaped. 51 | # Defaults to $facts['os_service_default'] 52 | # 53 | # [*max_pool_size*] 54 | # (Optional) Maximum number of SQL connections to keep open in a pool. 55 | # Defaults to $facts['os_service_default'] 56 | # 57 | # [*max_retries*] 58 | # (Optional) Maximum number of database connection retries during startup. 59 | # Set to -1 to specify an infinite retry count. 60 | # Defaults to $facts['os_service_default'] 61 | # 62 | # [*retry_interval*] 63 | # (Optional) Interval between retries of opening a SQL connection. 64 | # Defaults to $facts['os_service_default'] 65 | # 66 | # [*max_overflow*] 67 | # (Optional) If set, use this value for max_overflow with SQLALchemy. 68 | # Defaults to $facts['os_service_default'] 69 | # 70 | # [*connection_debug*] 71 | # (Optional) Verbosity of SQL debugging information: 0=None, 100=Everything. 72 | # Defaults to $facts['os_service_default'] 73 | # 74 | # [*connection_trace*] 75 | # (Optional) Add Python stack traces to SQL as comment strings (boolean value). 76 | # Defaults to $facts['os_service_default'] 77 | # 78 | # [*pool_timeout*] 79 | # (Optional) If set, use this value for pool_timeout with SQLAlchemy. 80 | # Defaults to $facts['os_service_default'] 81 | # 82 | # [*use_db_reconnect*] 83 | # (Optional) Enable the experimental use of database reconnect on connection lost (boolean value) 84 | # Defaults to $facts['os_service_default'] 85 | # 86 | # [*db_retry_interval*] 87 | # (Optional) Seconds between retries of a database transaction. 88 | # Defaults to $facts['os_service_default'] 89 | # 90 | # [*db_inc_retry_interval*] 91 | # (Optional) If True, increases the interval between retries of 92 | # a database operation up to db_max_retry_interval. 93 | # Defaults to $facts['os_service_default'] 94 | # 95 | # [*db_max_retry_interval*] 96 | # (Optional) If db_inc_retry_interval is set, the maximum seconds between 97 | # retries of a database operation. 98 | # Defaults to $facts['os_service_default'] 99 | # 100 | # [*db_max_retries*] 101 | # (Optional) Maximum retries in case of connection error or deadlock error 102 | # before error is raised. Set to -1 to specify an infinite retry count. 103 | # Defaults to $facts['os_service_default'] 104 | # 105 | # [*mysql_enable_ndb*] 106 | # (Optional) If True, transparently enables support for handling MySQL 107 | # Cluster (NDB). 108 | # Defaults to $facts['os_service_default'] 109 | # 110 | # [*manage_config*] 111 | # (Optional) Whether to manage the configuration parameters. 112 | # Defaults to true. 113 | # 114 | define oslo::db( 115 | $config = $name, 116 | String[1] $config_group = 'database', 117 | $sqlite_synchronous = $facts['os_service_default'], 118 | $backend = $facts['os_service_default'], 119 | Boolean $manage_backend_package = true, 120 | $backend_package_ensure = present, 121 | Oslo::Dbconn $connection = $facts['os_service_default'], 122 | Oslo::Dbconn $slave_connection = $facts['os_service_default'], 123 | $mysql_sql_mode = $facts['os_service_default'], 124 | $connection_recycle_time = $facts['os_service_default'], 125 | $max_pool_size = $facts['os_service_default'], 126 | $max_retries = $facts['os_service_default'], 127 | $retry_interval = $facts['os_service_default'], 128 | $max_overflow = $facts['os_service_default'], 129 | $connection_debug = $facts['os_service_default'], 130 | $connection_trace = $facts['os_service_default'], 131 | $pool_timeout = $facts['os_service_default'], 132 | $use_db_reconnect = $facts['os_service_default'], 133 | $db_retry_interval = $facts['os_service_default'], 134 | $db_inc_retry_interval = $facts['os_service_default'], 135 | $db_max_retry_interval = $facts['os_service_default'], 136 | $db_max_retries = $facts['os_service_default'], 137 | $mysql_enable_ndb = $facts['os_service_default'], 138 | Boolean $manage_config = true, 139 | ) { 140 | 141 | include oslo::params 142 | 143 | if $manage_backend_package { 144 | case $connection { 145 | Oslo::Dbconn::Mysql: { 146 | require 'mysql::bindings' 147 | require 'mysql::bindings::python' 148 | if $connection =~ /^mysql\+pymysql/ { 149 | $backend_package = $::oslo::params::pymysql_package_name 150 | } else { 151 | $backend_package = undef 152 | } 153 | } 154 | Oslo::Dbconn::Postgres: { 155 | $backend_package = undef 156 | require 'postgresql::lib::python' 157 | } 158 | Oslo::Dbconn::Sqlite: { 159 | $backend_package = undef 160 | } 161 | default: { 162 | $backend_package = undef 163 | } 164 | } 165 | 166 | if $backend_package { 167 | ensure_packages($backend_package, { 168 | ensure => $backend_package_ensure, 169 | name => $backend_package, 170 | tag => 'openstack', 171 | }) 172 | } 173 | } 174 | 175 | if $manage_config { 176 | $database_options = { 177 | "${config_group}/sqlite_synchronous" => { value => $sqlite_synchronous }, 178 | "${config_group}/backend" => { value => $backend }, 179 | "${config_group}/connection" => { value => $connection, secret => true }, 180 | "${config_group}/slave_connection" => { value => $slave_connection, secret => true }, 181 | "${config_group}/mysql_sql_mode" => { value => $mysql_sql_mode }, 182 | "${config_group}/connection_recycle_time" => { value => $connection_recycle_time }, 183 | "${config_group}/max_pool_size" => { value => $max_pool_size }, 184 | "${config_group}/max_retries" => { value => $max_retries }, 185 | "${config_group}/retry_interval" => { value => $retry_interval }, 186 | "${config_group}/max_overflow" => { value => $max_overflow }, 187 | "${config_group}/connection_debug" => { value => $connection_debug }, 188 | "${config_group}/connection_trace" => { value => $connection_trace }, 189 | "${config_group}/pool_timeout" => { value => $pool_timeout }, 190 | "${config_group}/use_db_reconnect" => { value => $use_db_reconnect }, 191 | "${config_group}/db_retry_interval" => { value => $db_retry_interval }, 192 | "${config_group}/db_inc_retry_interval" => { value => $db_inc_retry_interval }, 193 | "${config_group}/db_max_retry_interval" => { value => $db_max_retry_interval }, 194 | "${config_group}/db_max_retries" => { value => $db_max_retries }, 195 | "${config_group}/mysql_enable_ndb" => { value => $mysql_enable_ndb }, 196 | } 197 | 198 | create_resources($config, $database_options) 199 | } 200 | } 201 | -------------------------------------------------------------------------------- /manifests/healthcheck.pp: -------------------------------------------------------------------------------- 1 | # == Define: oslo::healthcheck 2 | # 3 | # Configure oslo_middleware options in healthcheck section 4 | # 5 | # === Parameters: 6 | # 7 | # [*detailed*] 8 | # (Optional) Show more detailed information as part of the response. 9 | # Defaults to $facts['os_service_default'] 10 | # 11 | # [*backends*] 12 | # (Optional) Additional backends that can perform health checks and report 13 | # that information back as part of a request. 14 | # Defaults to $facts['os_service_default'] 15 | # 16 | # [*allowed_source_ranges*] 17 | # (Optional) A list of network addresses to limit source ip allowed to access 18 | # healthcheck information. 19 | # Defaults to $facts['os_service_default'] 20 | # 21 | # [*ignore_proxied_requests*] 22 | # (Optional) Ignore requests with proxy headers 23 | # Defaults to $facts['os_service_default'] 24 | # 25 | # [*disable_by_file_path*] 26 | # (Optional) Check the presence of a file to determine if an application 27 | # is running on a port. 28 | # Defaults to $facts['os_service_default'] 29 | # 30 | # [*disable_by_file_paths*] 31 | # (Optional) Check the presence of a file to determine if an application 32 | # is running on a port. Expects a "port:path" list of strings. 33 | # Defaults to $facts['os_service_default'] 34 | # 35 | # [*enable_by_file_paths*] 36 | # (Optional) Check the presence of files. Used by EnableByFilesHealthcheck 37 | # plugin. 38 | # Defaults to $facts['os_service_default'] 39 | # 40 | define oslo::healthcheck( 41 | $detailed = $facts['os_service_default'], 42 | $backends = $facts['os_service_default'], 43 | $allowed_source_ranges = $facts['os_service_default'], 44 | $ignore_proxied_requests = $facts['os_service_default'], 45 | $disable_by_file_path = $facts['os_service_default'], 46 | $disable_by_file_paths = $facts['os_service_default'], 47 | $enable_by_file_paths = $facts['os_service_default'], 48 | ) { 49 | 50 | $backends_real = join(any2array($backends), ',') 51 | $allowed_source_ranges_real = join(any2array($allowed_source_ranges), ',') 52 | $disable_by_file_paths_real = join(any2array($disable_by_file_paths), ',') 53 | $enable_by_file_paths_real = join(any2array($enable_by_file_paths), ',') 54 | 55 | $healthcheck_options = { 56 | 'healthcheck/detailed' => { value => $detailed }, 57 | 'healthcheck/backends' => { value => $backends_real }, 58 | 'healthcheck/allowed_source_ranges' => { value => $allowed_source_ranges_real }, 59 | 'healthcheck/ignore_proxied_requests' => { value => $ignore_proxied_requests }, 60 | 'healthcheck/disable_by_file_path' => { value => $disable_by_file_path }, 61 | 'healthcheck/disable_by_file_paths' => { value => $disable_by_file_paths_real }, 62 | 'healthcheck/enable_by_file_paths' => { value => $enable_by_file_paths_real }, 63 | } 64 | create_resources($name, $healthcheck_options) 65 | } 66 | -------------------------------------------------------------------------------- /manifests/init.pp: -------------------------------------------------------------------------------- 1 | # == Class: oslo 2 | # 3 | # Full description of class oslo here. 4 | # 5 | # === Parameters 6 | # 7 | class oslo { 8 | 9 | include oslo::params 10 | 11 | } 12 | -------------------------------------------------------------------------------- /manifests/key_manager.pp: -------------------------------------------------------------------------------- 1 | # == Define: oslo::key_manager 2 | # 3 | # Configure key_manager options implemented in the castellan library 4 | # 5 | # === Parameters 6 | # 7 | # [*config*] 8 | # (Optional) The resource type used to apply configuration parameters. 9 | # Defaults to $name 10 | # 11 | # [*backend*] 12 | # (Optional) Specify the key manager implementation. 13 | # Defaults to $facts['os_service_default'] 14 | # 15 | define oslo::key_manager( 16 | $config = $name, 17 | $backend = $facts['os_service_default'], 18 | ) { 19 | 20 | $key_manager_options = { 21 | 'key_manager/backend' => { value => $backend }, 22 | } 23 | 24 | create_resources($config, $key_manager_options) 25 | } 26 | -------------------------------------------------------------------------------- /manifests/key_manager/barbican.pp: -------------------------------------------------------------------------------- 1 | # == Define: oslo::key_manager::barbican 2 | # 3 | # Setup and configure Barbican Key Manager options 4 | # 5 | # === Parameters 6 | # 7 | # [*config*] 8 | # (Optional) The resource type used to apply configuration parameters. 9 | # Defaults to $name 10 | # 11 | # [*barbican_endpoint*] 12 | # (Optional) Use this endpoint to connect to Barbican. 13 | # Defaults to $facts['os_service_default'] 14 | # 15 | # [*barbican_api_version*] 16 | # (Optional) Version of the Barbican API. 17 | # Defaults to $facts['os_service_default'] 18 | # 19 | # [*auth_endpoint*] 20 | # (Optional) Use this endpoint to connect to Keystone. 21 | # Defaults to $facts['os_service_default'] 22 | # 23 | # [*retry_delay*] 24 | # (Optional) Number of seconds to wait before retrying poll for key creation 25 | # completion. 26 | # Defaults to $facts['os_service_default'] 27 | # 28 | # [*number_of_retries*] 29 | # (Optional) Number of times to retry poll fo key creation completion. 30 | # Defaults to $facts['os_service_default'] 31 | # 32 | # [*barbican_endpoint_type*] 33 | # (Optional) Specifies the type of endpoint. 34 | # Defaults to $facts['os_service_default'] 35 | # 36 | # [*barbican_region_name*] 37 | # (Optional) Specifies the region of the chosen endpoint. 38 | # Defaults to $facts['os_service_default'] 39 | # 40 | # [*send_service_user_token*] 41 | # (Optional) The service uses service token feature when this is set as true. 42 | # Defaults to $facts['os_service_default'] 43 | # 44 | define oslo::key_manager::barbican ( 45 | $config = $name, 46 | $barbican_endpoint = $facts['os_service_default'], 47 | $barbican_api_version = $facts['os_service_default'], 48 | $auth_endpoint = $facts['os_service_default'], 49 | $retry_delay = $facts['os_service_default'], 50 | $number_of_retries = $facts['os_service_default'], 51 | $barbican_endpoint_type = $facts['os_service_default'], 52 | $barbican_region_name = $facts['os_service_default'], 53 | $send_service_user_token = $facts['os_service_default'], 54 | ) { 55 | 56 | $barbican_options = { 57 | 'barbican/barbican_endpoint' => { value => $barbican_endpoint }, 58 | 'barbican/barbican_api_version' => { value => $barbican_api_version }, 59 | 'barbican/auth_endpoint' => { value => $auth_endpoint }, 60 | 'barbican/retry_delay' => { value => $retry_delay }, 61 | 'barbican/number_of_retries' => { value => $number_of_retries }, 62 | 'barbican/barbican_endpoint_type' => { value => $barbican_endpoint_type }, 63 | 'barbican/barbican_region_name' => { value => $barbican_region_name }, 64 | 'barbican/send_service_user_token' => { value => $send_service_user_token }, 65 | } 66 | 67 | create_resources($config, $barbican_options) 68 | } 69 | -------------------------------------------------------------------------------- /manifests/key_manager/barbican/service_user.pp: -------------------------------------------------------------------------------- 1 | # == Definition: oslo::key_manager::barbican::service_user 2 | # 3 | # Setup and configure the service token feature for Barbican Key Manager 4 | # 5 | # == Parameters: 6 | # 7 | # [*name*] 8 | # (Required) The name of the resource corresponding to the config file. 9 | # For example, oslo::key_manager::barbican::service_user { 'nova_config': ... } 10 | # Where 'nova_config' is the name of the resource used to manage 11 | # the nova configuration. 12 | # 13 | # [*username*] 14 | # (Required) The name of the service user 15 | # 16 | # [*password*] 17 | # (Required) Password to create for the service user 18 | # 19 | # [*auth_url*] 20 | # (Required) The URL to use for authentication. 21 | # 22 | # [*project_name*] 23 | # (Optional) Service project name 24 | # Defaults to $facts['os_service_default'] 25 | # 26 | # [*user_domain_name*] 27 | # (Optional) Name of domain for $username 28 | # Defaults to $facts['os_service_default'] 29 | # 30 | # [*project_domain_name*] 31 | # (Optional) Name of domain for $project_name 32 | # Defaults to $facts['os_service_default'] 33 | # 34 | # [*system_scope*] 35 | # (Optional) Scope for system operations. 36 | # Defaults to $facts['os_service_default'] 37 | # 38 | # [*insecure*] 39 | # (Optional) If true, explicitly allow TLS without checking server cert 40 | # against any certificate authorities. WARNING: not recommended. Use with 41 | # caution. 42 | # Defaults to $facts['os_service_default'] 43 | # 44 | # [*auth_type*] 45 | # (Optional) Authentication type to load 46 | # Defaults to $facts['os_service_default'] 47 | # 48 | # [*auth_version*] 49 | # (Optional) API version of the admin Identity API endpoint. 50 | # Defaults to $facts['os_service_default']. 51 | # 52 | # [*cafile*] 53 | # (Optional) A PEM encoded Certificate Authority to use when verifying HTTPs 54 | # connections. 55 | # Defaults to $facts['os_service_default']. 56 | # 57 | # [*certfile*] 58 | # (Optional) Required if identity server requires client certificate 59 | # Defaults to $facts['os_service_default']. 60 | # 61 | # [*keyfile*] 62 | # (Optional) Required if identity server requires client certificate 63 | # Defaults to $facts['os_service_default']. 64 | # 65 | # [*region_name*] 66 | # (Optional) The region in which the identity server can be found. 67 | # Defaults to $facts['os_service_default']. 68 | # 69 | define oslo::key_manager::barbican::service_user( 70 | $username, 71 | $password, 72 | $auth_url, 73 | $project_name = $facts['os_service_default'], 74 | $user_domain_name = $facts['os_service_default'], 75 | $project_domain_name = $facts['os_service_default'], 76 | $system_scope = $facts['os_service_default'], 77 | $insecure = $facts['os_service_default'], 78 | $auth_type = $facts['os_service_default'], 79 | $auth_version = $facts['os_service_default'], 80 | $cafile = $facts['os_service_default'], 81 | $certfile = $facts['os_service_default'], 82 | $keyfile = $facts['os_service_default'], 83 | $region_name = $facts['os_service_default'], 84 | ) { 85 | 86 | if is_service_default($system_scope) { 87 | $project_name_real = $project_name 88 | $project_domain_name_real = $project_domain_name 89 | } else { 90 | # When system scope is used, project parameters should be removed otherwise 91 | # project scope is used. 92 | $project_name_real = $facts['os_service_default'] 93 | $project_domain_name_real = $facts['os_service_default'] 94 | } 95 | 96 | $service_user_options = { 97 | 'barbican_service_user/auth_type' => {'value' => $auth_type}, 98 | 'barbican_service_user/auth_version' => {'value' => $auth_version}, 99 | 'barbican_service_user/cafile' => {'value' => $cafile}, 100 | 'barbican_service_user/certfile' => {'value' => $certfile}, 101 | 'barbican_service_user/keyfile' => {'value' => $keyfile}, 102 | 'barbican_service_user/region_name' => {'value' => $region_name}, 103 | 'barbican_service_user/auth_url' => {'value' => $auth_url}, 104 | 'barbican_service_user/username' => {'value' => $username}, 105 | 'barbican_service_user/password' => {'value' => $password, 'secret' => true}, 106 | 'barbican_service_user/user_domain_name' => {'value' => $user_domain_name}, 107 | 'barbican_service_user/project_name' => {'value' => $project_name_real}, 108 | 'barbican_service_user/project_domain_name' => {'value' => $project_domain_name_real}, 109 | 'barbican_service_user/system_scope' => {'value' => $system_scope}, 110 | 'barbican_service_user/insecure' => {'value' => $insecure}, 111 | } 112 | 113 | create_resources($name, $service_user_options) 114 | } 115 | -------------------------------------------------------------------------------- /manifests/limit.pp: -------------------------------------------------------------------------------- 1 | # == Define: oslo::limit 2 | # 3 | # Configure oslo_limit options 4 | # 5 | # === Parameters: 6 | # 7 | # [*username*] 8 | # (Required) The name of the service user 9 | # 10 | # [*password*] 11 | # (Required) Password to create for the service user 12 | # 13 | # [*endpoint_id*] 14 | # (Optional) The service's endpoint id which is registered in Keystone. 15 | # Defaults to undef 16 | # 17 | # [*endpoint_service_name*] 18 | # (Optional) Service name for endpoint discovery 19 | # Defaults to undef 20 | # 21 | # [*endpoint_service_type*] 22 | # (Optional) Service type for endpoint discovery 23 | # Defaults to undef 24 | # 25 | # [*endpoint_region_name*] 26 | # (Optional) Region to which the endpoint belongs. 27 | # Defaults to $facts['os_service_default'] 28 | # 29 | # [*endpoint_interface*] 30 | # (Optional) The interface for endpoint discovery. 31 | # Defaults to $facts['os_service_default'] 32 | # 33 | # [*auth_url*] 34 | # (Optional) The URL to use for authentication. 35 | # Defaults to 'http://localhost:5000'. 36 | # 37 | # [*project_name*] 38 | # (Optional) Service project name 39 | # Defaults to 'services'. 40 | # 41 | # [*user_domain_name*] 42 | # (Optional) Name of domain for $username 43 | # Defaults to 'Default'. 44 | # 45 | # [*project_domain_name*] 46 | # (Optional) Name of domain for $project_name 47 | # Defaults to 'Default'. 48 | # 49 | # [*system_scope*] 50 | # (Optional) Scope for system operations. 51 | # Defaults to $facts['os_service_default'] 52 | # 53 | # [*auth_type*] 54 | # (Optional) Authentication type to load 55 | # Defaults to 'password'. 56 | # 57 | # [*service_type*] 58 | # (Optional) The name or type of the service as it appears in the service 59 | # catalog. This is used to validate tokens that have restricted access rules. 60 | # Defaults to $facts['os_service_default']. 61 | # 62 | # [*valid_interfaces*] 63 | # (Optional) List of interfaces, in order of preference, for endpoint URL. 64 | # Defaults to $facts['os_service_default']. 65 | # 66 | # [*region_name*] 67 | # (Optional) The region in which the identity server can be found. 68 | # Defaults to $facts['os_service_default']. 69 | # 70 | # [*endpoint_override*] 71 | # (Optional) Always use this endpoint URL for requests for this client. 72 | # Defaults to $facts['os_service_default']. 73 | # 74 | define oslo::limit( 75 | String[1] $username, 76 | String[1] $password, 77 | Optional[String[1]] $endpoint_id = undef, 78 | Optional[String[1]] $endpoint_service_name = undef, 79 | Optional[String[1]] $endpoint_service_type = undef, 80 | $endpoint_region_name = $facts['os_service_default'], 81 | $endpoint_interface = $facts['os_service_default'], 82 | $auth_url = 'http://localhost:5000', 83 | $project_name = 'services', 84 | $user_domain_name = 'Default', 85 | $project_domain_name = 'Default', 86 | $system_scope = $facts['os_service_default'], 87 | $auth_type = 'password', 88 | $service_type = $facts['os_service_default'], 89 | $valid_interfaces = $facts['os_service_default'], 90 | $region_name = $facts['os_service_default'], 91 | $endpoint_override = $facts['os_service_default'], 92 | ) { 93 | 94 | if delete_undef_values([$endpoint_id, $endpoint_service_name, $endpoint_service_type]) == [] { 95 | fail('Either endpoint_id, endpoint_service_name or endpoint_service_type is required') 96 | } 97 | if $endpoint_id and ($endpoint_service_name or $endpoint_service_type) { 98 | fail('endpoint_id and endpoint_service_name/type are mutually exclusive') 99 | } 100 | 101 | if is_service_default($system_scope) { 102 | $project_name_real = $project_name 103 | $project_domain_name_real = $project_domain_name 104 | } else { 105 | # When system scope is used, project parameters should be removed otherwise 106 | # project scope is used. 107 | $project_name_real = $facts['os_service_default'] 108 | $project_domain_name_real = $facts['os_service_default'] 109 | } 110 | 111 | $limit_options = { 112 | 'oslo_limit/endpoint_id' => { value => pick($endpoint_id, $facts['os_service_default']) }, 113 | 'oslo_limit/endpoint_service_name' => { value => pick($endpoint_service_name, $facts['os_service_default']) }, 114 | 'oslo_limit/endpoint_service_type' => { value => pick($endpoint_service_type, $facts['os_service_default']) }, 115 | 'oslo_limit/endpoint_region_name' => { value => $endpoint_region_name }, 116 | 'oslo_limit/endpoint_interface' => { value => $endpoint_interface }, 117 | 'oslo_limit/username' => { value => $username }, 118 | 'oslo_limit/password' => { value => $password, secret => true }, 119 | 'oslo_limit/auth_url' => { value => $auth_url }, 120 | 'oslo_limit/project_name' => { value => $project_name_real }, 121 | 'oslo_limit/user_domain_name' => { value => $user_domain_name }, 122 | 'oslo_limit/project_domain_name' => { value => $project_domain_name_real }, 123 | 'oslo_limit/system_scope' => { value => $system_scope }, 124 | 'oslo_limit/auth_type' => { value => $auth_type }, 125 | 'oslo_limit/service_type' => { value => $service_type }, 126 | 'oslo_limit/valid_interfaces' => { value => join(any2array($valid_interfaces), ',') }, 127 | 'oslo_limit/region_name' => { value => $region_name }, 128 | 'oslo_limit/endpoint_override' => { value => $endpoint_override }, 129 | } 130 | create_resources($name, $limit_options) 131 | } 132 | -------------------------------------------------------------------------------- /manifests/log.pp: -------------------------------------------------------------------------------- 1 | # == Define: oslo::log 2 | # 3 | # Configure oslo_log options 4 | # 5 | # This resource configures Oslo logging resources for an OpenStack service. 6 | # It will manage the [DEFAULT] section in the given config resource. 7 | # 8 | # === Parameters: 9 | # 10 | # [*debug*] 11 | # (Optional) Should the daemons log debug messages 12 | # Defaults to $facts['os_service_default'] 13 | # 14 | # [*log_config_append*] 15 | # The name of an additional logging configuration file. 16 | # Defaults to $facts['os_service_default'] 17 | # See https://docs.python.org/2/howto/logging.html 18 | # 19 | # [*log_date_format*] 20 | # (Optional) Format string for %%(asctime)s in log records. 21 | # Defaults to $facts['os_service_default'] 22 | # Example: 'Y-%m-%d %H:%M:%S' 23 | # 24 | # [*log_file*] 25 | # (Optional) Name of log file to output to. If no default is set, logging will go to stdout. 26 | # This option is ignored if log_config_append is set. 27 | # Defaults to $facts['os_service_default'] 28 | # 29 | # [*log_dir*] 30 | # (Optional) Directory where logs should be stored. 31 | # If set to $facts['os_service_default'], it will not log to any directory. 32 | # Defaults to $facts['os_service_default'] 33 | # 34 | # [*use_syslog*] 35 | # (Optional) Use syslog for logging (boolean value). 36 | # Defaults to $facts['os_service_default'] 37 | # 38 | # [*use_journal*] 39 | # (Optional) Use journald for logging (boolean value). 40 | # Defaults to $facts['os_service_default'] 41 | # 42 | # [*syslog_log_facility*] 43 | # (Optional) Syslog facility to receive log lines. 44 | # This option is ignored if log_config_append is set. 45 | # Defaults to $facts['os_service_default'] 46 | # 47 | # [*use_json*] 48 | # (Optional) Use JSON format for logging (boolean value). 49 | # Defaults to $facts['os_service_default'] 50 | # 51 | # [*use_stderr*] 52 | # (Optional) Log output to standard error. 53 | # This option is ignored if log_config_append is set. 54 | # Defaults to $facts['os_service_default'] 55 | # 56 | # [*logging_context_format_string*] 57 | # (Optional) Format string to use for log messages with context. 58 | # Defaults to $facts['os_service_default'] 59 | # Example: '%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s \ 60 | # [%(request_id)s %(user_identity)s] %(instance)s%(message)s' 61 | # 62 | # [*logging_default_format_string*] 63 | # (Optional) Format string to use for log messages when context is undefined. 64 | # Defaults to $facts['os_service_default'] 65 | # Example: '%(asctime)s.%(msecs)03d %(process)d %(levelname)s \ 66 | # %(name)s [-] %(instance)s%(message)s' 67 | # 68 | # [*logging_debug_format_suffix*] 69 | # (Optional) Additional data to append to log message when logging level for the message is DEBUG' 70 | # Defaults to $facts['os_service_default'] 71 | # Example: '%(funcName)s %(pathname)s:%(lineno)d' 72 | # 73 | # [*logging_exception_prefix*] 74 | # (Optional) Prefix each line of exception output with this format. 75 | # Defaults to $facts['os_service_default'] 76 | # Example: '%(asctime)s.%(msecs)03d %(process)d ERROR %(name)s %(instance)s' 77 | # 78 | # [*logging_user_identity_format*] 79 | # (Optional) Defines the format string for %(user_identity)s that is used in logging_context_format_string. 80 | # Defaults to $facts['os_service_default'] 81 | # Example: '%(user)s %(tenant)s %(domain)s %(user_domain)s %(project_domain)s' 82 | # 83 | # [*default_log_levels*] 84 | # (Optional) Hash of logger (keys) and level (values) pairs. 85 | # Defaults to $facts['os_service_default'] 86 | # Example: 87 | # { 'amqp' => 'WARN', 'amqplib' => 'WARN', 'boto' => 'WARN', 88 | # 'sqlalchemy' => 'WARN', 'suds' => 'INFO', 'iso8601' => 'WARN', 89 | # 'requests.packages.urllib3.connectionpool' => 'WARN' } 90 | # 91 | # [*publish_errors*] 92 | # (Optional) Enables or disables publication of error events (boolean value). 93 | # Defaults to $facts['os_service_default'] 94 | # 95 | # [*instance_format*] 96 | # (Optional) The format for an instance that is passed with the log message. 97 | # Defaults to $facts['os_service_default'] 98 | # Example: '[instance: %(uuid)s] ' 99 | # 100 | # [*instance_uuid_format*] 101 | # (Optional) The format for an instance UUID that is passed with the log message. 102 | # Defaults to $facts['os_service_default'] 103 | # Example: '[instance: %(uuid)s] ' 104 | # 105 | # [*fatal_deprecations*] 106 | # (Optional) Enables or disables fatal status of deprecations (boolean value). 107 | # Defaults to $facts['os_service_default'] 108 | # 109 | define oslo::log( 110 | $debug = $facts['os_service_default'], 111 | $log_config_append = $facts['os_service_default'], 112 | $log_date_format = $facts['os_service_default'], 113 | $log_file = $facts['os_service_default'], 114 | $log_dir = $facts['os_service_default'], 115 | $use_syslog = $facts['os_service_default'], 116 | $use_journal = $facts['os_service_default'], 117 | $use_json = $facts['os_service_default'], 118 | $syslog_log_facility = $facts['os_service_default'], 119 | $use_stderr = $facts['os_service_default'], 120 | $logging_context_format_string = $facts['os_service_default'], 121 | $logging_default_format_string = $facts['os_service_default'], 122 | $logging_debug_format_suffix = $facts['os_service_default'], 123 | $logging_exception_prefix = $facts['os_service_default'], 124 | $logging_user_identity_format = $facts['os_service_default'], 125 | $default_log_levels = $facts['os_service_default'], 126 | $publish_errors = $facts['os_service_default'], 127 | $instance_format = $facts['os_service_default'], 128 | $instance_uuid_format = $facts['os_service_default'], 129 | $fatal_deprecations = $facts['os_service_default'], 130 | ){ 131 | 132 | $default_log_levels_real = $default_log_levels ? { 133 | Hash => join(sort(join_keys_to_values($default_log_levels, '=')), ','), 134 | Array => join(sort($default_log_levels), ','), 135 | default => $default_log_levels 136 | } 137 | 138 | # NOTE(mwhahaha): oslo.log doesn't like it when debug is not a proper python 139 | # boolean. See LP#1719929 140 | if !is_service_default($debug) { 141 | $debug_real = any2bool($debug) 142 | } else { 143 | $debug_real = $debug 144 | } 145 | 146 | $log_options = { 147 | 'DEFAULT/debug' => { value => $debug_real }, 148 | 'DEFAULT/log_config_append' => { value => $log_config_append }, 149 | 'DEFAULT/log_date_format' => { value => $log_date_format }, 150 | 'DEFAULT/log_file' => { value => $log_file }, 151 | 'DEFAULT/log_dir' => { value => $log_dir }, 152 | 'DEFAULT/use_syslog' => { value => $use_syslog }, 153 | 'DEFAULT/use_journal' => { value => $use_journal }, 154 | 'DEFAULT/use_json' => { value => $use_json }, 155 | 'DEFAULT/syslog_log_facility' => { value => $syslog_log_facility }, 156 | 'DEFAULT/use_stderr' => { value => $use_stderr }, 157 | 'DEFAULT/logging_context_format_string' => { value => $logging_context_format_string }, 158 | 'DEFAULT/logging_default_format_string' => { value => $logging_default_format_string }, 159 | 'DEFAULT/logging_debug_format_suffix' => { value => $logging_debug_format_suffix }, 160 | 'DEFAULT/logging_exception_prefix' => { value => $logging_exception_prefix }, 161 | 'DEFAULT/logging_user_identity_format' => { value => $logging_user_identity_format }, 162 | 'DEFAULT/default_log_levels' => { value => $default_log_levels_real }, 163 | 'DEFAULT/publish_errors' => { value => $publish_errors }, 164 | 'DEFAULT/instance_format' => { value => $instance_format }, 165 | 'DEFAULT/instance_uuid_format' => { value => $instance_uuid_format }, 166 | 'DEFAULT/fatal_deprecations' => { value => $fatal_deprecations }, 167 | } 168 | 169 | create_resources($name, $log_options) 170 | } 171 | -------------------------------------------------------------------------------- /manifests/messaging/default.pp: -------------------------------------------------------------------------------- 1 | # == Define: oslo::messaging::default 2 | # 3 | # Configure oslo DEFAULT messaging options 4 | # 5 | # It will manage the [DEFAULT] section in the given config resource. 6 | # 7 | # === Parameters: 8 | # 9 | # [*executor_thread_pool_size*] 10 | # (Optional) Size of executor thread pool when executor is threading or eventlet. 11 | # Defaults to $facts['os_service_default']. 12 | # 13 | # [*rpc_response_timeout*] 14 | # (Optional) Seconds to wait for a response from a call. (integer value) 15 | # Defaults to $facts['os_service_default']. 16 | # 17 | # [*transport_url*] 18 | # (Optional) A URL representing the messaging driver to use 19 | # and its full configuration. If not set, we fall back to 20 | # the rpc_backend option and driver specific configuration. 21 | # Transport URLs take the form: 22 | # transport://user:pass@host1:port[,hostN:portN]/virtual_host 23 | # (string value) 24 | # Defaults to $facts['os_service_default']. 25 | # 26 | # [*control_exchange*] 27 | # (Optional) The default exchange under which topics are scoped. 28 | # May be overridden by an exchange name specified in the transport_url option. 29 | # (string value) 30 | # Defaults to $facts['os_service_default']. 31 | # 32 | 33 | define oslo::messaging::default( 34 | $executor_thread_pool_size = $facts['os_service_default'], 35 | $rpc_response_timeout = $facts['os_service_default'], 36 | Oslo::TransportURL $transport_url = $facts['os_service_default'], 37 | $control_exchange = $facts['os_service_default'], 38 | ) { 39 | 40 | $default_options = { 41 | 'DEFAULT/executor_thread_pool_size' => { value => $executor_thread_pool_size }, 42 | 'DEFAULT/rpc_response_timeout' => { value => $rpc_response_timeout }, 43 | 'DEFAULT/transport_url' => { value => $transport_url, secret => true }, 44 | 'DEFAULT/control_exchange' => { value => $control_exchange }, 45 | } 46 | 47 | create_resources($name, $default_options) 48 | } 49 | -------------------------------------------------------------------------------- /manifests/messaging/notifications.pp: -------------------------------------------------------------------------------- 1 | # == Define: oslo::messaging::notifications 2 | # 3 | # Configure oslo_messaging_notifications options 4 | # 5 | # This resource configures Oslo Notifications resources for an OpenStack service. 6 | # It will manage the [oslo_messaging_notifications] section in the given config resource. 7 | # 8 | # === Parameters: 9 | # 10 | # [*driver*] 11 | # (Optional) The Driver(s) to handle sending notifications. 12 | # Possible values are messaging, messagingv2, routing, log, test, noop. 13 | # (list value or string value) 14 | # Defaults to $facts['os_service_default']. 15 | # 16 | # [*transport_url*] 17 | # (Optional) A URL representing the messaging driver to use for 18 | # notifications. If not set, we fall back to the same 19 | # configuration used for RPC. 20 | # Transport URLs take the form:: 21 | # transport://user:pass@host1:port[,hostN:portN]/virtual_host 22 | # (string value) 23 | # Defaults to $facts['os_service_default']. 24 | # 25 | # [*topics*] 26 | # (Optional) AMQP topic(s) used for OpenStack notifications 27 | # (list value) 28 | # Defaults to $facts['os_service_default']. 29 | # 30 | # [*retry*] 31 | # (Optional) The maximum number of attempts to re-sent a notification 32 | # message, which failed to be delivered due to a recoverable error. 33 | # Defaults to $facts['os_service_default']. 34 | # 35 | define oslo::messaging::notifications( 36 | $driver = $facts['os_service_default'], 37 | Oslo::TransportURL $transport_url = $facts['os_service_default'], 38 | $topics = $facts['os_service_default'], 39 | $retry = $facts['os_service_default'], 40 | ) { 41 | 42 | # When we have a string value for driver, we keep passing it as string 43 | # to reduce any chance of breaking things in a backwards incompatible way 44 | $driver_real = $driver ? { 45 | String => $driver, 46 | default => any2array($driver) 47 | } 48 | 49 | $topics_real = join(any2array($topics), ',') 50 | 51 | $notification_options = { 52 | 'oslo_messaging_notifications/driver' => { value => $driver_real }, 53 | 'oslo_messaging_notifications/transport_url' => { value => $transport_url, secret => true }, 54 | 'oslo_messaging_notifications/topics' => { value => $topics_real }, 55 | 'oslo_messaging_notifications/retry' => { value => $retry }, 56 | } 57 | 58 | create_resources($name, $notification_options) 59 | } 60 | -------------------------------------------------------------------------------- /manifests/middleware.pp: -------------------------------------------------------------------------------- 1 | # == Define: oslo::middleware 2 | # 3 | # Configure oslo_middleware options 4 | # 5 | # This resource configures oslo.middleware resources for an OpenStack service. 6 | # It will manage the [oslo_middleware] section in the given config resource. 7 | # 8 | # === Parameters: 9 | # 10 | # [*max_request_body_size*] 11 | # (Optional) Make exception message format errors fatal. 12 | # (integer value) 13 | # Defaults to $facts['os_service_default']. 14 | # 15 | # [*enable_proxy_headers_parsing*] 16 | # (Optional) Enables SSL request handling from HTTPProxyToWSGI middleware. 17 | # (boolean value) 18 | # Defaults to $facts['os_service_default']. 19 | # 20 | # [*http_basic_auth_user_file*] 21 | # (Optional) HTTP basic auth password file. 22 | # (string value) 23 | # Defaults to $facts['os_service_default']. 24 | # 25 | define oslo::middleware( 26 | # sizelimit 27 | $max_request_body_size = $facts['os_service_default'], 28 | # http_proxy_to_wsgi 29 | $enable_proxy_headers_parsing = $facts['os_service_default'], 30 | # basic_auth 31 | $http_basic_auth_user_file = $facts['os_service_default'], 32 | ) { 33 | $middleware_options = { 34 | 'oslo_middleware/max_request_body_size' => { value => $max_request_body_size }, 35 | 'oslo_middleware/enable_proxy_headers_parsing' => { value => $enable_proxy_headers_parsing }, 36 | 'oslo_middleware/http_basic_auth_user_file' => { value => $http_basic_auth_user_file }, 37 | } 38 | create_resources($name, $middleware_options) 39 | } 40 | -------------------------------------------------------------------------------- /manifests/os_brick.pp: -------------------------------------------------------------------------------- 1 | # == Define: oslo::os_brick 2 | # 3 | # Configure os_brick options 4 | # 5 | # === Parameters: 6 | # 7 | # [*lock_path*] 8 | # (Optional) Directory to use for os-brick lock files. 9 | # Defaults to $facts['os_service_default'] 10 | # 11 | # [*wait_mpath_device_attempts*] 12 | # (Optional) Number of attempts for the multipath device to be ready for I/O 13 | # after it was created. 14 | # Defaults to $facts['os_service_default'] 15 | # 16 | # [*wait_mpath_device_interval*] 17 | # (Optional) Interval value to wait for multipath device to be ready for I/O. 18 | # Defaults to $facts['os_service_default'] 19 | # 20 | define oslo::os_brick( 21 | $lock_path = $facts['os_service_default'], 22 | $wait_mpath_device_attempts = $facts['os_service_default'], 23 | $wait_mpath_device_interval = $facts['os_service_default'], 24 | ) { 25 | 26 | $os_brick_options = { 27 | 'os_brick/lock_path' => { value => $lock_path }, 28 | 'os_brick/wait_mpath_device_attempts' => { value => $wait_mpath_device_attempts }, 29 | 'os_brick/wait_mpath_device_interval' => { value => $wait_mpath_device_interval }, 30 | } 31 | create_resources($name, $os_brick_options) 32 | } 33 | -------------------------------------------------------------------------------- /manifests/params.pp: -------------------------------------------------------------------------------- 1 | # ==Class: oslo::params 2 | # 3 | # Parameters for puppet-oslo 4 | # 5 | class oslo::params { 6 | include openstacklib::defaults 7 | 8 | $pylibmc_package_name = 'python3-pylibmc' 9 | 10 | case $facts['os']['family'] { 11 | 'RedHat': { 12 | $pymysql_package_name = undef 13 | $python_memcache_package_name = 'python3-memcached' 14 | $python_bmemcached_package_name = 'python3-binary-memcached' 15 | $python_pymemcache_package_name = 'python3-pymemcache' 16 | $python_redis_package_name = 'python3-redis' 17 | $python_etcd3gw_package_name = 'python3-etcd3gw' 18 | $python_kazoo_package_name = 'python3-kazoo' 19 | $oslo_reports_package_name = 'python3-oslo-reports' 20 | } 21 | 'Debian': { 22 | $pymysql_package_name = 'python3-pymysql' 23 | $python_memcache_package_name = 'python3-memcache' 24 | $python_bmemcached_package_name = 'python3-binary-memcached' 25 | $python_pymemcache_package_name = 'python3-pymemcache' 26 | $python_redis_package_name = 'python3-redis' 27 | $python_etcd3gw_package_name = 'python3-etcd3gw' 28 | $python_kazoo_package_name = 'python3-kazoo' 29 | $oslo_reports_package_name = 'python3-oslo.reports' 30 | } 31 | default: { 32 | fail("Unsupported osfamily: ${facts['os']['family']}") 33 | } 34 | 35 | } # Case $facts['os']['family'] 36 | } 37 | -------------------------------------------------------------------------------- /manifests/policy.pp: -------------------------------------------------------------------------------- 1 | # == Define: oslo::policy 2 | # 3 | # Configure oslo_policy options 4 | # 5 | # This resource configures Oslo policy resources for an OpenStack service. 6 | # It will manage the [oslo_policy] section in the given config resource. 7 | # 8 | # === Parameters: 9 | # 10 | # [*enforce_scope*] 11 | # (Optional) Whether or not to enforce scope when evaluating policies. 12 | # Defaults to $facts['os_service_default']. 13 | # 14 | # [*enforce_new_defaults*] 15 | # (Optional) Whether or not to use old deprecated defaults when evaluating 16 | # policies. 17 | # Defaults to $facts['os_service_default']. 18 | # 19 | # [*policy_file*] 20 | # (Optional) The JSON file that defines policies. (string value) 21 | # Defaults to $facts['os_service_default']. 22 | # 23 | # [*policy_default_rule*] 24 | # (Optional) Default rule. Enforced when a requested rule is not found. 25 | # (string value) 26 | # Defaults to $facts['os_service_default']. 27 | # 28 | # [*policy_dirs*] 29 | # (Optional) Directories where policy configuration files are stored. 30 | # They can be relative to any directory in the search path defined by 31 | # the config_dir option, or absolute paths. 32 | # The file defined by policy_file must exist for these directories to be searched. 33 | # Missing or empty directories are ignored. (list value) 34 | # Defaults to $facts['os_service_default']. 35 | # 36 | define oslo::policy( 37 | $enforce_scope = $facts['os_service_default'], 38 | $enforce_new_defaults = $facts['os_service_default'], 39 | $policy_file = $facts['os_service_default'], 40 | $policy_default_rule = $facts['os_service_default'], 41 | $policy_dirs = $facts['os_service_default'], 42 | ) { 43 | 44 | $policy_options = { 45 | 'oslo_policy/enforce_scope' => { value => $enforce_scope }, 46 | 'oslo_policy/enforce_new_defaults' => { value => $enforce_new_defaults }, 47 | 'oslo_policy/policy_file' => { value => $policy_file }, 48 | 'oslo_policy/policy_default_rule' => { value => $policy_default_rule }, 49 | 'oslo_policy/policy_dirs' => { value => $policy_dirs }, 50 | } 51 | 52 | create_resources($name, $policy_options) 53 | } 54 | -------------------------------------------------------------------------------- /manifests/privsep.pp: -------------------------------------------------------------------------------- 1 | # == Define: oslo::privsep 2 | # 3 | # Configure oslo_privsep options 4 | # 5 | # This resource configures Oslo privilege separator resources for an OpenStack service. 6 | # It will manage the [privsep_${entrypoint}] section in the given config resource. 7 | # 8 | # === Parameters: 9 | # 10 | # [*entrypoint*] 11 | # (Required) Privsep entrypoint. (string value) 12 | # Defaults to $name. 13 | # 14 | # [*config*] 15 | # (Required) Configuration file to manage. (string value) 16 | # 17 | # [*config_group*] 18 | # (Optional) Name of the section in which the parameters are set. 19 | # (string value) 20 | # Defaults to "privsep_${entrypoint}" 21 | # 22 | # [*user*] 23 | # (Optional) User that the privsep daemon should run as. (string value) 24 | # Defaults to $facts['os_service_default']. 25 | # 26 | # [*group*] 27 | # (Optional) Group that the privsep daemon should run as. (string value) 28 | # Defaults to $facts['os_service_default']. 29 | # 30 | # [*capabilities*] 31 | # (Optional) List of Linux capabilities retained by the privsep daemon. 32 | # (list value) 33 | # Defaults to $facts['os_service_default']. 34 | # 35 | # [*thread_pool_size*] 36 | # (Optional) The number of threads available for privsep to concurrently 37 | # run processes. 38 | # Defaults to $facts['os_service_default']. 39 | # 40 | # [*helper_command*] 41 | # (Optional) Command to invoke to start the privsep daemon if not using 42 | # the "fork" method. If not specified, a default is generated using 43 | # "sudo privsep-helper" and arguments designed to recreate the current 44 | # configuration. This command must accept suitable --privsep_context and 45 | # --privsep_sock_path arguments. 46 | # Defaults to $facts['os_service_default']. 47 | # 48 | # [*logger_name*] 49 | # (Optional) Logger name to use for this privsep context. 50 | # Defaults to $facts['os_service_default']. 51 | # 52 | # == Examples 53 | # 54 | # oslo::privsep { 'osbrick': 55 | # config => 'nova_config' 56 | # } 57 | # 58 | define oslo::privsep ( 59 | $config, 60 | $entrypoint = $name, 61 | $config_group = "privsep_${entrypoint}", 62 | $user = $facts['os_service_default'], 63 | $group = $facts['os_service_default'], 64 | $capabilities = $facts['os_service_default'], 65 | $thread_pool_size = $facts['os_service_default'], 66 | $helper_command = $facts['os_service_default'], 67 | $logger_name = $facts['os_service_default'], 68 | ) { 69 | 70 | $privsep_options = { 71 | "${config_group}/user" => { value => $user }, 72 | "${config_group}/group" => { value => $group }, 73 | "${config_group}/capabilities" => { value => $capabilities }, 74 | "${config_group}/thread_pool_size" => { value => $thread_pool_size }, 75 | "${config_group}/helper_command" => { value => $helper_command }, 76 | "${config_group}/logger_name" => { value => $logger_name }, 77 | } 78 | 79 | create_resources($config, $privsep_options) 80 | } 81 | -------------------------------------------------------------------------------- /manifests/reports.pp: -------------------------------------------------------------------------------- 1 | # == Define: oslo::reports 2 | # 3 | # Configure oslo_reports options 4 | # 5 | # === Parameters 6 | # 7 | # [*config*] 8 | # (Optional) The resource type used to apply configuration parameters. 9 | # Defaults to $name 10 | # 11 | # [*log_dir*] 12 | # (Optional) Path to a log directory where to create a file 13 | # Defaults to $facts['os_service_default'] 14 | # 15 | # [*file_event_handler*] 16 | # (Optional) The path to a file to watch for changes to trigger the reports. 17 | # Defaults to $facts['os_service_default'] 18 | # 19 | # [*file_event_handler_interval*] 20 | # (Optional) How many seconds to wait between pools when file_event_handler 21 | # is set. 22 | # Defaults to $facts['os_service_default'] 23 | # 24 | # [*package_ensure*] 25 | # (Optional) ensure state for package. 26 | # Defaults to 'present' 27 | # 28 | # [*manage_package*] 29 | # (Optional) Manage oslo.reports package. 30 | # Defaults to false 31 | # 32 | define oslo::reports( 33 | $config = $name, 34 | $log_dir = $facts['os_service_default'], 35 | $file_event_handler = $facts['os_service_default'], 36 | $file_event_handler_interval = $facts['os_service_default'], 37 | $package_ensure = 'present', 38 | Boolean $manage_package = false, 39 | ) { 40 | 41 | include oslo::params 42 | 43 | $oslo_reports_options = { 44 | 'oslo_reports/log_dir' => { value => $log_dir }, 45 | 'oslo_reports/file_event_handler' => { value => $file_event_handler }, 46 | 'oslo_reports/file_event_handler_interval' => { value => $file_event_handler_interval }, 47 | } 48 | 49 | if $manage_package { 50 | ensure_packages( 'oslo.reports', { 51 | name => $::oslo::params::oslo_reports_package_name, 52 | ensure => $package_ensure, 53 | tag => ['openstack'], 54 | }) 55 | } 56 | 57 | create_resources($config, $oslo_reports_options) 58 | } 59 | -------------------------------------------------------------------------------- /manifests/service.pp: -------------------------------------------------------------------------------- 1 | # == Define: oslo::service 2 | # 3 | # Configure oslo_service options 4 | # 5 | # This resource configures common parameters of oslo.service library 6 | # 7 | # === Parameters: 8 | # 9 | # [*backdoor_port*] 10 | # (optional) Enable eventlet backdoor. Acceptable values are 0, , and 11 | # :, where 0 results in listening on a random tcp port number. 12 | # Defaults to $facts['os_service_default']. 13 | # 14 | # [*backdoor_socket*] 15 | # (optional) Enable eventlet backdoor, using the provided path as a unix 16 | # socket that can receive connections. (string value) 17 | # Defaults to $facts['os_service_default']. 18 | # 19 | # [*graceful_shutdown_timeout*] 20 | # (optional) Specify a timeout after which a gracefully shutdown server will 21 | # exit. '0' value means endless wait. (integer value) 22 | # Defaults to $facts['os_service_default']. 23 | # 24 | # [*log_options*] 25 | # (optional) Enables or disables logging values of all registered options 26 | # when starting a service (at DEBUG level). (boolean value) 27 | # Defaults to $facts['os_service_default']. 28 | # 29 | # [*run_external_periodic_tasks*] 30 | # (optional) Some periodic tasks can be run in a separate process. 31 | # (boolean value) 32 | # Defaults to $facts['os_service_default']. 33 | # 34 | define oslo::service ( 35 | $backdoor_port = $facts['os_service_default'], 36 | $backdoor_socket = $facts['os_service_default'], 37 | $graceful_shutdown_timeout = $facts['os_service_default'], 38 | $log_options = $facts['os_service_default'], 39 | $run_external_periodic_tasks = $facts['os_service_default'], 40 | ) { 41 | 42 | $service_options = { 43 | 'DEFAULT/backdoor_port' => { value => $backdoor_port }, 44 | 'DEFAULT/backdoor_socket' => { value => $backdoor_socket }, 45 | 'DEFAULT/graceful_shutdown_timeout' => { value => $graceful_shutdown_timeout }, 46 | 'DEFAULT/log_options' => { value => $log_options }, 47 | 'DEFAULT/run_external_periodic_tasks' => { value => $run_external_periodic_tasks }, 48 | } 49 | 50 | create_resources($name, $service_options) 51 | } 52 | -------------------------------------------------------------------------------- /manifests/service/ssl.pp: -------------------------------------------------------------------------------- 1 | # == Define: oslo::service::ssl 2 | # 3 | # Configure oslo_service options 4 | # 5 | # This resource configures ssl parameters of oslo.service library 6 | # 7 | # === Parameters: 8 | # 9 | # [*ca_file*] 10 | # (optional) CA certificate file to use to verify connecting clients. 11 | # (string value) 12 | # Defaults to $facts['os_service_default']. 13 | # 14 | # [*cert_file*] 15 | # (optional) Certificate file to use when starting the server securely. 16 | # (string value) 17 | # Defaults to $facts['os_service_default']. 18 | # 19 | # [*ciphers*] 20 | # (optional) Sets the list of available ciphers. value should be a string 21 | # in the OpenSSL cipher list format. (string value) 22 | # Defaults to $facts['os_service_default']. 23 | # 24 | # [*key_file*] 25 | # (optional) Private key file to use when starting the server securely. 26 | # (string value) 27 | # Defaults to $facts['os_service_default']. 28 | # 29 | # [*version*] 30 | # (optional) SSL version to use (valid only if SSL enabled). Valid values are 31 | # TLSv1 and SSLv23. SSLv2, SSLv3, TLSv1_1, and TLSv1_2 may be available on 32 | # some distributions. (string value) 33 | # Defaults to $facts['os_service_default']. 34 | # 35 | define oslo::service::ssl ( 36 | $ca_file = $facts['os_service_default'], 37 | $cert_file = $facts['os_service_default'], 38 | $ciphers = $facts['os_service_default'], 39 | $key_file = $facts['os_service_default'], 40 | $version = $facts['os_service_default'], 41 | ) { 42 | 43 | if is_service_default($cert_file) != is_service_default($key_file) { 44 | fail('Both of cert_file and key_file should be set or unset.') 45 | } 46 | 47 | $service_options = { 48 | 'ssl/ca_file' => { value => $ca_file }, 49 | 'ssl/cert_file' => { value => $cert_file }, 50 | 'ssl/ciphers' => { value => join(any2array($ciphers), ':') }, 51 | 'ssl/key_file' => { value => $key_file }, 52 | 'ssl/version' => { value => $version }, 53 | } 54 | 55 | create_resources($name, $service_options) 56 | } 57 | -------------------------------------------------------------------------------- /manifests/service/wsgi.pp: -------------------------------------------------------------------------------- 1 | # == Define: oslo::service::wsgi 2 | # 3 | # Configure oslo_service options 4 | # 5 | # This resource configures wsgi service parameters of oslo.service library. 6 | # 7 | # === Parameters: 8 | # 9 | # [*api_paste_config*] 10 | # (optional) File name for the paste.deploy config for api service. 11 | # (string value) 12 | # Defaults to $facts['os_service_default']. 13 | # 14 | # [*client_socket_timeout*] 15 | # (optional) Timeout for client connections' socket operations. A value of 16 | # '0' means wait forever. (integer value) 17 | # Defaults to $facts['os_service_default']. 18 | # 19 | # [*max_header_line*] 20 | # (optional) Maximum line size of message headers to be accepted. 21 | # (integer value) 22 | # Defaults to $facts['os_service_default']. 23 | # 24 | # [*tcp_keepidle*] 25 | # (optional) # Sets the value of TCP_KEEPIDLE in seconds for each server socket. 26 | # (integer value) 27 | # Defaults to $facts['os_service_default']. 28 | # 29 | # [*wsgi_default_pool_size*] 30 | # (optional) Size of the pool of greenthreads used by wsgi (integer value) 31 | # Defaults to $facts['os_service_default']. 32 | # 33 | # [*wsgi_keep_alive*] 34 | # (optional) If False, closes the client socket connection explicitly. 35 | # (boolean value) 36 | # Defaults to $facts['os_service_default']. 37 | # 38 | # [*wsgi_log_format*] 39 | # (optional) A python format string that is used as the template to generate 40 | # log lines. (string value) 41 | # Defaults to $facts['os_service_default']. 42 | # Example: '%(client_ip)s "%(request_line)s" status: %(status_code)s len: \ 43 | # %(body_length)s time: %(wall_seconds).7f' 44 | # 45 | define oslo::service::wsgi ( 46 | $api_paste_config = $facts['os_service_default'], 47 | $client_socket_timeout = $facts['os_service_default'], 48 | $max_header_line = $facts['os_service_default'], 49 | $tcp_keepidle = $facts['os_service_default'], 50 | $wsgi_default_pool_size = $facts['os_service_default'], 51 | $wsgi_keep_alive = $facts['os_service_default'], 52 | $wsgi_log_format = $facts['os_service_default'], 53 | ) { 54 | 55 | $service_options = { 56 | 'DEFAULT/api_paste_config' => { value => $api_paste_config }, 57 | 'DEFAULT/client_socket_timeout' => { value => $client_socket_timeout }, 58 | 'DEFAULT/max_header_line' => { value => $max_header_line }, 59 | 'DEFAULT/tcp_keepidle' => { value => $tcp_keepidle }, 60 | 'DEFAULT/wsgi_default_pool_size' => { value => $wsgi_default_pool_size }, 61 | 'DEFAULT/wsgi_keep_alive' => { value => $wsgi_keep_alive }, 62 | 'DEFAULT/wsgi_log_format' => { value => $wsgi_log_format }, 63 | } 64 | 65 | create_resources($name, $service_options) 66 | } 67 | -------------------------------------------------------------------------------- /manifests/versionedobjects.pp: -------------------------------------------------------------------------------- 1 | # == Define: oslo::versionedobjects 2 | # 3 | # Configure oslo_versionedobjects options 4 | # 5 | # This resource configures oslo.versionedobjects resources for an OpenStack service. 6 | # It will manage the [oslo_versionedobjects] section in the given config resource. 7 | # 8 | # === Parameters: 9 | # 10 | # [*fatal_exception_format_errors*] 11 | # (Optional) Make exception message format errors fatal. (boolean value) 12 | # Defaults to $facts['os_service_default']. 13 | # 14 | define oslo::versionedobjects( 15 | $fatal_exception_format_errors = $facts['os_service_default'], 16 | ) { 17 | create_resources($name, {'oslo_versionedobjects/fatal_exception_format_errors' => { value => $fatal_exception_format_errors }}) 18 | } 19 | -------------------------------------------------------------------------------- /metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": "OpenStack Contributors", 3 | "dependencies": [ 4 | { 5 | "name": "puppetlabs/stdlib", 6 | "version_requirement": ">=5.0.0 <10.0.0" 7 | }, 8 | { 9 | "name": "openstack/openstacklib", 10 | "version_requirement": ">=26.0.0 <27.0.0" 11 | } 12 | ], 13 | "description": "Installs and configures OpenStack Oslo.", 14 | "issues_url": "https://bugs.launchpad.net/puppet-oslo", 15 | "license": "Apache-2.0", 16 | "name": "openstack-oslo", 17 | "operatingsystem_support": [ 18 | { 19 | "operatingsystem": "Debian", 20 | "operatingsystemrelease": [ 21 | "12" 22 | ] 23 | }, 24 | { 25 | "operatingsystem": "RedHat", 26 | "operatingsystemrelease": [ 27 | "9" 28 | ] 29 | }, 30 | { 31 | "operatingsystem": "CentOS", 32 | "operatingsystemrelease": [ 33 | "9" 34 | ] 35 | }, 36 | { 37 | "operatingsystem": "Ubuntu", 38 | "operatingsystemrelease": [ 39 | "24.04" 40 | ] 41 | } 42 | ], 43 | "project_page": "https://launchpad.net/puppet-oslo", 44 | "requirements": [ 45 | { 46 | "name": "puppet", 47 | "version_requirement": ">= 7.0.0 < 9.0.0" 48 | } 49 | ], 50 | "source": "https://opendev.org/openstack/puppet-oslo.git", 51 | "summary": "Puppet module for OpenStack Oslo", 52 | "version": "26.0.0" 53 | } 54 | -------------------------------------------------------------------------------- /releasenotes/notes/Add-use_journal-option-for-logging-e8182a1cd944ef59.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | Adds the use_journal option for configuring oslo.log. This will enable 5 | passing the logs to journald. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/add_executor_thread_pool_size-1382ff07a6808402.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - Add possibility to configure the size of executor thread pool. 4 | -------------------------------------------------------------------------------- /releasenotes/notes/add_keepalive_options-3802510b6d4461e1.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | Add socket keepalive options for the pymemcache (dogpile.cache) backend. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/add_mysql_enable_ndb-option-8b82c371ad16245a.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | Add mysql_enable_ndb parameter to select mysql storage engine. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/add_oslo_privsep-3f125445bce8b431.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - Add oslo::privsep define to configure privsep_${entrypoint} section 4 | of given config resource. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/add_tls_options-9010fc5eab23dfe7.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | Add TLS options to oslo.cache 5 | -------------------------------------------------------------------------------- /releasenotes/notes/add_zmq_messaging-7ea20df747c78035.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - Add possibility to configure ZeroMQ messaging system. 4 | -------------------------------------------------------------------------------- /releasenotes/notes/amqp_auto_delete-e2734589468a98a2.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | A new parameter ``amqp_auto_delete`` has been added to allow automatic 5 | deletion of transient queues. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/backend_package_ensure-54b4525895ce9acd.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - Allow setting the desired state of the backend 4 | database package. This will default to present 5 | which maintains original behavior but allows 6 | for more flexibility. 7 | -------------------------------------------------------------------------------- /releasenotes/notes/barbican_service_user-a8ac0abd364927d8.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The following parameter and resource type have been added, to support usage 5 | of the service token feature with the Barbican key manager. 6 | 7 | - The ``oslo::key_manager::barbican::send_service_user_token`` parameter 8 | - The ``oslo::key_manager::barbican::service_user`` resource type 9 | -------------------------------------------------------------------------------- /releasenotes/notes/basic-auth-middleware-64bf02c8f2a710f6.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The new ``oslo::middleware::http_basic_auth_userfile`` parameter has been 5 | added. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/bug-1988205-973ce17f355cbfce.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | Now the ``oslo::cache`` defined resource type installs 5 | the pymemcache library when pymemcache backend is used. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/cache-backend-expiration-time-78bd3c1ebb3ab7c5.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The new ``oslo::cache::backend_expiration_time`` parameter has been added. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/cache-memcache-sasl-af31b10afe7ce93a.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The ``oslo::cache`` defined resource type now supports options to allow 5 | memcached with SASL enabled. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/cache-memcache_pool_flush_on_reconnect-ef097a16a54d9fac.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The new ``oslo::cache::memcache_pool_flush_on_reconnect`` parameter has 5 | been added. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/cache-package_ensure-a9d500c5681a664f.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The new ``oslo::cache::package_ensure`` parameter has been added. This 5 | parameter defines status of the backend package used. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/cache-redis-opts-48e5d9aed33f3318.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The ``oslo::cache`` defined resource type now supports the following new 5 | options for Redis backend and Redis Sentinel backend. 6 | 7 | - ``redis_server`` 8 | - ``redis_username`` 9 | - ``redis_password`` 10 | - ``redis_sentinels`` 11 | - ``redis_socket_timeout`` 12 | - ``redis_sentinel_service_name`` 13 | -------------------------------------------------------------------------------- /releasenotes/notes/centos-9-support-17ad74c0169c5096.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | Now this module supports CentOS 9 and Red Hat Enterprise Linux 9. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/coordination-aef87a77189200f1.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The new ``oslo::coordination`` resource type has been added. This manages 5 | parameters for coordination which is implemented in the tooz library and 6 | backend packages required for each drivers. 7 | -------------------------------------------------------------------------------- /releasenotes/notes/coordination-deprecate-etcd3-2511b454b2b5e58c.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | deprecations: 3 | - | 4 | Support of the etcd3 driver by ``oslo::coordination`` has been deprecated, 5 | because the driver has been deprecated. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/coordination-manage_backend_package-d6cc78682827d2df.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The ``oslo::coordination::manage_backend_package`` parameter has been 5 | added. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/deprecate-amqp1-driver-18eae241ab01b487.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | deprecations: 3 | - | 4 | Support for the amqp1 driver has been deprecated and will be removed in 5 | a future release. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/deprecate-db-use_tpool-d4897027d3fcf788.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | deprecations: 3 | - | 4 | The ``oslo::db::use_tpool`` parameter has been deprecated and will be 5 | removed in a future release. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/deprecate-heartbeat_in_pthread-7f8afe949faaac23.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | deprecations: 3 | - | 4 | The ``oslo::messaging::rabbit::heartbeat_in_pthread`` parameter has been 5 | deprecated and will be removed in a future release. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/deprecate-oslo_config-fcd5be0a4c358ba3.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | deprecations: 3 | - | 4 | The ``oslo_config`` resource has been deprecated and will be removed in a 5 | future release. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/deprecate-watch_log_file-255b789d22db61ee.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The ``oslo::logging::watch_log_file`` parameter has been deprecated and 5 | has no effect now. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/deprecate-zeromq-0200b6efd57feb5d.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | The oslo::messaging::zeromq class has no effect so you much use another 5 | messaging provider such as rabbitmq. 6 | deprecations: 7 | - | 8 | The oslo::messaging::zeromq class is deprecated and has no effect. 9 | -------------------------------------------------------------------------------- /releasenotes/notes/deprecate_allow_insecure_clients-option-bca936c587b71a40.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | deprecations: 3 | - allow_insecure_clients option is now deprecated for removal, the 4 | parameter has no effect. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/deprecate_config_sqlite_db-1a239175d42378e3.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | deprecations: 3 | - | 4 | The configuration option ``sqlite_db`` is now deprecated and 5 | will be removed in the future. Please use configuration 6 | option ``connection`` or ``slave_connection`` to connect to the database. 7 | 8 | -------------------------------------------------------------------------------- /releasenotes/notes/deprecate_database_min_pool_size-option-854fd8fed2229651.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | deprecations: 3 | - min_pool_size option is now deprecated for removal, the 4 | parameter has no effect. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/deprecate_idle_timeout_parameter-90814e13548fd549.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | deprecations: 3 | - db::idle_timeout is deprecated and will be removed in a future 4 | release. Please use db::connection_recycle_time instead. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/deprecate_rabbit_max_retries-813a568923f2335d.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | deprecations: 3 | - | 4 | The configuration option ``rabbit_max_retries`` is now deprecated and 5 | will be removed in the future. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/drop-fedora-d4df1af521d28163.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | Fedora is no longer supported. -------------------------------------------------------------------------------- /releasenotes/notes/ensure-log-debug-is-boolean-ca20c1b14f5774e7.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | Bump minimum version of puppetlabs-stdlib to 4.13.0 as we are using the 5 | any2bool function. 6 | fixes: 7 | - | 8 | oslo.log fails if the debug setting is the configuration file is not a 9 | boolean. So we've added boolean conversion to the setting to ensure that 10 | we are either passing a proper boolean or $::os_service_default. We are 11 | leveraging puppetlabs-stdlib any2bool for the conversion. LP#1719929 12 | -------------------------------------------------------------------------------- /releasenotes/notes/first_release-a7268e1c8959eca3.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | prelude: > 3 | First release of puppet-oslo. 4 | -------------------------------------------------------------------------------- /releasenotes/notes/fix_log_dir_documentation-050052366584e83e.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fixes: 3 | - Fixed documentation for log_dir parameter 4 | -------------------------------------------------------------------------------- /releasenotes/notes/hc-enable_by_file_paths-e5594b85140cf449.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The new ``oslo::healthcheck::enable_by_file_paths`` parameter has been 5 | added. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/healthcheck-allowed_source_ranges-63562e58d1a96e74.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The ``oslo::healthcheck::allowed_source_ranges`` parameter has been added. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/healthcheck-ignore_proxied_requests-1c64c62f261882c9.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The new ``oslo::ignore_proxied_requests`` parameter has been added. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/healthcheck-middleware-c254827e460e7443.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | Support for options of healthcheck middleware has been added. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/log-json-70816c646023e567.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | Expose use_json logging parameter, which enables JSON formatted logging. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/memcache_socket_timeout-9daa8981f42caf41.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | `memcache_socket_timeout` is changed to float value. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/messaging-notification-retry-4080762ebe815271.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The new ``oslo::messaging::notification::retry`` parameter has been added. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/os-brick-wait_mpath_device-1a7a06c717fb1fc6.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The following parameters have been added to the ``oslo::os_brick`` defined 5 | resource type. 6 | 7 | - ``wait_mpath_device_attempts`` 8 | - ``wait_mpath_device_interval`` 9 | -------------------------------------------------------------------------------- /releasenotes/notes/os_brick-444b69e1384bc260.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The new ``oslo::os_brick`` defined resource type has been added. This can 5 | be used to manage the ``[os_brick]`` options provided by the ``os-brick`` 6 | library. 7 | -------------------------------------------------------------------------------- /releasenotes/notes/oslo-db-config-group-4502ce93406f57b4.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | Added new parameter oslo::db::config_group that can be used to tell the 5 | oslo::db resource in which config section in the configuration file it 6 | should set the oslo.db specific database options. This doesn't change any 7 | existing behavior and the default value is ``database``, this is to support 8 | services like Placement that reads database config from ``placement_database`` 9 | group. 10 | -------------------------------------------------------------------------------- /releasenotes/notes/oslo-db-type-50bc9f614d50689a.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | Added new Oslo::Dbconn data type that can be used to validate 5 | a database connection pattern. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/oslo-limit-opts-4ec9fa3880a991f4.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The new ``oslo::limit`` resource type has been added. This manages 5 | parameters of the ``oslo.limit`` library. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/oslo-limit-query-endpoint-options-c85c4542bc678217.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The following parameters have been added to the ``oslo::limit`` defined 5 | resource type. 6 | 7 | - ``endpoint_service_name`` 8 | - ``endpoint_service_type`` 9 | - ``endpoint_region_name`` 10 | - ``endpoint_interface`` 11 | -------------------------------------------------------------------------------- /releasenotes/notes/oslo-privsep-section-f577879ae1dba66c.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The new ``oslo::privsep::config_group`` parameter has been added. This 5 | parameter can be used to add parameters to the section different from 6 | the default ``privsep_${entrypoint}`` section. 7 | -------------------------------------------------------------------------------- /releasenotes/notes/oslo_policy-enforce_scope-a65d9a5e538a05e6.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The new ``oslo::policy::enforce_scope`` parameter has been added to support 5 | the corresponding parameter in oslo.policy library. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/oslo_reports-12002edb359451c8.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | Support for parameters of the oslo.reports library has been added. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/policy-enforce_new_defaults-f033a2b395abb924.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The new ``oslo:::policy::enforce_new_defaults`` parameter has been added. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/postgresql-590a36045748761a.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - allow to specify a full dbname+drivername:// 4 | protocol URL for postgresql databases. 5 | 6 | -------------------------------------------------------------------------------- /releasenotes/notes/privsep-opts-d3d12d20281a0ee5.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The ``oslo::privsep`` defined resource type now supports 5 | the ``thread_pool_size`` parameter and the ``logger_name`` parameter. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/puppet-8-fb094942670c2b58.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | This module now officially supports Puppet 8. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/pymemcache_hashclient_retrying-10a756708ad9894b.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | Add options to configure pymemcache's HashClient retrying mechanisms 5 | (dogpile.cache) backend. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/pymemcache_retrying-4fa326e3bc913a97.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | Add retrying options for pymemcache (dogpile.cache) backend. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/rabbit-queue-manager-a2ee5b50b6c46615.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The ``oslo::messaging::rabbit`` defined resource type now supports options 5 | for queue manager feature. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/rabbit-quorum-queue-86ab6394546356a9.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The ``oslo::messaging::rabbit`` defined resource type now supports options 5 | for quorum queues in RabbitMQ. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/rabbit_stream_fanout-4f916e1821642b08.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The new ``oslo::messaging::rabbit::rabbit_stream_fanout`` parmaeter has 5 | been added. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/rabbit_transient_quorum_queue-dc8393c75feb5046.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The new ``oslo::messaging::rabbit::rabbit_transient_quorum_queue`` 5 | parameter has been added. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/rabbitmq-enable_cancel_on_failover-267c874b7d4df486.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The new ``oslo::messaging::rabbitmq::enable_cancel_on_failover`` parameter 5 | has been added. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/rabbitmq-heartbeat-over-pthread-bc86d8b3a2154613.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | Allow users to run the RabbitMQ AMQP heartbeat over a native python thread 5 | in the oslo.messaging RabbitMQ driver, by using the `heartbeat_in_pthread` 6 | option in configuration. 7 | -------------------------------------------------------------------------------- /releasenotes/notes/release-note-ubuntu-py3-efe7fb76645d4dab.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | prelude: > 3 | In this release Ubuntu has moved all projects that supported it to python3 4 | which means that there will be a lot of changes. The Puppet OpenStack project 5 | does not test the upgrade path from python2 to python3 packages so there might 6 | be manual steps required when moving to the python3 packages. 7 | upgrade: 8 | - | 9 | Ubuntu packages are now using python3, the upgrade path is not tested by 10 | Puppet OpenStack. Manual steps may be required when upgrading. 11 | -------------------------------------------------------------------------------- /releasenotes/notes/remove-allow_insecure_clients-f722cf425ec452d4.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | The ``allow_insecure_clients`` parameter of 5 | the ``oslo::messaging::amqp`` defined resource type has been removed. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/remove-amqp1-3101b26cef9b15fb.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | Support for amqp1 messaging driver has been removed. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/remove-centos-8-30c2edf7b40138d4.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | CentOS 8 Stream is no longer supported by this module. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/remove-db-idel_timeout-ce2e23c94ddc58ea.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | The ``oslo::db::idel_timeout`` parameter has been removed. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/remove-db-min_pool_size-425afb5b6d6fd188.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | The ``oslo::db::min_pool_size`` parameter has been removed. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/remove-db-use_tpool-35c9d76af145c18e.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | The deprecated ``oslo::db::use_tpool`` parameter has been removed. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/remove-deprecated-rabbit-options-212b21d41e6d2808.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | prelude: > 3 | If you relied on the now removed rabbit_hosts parameters to set rabbit_ha_queues 4 | to true automatically when you configured multiple hosts you must now explicitly 5 | set it to true. 6 | upgrade: 7 | - | 8 | The deprecated options rabbit_host, rabbit_port, rabbit_hosts, rabbit_userid, 9 | rabbit_password and rabbit_virtual_host in oslo::messaging::rabbit has been 10 | removed. Please use the transport_url in oslo::messaging::default instead. 11 | - | 12 | If you relied on the now removed rabbit_hosts parameters to set rabbit_ha_queues 13 | to true automatically when you configured multiple hosts you must now explicitly 14 | set it to true. 15 | -------------------------------------------------------------------------------- /releasenotes/notes/remove-mongo-01c0895a76175bb4.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | The ``oslo::db`` defined resource type no longer supports MongoDB backend. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/remove-oslo_config-ee4c8b63e4226a46.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | The ``oslo_config`` resource has been removed. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/remove-puppet-6-c5ee67b4060a6c5a.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | Puppet 6 is no longer supported. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/remove-watch_log_file-0949dfc2300af8e4.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | The ``oslo::log::watch_log_file`` parameter has been removed. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/remove-zeromq-826ce00eea673739.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | deprecations: 3 | - | 4 | The deprecated support for ZeroMQ has been removed. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/remove_deprecated_rabbit_max_retries_option-86f90600cb43f6c1.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - Deprecated rabbit_max_retries option has been removed. 4 | -------------------------------------------------------------------------------- /releasenotes/notes/remove_sqlite_db-8703ae2068157637.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - Deprecated sqlite_db option has been removed. 4 | -------------------------------------------------------------------------------- /releasenotes/notes/remove_verbose-0b599cd4810a8c51.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | other: 3 | - The verbose option was marked to be removed in Ocata, 4 | in Newton the option was deprecated. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/secure-transport-url-d67d307cf85a16b1.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | security: 3 | - Secure transport_url option in logs 4 | -------------------------------------------------------------------------------- /releasenotes/notes/service-split-31d614b24cf43a7c.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | The ``oslo::service`` defined type has been splitted to the following three 5 | defined types. 6 | 7 | - ``oslo::service`` to manage common service parameters 8 | - ``oslo::service::ssl`` to manage ssl parameters 9 | - ``oslo::service::wsgi`` to manage wsgi service parameters 10 | -------------------------------------------------------------------------------- /releasenotes/notes/system_scope-barbican_service_user-3e9cba1bba4f22b8.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The ``oslo::key_manager::barbican::service_user`` resource type now 5 | supports the ``system_scope`` parameter. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/system_scope-keystone-limit-422cbeee81ba84c5.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The ``system_scope`` parameter has been added to the ``oslo::limit`` 5 | resource type. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/ubuntu-jammy-218197b44e6c915a.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | This module now supports Ubuntu 22.04 (Jammy Jellyfish). 5 | 6 | upgrade: 7 | - | 8 | This module no longer supports Ubuntu 20.04 (Focal Fossa). 9 | -------------------------------------------------------------------------------- /releasenotes/notes/ubuntu-noble-8854795cecbe1e62.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | Ubuntu 24.04 is now formally supported. 5 | 6 | upgrade: 7 | - | 8 | Ubuntu 22.04 is no longer supported. 9 | -------------------------------------------------------------------------------- /releasenotes/notes/update-amqp-opts-1f14b8d3648b2b30.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - Add new configuration options for amqp 1.0 messaging driver 4 | -------------------------------------------------------------------------------- /releasenotes/source/2023.1.rst: -------------------------------------------------------------------------------- 1 | =========================== 2 | 2023.1 Series Release Notes 3 | =========================== 4 | 5 | .. release-notes:: 6 | :branch: unmaintained/2023.1 7 | -------------------------------------------------------------------------------- /releasenotes/source/2023.2.rst: -------------------------------------------------------------------------------- 1 | =========================== 2 | 2023.2 Series Release Notes 3 | =========================== 4 | 5 | .. release-notes:: 6 | :branch: stable/2023.2 7 | -------------------------------------------------------------------------------- /releasenotes/source/2024.1.rst: -------------------------------------------------------------------------------- 1 | =========================== 2 | 2024.1 Series Release Notes 3 | =========================== 4 | 5 | .. release-notes:: 6 | :branch: stable/2024.1 7 | -------------------------------------------------------------------------------- /releasenotes/source/2024.2.rst: -------------------------------------------------------------------------------- 1 | =========================== 2 | 2024.2 Series Release Notes 3 | =========================== 4 | 5 | .. release-notes:: 6 | :branch: stable/2024.2 7 | -------------------------------------------------------------------------------- /releasenotes/source/2025.1.rst: -------------------------------------------------------------------------------- 1 | =========================== 2 | 2025.1 Series Release Notes 3 | =========================== 4 | 5 | .. release-notes:: 6 | :branch: stable/2025.1 7 | -------------------------------------------------------------------------------- /releasenotes/source/_static/.placeholder: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstack/puppet-oslo/5715c387b44153cf3d3dddf26c0108f8f99132b0/releasenotes/source/_static/.placeholder -------------------------------------------------------------------------------- /releasenotes/source/conf.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Licensed under the Apache License, Version 2.0 (the "License"); 3 | # you may not use this file except in compliance with the License. 4 | # You may obtain a copy of the License at 5 | # 6 | # http://www.apache.org/licenses/LICENSE-2.0 7 | # 8 | # Unless required by applicable law or agreed to in writing, software 9 | # distributed under the License is distributed on an "AS IS" BASIS, 10 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 11 | # implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | 16 | # If extensions (or modules to document with autodoc) are in another directory, 17 | # add these directories to sys.path here. If the directory is relative to the 18 | # documentation root, use os.path.abspath to make it absolute, like shown here. 19 | #sys.path.insert(0, os.path.abspath('.')) 20 | 21 | # -- General configuration ------------------------------------------------ 22 | 23 | 24 | # If your documentation needs a minimal Sphinx version, state it here. 25 | #needs_sphinx = '1.0' 26 | 27 | # Add any Sphinx extension module names here, as strings. They can be 28 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 29 | # ones. 30 | extensions = [ 31 | 'openstackdocstheme', 32 | 'reno.sphinxext', 33 | ] 34 | 35 | # Add any paths that contain templates here, relative to this directory. 36 | templates_path = ['_templates'] 37 | 38 | # The suffix of source filenames. 39 | source_suffix = '.rst' 40 | 41 | # The encoding of source files. 42 | #source_encoding = 'utf-8-sig' 43 | 44 | # The master toctree document. 45 | master_doc = 'index' 46 | 47 | # General information about the project. 48 | copyright = '2017, Puppet OpenStack Developers' 49 | 50 | # The version info for the project you're documenting, acts as replacement for 51 | # |version| and |release|, also used in various other places throughout the 52 | # built documents. 53 | # 54 | # The short X.Y version. 55 | version = '' 56 | # The full version, including alpha/beta/rc tags. 57 | release = '' 58 | 59 | # The language for content autogenerated by Sphinx. Refer to documentation 60 | # for a list of supported languages. 61 | #language = None 62 | 63 | # There are two options for replacing |today|: either, you set today to some 64 | # non-false value, then it is used: 65 | #today = '' 66 | # Else, today_fmt is used as the format for a strftime call. 67 | #today_fmt = '%B %d, %Y' 68 | 69 | # List of patterns, relative to source directory, that match files and 70 | # directories to ignore when looking for source files. 71 | exclude_patterns = [] 72 | 73 | # The reST default role (used for this markup: `text`) to use for all 74 | # documents. 75 | #default_role = None 76 | 77 | # If true, '()' will be appended to :func: etc. cross-reference text. 78 | #add_function_parentheses = True 79 | 80 | # If true, the current module name will be prepended to all description 81 | # unit titles (such as .. function::). 82 | #add_module_names = True 83 | 84 | # If true, sectionauthor and moduleauthor directives will be shown in the 85 | # output. They are ignored by default. 86 | #show_authors = False 87 | 88 | # The name of the Pygments (syntax highlighting) style to use. 89 | pygments_style = 'native' 90 | 91 | # A list of ignored prefixes for module index sorting. 92 | #modindex_common_prefix = [] 93 | 94 | # If true, keep warnings as "system message" paragraphs in the built documents. 95 | #keep_warnings = False 96 | 97 | 98 | # -- Options for HTML output ---------------------------------------------- 99 | 100 | # The theme to use for HTML and HTML Help pages. See the documentation for 101 | # a list of builtin themes. 102 | html_theme = 'openstackdocs' 103 | 104 | # Theme options are theme-specific and customize the look and feel of a theme 105 | # further. For a list of options available for each theme, see the 106 | # documentation. 107 | #html_theme_options = {} 108 | 109 | # Add any paths that contain custom themes here, relative to this directory. 110 | # html_theme_path = [] 111 | 112 | # The name for this set of Sphinx documents. If None, it defaults to 113 | # " v documentation". 114 | #html_title = None 115 | 116 | # A shorter title for the navigation bar. Default is the same as html_title. 117 | #html_short_title = None 118 | 119 | # The name of an image file (relative to this directory) to place at the top 120 | # of the sidebar. 121 | #html_logo = None 122 | 123 | # The name of an image file (within the static path) to use as favicon of the 124 | # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 125 | # pixels large. 126 | #html_favicon = None 127 | 128 | # Add any paths that contain custom static files (such as style sheets) here, 129 | # relative to this directory. They are copied after the builtin static files, 130 | # so a file named "default.css" will overwrite the builtin "default.css". 131 | html_static_path = ['_static'] 132 | 133 | # Add any extra paths that contain custom files (such as robots.txt or 134 | # .htaccess) here, relative to this directory. These files are copied 135 | # directly to the root of the documentation. 136 | #html_extra_path = [] 137 | 138 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, 139 | # using the given strftime format. 140 | 141 | # If true, SmartyPants will be used to convert quotes and dashes to 142 | # typographically correct entities. 143 | #html_use_smartypants = True 144 | 145 | # Custom sidebar templates, maps document names to template names. 146 | #html_sidebars = {} 147 | 148 | # Additional templates that should be rendered to pages, maps page names to 149 | # template names. 150 | #html_additional_pages = {} 151 | 152 | # If false, no module index is generated. 153 | #html_domain_indices = True 154 | 155 | # If false, no index is generated. 156 | #html_use_index = True 157 | 158 | # If true, the index is split into individual pages for each letter. 159 | #html_split_index = False 160 | 161 | # If true, links to the reST sources are added to the pages. 162 | #html_show_sourcelink = True 163 | 164 | # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. 165 | #html_show_sphinx = True 166 | 167 | # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. 168 | #html_show_copyright = True 169 | 170 | # If true, an OpenSearch description file will be output, and all pages will 171 | # contain a tag referring to it. The value of this option must be the 172 | # base URL from which the finished HTML is served. 173 | #html_use_opensearch = '' 174 | 175 | # This is the file name suffix for HTML files (e.g. ".xhtml"). 176 | #html_file_suffix = None 177 | 178 | # Output file base name for HTML help builder. 179 | htmlhelp_basename = 'puppet-osloReleaseNotesdoc' 180 | 181 | 182 | # -- Options for LaTeX output --------------------------------------------- 183 | 184 | # Grouping the document tree into LaTeX files. List of tuples 185 | # (source start file, target name, title, 186 | # author, documentclass [howto, manual, or own class]). 187 | latex_documents = [ 188 | ('index', 'puppet-osloReleaseNotes.tex', 'puppet-oslo Release Notes Documentation', 189 | '2017, Puppet OpenStack Developers', 'manual'), 190 | ] 191 | 192 | # The name of an image file (relative to this directory) to place at the top of 193 | # the title page. 194 | #latex_logo = None 195 | 196 | # For "manual" documents, if this is true, then toplevel headings are parts, 197 | # not chapters. 198 | #latex_use_parts = False 199 | 200 | # If true, show page references after internal links. 201 | #latex_show_pagerefs = False 202 | 203 | # If true, show URL addresses after external links. 204 | #latex_show_urls = False 205 | 206 | # Documents to append as an appendix to all manuals. 207 | #latex_appendices = [] 208 | 209 | # If false, no module index is generated. 210 | #latex_domain_indices = True 211 | 212 | 213 | # -- Options for manual page output --------------------------------------- 214 | 215 | # One entry per manual page. List of tuples 216 | # (source start file, name, description, authors, manual section). 217 | man_pages = [ 218 | ('index', 'puppet-osloreleasenotes', 'puppet-oslo Release Notes Documentation', 219 | ['2017, Puppet OpenStack Developers'], 1) 220 | ] 221 | 222 | # If true, show URL addresses after external links. 223 | #man_show_urls = False 224 | 225 | 226 | # -- Options for Texinfo output ------------------------------------------- 227 | 228 | # Grouping the document tree into Texinfo files. List of tuples 229 | # (source start file, target name, title, author, 230 | # dir menu entry, description, category) 231 | texinfo_documents = [ 232 | ('index', 'puppet-osloReleaseNotes', 'puppet-oslo Release Notes Documentation', 233 | '2017, Puppet OpenStack Developers', 'puppet-osloReleaseNotes', 'One line description of project.', 234 | 'Miscellaneous'), 235 | ] 236 | 237 | # Documents to append as an appendix to all manuals. 238 | #texinfo_appendices = [] 239 | 240 | # If false, no module index is generated. 241 | #texinfo_domain_indices = True 242 | 243 | # How to display URL addresses: 'footnote', 'no', or 'inline'. 244 | #texinfo_show_urls = 'footnote' 245 | 246 | # If true, do not generate a @detailmenu in the "Top" node's menu. 247 | #texinfo_no_detailmenu = False 248 | 249 | # -- Options for Internationalization output ------------------------------ 250 | locale_dirs = ['locale/'] 251 | 252 | # openstackdocstheme options 253 | openstackdocs_repo_name = 'openstack/puppet-oslo' 254 | openstackdocs_bug_project = 'puppet-oslo' 255 | openstackdocs_bug_tag = '' 256 | openstackdocs_auto_name = False 257 | -------------------------------------------------------------------------------- /releasenotes/source/index.rst: -------------------------------------------------------------------------------- 1 | ======================================== 2 | Welcome to puppet-oslo Release Notes! 3 | ======================================== 4 | 5 | Contents 6 | ======== 7 | 8 | .. toctree:: 9 | :maxdepth: 2 10 | 11 | unreleased 12 | 2025.1 13 | 2024.2 14 | 2024.1 15 | 2023.2 16 | 2023.1 17 | zed 18 | yoga 19 | xena 20 | wallaby 21 | victoria 22 | ussuri 23 | train 24 | stein 25 | rocky 26 | queens 27 | pike 28 | ocata 29 | newton 30 | 31 | 32 | Indices and tables 33 | ================== 34 | 35 | * :ref:`genindex` 36 | * :ref:`search` 37 | -------------------------------------------------------------------------------- /releasenotes/source/newton.rst: -------------------------------------------------------------------------------- 1 | =================================== 2 | Newton Series Release Notes 3 | =================================== 4 | 5 | .. release-notes:: 6 | :branch: origin/stable/newton 7 | -------------------------------------------------------------------------------- /releasenotes/source/ocata.rst: -------------------------------------------------------------------------------- 1 | =================================== 2 | Ocata Series Release Notes 3 | =================================== 4 | 5 | .. release-notes:: 6 | :branch: origin/stable/ocata 7 | -------------------------------------------------------------------------------- /releasenotes/source/pike.rst: -------------------------------------------------------------------------------- 1 | =================================== 2 | Pike Series Release Notes 3 | =================================== 4 | 5 | .. release-notes:: 6 | :branch: stable/pike 7 | -------------------------------------------------------------------------------- /releasenotes/source/queens.rst: -------------------------------------------------------------------------------- 1 | =================================== 2 | Queens Series Release Notes 3 | =================================== 4 | 5 | .. release-notes:: 6 | :branch: stable/queens 7 | -------------------------------------------------------------------------------- /releasenotes/source/rocky.rst: -------------------------------------------------------------------------------- 1 | =================================== 2 | Rocky Series Release Notes 3 | =================================== 4 | 5 | .. release-notes:: 6 | :branch: stable/rocky 7 | -------------------------------------------------------------------------------- /releasenotes/source/stein.rst: -------------------------------------------------------------------------------- 1 | =================================== 2 | Stein Series Release Notes 3 | =================================== 4 | 5 | .. release-notes:: 6 | :branch: stable/stein 7 | -------------------------------------------------------------------------------- /releasenotes/source/train.rst: -------------------------------------------------------------------------------- 1 | ========================== 2 | Train Series Release Notes 3 | ========================== 4 | 5 | .. release-notes:: 6 | :branch: stable/train 7 | -------------------------------------------------------------------------------- /releasenotes/source/unreleased.rst: -------------------------------------------------------------------------------- 1 | ============================== 2 | Current Series Release Notes 3 | ============================== 4 | 5 | .. release-notes:: 6 | -------------------------------------------------------------------------------- /releasenotes/source/ussuri.rst: -------------------------------------------------------------------------------- 1 | =========================== 2 | Ussuri Series Release Notes 3 | =========================== 4 | 5 | .. release-notes:: 6 | :branch: stable/ussuri 7 | -------------------------------------------------------------------------------- /releasenotes/source/victoria.rst: -------------------------------------------------------------------------------- 1 | ============================= 2 | Victoria Series Release Notes 3 | ============================= 4 | 5 | .. release-notes:: 6 | :branch: stable/victoria 7 | -------------------------------------------------------------------------------- /releasenotes/source/wallaby.rst: -------------------------------------------------------------------------------- 1 | ============================ 2 | Wallaby Series Release Notes 3 | ============================ 4 | 5 | .. release-notes:: 6 | :branch: unmaintained/wallaby 7 | -------------------------------------------------------------------------------- /releasenotes/source/xena.rst: -------------------------------------------------------------------------------- 1 | ========================= 2 | Xena Series Release Notes 3 | ========================= 4 | 5 | .. release-notes:: 6 | :branch: unmaintained/xena 7 | -------------------------------------------------------------------------------- /releasenotes/source/yoga.rst: -------------------------------------------------------------------------------- 1 | ========================= 2 | Yoga Series Release Notes 3 | ========================= 4 | 5 | .. release-notes:: 6 | :branch: unmaintained/yoga 7 | -------------------------------------------------------------------------------- /releasenotes/source/zed.rst: -------------------------------------------------------------------------------- 1 | ======================== 2 | Zed Series Release Notes 3 | ======================== 4 | 5 | .. release-notes:: 6 | :branch: unmaintained/zed 7 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [metadata] 2 | name = puppet-oslo 3 | summary = Puppet module for Oslo 4 | description_file = 5 | README.md 6 | author = OpenStack 7 | author_email = openstack-discuss@lists.openstack.org 8 | home_page = https://docs.openstack.org/puppet-openstack-guide/latest/ 9 | license = Apache License, Version 2.0 10 | classifier = 11 | Intended Audience :: Developers 12 | Intended Audience :: Information Technology 13 | Intended Audience :: System Administrators 14 | License :: OSI Approved :: Apache Software License 15 | Operating System :: POSIX :: Linux 16 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2013 Hewlett-Packard Development Company, L.P. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 12 | # implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | import setuptools 17 | 18 | setuptools.setup( 19 | setup_requires=['pbr>=2.0.0'], 20 | py_modules=[], 21 | pbr=True) 22 | -------------------------------------------------------------------------------- /spec/classes/oslo_init_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'oslo' do 4 | shared_examples 'oslo' do 5 | context 'with default parameters' do 6 | it { should contain_class('oslo::params') } 7 | end 8 | end 9 | 10 | on_supported_os({ 11 | :supported_os => OSDefaults.get_supported_os 12 | }).each do |os,facts| 13 | context "on #{os}" do 14 | let (:facts) do 15 | facts.merge!(OSDefaults.get_facts()) 16 | end 17 | 18 | it_behaves_like 'oslo' 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /spec/defines/oslo_concurrency_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'oslo::concurrency' do 4 | 5 | let (:title) { 'keystone_config' } 6 | 7 | shared_examples 'oslo-concurrency' do 8 | 9 | context 'with default parameters' do 10 | it 'configures oslo_concurrency default params' do 11 | is_expected.to contain_keystone_config('oslo_concurrency/disable_process_locking').with_value('') 12 | is_expected.to contain_keystone_config('oslo_concurrency/lock_path').with_value('') 13 | end 14 | end 15 | 16 | context 'with overridden parameters' do 17 | let :params do 18 | { 19 | :disable_process_locking => 'true', 20 | :lock_path => '/lock/dir/', 21 | } 22 | end 23 | 24 | it 'configures oslo_concurrency section' do 25 | is_expected.to contain_keystone_config('oslo_concurrency/disable_process_locking').with_value('true') 26 | is_expected.to contain_keystone_config('oslo_concurrency/lock_path').with_value('/lock/dir/') 27 | end 28 | end 29 | end 30 | 31 | on_supported_os({ 32 | :supported_os => OSDefaults.get_supported_os 33 | }).each do |os,facts| 34 | context "on #{os}" do 35 | let (:facts) do 36 | facts.merge!(OSDefaults.get_facts()) 37 | end 38 | 39 | it_behaves_like 'oslo-concurrency' 40 | end 41 | end 42 | end 43 | -------------------------------------------------------------------------------- /spec/defines/oslo_coordination_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'oslo::coordination' do 4 | 5 | let (:title) { 'keystone_config' } 6 | 7 | shared_examples 'oslo::coordination' do 8 | 9 | context 'with default parameters' do 10 | it 'configures oslo_cache default params' do 11 | is_expected.to contain_keystone_config('coordination/backend_url').with_value('').with_secret(true) 12 | end 13 | end 14 | 15 | context 'with redis backend' do 16 | let :params do 17 | { :backend_url => 'redis://localhost:6379' } 18 | end 19 | 20 | it 'configures redis backend' do 21 | is_expected.to contain_keystone_config('coordination/backend_url').with_value('redis://localhost:6379').with_secret(true) 22 | 23 | is_expected.to contain_package('python-redis').with( 24 | :name => platform_params[:python_redis_package_name], 25 | :ensure => 'installed', 26 | :tag => ['openstack'], 27 | ) 28 | end 29 | 30 | context 'with backend package management disabled' do 31 | before do 32 | params.merge!({ 33 | :manage_backend_package => false, 34 | }) 35 | end 36 | 37 | it 'does not install backend package' do 38 | is_expected.to_not contain_package('python-redis') 39 | end 40 | end 41 | end 42 | 43 | context 'with etcd3gw backend(http)' do 44 | let :params do 45 | { :backend_url => 'etcd3+http://localhost:2379' } 46 | end 47 | 48 | it 'configures etcd3gw backend' do 49 | is_expected.to contain_keystone_config('coordination/backend_url').with_value('etcd3+http://localhost:2379').with_secret(true) 50 | is_expected.to contain_package('python-etcd3gw').with( 51 | :name => platform_params[:python_etcd3gw_package_name], 52 | :ensure => 'installed', 53 | :tag => ['openstack'], 54 | ) 55 | end 56 | 57 | context 'with backend package management disabled' do 58 | before do 59 | params.merge!({ 60 | :manage_backend_package => false, 61 | }) 62 | end 63 | 64 | it 'does not install backend package' do 65 | is_expected.to_not contain_package('python-etcd3gw') 66 | end 67 | end 68 | end 69 | 70 | context 'with etcd3gw backend(https)' do 71 | let :params do 72 | { :backend_url => 'etcd3+https://localhost:2379' } 73 | end 74 | 75 | it 'configures etcd3gw backend' do 76 | is_expected.to contain_keystone_config('coordination/backend_url').with_value('etcd3+https://localhost:2379').with_secret(true) 77 | is_expected.to contain_package('python-etcd3gw').with( 78 | :name => platform_params[:python_etcd3gw_package_name], 79 | :ensure => 'installed', 80 | :tag => ['openstack'], 81 | ) 82 | end 83 | 84 | context 'with backend package management disabled' do 85 | before do 86 | params.merge!({ 87 | :manage_backend_package => false, 88 | }) 89 | end 90 | 91 | it 'does not install backend package' do 92 | is_expected.to_not contain_package('python-etcd3gw') 93 | end 94 | end 95 | end 96 | 97 | context 'with memcache backend' do 98 | let :params do 99 | { :backend_url => 'memcached://localhost:11211' } 100 | end 101 | 102 | it 'configures memcache backend' do 103 | is_expected.to contain_keystone_config('coordination/backend_url').with_value('memcached://localhost:11211').with_secret(true) 104 | 105 | is_expected.to contain_package('python-pymemcache').with( 106 | :name => platform_params[:python_pymemcache_package_name], 107 | :ensure => 'installed', 108 | :tag => ['openstack'], 109 | ) 110 | end 111 | 112 | context 'with backend package management disabled' do 113 | before do 114 | params.merge!({ 115 | :manage_backend_package => false, 116 | }) 117 | end 118 | 119 | it 'does not install backend package' do 120 | is_expected.to_not contain_package('python-pymemcache') 121 | end 122 | end 123 | end 124 | 125 | context 'with zookeeper backend' do 126 | let :params do 127 | { :backend_url => 'zookeeper://localhost:2181' } 128 | end 129 | 130 | it 'configures memcache backend' do 131 | is_expected.to contain_keystone_config('coordination/backend_url').with_value('zookeeper://localhost:2181').with_secret(true) 132 | 133 | is_expected.to contain_package('python-kazoo').with( 134 | :name => platform_params[:python_kazoo_package_name], 135 | :ensure => 'installed', 136 | :tag => ['openstack'], 137 | ) 138 | end 139 | 140 | context 'with backend package management disabled' do 141 | before do 142 | params.merge!({ 143 | :manage_backend_package => false, 144 | }) 145 | end 146 | 147 | it 'does not install backend package' do 148 | is_expected.to_not contain_package('python-kazoo') 149 | end 150 | end 151 | end 152 | 153 | context 'with kazoo backend' do 154 | let :params do 155 | { :backend_url => 'kazoo://localhost:2181' } 156 | end 157 | 158 | it 'configures memcache backend' do 159 | is_expected.to contain_keystone_config('coordination/backend_url').with_value('kazoo://localhost:2181').with_secret(true) 160 | 161 | is_expected.to contain_package('python-kazoo').with( 162 | :name => platform_params[:python_kazoo_package_name], 163 | :ensure => 'installed', 164 | :tag => ['openstack'], 165 | ) 166 | end 167 | 168 | context 'with backend package management disabled' do 169 | before do 170 | params.merge!({ 171 | :manage_backend_package => false, 172 | }) 173 | end 174 | 175 | it 'does not install backend package' do 176 | is_expected.to_not contain_package('python-kazoo') 177 | end 178 | end 179 | end 180 | 181 | context 'with configuration management disabled' do 182 | let :params do 183 | { :backend_url => 'redis://localhost:6379', 184 | :manage_config => false } 185 | end 186 | 187 | it 'manages only packages' do 188 | is_expected.to_not contain_keystone_config('coordination/backend_url') 189 | 190 | is_expected.to contain_package('python-redis').with( 191 | :name => platform_params[:python_redis_package_name], 192 | :ensure => 'installed', 193 | :tag => ['openstack'], 194 | ) 195 | end 196 | end 197 | end 198 | 199 | on_supported_os({ 200 | :supported_os => OSDefaults.get_supported_os 201 | }).each do |os,facts| 202 | context "on #{os}" do 203 | let (:facts) do 204 | facts.merge!(OSDefaults.get_facts()) 205 | end 206 | 207 | let(:platform_params) do 208 | case facts[:os]['family'] 209 | when 'Debian' 210 | { 211 | :python_redis_package_name => 'python3-redis', 212 | :python_etcd3gw_package_name => 'python3-etcd3gw', 213 | :python_pymemcache_package_name => 'python3-pymemcache', 214 | :python_kazoo_package_name => 'python3-kazoo' 215 | } 216 | when 'RedHat' 217 | { 218 | :python_redis_package_name => 'python3-redis', 219 | :python_etcd3gw_package_name => 'python3-etcd3gw', 220 | :python_pymemcache_package_name => 'python3-pymemcache', 221 | :python_kazoo_package_name => 'python3-kazoo' 222 | } 223 | end 224 | end 225 | 226 | it_behaves_like 'oslo::coordination' 227 | end 228 | end 229 | end 230 | -------------------------------------------------------------------------------- /spec/defines/oslo_cors_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'oslo::cors' do 4 | 5 | let (:title) { 'keystone_config' } 6 | 7 | shared_examples 'shared examples' do 8 | 9 | context 'with default parameters' do 10 | it 'configure cors default params' do 11 | is_expected.to contain_keystone_config('cors/allowed_origin').with_value('') 12 | is_expected.to contain_keystone_config('cors/allow_credentials').with_value('') 13 | is_expected.to contain_keystone_config('cors/expose_headers').with_value('') 14 | is_expected.to contain_keystone_config('cors/max_age').with_value('') 15 | is_expected.to contain_keystone_config('cors/allow_methods').with_value('') 16 | is_expected.to contain_keystone_config('cors/allow_headers').with_value('') 17 | end 18 | end 19 | 20 | context 'with parameters' do 21 | let (:params) do 22 | { 23 | :allowed_origin => 'https://horizon.example.com,https://horizon.example2.com', 24 | :allow_credentials => true, 25 | :expose_headers => 'HeaderOne,HeaderTwo', 26 | :max_age => 3600, 27 | :allow_methods => 'GET,HEAD', 28 | :allow_headers => 'HeaderThree,HeaderFour', 29 | } 30 | end 31 | 32 | it 'configure cors params' do 33 | is_expected.to contain_keystone_config('cors/allowed_origin').with_value('https://horizon.example.com,https://horizon.example2.com') 34 | is_expected.to contain_keystone_config('cors/allow_credentials').with_value(true) 35 | is_expected.to contain_keystone_config('cors/expose_headers').with_value('HeaderOne,HeaderTwo') 36 | is_expected.to contain_keystone_config('cors/max_age').with_value(3600) 37 | is_expected.to contain_keystone_config('cors/allow_methods').with_value('GET,HEAD') 38 | is_expected.to contain_keystone_config('cors/allow_headers').with_value('HeaderThree,HeaderFour') 39 | end 40 | end 41 | 42 | context 'with parameters in array' do 43 | let (:params) do 44 | { 45 | :allowed_origin => ['https://horizon.example.com', 'https://horizon.example2.com'], 46 | :expose_headers => ['HeaderOne', 'HeaderTwo'], 47 | :allow_methods => ['GET', 'HEAD'], 48 | :allow_headers => ['HeaderThree', 'HeaderFour'], 49 | } 50 | end 51 | 52 | it 'configure cors params' do 53 | is_expected.to contain_keystone_config('cors/allowed_origin').with_value('https://horizon.example.com,https://horizon.example2.com') 54 | is_expected.to contain_keystone_config('cors/expose_headers').with_value('HeaderOne,HeaderTwo') 55 | is_expected.to contain_keystone_config('cors/allow_methods').with_value('GET,HEAD') 56 | is_expected.to contain_keystone_config('cors/allow_headers').with_value('HeaderThree,HeaderFour') 57 | end 58 | end 59 | end 60 | 61 | on_supported_os({ 62 | :supported_os => OSDefaults.get_supported_os 63 | }).each do |os,facts| 64 | context "on #{os}" do 65 | let (:facts) do 66 | facts.merge!(OSDefaults.get_facts()) 67 | end 68 | 69 | include_examples 'shared examples' 70 | end 71 | end 72 | end 73 | -------------------------------------------------------------------------------- /spec/defines/oslo_db_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'oslo::db' do 4 | 5 | let (:title) { 'keystone_config' } 6 | 7 | shared_examples 'oslo-db' do 8 | 9 | context 'with default parameters' do 10 | it 'configure oslo_db default params' do 11 | is_expected.to contain_keystone_config('database/sqlite_synchronous').with_value('') 12 | is_expected.to contain_keystone_config('database/backend').with_value('') 13 | is_expected.to contain_keystone_config('database/connection').with_value('').with_secret(true) 14 | is_expected.to contain_keystone_config('database/slave_connection').with_value('').with_secret(true) 15 | is_expected.to contain_keystone_config('database/mysql_sql_mode').with_value('') 16 | is_expected.to contain_keystone_config('database/connection_recycle_time').with_value('') 17 | is_expected.to contain_keystone_config('database/max_pool_size').with_value('') 18 | is_expected.to contain_keystone_config('database/max_retries').with_value('') 19 | is_expected.to contain_keystone_config('database/retry_interval').with_value('') 20 | is_expected.to contain_keystone_config('database/max_overflow').with_value('') 21 | is_expected.to contain_keystone_config('database/connection_debug').with_value('') 22 | is_expected.to contain_keystone_config('database/connection_trace').with_value('') 23 | is_expected.to contain_keystone_config('database/pool_timeout').with_value('') 24 | is_expected.to contain_keystone_config('database/use_db_reconnect').with_value('') 25 | is_expected.to contain_keystone_config('database/db_retry_interval').with_value('') 26 | is_expected.to contain_keystone_config('database/db_inc_retry_interval').with_value('') 27 | is_expected.to contain_keystone_config('database/db_max_retry_interval').with_value('') 28 | is_expected.to contain_keystone_config('database/db_max_retries').with_value('') 29 | is_expected.to contain_keystone_config('database/mysql_enable_ndb').with_value('') 30 | end 31 | end 32 | 33 | context 'with overridden parameters' do 34 | let :params do 35 | { 36 | :config_group => 'custom_group', 37 | :backend => 'sqlalchemy', 38 | :connection => 'mysql+pymysql://db:db@master/db', 39 | :slave_connection => 'mysql+pymysql://db:db@slave/db', 40 | :mysql_sql_mode => 'TRADITIONAL', 41 | :connection_recycle_time => '3601', 42 | :max_pool_size => '100', 43 | :max_retries => '10', 44 | :retry_interval => '10', 45 | :max_overflow => '50', 46 | :connection_debug => '0', 47 | :connection_trace => true, 48 | :pool_timeout => '10', 49 | :use_db_reconnect => true, 50 | :db_retry_interval => '1', 51 | :db_inc_retry_interval => true, 52 | :db_max_retry_interval => '10', 53 | :db_max_retries => '20', 54 | :mysql_enable_ndb => true, 55 | } 56 | end 57 | 58 | it 'configures database parameters' do 59 | is_expected.to contain_keystone_config('custom_group/sqlite_synchronous').with_value('') 60 | is_expected.to contain_keystone_config('custom_group/backend').with_value('sqlalchemy') 61 | is_expected.to contain_keystone_config('custom_group/connection').with_value('mysql+pymysql://db:db@master/db').with_secret(true) 62 | is_expected.to contain_keystone_config('custom_group/slave_connection').with_value('mysql+pymysql://db:db@slave/db').with_secret(true) 63 | is_expected.to contain_keystone_config('custom_group/mysql_sql_mode').with_value('TRADITIONAL') 64 | is_expected.to contain_keystone_config('custom_group/connection_recycle_time').with_value('3601') 65 | is_expected.to contain_keystone_config('custom_group/max_pool_size').with_value('100') 66 | is_expected.to contain_keystone_config('custom_group/max_retries').with_value('10') 67 | is_expected.to contain_keystone_config('custom_group/retry_interval').with_value('10') 68 | is_expected.to contain_keystone_config('custom_group/max_overflow').with_value('50') 69 | is_expected.to contain_keystone_config('custom_group/connection_debug').with_value('0') 70 | is_expected.to contain_keystone_config('custom_group/connection_trace').with_value(true) 71 | is_expected.to contain_keystone_config('custom_group/pool_timeout').with_value('10') 72 | is_expected.to contain_keystone_config('custom_group/use_db_reconnect').with_value(true) 73 | is_expected.to contain_keystone_config('custom_group/db_retry_interval').with_value('1') 74 | is_expected.to contain_keystone_config('custom_group/db_inc_retry_interval').with_value(true) 75 | is_expected.to contain_keystone_config('custom_group/db_max_retry_interval').with_value('10') 76 | is_expected.to contain_keystone_config('custom_group/db_max_retries').with_value('20') 77 | is_expected.to contain_keystone_config('custom_group/mysql_enable_ndb').with_value(true) 78 | end 79 | end 80 | 81 | context 'with config management disabled' do 82 | let :params do 83 | { :manage_config => false } 84 | end 85 | 86 | it 'does not manage config options' do 87 | is_expected.to_not contain_keystone_config('custom_group/backend') 88 | is_expected.to_not contain_keystone_config('custom_group/conection') 89 | end 90 | end 91 | 92 | context 'with pymysql connection' do 93 | let :params do 94 | { :connection => 'mysql+pymysql://db:db@localhost/db' } 95 | end 96 | 97 | it { is_expected.to contain_class('oslo::params') } 98 | it { is_expected.to contain_keystone_config('database/connection').with_value('mysql+pymysql://db:db@localhost/db').with_secret(true) } 99 | end 100 | 101 | context 'with postgresql backend' do 102 | let :params do 103 | { :connection => 'postgresql://db:db@localhost/db', } 104 | end 105 | 106 | it { is_expected.to contain_keystone_config('database/connection').with_value('postgresql://db:db@localhost/db').with_secret(true) } 107 | it { is_expected.to contain_class('postgresql::lib::python') } 108 | 109 | context 'with backend package management disabled' do 110 | before do 111 | params.merge!({ 112 | :manage_backend_package => false, 113 | }) 114 | end 115 | 116 | it 'does not install backend package' do 117 | is_expected.not_to contain_class('postgresql::lib::python') 118 | end 119 | end 120 | end 121 | 122 | context 'with postgresql backend + drivername' do 123 | let :params do 124 | { :connection => 'postgresql+psycopg2://db:db@localhost/db' } 125 | end 126 | 127 | it { is_expected.to contain_keystone_config('database/connection').with_value('postgresql+psycopg2://db:db@localhost/db').with_secret(true) } 128 | it { is_expected.to contain_class('postgresql::lib::python') } 129 | end 130 | 131 | context 'with incorrect database_connection string' do 132 | let :params do 133 | { :connection => 'foo://db:db@localhost/db', } 134 | end 135 | 136 | it { should raise_error(Puppet::Error) } 137 | end 138 | 139 | context 'with incorrect pymysql database_connection string' do 140 | let :params do 141 | { :connection => 'foo+pymysql://db:db@localhost/db', } 142 | end 143 | 144 | it { should raise_error(Puppet::Error) } 145 | end 146 | end 147 | 148 | shared_examples 'oslo-db on Debian' do 149 | context 'using pymysql driver' do 150 | let :params do 151 | { :connection => 'mysql+pymysql:///db:db@localhost/db', } 152 | end 153 | 154 | it 'install the proper backend package' do 155 | is_expected.to contain_package(platform_params[:pymysql_package_name]).with( 156 | :ensure => 'installed', 157 | :name => platform_params[:pymysql_package_name], 158 | :tag => 'openstack' 159 | ) 160 | end 161 | 162 | context 'with backend package management disabled' do 163 | before do 164 | params.merge!({ 165 | :manage_backend_package => false, 166 | }) 167 | end 168 | 169 | it 'does not install backend package' do 170 | is_expected.not_to contain_package('python-pymysql') 171 | end 172 | end 173 | end 174 | end 175 | 176 | shared_examples 'oslo-db on RedHat' do 177 | context 'using pymysql driver' do 178 | let :params do 179 | { :connection => 'mysql+pymysql:///db:db@localhost/db', } 180 | end 181 | end 182 | end 183 | 184 | on_supported_os({ 185 | :supported_os => OSDefaults.get_supported_os 186 | }).each do |os,facts| 187 | context "on #{os}" do 188 | let (:facts) do 189 | facts.merge!(OSDefaults.get_facts({ 190 | # puppet-postgresql requires the service_provider fact provided by 191 | # puppetlabs-postgresql. 192 | :service_provider => 'systemd' 193 | })) 194 | end 195 | 196 | let (:platform_params) do 197 | case facts[:os]['family'] 198 | when 'Debian' 199 | { 200 | :pymongo_package_name => 'python3-pymongo', 201 | :pymysql_package_name => 'python3-pymysql', 202 | } 203 | when 'RedHat' 204 | { 205 | :pymongo_package_name => 'python3-pymongo', 206 | :pymysql_package_name => nil, 207 | } 208 | end 209 | end 210 | 211 | it_behaves_like 'oslo-db' 212 | it_behaves_like "oslo-db on #{facts[:os]['family']}" 213 | end 214 | end 215 | end 216 | -------------------------------------------------------------------------------- /spec/defines/oslo_healthcheck_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'oslo::healthcheck' do 4 | 5 | let (:title) { 'keystone_config' } 6 | 7 | shared_examples 'oslo::healthcheck' do 8 | 9 | context 'with default parameters' do 10 | let :params do 11 | {} 12 | end 13 | 14 | it 'configure healthcheck default params' do 15 | is_expected.to contain_keystone_config('healthcheck/detailed').with_value('') 16 | is_expected.to contain_keystone_config('healthcheck/backends').with_value('') 17 | is_expected.to contain_keystone_config('healthcheck/allowed_source_ranges').with_value('') 18 | is_expected.to contain_keystone_config('healthcheck/ignore_proxied_requests').with_value('') 19 | is_expected.to contain_keystone_config('healthcheck/disable_by_file_path').with_value('') 20 | is_expected.to contain_keystone_config('healthcheck/disable_by_file_paths').with_value('') 21 | is_expected.to contain_keystone_config('healthcheck/enable_by_file_paths').with_value('') 22 | end 23 | end 24 | 25 | context 'with parameters overridden' do 26 | let :params do 27 | { 28 | :detailed => true, 29 | :backends => ['disable_by_file', 'disable_by_files_ports'], 30 | :allowed_source_ranges => ['10.0.0.0/24', '10.0.1.0/24'], 31 | :disable_by_file_path => '/etc/keystone/healthcheck/disabled', 32 | :disable_by_file_paths => [ 33 | '5000:/etc/keystone/healthcheck/public-disabled', 34 | '35357:/etc/keystone/healthcheck/admin-disabled' 35 | ], 36 | :enable_by_file_paths => [ 37 | '/etc/keystone/healthcheck/enabled0', 38 | '/etc/keystone/healthcheck/enabled1' 39 | ], 40 | :ignore_proxied_requests => false, 41 | } 42 | end 43 | 44 | it 'configure healthcheck params' do 45 | is_expected.to contain_keystone_config('healthcheck/detailed').with_value('true') 46 | is_expected.to contain_keystone_config('healthcheck/backends').with_value( 47 | 'disable_by_file,disable_by_files_ports' 48 | ) 49 | is_expected.to contain_keystone_config('healthcheck/allowed_source_ranges').with_value( 50 | '10.0.0.0/24,10.0.1.0/24' 51 | ) 52 | is_expected.to contain_keystone_config('healthcheck/ignore_proxied_requests').with_value('false') 53 | is_expected.to contain_keystone_config('healthcheck/disable_by_file_path').with_value( 54 | '/etc/keystone/healthcheck/disabled' 55 | ) 56 | is_expected.to contain_keystone_config('healthcheck/disable_by_file_paths').with_value( 57 | '5000:/etc/keystone/healthcheck/public-disabled,35357:/etc/keystone/healthcheck/admin-disabled' 58 | ) 59 | is_expected.to contain_keystone_config('healthcheck/enable_by_file_paths').with_value( 60 | '/etc/keystone/healthcheck/enabled0,/etc/keystone/healthcheck/enabled1' 61 | ) 62 | end 63 | end 64 | end 65 | 66 | on_supported_os({ 67 | :supported_os => OSDefaults.get_supported_os 68 | }).each do |os,facts| 69 | context "on #{os}" do 70 | let (:facts) do 71 | facts.merge!(OSDefaults.get_facts()) 72 | end 73 | 74 | include_examples 'oslo::healthcheck' 75 | end 76 | end 77 | end 78 | -------------------------------------------------------------------------------- /spec/defines/oslo_key_manager_barbican_service_user_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'oslo::key_manager::barbican::service_user' do 4 | 5 | let (:title) { 'keystone_config' } 6 | 7 | let :params do 8 | { :username => 'keystone', 9 | :password => 'secret', 10 | :auth_url => 'http://127.0.0.1:5000' } 11 | end 12 | 13 | shared_examples 'oslo::key_manager::barbican::service_user' do 14 | context 'with only required parameters' do 15 | it 'configures keystone service_user' do 16 | is_expected.to contain_keystone_config('barbican_service_user/username').with_value('keystone') 17 | is_expected.to contain_keystone_config('barbican_service_user/password').with_value('secret').with_secret(true) 18 | is_expected.to contain_keystone_config('barbican_service_user/auth_url').with_value( params[:auth_url] ) 19 | is_expected.to contain_keystone_config('barbican_service_user/project_name').with_value('') 20 | is_expected.to contain_keystone_config('barbican_service_user/project_domain_name').with_value('') 21 | is_expected.to contain_keystone_config('barbican_service_user/system_scope').with_value('') 22 | is_expected.to contain_keystone_config('barbican_service_user/user_domain_name').with_value('') 23 | is_expected.to contain_keystone_config('barbican_service_user/insecure').with_value('') 24 | is_expected.to contain_keystone_config('barbican_service_user/auth_type').with_value('') 25 | is_expected.to contain_keystone_config('barbican_service_user/auth_version').with_value('') 26 | is_expected.to contain_keystone_config('barbican_service_user/cafile').with_value('') 27 | is_expected.to contain_keystone_config('barbican_service_user/certfile').with_value('') 28 | is_expected.to contain_keystone_config('barbican_service_user/keyfile').with_value('') 29 | is_expected.to contain_keystone_config('barbican_service_user/region_name').with_value('') 30 | end 31 | end 32 | 33 | context 'set all keystone service_user parameters' do 34 | before do 35 | params.merge! ({ 36 | :username => 'username', 37 | :password => 'hardpassword', 38 | :auth_url => 'http://127.1.1.127:5000/', 39 | :project_name => 'NoProject', 40 | :user_domain_name => 'MyDomain', 41 | :project_domain_name => 'OurDomain', 42 | :insecure => true, 43 | :auth_type => 'password', 44 | :auth_version => '3', 45 | :cafile => 'cafile.pem', 46 | :certfile => 'certfile.crt', 47 | :keyfile => 'somekey.key', 48 | :region_name => 'MyRegion', 49 | }) 50 | end 51 | it 'override keystone service_user parameters' do 52 | is_expected.to contain_keystone_config('barbican_service_user/username').with_value(params[:username]) 53 | is_expected.to contain_keystone_config('barbican_service_user/password').with_value(params[:password]).with_secret(true) 54 | is_expected.to contain_keystone_config('barbican_service_user/auth_url').with_value( params[:auth_url] ) 55 | is_expected.to contain_keystone_config('barbican_service_user/project_name').with_value( params[:project_name] ) 56 | is_expected.to contain_keystone_config('barbican_service_user/user_domain_name').with_value(params[:user_domain_name]) 57 | is_expected.to contain_keystone_config('barbican_service_user/project_domain_name').with_value(params[:project_domain_name]) 58 | is_expected.to contain_keystone_config('barbican_service_user/system_scope').with_value('') 59 | is_expected.to contain_keystone_config('barbican_service_user/insecure').with_value(params[:insecure]) 60 | is_expected.to contain_keystone_config('barbican_service_user/auth_version').with_value(params[:auth_version]) 61 | is_expected.to contain_keystone_config('barbican_service_user/cafile').with_value(params[:cafile]) 62 | is_expected.to contain_keystone_config('barbican_service_user/certfile').with_value(params[:certfile]) 63 | is_expected.to contain_keystone_config('barbican_service_user/keyfile').with_value(params[:keyfile]) 64 | is_expected.to contain_keystone_config('barbican_service_user/region_name').with_value(params[:region_name]) 65 | end 66 | end 67 | 68 | context 'without password required parameter' do 69 | let :params do 70 | params.delete(:password) 71 | end 72 | it { expect { is_expected.to raise_error(Puppet::Error) } } 73 | end 74 | 75 | context 'with system_scope' do 76 | before do 77 | params.merge!({ 78 | :project_name => 'NoProject', 79 | :project_domain_name => 'OurDomain', 80 | :system_scope => 'all', 81 | }) 82 | end 83 | 84 | it 'configures system_scope' do 85 | is_expected.to contain_keystone_config('barbican_service_user/project_name').with_value('') 86 | is_expected.to contain_keystone_config('barbican_service_user/project_domain_name').with_value('') 87 | is_expected.to contain_keystone_config('barbican_service_user/system_scope').with_value(params[:system_scope]) 88 | end 89 | end 90 | end 91 | 92 | on_supported_os({ 93 | :supported_os => OSDefaults.get_supported_os 94 | }).each do |os,facts| 95 | context "on #{os}" do 96 | let (:facts) do 97 | facts.merge!(OSDefaults.get_facts()) 98 | end 99 | 100 | include_examples 'oslo::key_manager::barbican::service_user' 101 | end 102 | end 103 | 104 | end 105 | -------------------------------------------------------------------------------- /spec/defines/oslo_key_manager_barbican_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'oslo::key_manager::barbican' do 4 | 5 | let (:title) { 'keystone_config' } 6 | 7 | shared_examples 'oslo::key_manager::barbican' do 8 | 9 | context 'with default parameters' do 10 | let :params do 11 | {} 12 | end 13 | 14 | it 'configure key_manager default params' do 15 | is_expected.to contain_keystone_config('barbican/barbican_endpoint').with_value('') 16 | is_expected.to contain_keystone_config('barbican/barbican_api_version').with_value('') 17 | is_expected.to contain_keystone_config('barbican/auth_endpoint').with_value('') 18 | is_expected.to contain_keystone_config('barbican/retry_delay').with_value('') 19 | is_expected.to contain_keystone_config('barbican/number_of_retries').with_value('') 20 | is_expected.to contain_keystone_config('barbican/barbican_endpoint_type').with_value('') 21 | is_expected.to contain_keystone_config('barbican/barbican_region_name').with_value('') 22 | is_expected.to contain_keystone_config('barbican/send_service_user_token').with_value('') 23 | end 24 | end 25 | 26 | context 'with parameters overridden' do 27 | let :params do 28 | { 29 | :barbican_endpoint => 'http://localhost:9311/', 30 | :barbican_api_version => 'v1', 31 | :auth_endpoint => 'http://localhost:5000', 32 | :retry_delay => 1, 33 | :number_of_retries => 60, 34 | :barbican_endpoint_type => 'public', 35 | :barbican_region_name => 'regionOne', 36 | :send_service_user_token => true, 37 | } 38 | end 39 | 40 | it 'configure key_manager params' do 41 | is_expected.to contain_keystone_config('barbican/barbican_endpoint').with_value('http://localhost:9311/') 42 | is_expected.to contain_keystone_config('barbican/barbican_api_version').with_value('v1') 43 | is_expected.to contain_keystone_config('barbican/auth_endpoint').with_value('http://localhost:5000') 44 | is_expected.to contain_keystone_config('barbican/retry_delay').with_value(1) 45 | is_expected.to contain_keystone_config('barbican/number_of_retries').with_value(60) 46 | is_expected.to contain_keystone_config('barbican/barbican_endpoint_type').with_value('public') 47 | is_expected.to contain_keystone_config('barbican/barbican_region_name').with_value('regionOne') 48 | is_expected.to contain_keystone_config('barbican/send_service_user_token').with_value(true) 49 | end 50 | end 51 | end 52 | 53 | on_supported_os({ 54 | :supported_os => OSDefaults.get_supported_os 55 | }).each do |os,facts| 56 | context "on #{os}" do 57 | let (:facts) do 58 | facts.merge!(OSDefaults.get_facts()) 59 | end 60 | 61 | include_examples 'oslo::key_manager::barbican' 62 | end 63 | end 64 | end 65 | -------------------------------------------------------------------------------- /spec/defines/oslo_key_manager_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'oslo::key_manager' do 4 | 5 | let (:title) { 'keystone_config' } 6 | 7 | shared_examples 'oslo::key_manager' do 8 | 9 | context 'with default parameters' do 10 | let :params do 11 | {} 12 | end 13 | 14 | it 'configure key_manager default params' do 15 | is_expected.to contain_keystone_config('key_manager/backend').with_value('') 16 | end 17 | end 18 | 19 | context 'with parameters overridden' do 20 | let :params do 21 | { 22 | :backend => 'barbican' 23 | } 24 | end 25 | 26 | it 'configure key_manager params' do 27 | is_expected.to contain_keystone_config('key_manager/backend').with_value('barbican') 28 | end 29 | end 30 | end 31 | 32 | on_supported_os({ 33 | :supported_os => OSDefaults.get_supported_os 34 | }).each do |os,facts| 35 | context "on #{os}" do 36 | let (:facts) do 37 | facts.merge!(OSDefaults.get_facts()) 38 | end 39 | 40 | include_examples 'oslo::key_manager' 41 | end 42 | end 43 | end 44 | -------------------------------------------------------------------------------- /spec/defines/oslo_limit_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'oslo::limit' do 4 | 5 | let (:title) { 'keystone_config' } 6 | 7 | shared_examples 'oslo::limit' do 8 | 9 | let :required_params do 10 | { 11 | :username => 'keystone', 12 | :password => 'keystone_password', 13 | } 14 | end 15 | 16 | context 'with endpoint_id' do 17 | let :params do 18 | required_params.merge!({ 19 | :endpoint_id => '770f924a-e483-4b43-a6f3-73acc91f4757' 20 | }) 21 | end 22 | 23 | context 'with default parameters' do 24 | it 'configures the required params' do 25 | is_expected.to contain_keystone_config('oslo_limit/username').with_value('keystone') 26 | is_expected.to contain_keystone_config('oslo_limit/password').with_value('keystone_password').with_secret(true) 27 | is_expected.to contain_keystone_config('oslo_limit/endpoint_id').with_value('770f924a-e483-4b43-a6f3-73acc91f4757') 28 | is_expected.to contain_keystone_config('oslo_limit/endpoint_service_type').with_value('') 29 | is_expected.to contain_keystone_config('oslo_limit/endpoint_service_name').with_value('') 30 | end 31 | 32 | it 'configures the default params' do 33 | is_expected.to contain_keystone_config('oslo_limit/endpoint_region_name').with_value('') 34 | is_expected.to contain_keystone_config('oslo_limit/endpoint_interface').with_value('') 35 | is_expected.to contain_keystone_config('oslo_limit/auth_url').with_value('http://localhost:5000') 36 | is_expected.to contain_keystone_config('oslo_limit/project_name').with_value('services') 37 | is_expected.to contain_keystone_config('oslo_limit/user_domain_name').with_value('Default') 38 | is_expected.to contain_keystone_config('oslo_limit/project_domain_name').with_value('Default') 39 | is_expected.to contain_keystone_config('oslo_limit/system_scope').with_value('') 40 | is_expected.to contain_keystone_config('oslo_limit/auth_type').with_value('password') 41 | is_expected.to contain_keystone_config('oslo_limit/service_type').with_value('') 42 | is_expected.to contain_keystone_config('oslo_limit/valid_interfaces').with_value('') 43 | is_expected.to contain_keystone_config('oslo_limit/region_name').with_value('') 44 | is_expected.to contain_keystone_config('oslo_limit/endpoint_override').with_value('') 45 | end 46 | end 47 | 48 | context 'with parameters overridden' do 49 | before :each do 50 | params.merge!({ 51 | :endpoint_region_name => 'regionOne', 52 | :endpoint_interface => 'public', 53 | :auth_url => 'http://localhost:5000/v3', 54 | :project_name => 'alt_services', 55 | :user_domain_name => 'UserDomain', 56 | :project_domain_name => 'ProjectDomain', 57 | :auth_type => 'v3password', 58 | :service_type => 'identity', 59 | :valid_interfaces => ['admin', 'internal'], 60 | :region_name => 'regionOne', 61 | :endpoint_override => 'http://localhost:5000', 62 | }) 63 | end 64 | 65 | it 'configures the overridden values' do 66 | is_expected.to contain_keystone_config('oslo_limit/endpoint_region_name').with_value('regionOne') 67 | is_expected.to contain_keystone_config('oslo_limit/endpoint_interface').with_value('public') 68 | is_expected.to contain_keystone_config('oslo_limit/auth_url').with_value('http://localhost:5000/v3') 69 | is_expected.to contain_keystone_config('oslo_limit/project_name').with_value('alt_services') 70 | is_expected.to contain_keystone_config('oslo_limit/user_domain_name').with_value('UserDomain') 71 | is_expected.to contain_keystone_config('oslo_limit/project_domain_name').with_value('ProjectDomain') 72 | is_expected.to contain_keystone_config('oslo_limit/system_scope').with_value('') 73 | is_expected.to contain_keystone_config('oslo_limit/auth_type').with_value('v3password') 74 | is_expected.to contain_keystone_config('oslo_limit/service_type').with_value('identity') 75 | is_expected.to contain_keystone_config('oslo_limit/valid_interfaces').with_value('admin,internal') 76 | is_expected.to contain_keystone_config('oslo_limit/region_name').with_value('regionOne') 77 | is_expected.to contain_keystone_config('oslo_limit/endpoint_override').with_value('http://localhost:5000') 78 | end 79 | end 80 | 81 | context 'with system_scope' do 82 | before :each do 83 | params.merge!({ 84 | :project_name => 'services', 85 | :system_scope => 'all', 86 | }) 87 | end 88 | 89 | it 'configures system_scope but ignore project parameters' do 90 | is_expected.to contain_keystone_config('oslo_limit/project_name').with_value('') 91 | is_expected.to contain_keystone_config('oslo_limit/project_domain_name').with_value('') 92 | is_expected.to contain_keystone_config('oslo_limit/system_scope').with_value('all') 93 | end 94 | end 95 | end 96 | 97 | context 'with endpoint_service_name' do 98 | let :params do 99 | required_params.merge({ 100 | :endpoint_service_name => 'nova', 101 | }) 102 | end 103 | 104 | it 'configures the required params' do 105 | is_expected.to contain_keystone_config('oslo_limit/username').with_value('keystone') 106 | is_expected.to contain_keystone_config('oslo_limit/password').with_value('keystone_password').with_secret(true) 107 | is_expected.to contain_keystone_config('oslo_limit/endpoint_id').with_value('') 108 | is_expected.to contain_keystone_config('oslo_limit/endpoint_service_type').with_value('') 109 | is_expected.to contain_keystone_config('oslo_limit/endpoint_service_name').with_value('nova') 110 | end 111 | end 112 | 113 | context 'with endpoint_service_type' do 114 | let :params do 115 | required_params.merge({ 116 | :endpoint_service_type => 'compute', 117 | }) 118 | end 119 | 120 | it 'configures the required params' do 121 | is_expected.to contain_keystone_config('oslo_limit/username').with_value('keystone') 122 | is_expected.to contain_keystone_config('oslo_limit/password').with_value('keystone_password').with_secret(true) 123 | is_expected.to contain_keystone_config('oslo_limit/endpoint_id').with_value('') 124 | is_expected.to contain_keystone_config('oslo_limit/endpoint_service_type').with_value('compute') 125 | is_expected.to contain_keystone_config('oslo_limit/endpoint_service_name').with_value('') 126 | end 127 | end 128 | end 129 | 130 | on_supported_os({ 131 | :supported_os => OSDefaults.get_supported_os 132 | }).each do |os,facts| 133 | context "on #{os}" do 134 | let (:facts) do 135 | facts.merge!(OSDefaults.get_facts()) 136 | end 137 | 138 | include_examples 'oslo::limit' 139 | end 140 | end 141 | end 142 | -------------------------------------------------------------------------------- /spec/defines/oslo_log_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'oslo::log' do 4 | 5 | let (:title) { 'keystone_config' } 6 | 7 | shared_examples 'oslo-log' do 8 | 9 | context 'with default parameters' do 10 | it 'configure oslo_log default params' do 11 | is_expected.to contain_keystone_config('DEFAULT/debug').with_value('') 12 | is_expected.to contain_keystone_config('DEFAULT/log_config_append').with_value('') 13 | is_expected.to contain_keystone_config('DEFAULT/log_date_format').with_value('') 14 | is_expected.to contain_keystone_config('DEFAULT/log_file').with_value('') 15 | is_expected.to contain_keystone_config('DEFAULT/log_dir').with_value('') 16 | is_expected.to contain_keystone_config('DEFAULT/use_syslog').with_value('') 17 | is_expected.to contain_keystone_config('DEFAULT/use_journal').with_value('') 18 | is_expected.to contain_keystone_config('DEFAULT/use_json').with_value('') 19 | is_expected.to contain_keystone_config('DEFAULT/syslog_log_facility').with_value('') 20 | is_expected.to contain_keystone_config('DEFAULT/use_stderr').with_value('') 21 | is_expected.to contain_keystone_config('DEFAULT/logging_context_format_string').with_value('') 22 | is_expected.to contain_keystone_config('DEFAULT/logging_default_format_string').with_value('') 23 | is_expected.to contain_keystone_config('DEFAULT/logging_debug_format_suffix').with_value('') 24 | is_expected.to contain_keystone_config('DEFAULT/logging_exception_prefix').with_value('') 25 | is_expected.to contain_keystone_config('DEFAULT/logging_user_identity_format').with_value('') 26 | is_expected.to contain_keystone_config('DEFAULT/default_log_levels').with_value('') 27 | is_expected.to contain_keystone_config('DEFAULT/publish_errors').with_value('') 28 | is_expected.to contain_keystone_config('DEFAULT/instance_format').with_value('') 29 | is_expected.to contain_keystone_config('DEFAULT/instance_uuid_format').with_value('') 30 | is_expected.to contain_keystone_config('DEFAULT/fatal_deprecations').with_value('') 31 | end 32 | end 33 | 34 | context 'with overridden parameters' do 35 | let :params do 36 | { :debug => true, 37 | :log_config_append => '/var/log/keystone/keystone.log', 38 | :log_date_format => '%Y-%m-%d %H:%M:%S', 39 | :log_file => '/var/log/keystone/keystone.log', 40 | :log_dir => '/var/log/keystone', 41 | :use_syslog => true, 42 | :use_journal => true, 43 | :use_json => true, 44 | :syslog_log_facility => 'LOG_USER', 45 | :use_stderr => true, 46 | :logging_context_format_string => 47 | '%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [%(request_id)s %(user_identity)s] %(instance)s%(message)s', 48 | :logging_default_format_string => '%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [-] %(instance)s%(message)s', 49 | :logging_debug_format_suffix => '%(funcName)s %(pathname)s:%(lineno)d', 50 | :logging_exception_prefix => '%(asctime)s.%(msecs)03d %(process)d ERROR %(name)s %(instance)s', 51 | :logging_user_identity_format => '%(user)s %(tenant)s %(domain)s %(user_domain)s %(project_domain)s', 52 | :default_log_levels => [ 53 | 'amqp=WARN', 'amqplib=WARN', 'boto=WARN', 'sqlalchemy=WARN', 54 | 'suds=INFO', 'iso8601=WARN', 'requests.packages.urllib3.connectionpool=WARN' ], 55 | :publish_errors => true, 56 | :instance_format => '[instance: %(uuid)s]', 57 | :instance_uuid_format => '[instance: %(uuid)s]', 58 | :fatal_deprecations => true, 59 | } 60 | end 61 | 62 | it 'configures logging' do 63 | is_expected.to contain_keystone_config('DEFAULT/debug').with_value(true) 64 | is_expected.to contain_keystone_config('DEFAULT/log_config_append').with_value('/var/log/keystone/keystone.log') 65 | is_expected.to contain_keystone_config('DEFAULT/log_date_format').with_value('%Y-%m-%d %H:%M:%S') 66 | is_expected.to contain_keystone_config('DEFAULT/log_file').with_value('/var/log/keystone/keystone.log') 67 | is_expected.to contain_keystone_config('DEFAULT/log_dir').with_value('/var/log/keystone') 68 | is_expected.to contain_keystone_config('DEFAULT/use_syslog').with_value(true) 69 | is_expected.to contain_keystone_config('DEFAULT/use_journal').with_value(true) 70 | is_expected.to contain_keystone_config('DEFAULT/use_json').with_value(true) 71 | is_expected.to contain_keystone_config('DEFAULT/syslog_log_facility').with_value('LOG_USER') 72 | is_expected.to contain_keystone_config('DEFAULT/use_stderr').with_value(true) 73 | is_expected.to contain_keystone_config('DEFAULT/logging_context_format_string').with_value( 74 | '%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [%(request_id)s %(user_identity)s] %(instance)s%(message)s') 75 | is_expected.to contain_keystone_config('DEFAULT/logging_default_format_string').with_value( 76 | '%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [-] %(instance)s%(message)s') 77 | is_expected.to contain_keystone_config('DEFAULT/logging_debug_format_suffix').with_value('%(funcName)s %(pathname)s:%(lineno)d') 78 | is_expected.to contain_keystone_config('DEFAULT/logging_exception_prefix').with_value( 79 | '%(asctime)s.%(msecs)03d %(process)d ERROR %(name)s %(instance)s') 80 | is_expected.to contain_keystone_config('DEFAULT/logging_user_identity_format').with_value( 81 | '%(user)s %(tenant)s %(domain)s %(user_domain)s %(project_domain)s') 82 | is_expected.to contain_keystone_config('DEFAULT/default_log_levels').with_value( 83 | 'amqp=WARN,amqplib=WARN,boto=WARN,iso8601=WARN,requests.packages.urllib3.connectionpool=WARN,sqlalchemy=WARN,suds=INFO') 84 | is_expected.to contain_keystone_config('DEFAULT/publish_errors').with_value(true) 85 | is_expected.to contain_keystone_config('DEFAULT/instance_format').with_value('[instance: %(uuid)s]') 86 | is_expected.to contain_keystone_config('DEFAULT/instance_uuid_format').with_value('[instance: %(uuid)s]') 87 | is_expected.to contain_keystone_config('DEFAULT/fatal_deprecations').with_value(true) 88 | end 89 | end 90 | 91 | context 'with default_log_levels set to hash' do 92 | let :params do 93 | { 94 | :default_log_levels => { 95 | 'amqp' => 'WARN', 'amqplib' => 'WARN', 'boto' => 'WARN', 'sqlalchemy' => 'WARN', 96 | 'suds' => 'INFO', 'iso8601' => 'WARN', 'requests.packages.urllib3.connectionpool' => 'WARN' 97 | }, 98 | } 99 | end 100 | 101 | it 'configures logging' do 102 | is_expected.to contain_keystone_config('DEFAULT/default_log_levels').with_value( 103 | 'amqp=WARN,amqplib=WARN,boto=WARN,iso8601=WARN,requests.packages.urllib3.connectionpool=WARN,sqlalchemy=WARN,suds=INFO') 104 | end 105 | end 106 | 107 | context 'with debug as an empty string' do 108 | let :params do 109 | { :debug => '' } 110 | end 111 | it { 112 | is_expected.to contain_keystone_config('DEFAULT/debug').with_value(false) 113 | } 114 | end 115 | end 116 | 117 | on_supported_os({ 118 | :supported_os => OSDefaults.get_supported_os 119 | }).each do |os,facts| 120 | context "on #{os}" do 121 | let (:facts) do 122 | facts.merge!(OSDefaults.get_facts()) 123 | end 124 | 125 | it_behaves_like 'oslo-log' 126 | end 127 | end 128 | end 129 | -------------------------------------------------------------------------------- /spec/defines/oslo_messaging_default_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'oslo::messaging::default' do 4 | 5 | let (:title) { 'keystone_config' } 6 | 7 | shared_examples 'oslo-messaging-default' do 8 | 9 | context 'with default parameters' do 10 | it 'configure DEFAULT default params' do 11 | is_expected.to contain_keystone_config('DEFAULT/executor_thread_pool_size').with_value('') 12 | is_expected.to contain_keystone_config('DEFAULT/rpc_response_timeout').with_value('') 13 | is_expected.to contain_keystone_config('DEFAULT/transport_url').with_value('').with_secret(true) 14 | is_expected.to contain_keystone_config('DEFAULT/control_exchange').with_value('') 15 | end 16 | 17 | end 18 | 19 | context 'with overridden parameters' do 20 | let :params do 21 | { 22 | :executor_thread_pool_size => '64', 23 | :rpc_response_timeout => '42', 24 | :transport_url => 'fake://', 25 | :control_exchange => 'openstack', 26 | } 27 | end 28 | 29 | it 'configure DEFAULT with overridden values' do 30 | is_expected.to contain_keystone_config('DEFAULT/executor_thread_pool_size').with_value('64') 31 | is_expected.to contain_keystone_config('DEFAULT/rpc_response_timeout').with_value('42') 32 | is_expected.to contain_keystone_config('DEFAULT/transport_url').with_value('fake://').with_secret(true) 33 | is_expected.to contain_keystone_config('DEFAULT/control_exchange').with_value('openstack') 34 | end 35 | end 36 | end 37 | 38 | on_supported_os({ 39 | :supported_os => OSDefaults.get_supported_os 40 | }).each do |os,facts| 41 | context "on #{os}" do 42 | let (:facts) do 43 | facts.merge!(OSDefaults.get_facts()) 44 | end 45 | 46 | it_behaves_like 'oslo-messaging-default' 47 | end 48 | end 49 | end 50 | -------------------------------------------------------------------------------- /spec/defines/oslo_messaging_notifications_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'oslo::messaging::notifications' do 4 | 5 | let (:title) { 'keystone_config' } 6 | 7 | shared_examples 'oslo-messaging-notifications' do 8 | 9 | context 'with default parameters' do 10 | it 'configure oslo_messaging_notifications default params' do 11 | is_expected.to contain_keystone_config('oslo_messaging_notifications/driver').with_value('') 12 | is_expected.to contain_keystone_config('oslo_messaging_notifications/transport_url').with_value('').with_secret(true) 13 | is_expected.to contain_keystone_config('oslo_messaging_notifications/topics').with_value('') 14 | is_expected.to contain_keystone_config('oslo_messaging_notifications/retry').with_value('') 15 | end 16 | 17 | end 18 | 19 | context 'with overridden parameters' do 20 | let :params do 21 | { :driver => ['messaging', 'messagingv2'], 22 | :transport_url => 'fake://', 23 | :topics => ['foo', 'baa'], 24 | :retry => -1, 25 | } 26 | end 27 | 28 | it 'configure oslo_messaging_notifications with overridden values' do 29 | is_expected.to contain_keystone_config('oslo_messaging_notifications/driver').with_value(['messaging', 'messagingv2']) 30 | is_expected.to contain_keystone_config('oslo_messaging_notifications/transport_url').with_value('fake://').with_secret(true) 31 | is_expected.to contain_keystone_config('oslo_messaging_notifications/topics').with_value('foo,baa') 32 | is_expected.to contain_keystone_config('oslo_messaging_notifications/retry').with_value(-1) 33 | end 34 | end 35 | 36 | context 'with a single item in lists' do 37 | let :params do 38 | { :driver => ['messaging'], 39 | :topics => ['notifications'], 40 | } 41 | end 42 | 43 | it 'configure oslo_messaging_notifications with overridden values' do 44 | is_expected.to contain_keystone_config('oslo_messaging_notifications/driver').with_value(['messaging']) 45 | is_expected.to contain_keystone_config('oslo_messaging_notifications/topics').with_value('notifications') 46 | end 47 | end 48 | 49 | context 'with string in list parameters' do 50 | let :params do 51 | { 52 | :driver => 'messaging', 53 | :topics => 'notifications', 54 | } 55 | end 56 | 57 | it 'configures oslo_messaging_notifications section with overridden list values as strings' do 58 | is_expected.to contain_keystone_config('oslo_messaging_notifications/driver').with_value('messaging') 59 | is_expected.to contain_keystone_config('oslo_messaging_notifications/topics').with_value('notifications') 60 | end 61 | end 62 | end 63 | 64 | on_supported_os({ 65 | :supported_os => OSDefaults.get_supported_os 66 | }).each do |os,facts| 67 | context "on #{os}" do 68 | let (:facts) do 69 | facts.merge!(OSDefaults.get_facts()) 70 | end 71 | 72 | it_behaves_like 'oslo-messaging-notifications' 73 | end 74 | end 75 | end 76 | -------------------------------------------------------------------------------- /spec/defines/oslo_middleware_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'oslo::middleware' do 4 | 5 | let (:title) { 'keystone_config' } 6 | 7 | shared_examples 'shared examples' do 8 | 9 | context 'with default parameters' do 10 | it 'configure oslo_middleware default params' do 11 | is_expected.to contain_keystone_config('oslo_middleware/max_request_body_size').with_value('') 12 | is_expected.to contain_keystone_config('oslo_middleware/enable_proxy_headers_parsing').with_value('') 13 | is_expected.to contain_keystone_config('oslo_middleware/http_basic_auth_user_file').with_value('') 14 | end 15 | 16 | end 17 | 18 | context 'with overridden parameters' do 19 | let :params do 20 | { 21 | :max_request_body_size => 114600, 22 | :enable_proxy_headers_parsing => true, 23 | :http_basic_auth_user_file => '/etc/htpasswd', 24 | } 25 | end 26 | it 'configure oslo_middleware with overridden values' do 27 | is_expected.to contain_keystone_config('oslo_middleware/max_request_body_size').with_value(114600) 28 | is_expected.to contain_keystone_config('oslo_middleware/enable_proxy_headers_parsing').with_value(true) 29 | is_expected.to contain_keystone_config('oslo_middleware/http_basic_auth_user_file').with_value('/etc/htpasswd') 30 | end 31 | 32 | end 33 | end 34 | 35 | on_supported_os({ 36 | :supported_os => OSDefaults.get_supported_os 37 | }).each do |os,facts| 38 | context "on #{os}" do 39 | let (:facts) do 40 | facts.merge!(OSDefaults.get_facts()) 41 | end 42 | 43 | include_examples 'shared examples' 44 | end 45 | end 46 | end 47 | -------------------------------------------------------------------------------- /spec/defines/oslo_os_brick_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'oslo::os_brick' do 4 | 5 | let (:title) { 'keystone_config' } 6 | 7 | shared_examples 'oslo::os_brick' do 8 | 9 | context 'with defaults' do 10 | it 'configures the default values' do 11 | is_expected.to contain_keystone_config('os_brick/lock_path').with_value('') 12 | is_expected.to contain_keystone_config('os_brick/wait_mpath_device_attempts').with_value('') 13 | is_expected.to contain_keystone_config('os_brick/wait_mpath_device_interval').with_value('') 14 | end 15 | end 16 | 17 | context 'with parameters overridden' do 18 | let :params do 19 | { 20 | :lock_path => '/var/lib/openstack/lock', 21 | :wait_mpath_device_attempts => 4, 22 | :wait_mpath_device_interval => 1, 23 | } 24 | end 25 | 26 | it 'configures the overridden values' do 27 | is_expected.to contain_keystone_config('os_brick/lock_path').with_value('/var/lib/openstack/lock') 28 | is_expected.to contain_keystone_config('os_brick/wait_mpath_device_attempts').with_value(4) 29 | is_expected.to contain_keystone_config('os_brick/wait_mpath_device_interval').with_value(1) 30 | end 31 | end 32 | end 33 | 34 | on_supported_os({ 35 | :supported_os => OSDefaults.get_supported_os 36 | }).each do |os,facts| 37 | context "on #{os}" do 38 | let (:facts) do 39 | facts.merge!(OSDefaults.get_facts()) 40 | end 41 | 42 | include_examples 'oslo::os_brick' 43 | end 44 | end 45 | end 46 | -------------------------------------------------------------------------------- /spec/defines/oslo_policy_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'oslo::policy' do 4 | 5 | let (:title) { 'keystone_config' } 6 | 7 | shared_examples 'oslo-policy' do 8 | 9 | context 'with default parameters' do 10 | it 'configure oslo_policy default params' do 11 | is_expected.to contain_keystone_config('oslo_policy/enforce_scope').with_value('') 12 | is_expected.to contain_keystone_config('oslo_policy/enforce_new_defaults').with_value('') 13 | is_expected.to contain_keystone_config('oslo_policy/policy_file').with_value('') 14 | is_expected.to contain_keystone_config('oslo_policy/policy_default_rule').with_value('') 15 | is_expected.to contain_keystone_config('oslo_policy/policy_dirs').with_value('') 16 | end 17 | end 18 | 19 | context 'with overridden parameters' do 20 | let :params do 21 | { 22 | :enforce_scope => false, 23 | :enforce_new_defaults => false, 24 | :policy_file => '/path/to/policy.file', 25 | :policy_default_rule => 'some rule', 26 | :policy_dirs => 'dir1', 27 | } 28 | end 29 | 30 | it 'configures oslo_policy section' do 31 | is_expected.to contain_keystone_config('oslo_policy/enforce_scope').with_value(false) 32 | is_expected.to contain_keystone_config('oslo_policy/enforce_new_defaults').with_value(false) 33 | is_expected.to contain_keystone_config('oslo_policy/policy_file').with_value('/path/to/policy.file') 34 | is_expected.to contain_keystone_config('oslo_policy/policy_default_rule').with_value('some rule') 35 | is_expected.to contain_keystone_config('oslo_policy/policy_dirs').with_value('dir1') 36 | end 37 | end 38 | end 39 | 40 | on_supported_os({ 41 | :supported_os => OSDefaults.get_supported_os 42 | }).each do |os,facts| 43 | context "on #{os}" do 44 | let (:facts) do 45 | facts.merge!(OSDefaults.get_facts()) 46 | end 47 | 48 | it_behaves_like 'oslo-policy' 49 | end 50 | end 51 | end 52 | -------------------------------------------------------------------------------- /spec/defines/oslo_privsep_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'oslo::privsep' do 4 | 5 | let (:title) { 'osbrick' } 6 | 7 | let :params do 8 | { :config => 'keystone_config' } 9 | end 10 | 11 | shared_examples 'oslo-privsep' do 12 | 13 | context 'with default parameters' do 14 | it 'configure oslo_privsep default params' do 15 | is_expected.to contain_keystone_config('privsep_osbrick/user').with_value('') 16 | is_expected.to contain_keystone_config('privsep_osbrick/group').with_value('') 17 | is_expected.to contain_keystone_config('privsep_osbrick/capabilities').with_value('') 18 | is_expected.to contain_keystone_config('privsep_osbrick/thread_pool_size').with_value('') 19 | is_expected.to contain_keystone_config('privsep_osbrick/helper_command').with_value('') 20 | is_expected.to contain_keystone_config('privsep_osbrick/logger_name').with_value('') 21 | end 22 | end 23 | 24 | context 'with overridden parameters' do 25 | before do 26 | params.merge!({ 27 | :user => 'keystone', 28 | :group => 'keystone', 29 | :capabilities => [], 30 | :thread_pool_size => 1, 31 | :helper_command => 'sudo nova-rootwrap /etc/nova/rootwrap.conf privsep-helper --config-file /etc/nova/nova.conf', 32 | :logger_name => 'oslo_privsep.daemon', 33 | }) 34 | end 35 | 36 | it 'configures oslo_privsep section' do 37 | is_expected.to contain_keystone_config('privsep_osbrick/user').with_value('keystone') 38 | is_expected.to contain_keystone_config('privsep_osbrick/group').with_value('keystone') 39 | is_expected.to contain_keystone_config('privsep_osbrick/capabilities').with_value([]) 40 | is_expected.to contain_keystone_config('privsep_osbrick/thread_pool_size').with_value(1) 41 | is_expected.to contain_keystone_config('privsep_osbrick/helper_command').with_value('sudo nova-rootwrap /etc/nova/rootwrap.conf privsep-helper --config-file /etc/nova/nova.conf') 42 | is_expected.to contain_keystone_config('privsep_osbrick/logger_name').with_value('oslo_privsep.daemon') 43 | end 44 | end 45 | 46 | context 'with config group' do 47 | before do 48 | params.merge!({ 49 | :config_group => 'mysection' 50 | }) 51 | end 52 | 53 | it 'configure oslo_privsep default params' do 54 | is_expected.to contain_keystone_config('mysection/user').with_value('') 55 | is_expected.to contain_keystone_config('mysection/group').with_value('') 56 | is_expected.to contain_keystone_config('mysection/capabilities').with_value('') 57 | is_expected.to contain_keystone_config('mysection/thread_pool_size').with_value('') 58 | is_expected.to contain_keystone_config('mysection/helper_command').with_value('') 59 | is_expected.to contain_keystone_config('mysection/logger_name').with_value('') 60 | end 61 | end 62 | 63 | end 64 | 65 | on_supported_os({ 66 | :supported_os => OSDefaults.get_supported_os 67 | }).each do |os,facts| 68 | context "on #{os}" do 69 | let (:facts) do 70 | facts.merge!(OSDefaults.get_facts()) 71 | end 72 | 73 | it_behaves_like 'oslo-privsep' 74 | end 75 | end 76 | end 77 | -------------------------------------------------------------------------------- /spec/defines/oslo_reports_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'oslo::reports' do 4 | 5 | let (:title) { 'keystone_config' } 6 | 7 | shared_examples 'oslo::reports' do 8 | 9 | context 'with default parameters' do 10 | let :params do 11 | {} 12 | end 13 | 14 | it 'configure reports default params' do 15 | is_expected.to contain_keystone_config('oslo_reports/log_dir').with_value('') 16 | is_expected.to contain_keystone_config('oslo_reports/file_event_handler').with_value('') 17 | is_expected.to contain_keystone_config('oslo_reports/file_event_handler_interval').with_value('') 18 | end 19 | 20 | it 'should not manage the oslo.reports package' do 21 | is_expected.to_not contain_package('oslo.reports') 22 | end 23 | end 24 | 25 | context 'with parameters overridden' do 26 | let :params do 27 | { 28 | :log_dir => '/var/log/keystone', 29 | :file_event_handler => '/var/tmp/keystone/reports', 30 | :file_event_handler_interval => 1, 31 | } 32 | end 33 | 34 | it 'configure oslo_reports params' do 35 | is_expected.to contain_keystone_config('oslo_reports/log_dir').with_value('/var/log/keystone') 36 | is_expected.to contain_keystone_config('oslo_reports/file_event_handler').with_value('/var/tmp/keystone/reports') 37 | is_expected.to contain_keystone_config('oslo_reports/file_event_handler_interval').with_value(1) 38 | end 39 | end 40 | 41 | context 'with package management enabled' do 42 | let :params do 43 | { :manage_package => true } 44 | end 45 | 46 | it 'should not manage the oslo.reports package' do 47 | is_expected.to contain_package('oslo.reports').with( 48 | :ensure => 'installed', 49 | :name => platform_params[:oslo_reports_package_name], 50 | :tag => ['openstack'], 51 | ) 52 | end 53 | end 54 | end 55 | 56 | on_supported_os({ 57 | :supported_os => OSDefaults.get_supported_os 58 | }).each do |os,facts| 59 | context "on #{os}" do 60 | let (:facts) do 61 | facts.merge!(OSDefaults.get_facts()) 62 | end 63 | 64 | let(:platform_params) do 65 | case facts[:os]['family'] 66 | when 'Debian' 67 | { :oslo_reports_package_name => 'python3-oslo.reports' } 68 | when 'RedHat' 69 | { :oslo_reports_package_name => 'python3-oslo-reports' } 70 | end 71 | end 72 | 73 | include_examples 'oslo::reports' 74 | end 75 | end 76 | end 77 | -------------------------------------------------------------------------------- /spec/defines/oslo_service_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'oslo::service' do 4 | 5 | let (:title) { 'keystone_config' } 6 | 7 | shared_examples 'oslo::service' do 8 | 9 | context 'with default parameters' do 10 | it 'configures service parameters' do 11 | is_expected.to contain_keystone_config('DEFAULT/backdoor_port').with_value('') 12 | is_expected.to contain_keystone_config('DEFAULT/backdoor_socket').with_value('') 13 | is_expected.to contain_keystone_config('DEFAULT/graceful_shutdown_timeout').with_value('') 14 | is_expected.to contain_keystone_config('DEFAULT/log_options').with_value('') 15 | is_expected.to contain_keystone_config('DEFAULT/run_external_periodic_tasks').with_value('') 16 | end 17 | end 18 | 19 | context 'with overridden parameters' do 20 | let :params do 21 | { 22 | :backdoor_port => '1234', 23 | :backdoor_socket => 'backdoor.sock', 24 | :graceful_shutdown_timeout => '60', 25 | :log_options => true, 26 | :run_external_periodic_tasks => true, 27 | } 28 | end 29 | 30 | it 'configures service parameters' do 31 | is_expected.to contain_keystone_config('DEFAULT/backdoor_port').with_value('1234') 32 | is_expected.to contain_keystone_config('DEFAULT/backdoor_socket').with_value('backdoor.sock') 33 | is_expected.to contain_keystone_config('DEFAULT/graceful_shutdown_timeout').with_value('60') 34 | is_expected.to contain_keystone_config('DEFAULT/log_options').with_value(true) 35 | is_expected.to contain_keystone_config('DEFAULT/run_external_periodic_tasks').with_value(true) 36 | end 37 | end 38 | end 39 | 40 | on_supported_os({ 41 | :supported_os => OSDefaults.get_supported_os 42 | }).each do |os,facts| 43 | context "on #{os}" do 44 | let (:facts) do 45 | facts.merge!(OSDefaults.get_facts()) 46 | end 47 | 48 | it_behaves_like 'oslo::service' 49 | end 50 | end 51 | end 52 | -------------------------------------------------------------------------------- /spec/defines/oslo_service_ssl_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'oslo::service::ssl' do 4 | 5 | let (:title) { 'keystone_config' } 6 | 7 | shared_examples 'oslo::service::ssl' do 8 | 9 | context 'with default parameters' do 10 | it 'configures ssl parameters' do 11 | is_expected.to contain_keystone_config('ssl/ca_file').with_value('') 12 | is_expected.to contain_keystone_config('ssl/cert_file').with_value('') 13 | is_expected.to contain_keystone_config('ssl/ciphers').with_value('') 14 | is_expected.to contain_keystone_config('ssl/key_file').with_value('') 15 | is_expected.to contain_keystone_config('ssl/version').with_value('') 16 | end 17 | end 18 | 19 | context 'with overridden parameters' do 20 | let :params do 21 | { 22 | :ca_file => '/path/to/ca/file', 23 | :cert_file => '/path/to/cert/file', 24 | :ciphers => 'HIGH:!RC4:!MD5:!aNULL:!eNULL:!EXP:!LOW:!MEDIUM', 25 | :key_file => '/path/to/key/file', 26 | :version => 'TLSv1', 27 | } 28 | end 29 | 30 | it 'configures ssl parameters' do 31 | is_expected.to contain_keystone_config('ssl/ca_file').with_value('/path/to/ca/file') 32 | is_expected.to contain_keystone_config('ssl/cert_file').with_value('/path/to/cert/file') 33 | is_expected.to contain_keystone_config('ssl/ciphers').with_value('HIGH:!RC4:!MD5:!aNULL:!eNULL:!EXP:!LOW:!MEDIUM') 34 | is_expected.to contain_keystone_config('ssl/key_file').with_value('/path/to/key/file') 35 | is_expected.to contain_keystone_config('ssl/version').with_value('TLSv1') 36 | end 37 | end 38 | 39 | context 'with only cert_file' do 40 | let :params do 41 | { 42 | :cert_file => '/path/to/cert/file', 43 | } 44 | end 45 | 46 | it 'fails because of incomplete input' do 47 | should raise_error(Puppet::Error) 48 | end 49 | end 50 | 51 | context 'with only key_file' do 52 | let :params do 53 | { 54 | :key_file => '/path/to/key/file', 55 | } 56 | end 57 | 58 | it 'fails because of incomplete input' do 59 | should raise_error(Puppet::Error) 60 | end 61 | end 62 | 63 | context 'with list values' do 64 | let :params do 65 | { 66 | :ciphers => ['HIGH', '!RC4', '!MD5', '!aNULL', '!eNULL', '!EXP', '!LOW', '!MEDIUM'], 67 | } 68 | end 69 | it 'configures ssl parameters' do 70 | is_expected.to contain_keystone_config('ssl/ciphers').with_value('HIGH:!RC4:!MD5:!aNULL:!eNULL:!EXP:!LOW:!MEDIUM') 71 | end 72 | end 73 | end 74 | 75 | on_supported_os({ 76 | :supported_os => OSDefaults.get_supported_os 77 | }).each do |os,facts| 78 | context "on #{os}" do 79 | let (:facts) do 80 | facts.merge!(OSDefaults.get_facts()) 81 | end 82 | 83 | it_behaves_like 'oslo::service::ssl' 84 | end 85 | end 86 | end 87 | -------------------------------------------------------------------------------- /spec/defines/oslo_service_wsgi_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'oslo::service::wsgi' do 4 | 5 | let (:title) { 'keystone_config' } 6 | 7 | shared_examples 'oslo::service::wsgi' do 8 | 9 | context 'with default parameters' do 10 | it 'configures wsgi parameters' do 11 | is_expected.to contain_keystone_config('DEFAULT/api_paste_config').with_value('') 12 | is_expected.to contain_keystone_config('DEFAULT/client_socket_timeout').with_value('') 13 | is_expected.to contain_keystone_config('DEFAULT/max_header_line').with_value('') 14 | is_expected.to contain_keystone_config('DEFAULT/tcp_keepidle').with_value('') 15 | is_expected.to contain_keystone_config('DEFAULT/wsgi_default_pool_size').with_value('') 16 | is_expected.to contain_keystone_config('DEFAULT/wsgi_keep_alive').with_value('') 17 | is_expected.to contain_keystone_config('DEFAULT/wsgi_log_format').with_value('') 18 | end 19 | end 20 | 21 | context 'with overridden parameters' do 22 | let :params do 23 | { 24 | :api_paste_config => 'api-paste.ini', 25 | :client_socket_timeout => '900', 26 | :max_header_line => '16384', 27 | :tcp_keepidle => '600', 28 | :wsgi_default_pool_size => '1000', 29 | :wsgi_keep_alive => true, 30 | :wsgi_log_format => '%(client_ip)s "%(request_line)s" status: %(status_code)s len: %(body_length)s time: %(wall_seconds).7f', 31 | } 32 | end 33 | 34 | it 'configures wsgi parameters' do 35 | is_expected.to contain_keystone_config('DEFAULT/api_paste_config').with_value('api-paste.ini') 36 | is_expected.to contain_keystone_config('DEFAULT/client_socket_timeout').with_value('900') 37 | is_expected.to contain_keystone_config('DEFAULT/max_header_line').with_value('16384') 38 | is_expected.to contain_keystone_config('DEFAULT/tcp_keepidle').with_value('600') 39 | is_expected.to contain_keystone_config('DEFAULT/wsgi_default_pool_size').with_value('1000') 40 | is_expected.to contain_keystone_config('DEFAULT/wsgi_keep_alive').with_value(true) 41 | is_expected.to contain_keystone_config('DEFAULT/wsgi_log_format').with_value( 42 | '%(client_ip)s "%(request_line)s" status: %(status_code)s len: %(body_length)s time: %(wall_seconds).7f') 43 | end 44 | end 45 | end 46 | 47 | on_supported_os({ 48 | :supported_os => OSDefaults.get_supported_os 49 | }).each do |os,facts| 50 | context "on #{os}" do 51 | let (:facts) do 52 | facts.merge!(OSDefaults.get_facts()) 53 | end 54 | 55 | it_behaves_like 'oslo::service::wsgi' 56 | end 57 | end 58 | end 59 | -------------------------------------------------------------------------------- /spec/defines/oslo_versionedobjects_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'oslo::versionedobjects' do 4 | 5 | let (:title) { 'keystone_config' } 6 | 7 | shared_examples 'oslo-versionedobjects' do 8 | 9 | context 'with default parameters' do 10 | it 'configure oslo_versionedobjects default params' do 11 | is_expected.to contain_keystone_config('oslo_versionedobjects/fatal_exception_format_errors').with_value('') 12 | end 13 | 14 | end 15 | 16 | context 'with overridden parameters' do 17 | let :params do 18 | { :fatal_exception_format_errors => true, 19 | } 20 | end 21 | it 'configure oslo_versionedobjects with overridden values' do 22 | is_expected.to contain_keystone_config('oslo_versionedobjects/fatal_exception_format_errors').with_value(true) 23 | end 24 | 25 | end 26 | end 27 | 28 | on_supported_os({ 29 | :supported_os => OSDefaults.get_supported_os 30 | }).each do |os,facts| 31 | context "on #{os}" do 32 | let (:facts) do 33 | facts.merge!(OSDefaults.get_facts()) 34 | end 35 | 36 | it_behaves_like 'oslo-versionedobjects' 37 | end 38 | end 39 | 40 | end 41 | -------------------------------------------------------------------------------- /spec/shared_examples.rb: -------------------------------------------------------------------------------- 1 | shared_examples_for "a Puppet::Error" do |description| 2 | it "with message matching #{description.inspect}" do 3 | expect { is_expected.to have_class_count(1) }.to raise_error(Puppet::Error, description) 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/spec_helper.rb: -------------------------------------------------------------------------------- 1 | require 'puppetlabs_spec_helper/module_spec_helper' 2 | require 'shared_examples' 3 | require 'puppet-openstack_spec_helper/facts' 4 | 5 | fixture_path = File.expand_path(File.join(File.dirname(__FILE__), 'fixtures')) 6 | 7 | RSpec.configure do |c| 8 | c.alias_it_should_behave_like_to :it_configures, 'configures' 9 | c.alias_it_should_behave_like_to :it_raises, 'raises' 10 | 11 | c.module_path = File.join(fixture_path, 'modules') 12 | end 13 | 14 | at_exit { RSpec::Puppet::Coverage.report! } 15 | -------------------------------------------------------------------------------- /spec/spec_helper_acceptance.rb: -------------------------------------------------------------------------------- 1 | require 'puppet-openstack_spec_helper/litmus_spec_helper' 2 | -------------------------------------------------------------------------------- /spec/type_aliases/dbconn_mysql_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Oslo::Dbconn::Mysql' do 4 | describe 'valid types' do 5 | context 'with valid types' do 6 | [ 7 | 'mysql+pymysql://db:db@localhost/db', 8 | ].each do |value| 9 | describe value.inspect do 10 | it { is_expected.to allow_value(value) } 11 | end 12 | end 13 | end 14 | end 15 | 16 | describe 'invalid types' do 17 | context 'with garbage inputs' do 18 | [ 19 | 'postgresql://db:db@localhost/db', 20 | 'postgresql+psycopg2://db:db@localhost/db', 21 | 'sqlite:///var/lib/db.db', 22 | 'mongodb://db:db@localhost/db', 23 | ].each do |value| 24 | describe value.inspect do 25 | it { is_expected.not_to allow_value(value) } 26 | end 27 | end 28 | end 29 | end 30 | end 31 | 32 | -------------------------------------------------------------------------------- /spec/type_aliases/dbconn_postgres_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Oslo::Dbconn::Postgres' do 4 | describe 'valid types' do 5 | context 'with valid types' do 6 | [ 7 | 'postgresql://db:db@localhost/db', 8 | 'postgresql+psycopg2://db:db@localhost/db', 9 | ].each do |value| 10 | describe value.inspect do 11 | it { is_expected.to allow_value(value) } 12 | end 13 | end 14 | end 15 | end 16 | 17 | describe 'invalid types' do 18 | context 'with garbage inputs' do 19 | [ 20 | 'mysql+pymysql://db:db@localhost/db', 21 | 'sqlite:///var/lib/db.db', 22 | 'mongodb://db:db@localhost/db', 23 | ].each do |value| 24 | describe value.inspect do 25 | it { is_expected.not_to allow_value(value) } 26 | end 27 | end 28 | end 29 | end 30 | end 31 | 32 | -------------------------------------------------------------------------------- /spec/type_aliases/dbconn_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Oslo::Dbconn' do 4 | describe 'valid types' do 5 | context 'with valid types' do 6 | [ 7 | 'mysql+pymysql://db:db@localhost/db', 8 | 'postgresql://db:db@localhost/db', 9 | 'postgresql+psycopg2://db:db@localhost/db', 10 | 'sqlite:///var/lib/db.db', 11 | '', 12 | ].each do |value| 13 | describe value.inspect do 14 | it { is_expected.to allow_value(value) } 15 | end 16 | end 17 | end 18 | end 19 | 20 | describe 'invalid types' do 21 | context 'with garbage inputs' do 22 | [ 23 | 'foo://db:db@localhost/db', 24 | 'foo+pymysql://db:db@localhost/db', 25 | 'mongodb://db:db@localhost/db', 26 | true, 27 | false, 28 | nil, 29 | { 'foo' => 'bar' }, 30 | {}, 31 | '', 32 | 55555, 33 | ].each do |value| 34 | describe value.inspect do 35 | it { is_expected.not_to allow_value(value) } 36 | end 37 | end 38 | end 39 | end 40 | end 41 | 42 | -------------------------------------------------------------------------------- /spec/type_aliases/dbconn_sqlite_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Oslo::Dbconn::Sqlite' do 4 | describe 'valid types' do 5 | context 'with valid types' do 6 | [ 7 | 'sqlite:///var/lib/db.db', 8 | ].each do |value| 9 | describe value.inspect do 10 | it { is_expected.to allow_value(value) } 11 | end 12 | end 13 | end 14 | end 15 | 16 | describe 'invalid types' do 17 | context 'with garbage inputs' do 18 | [ 19 | 'mysql+pymysql://db:db@localhost/db', 20 | 'postgresql://db:db@localhost/db', 21 | 'postgresql+psycopg2://db:db@localhost/db', 22 | 'mongodb://db:db@localhost/db', 23 | ].each do |value| 24 | describe value.inspect do 25 | it { is_expected.not_to allow_value(value) } 26 | end 27 | end 28 | end 29 | end 30 | end 31 | 32 | -------------------------------------------------------------------------------- /spec/type_aliases/transporturl_fake_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Oslo::TransportURL::Fake' do 4 | describe 'valid types' do 5 | context 'with valid types' do 6 | [ 7 | 'fake://' 8 | ].each do |value| 9 | describe value.inspect do 10 | it { is_expected.to allow_value(value) } 11 | end 12 | end 13 | end 14 | end 15 | 16 | describe 'invalid types' do 17 | context 'with garbage inputs' do 18 | [ 19 | 'fakes://', 20 | 'afake://', 21 | 'fake://host', 22 | 'fake:/', 23 | 'fake:///', 24 | 'rabbit://rabbit_user:password@localhost:5673', 25 | '', 26 | ].each do |value| 27 | describe value.inspect do 28 | it { is_expected.not_to allow_value(value) } 29 | end 30 | end 31 | end 32 | end 33 | end 34 | 35 | -------------------------------------------------------------------------------- /spec/type_aliases/transporturl_rabbit_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Oslo::TransportURL::Rabbit' do 4 | describe 'valid types' do 5 | context 'with valid types' do 6 | [ 7 | 'rabbit://rabbit_user:password@localhost:5673', 8 | 'kombu://rabbit_user:password@localhost:5673', 9 | ].each do |value| 10 | describe value.inspect do 11 | it { is_expected.to allow_value(value) } 12 | end 13 | end 14 | end 15 | end 16 | 17 | describe 'invalid types' do 18 | context 'with garbage inputs' do 19 | [ 20 | 'rabbits://rabbit_user:password@localhost:5673', 21 | 'arabbit://rabbit_user:password@localhost:5673', 22 | 'rabbit:/rabbit_user:password@localhost:5673', 23 | 'rabbit:///rabbit_user:password@localhost:5673', 24 | 'rabbit://', 25 | 'kombus://rabbit_user:password@localhost:5673', 26 | 'akombu://rabbit_user:password@localhost:5673', 27 | 'kombu:/rabbit_user:password@localhost:5673', 28 | 'kombu:///rabbit_user:password@localhost:5673', 29 | 'kombu://', 30 | 'fake://', 31 | '', 32 | ].each do |value| 33 | describe value.inspect do 34 | it { is_expected.not_to allow_value(value) } 35 | end 36 | end 37 | end 38 | end 39 | end 40 | 41 | -------------------------------------------------------------------------------- /spec/type_aliases/transporturl_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Oslo::TransportURL' do 4 | describe 'valid types' do 5 | context 'with valid types' do 6 | [ 7 | 'rabbit://rabbit_user:password@localhost:5673', 8 | 'kombu://rabbit_user:password@localhost:5673', 9 | 'fake://', 10 | '', 11 | ].each do |value| 12 | describe value.inspect do 13 | it { is_expected.to allow_value(value) } 14 | end 15 | end 16 | end 17 | end 18 | 19 | describe 'invalid types' do 20 | context 'with garbage inputs' do 21 | [ 22 | 'amqp://amqp_user:password@localhost:5672', 23 | ].each do |value| 24 | describe value.inspect do 25 | it { is_expected.not_to allow_value(value) } 26 | end 27 | end 28 | end 29 | end 30 | end 31 | 32 | -------------------------------------------------------------------------------- /tox.ini: -------------------------------------------------------------------------------- 1 | [tox] 2 | minversion = 3.1 3 | skipsdist = True 4 | envlist = releasenotes 5 | ignore_basepython_conflict = True 6 | 7 | [testenv] 8 | basepython = python3 9 | 10 | [testenv:releasenotes] 11 | deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} 12 | -r{toxinidir}/doc/requirements.txt 13 | commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html 14 | -------------------------------------------------------------------------------- /types/dbconn.pp: -------------------------------------------------------------------------------- 1 | type Oslo::Dbconn = Variant[ 2 | Oslo::Dbconn::Sqlite, 3 | Oslo::Dbconn::Mysql, 4 | Oslo::Dbconn::Postgres, 5 | Openstacklib::Servicedefault, 6 | ] 7 | -------------------------------------------------------------------------------- /types/dbconn/mysql.pp: -------------------------------------------------------------------------------- 1 | type Oslo::Dbconn::Mysql = Pattern[/^mysql(\+pymysql)?:\/\/(\S+:\S+@\S+\/\S+)?/] 2 | -------------------------------------------------------------------------------- /types/dbconn/postgres.pp: -------------------------------------------------------------------------------- 1 | type Oslo::Dbconn::Postgres = Pattern[/^postgresql(\+psycopg2)?:\/\/(\S+:\S+@\S+\/\S+)?/] 2 | -------------------------------------------------------------------------------- /types/dbconn/sqlite.pp: -------------------------------------------------------------------------------- 1 | type Oslo::Dbconn::Sqlite = Pattern[/^sqlite:\/\//] 2 | -------------------------------------------------------------------------------- /types/transporturl.pp: -------------------------------------------------------------------------------- 1 | type Oslo::TransportURL = Variant[ 2 | Oslo::TransportURL::Rabbit, 3 | Oslo::TransportURL::Fake, 4 | Openstacklib::Servicedefault, 5 | ] 6 | -------------------------------------------------------------------------------- /types/transporturl/fake.pp: -------------------------------------------------------------------------------- 1 | type Oslo::TransportURL::Fake = Pattern[ 2 | /^(fake):\/\/$/ 3 | ] 4 | -------------------------------------------------------------------------------- /types/transporturl/rabbit.pp: -------------------------------------------------------------------------------- 1 | type Oslo::TransportURL::Rabbit = Pattern[ 2 | /^(rabbit|kombu):\/\/[^\/].*/ 3 | ] 4 | --------------------------------------------------------------------------------