Retire puppet-qdr: Remove Project Content

Depends-on: https://review.opendev.org/c/openstack/project-config/+/907951
Change-Id: I77f7bc94b8d1b3459c64f44f5d18d5f8c747ae4a
This commit is contained in:
Takashi Kajinami 2024-02-06 16:04:56 +09:00
parent e349e5feba
commit 31aeb84bae
64 changed files with 8 additions and 2647 deletions

View File

@ -1,6 +0,0 @@
fixtures:
repositories:
"stdlib": "https://github.com/puppetlabs/puppetlabs-stdlib.git"
"apt": "https://github.com/puppetlabs/puppetlabs-apt.git"
symlinks:
"qdr": "#{source_dir}"

26
.gitignore vendored
View File

@ -1,26 +0,0 @@
# Add patterns in here to exclude files created by tools integrated with this
# repository, such as test frameworks from the project's recommended workflow,
# rendered documentation and package builds.
#
# Don't add patterns to exclude files created by preferred personal tools
# (editors, IDEs, your operating system itself even). These should instead be
# maintained outside the repository, for example in a ~/.gitignore file added
# with:
#
# git config --global core.excludesfile '~/.gitignore'
pkg/
Gemfile.lock
vendor/
spec/fixtures/
.vagrant/
.bundle/
coverage/
.idea/
*.iml
/openstack
/log
# Files created by releasenotes build
releasenotes/build
.tox

View File

@ -1,52 +0,0 @@
# common list used in puppetlabs repos
.git/
.*.sw[op]
.metadata
.yardoc
.yardwarns
*.iml
/.bundle/
/.idea/
/.vagrant/
/coverage/
/bin/
/doc/
/Gemfile.local
/Gemfile.lock
/junit/
/log/
/pkg/
/spec/fixtures/manifests/
/spec/fixtures/modules/*
/tmp/
/vendor/
/convert_report.txt
/update_report.txt
.DS_Store
.project
.envrc
/inventory.yaml
/spec/fixtures/litmus_inventory.yaml
/.fixtures.yml
/Gemfile
/.gitattributes
/.gitignore
/.pdkignore
/.puppet-lint.rc
/Rakefile
/rakelib/
/.rspec
/..yml
/.yardopts
/spec/
/.vscode/
/.sync.yml
/.devcontainer/
# OpenStack-specific files
/bindep.txt
/.gitreview
/releasenotes/
/setup.cfg
/setup.py
/tox.ini
/.zuul.yaml

View File

@ -1,6 +0,0 @@
- project:
templates:
- puppet-openstack-check-jobs
- puppet-openstack-module-unit-jobs
- puppet-openstack-litmus-jobs
- release-notes-jobs-python3

View File

@ -1,19 +0,0 @@
The source repository for this project can be found at:
https://opendev.org/openstack/puppet-qdr
Pull requests submitted through GitHub are not monitored.
To start contributing to OpenStack, follow the steps in the contribution guide
to set up and use Gerrit:
https://docs.openstack.org/contributors/code-and-documentation/quick-start.html
Bugs should be filed on Launchpad:
https://bugs.launchpad.net/puppet-qdr
For more specific information about contributing to this repository, see the
Puppet OpenStack contributor guide:
https://docs.openstack.org/puppet-openstack-guide/latest/contributor/contributing.html

36
Gemfile
View File

@ -1,36 +0,0 @@
source ENV['GEM_SOURCE'] || "https://rubygems.org"
group :development, :test, :system_tests do
spec_helper_dir = '/home/zuul/src/opendev.org/openstack/puppet-openstack_spec_helper'
if File.directory?(spec_helper_dir)
if ENV['ZUUL_PROJECT'] == 'openstack/puppet-openstack_spec_helper'
gem 'puppet-openstack_spec_helper',
:path => '../..',
:require => 'false'
else
gem 'puppet-openstack_spec_helper',
:path => spec_helper_dir,
:require => 'false'
end
else
spec_helper_version = ENV['ZUUL_BRANCH'] || "master"
gem 'puppet-openstack_spec_helper',
:git => 'https://opendev.org/openstack/puppet-openstack_spec_helper',
:ref => spec_helper_version,
:require => 'false'
end
end
if facterversion = ENV['FACTER_GEM_VERSION']
gem 'facter', facterversion, :require => false
else
gem 'facter', :require => false
end
if puppetversion = ENV['PUPPET_GEM_VERSION']
gem 'puppet', puppetversion, :require => false
else
gem 'puppet', :require => false
end
# vim:ft=ruby

202
LICENSE
View File

@ -1,202 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

188
README.md
View File

@ -1,188 +0,0 @@
Team and repository tags
========================
[![Team and repository tags](https://governance.openstack.org/tc/badges/puppet-qdr.svg)](https://governance.openstack.org/tc/reference/tags/index.html)
<!-- Change things from this point on -->
# qdr
#### Table of Contents
1. [Overview](#overview)
2. [Module Description - Manage the QPID Dispatch Router](#module-description)
3. [Setup - The basics of getting started with qdr](#setup)
* [What qdr affects](#what-qdr-affects)
* [Setup requirements](#setup-requirements)
* [Beginning with qdr](#beginning-with-qdr)
4. [Usage - Configuration options and additional functionality](#usage)
5. [Reference - An under-the-hood peek at what the module is doing and how](#reference)
5. [Limitations - OS compatibility, etc.](#limitations)
6. [Development - Guide for contributing to the module](#development)
7. [Contributors - Those with commits](#contributors)
8. [Release Notes - Release notes for the project](#release-notes)
9. [Repository - The project source code repository](#repository)
## Overview
This module manages the QPID Dispatch Router (qdr) found at:
http://qpid.apache.org/components/dispatch-router/
The dispatch router provides flexible and scalable interconnect between any AMQP 1.0 endpoints, whether they be clients, brokers or other AMQP-enabled services
Support is intended for Red Hat and Ubuntu OS family deployed with Pupppet V4.x
## Module Description
This module sets up the installations, configuration and management of the QPID Dispatch
Router (qdr) class and has a number of providers that correpsond the router configuration
entities such as listeners and connectors.
This module will facilitate the deployment of a full/partial mesh topology of QPID Dispatch
Routers serving as the messaging interconnect for a site.
## Setup
### What qdr affects
* repository files
* packages
* configuration files
* service
* configuration entities
### Beginning with qdr
```puppet
include qdr
```
The default configuration currently installs Qpid-Dispatch-Router 0.6
## Usage
All configuration parameters can be managed via the main qdr class.
```puppet
class { 'qdr' :
service_enable => true,
container_workder_threads => 4,
listener_port => 15672,
}
```
## Class Reference
* qdr: Provides the basic installation and configuration sequence
* qdr::config: Provides qdrouterd configuration
* qdr::install: Performs package installations
* qdr::params: Aggregates configuration data for router
* qdr::service: Manages the qdrouterd service state
## Resource Types
### qdr\_address
Resource to manage address prefixes for distribution and phasing
Query all current internal addresses: '$puppet resource qdr_address'
```puppet
qdr_address { 'anyAddress' :
prefix => 'unicast',
distribution => 'closest',
}
```
### qdr\_connector
Resource configuration entity to establish outgoing connections from the router.
Query all current connectors: '$puppet resource qdr_connector'
```puppet
qdr_connector { 'anyConnector' :
addr => '10.10.10.10',
port => '1234',
role => 'inter_router',
max_frame_size => '65536',
}
```
### qdr\_listener
Listens for incoming connection requests to the router
Query all current listeners: '$puppet resource qdr_listener'
```puppet
qdr_listener { 'anyListener' :
addr => '10.10.10.10',
port => '5678',
role => 'normal',
sasl_mechanisms => 'DIGEST-MD5,EXTERNAL',
}
```
### qdr\_log
Control log settings for a particular module on the running router
Query all current log module settings: '$puppet resource qdr_log'
### qdr\_user
Users for internal sasl authentication
Query all current internal users: '$puppet resource qdr_user'
```puppet
qdr_user { 'anyUser' :
password => 'changeme',
}
```
## Resource Providers
### qdmanage
An AMQP management client tool for used with any standard AMQP managed endpoint.
## Limitations
This module has been tested on the following platforms:
* CentOS 7
* Ubuntu 15.10
### Apt module dependence
If running Debian os family, puppetlabs-apt module is required
## Development
Developer documentation for the entire puppet-openstack project.
* https://docs.openstack.org/puppet-openstack-guide/latest/
## Contributors
* https://github.com/openstack/puppet-qdr/graphs/contributors
## Release Notes
* https://docs.openstack.org/releasenotes/puppet-qdr
Repository
----------
* https://opendev.org/openstack/puppet-qdr
If you aren't using changelog, put your release notes here (though you should
consider using changelog). You may also add any additional sections you feel are
necessary or important to include here. Please use the `## ` header.

8
README.rst Normal file
View File

@ -0,0 +1,8 @@
This project is no longer maintained.
The contents of this repository are still available in the Git source code
management system. To see the contents of this repository before it reached its
end of life, please check out the previous commit with "git checkout HEAD^1".
For any further questions, please email openstack-discuss@lists.openstack.org
or join #openstack-dev on OFTC.

View File

@ -1 +0,0 @@
require 'puppet-openstack_spec_helper/rake_tasks'

View File

@ -1,12 +0,0 @@
# This is a cross-platform list tracking distribution packages needed by tests;
# see https://docs.openstack.org/infra/bindep/ for additional information.
libxml2-devel [test platform:rpm]
libxml2-dev [test platform:dpkg]
libxslt-devel [test platform:rpm]
libxslt1-dev [test platform:dpkg]
ruby-devel [test platform:rpm]
ruby-dev [test platform:dpkg]
zlib1g-dev [test platform:dpkg]
zlib-devel [test platform:rpm]
puppet [build]

View File

@ -1,6 +0,0 @@
# This is required for the docs build jobs
sphinx>=3.5.1 # BSD
openstackdocstheme>=2.2.7 # Apache-2.0
# This is required for the releasenotes build jobs
reno>=3.2.0 # Apache-2.0

View File

@ -1,23 +0,0 @@
node default {
# Qpid Dispatch Router common class
class { 'qdr' :
# Currently no mandatory parameters
}
# Create a listener type
# qdr_listener { 'GoodListener' :
# ensure => present,
# addr => '127.0.0.1',
# port => '6789',
# role => 'normal',
# auth_peer => true,
# sasl_mechanisms => 'ANONYMOUS,DIGEST-MD5,EXTERNAL,PLAIN',
# }
# Create a user for sasl db
# qdr_user { 'SaslUser' :
# ensure => present,
# password => 'testpw',
# }
}

View File

@ -1,101 +0,0 @@
require "json"
Puppet::Type.type(:qdr_address).provide(:qdmanage) do
# should rely on environment rather fq path
commands :qdmanage => '/usr/bin/qdmanage'
mk_resource_methods
def initialize(value={})
super(value)
@property_flush = {}
end
def self.get_list_of_addresses
begin
@addresses=JSON.load(qdmanage('QUERY','--type=address'))
rescue Puppet::ExecutionFailure => e
@addresses = {}
end
end
def self.get_address_properties(address)
address_properties = {}
address_properties[:provider] = :qdmanage
address_properties[:ensure] = :present
address_properties[:name] = address["name"]
address_properties[:prefix] = address["prefix"]
address_properties[:distribution] = address["distribution"]
address_properties[:waypoint] = address["waypoint"].to_s
address_properties[:ingressPhase] = address["ingressPhase"]
address_properties[:egressPhase] = address["egressPhase"]
address_properties
end
def self.instances
addresses = []
get_list_of_addresses.each do |address|
addresses << new( :prefix => address["prefix"],
:name => address["name"],
:ensure => :present,
:distribution => address["distribution"],
:waypoint => address["waypoint"].to_s,
:ingressPhase => address["ingressPhase"],
:egressPhase => address["egressPhase"])
end
addresses
end
def create
@property_flush[:ensure] = :present
end
def exists?
@property_hash[:ensure] == :present
end
def destroy
@property_flush[:ensure] = :absent
end
def self.prefetch(resources)
instances.each do |prov|
if resource = resources[prov.prefix]
resource.provider = prov
end
end
end
def set_address
# TODO(ansmith) - full CRUD once supported by qdmanage
if @property_flush[:ensure] == :absent
notice("Address destroy not supported")
return
end
begin
# TODO(ansmith) - prefix uniqueness check
qdmanage('CREATE',
'--type=address',
'--prefix',
resource[:prefix],
'distribution='+resource[:distribution],
'waypoint='+resource[:waypoint].to_s,
'ingressPhase='+resource[:ingressPhase],
'egressPhase='+resource[:egressPhase])
rescue Puppet::ExecutionFailure => e
return
end
end
def flush
set_address
@property_hash = self.class.get_address_properties(resource[:prefix])
end
end

View File

@ -1,111 +0,0 @@
require "json"
Puppet::Type.type(:qdr_connector).provide(:qdmanage) do
# should rely on environment rather fq path
commands :qdmanage => '/usr/bin/qdmanage'
mk_resource_methods
def initialize(value={})
super(value)
@property_flush = {}
end
def self.get_list_of_connectors
begin
@connectors=JSON.load(qdmanage('QUERY','--type=connector'))
rescue Puppet::ExecutionFailure => e
@connectors = {}
end
end
def self.get_connector_properties(connector)
connector_properties = {}
connector_properties[:provider] = :qdmanage
connector_properties[:ensure] = :present
connector_properties[:name] = connector["name"]
connector_properties[:addr] = connector["addr"]
connector_properties[:port] = connector["port"]
connector_properties[:role] = connector["role"].to_s
connector_properties[:allow_redirect] = connector["allowRedirect"].to_s
connector_properties[:sasl_mechanisms] = connector["saslMechanisms"].to_s
connector_properties[:max_frame_size] = connector["maxFrameSize"].to_s
connector_properties[:idle_timeout_seconds] = connector["idleTimeoutSeconds"].to_s
connector_properties[:strip_annotations] = connector["stripAnnotations"].to_s
connector_properties
end
def self.instances
connectors = []
get_list_of_connectors.each do |connector|
connectors << new(:name => connector["name"],
:ensure => :present,
:addr => connector["addr"],
:port => connector["port"],
:role => connector["role"].to_s,
:sasl_mechanisms => connector["saslMechanisms"].to_s,
:allow_redirect => connector["allowRedirect"].to_s,
:max_frame_size => connector["maxFrameSize"].to_s,
:idle_timeout_seconds => connector["idleTimeoutSeconds"].to_s,
:strip_annotations => connector["stripAnnotations"].to_s)
end
connectors
end
def create
@property_flush[:ensure] = :present
end
def exists?
@property_hash[:ensure] == :present
end
def destroy
@property_flush[:ensure] = :absent
end
def self.prefetch(resources)
instances.each do |prov|
if resource = resources[prov.name]
resource.provider = prov
end
end
end
def set_connector
# TODO(ansmith) - full CRUD once supported by qdmanage
if @property_flush[:ensure] == :absent
notice("Connector destroy not supported")
return
end
begin
# TODO(ansmith) - name, addr:port uniqueness check
qdmanage('CREATE',
'--type=connector',
'--name',
resource[:name],
'addr='+resource[:addr],
'port='+resource[:port],
'role='+resource[:role].to_s,
'saslMechanisms='+resource[:sasl_mechanisms].to_s,
'allowRedirect='+resource[:allow_redirect].to_s,
'maxFrameSize='+resource[:max_frame_size].to_s,
'idleTimeoutSeconds='+resource[:idle_timeout_seconds].to_s,
'stripAnnotations='+resource[:strip_annotations].to_s)
rescue Puppet::ExecutionFailure => e
return
end
end
def flush
set_connector
@property_hash = self.class.get_connector_properties(resource[:name])
end
end

View File

@ -1,111 +0,0 @@
require "json"
Puppet::Type.type(:qdr_listener).provide(:qdmanage) do
# should rely on environment rather fq path
commands :qdmanage => '/usr/bin/qdmanage'
mk_resource_methods
def initialize(value={})
super(value)
@property_flush = {}
end
def self.get_list_of_listeners
begin
@listeners=JSON.load(qdmanage('QUERY','--type=listener'))
rescue Puppet::ExecutionFailure => e
@listeners = {}
end
end
def self.get_listener_properties(listener)
listener_properties = {}
listener_properties[:provider] = :qdmanage
listener_properties[:ensure] = :present
listener_properties[:name] = listener["name"]
listener_properties[:addr] = listener["addr"]
listener_properties[:port] = listener["port"]
listener_properties[:role] = listener["role"].to_s
listener_properties[:sasl_mechanisms] = listener["saslMechanisms"].to_s
listener_properties[:auth_peer] = listener["authenticatePeer"].to_s
listener_properties[:require_encryption] = listener["requireEncryption"].to_s
listener_properties[:require_ssl] = listener["requireSsl"].to_s
listener_properties[:max_frame_size] = listener["maxFrameSize"].to_s
listener_properties
end
def self.instances
listeners = []
get_list_of_listeners.each do |listener|
listeners << new( :name => listener["name"],
:ensure => :present,
:addr => listener["addr"],
:port => listener["port"],
:role => listener["role"].to_s,
:sasl_mechanisms => listener["saslMechanisms"].to_s,
:auth_peer => listener["authenticatePeer"].to_s,
:require_encryption => listener["requireEncryption"].to_s,
:require_ssl => listener["requireSsl"].to_s,
:max_frame_size => listener["maxFrameSize"].to_s)
end
listeners
end
def create
@property_flush[:ensure] = :present
end
def exists?
@property_hash[:ensure] == :present
end
def destroy
@property_flush[:ensure] = :absent
end
def self.prefetch(resources)
instances.each do |prov|
if resource = resources[prov.name]
resource.provider = prov
end
end
end
def set_listener
# TODO(ansmith) - full CRUD once supported by qdmanage
if @property_flush[:ensure] == :absent
notice("Listener destroy not supported")
return
end
begin
# TODO(ansmith) - name, addr:port uniqueness check
qdmanage('CREATE',
'--type=listener',
'--name',
resource[:name],
'addr='+resource[:addr],
'port='+resource[:port],
'role='+resource[:role].to_s,
'saslMechanisms='+resource[:sasl_mechanisms].to_s,
'authenticatePeer='+resource[:auth_peer].to_s,
'requireEncryption='+resource[:require_encryption].to_s,
'requireSsl='+resource[:require_ssl].to_s,
'maxFrameSize='+resource[:max_frame_size].to_s)
rescue Puppet::ExecutionFailure => e
return
end
end
def flush
set_listener
@property_hash = self.class.get_listener_properties(resource[:name])
end
end

View File

@ -1,83 +0,0 @@
require "json"
Puppet::Type.type(:qdr_log).provide(:qdmanage) do
# should rely on environment rather fq path
commands :qdmanage => '/usr/bin/qdmanage'
mk_resource_methods
def initialize(value={})
super(value)
@property_flush = {}
end
def self.get_list_of_loggers
begin
@loggers=JSON.load(qdmanage('QUERY','--type=log'))
rescue Puppet::ExecutionFailure => e
@loggers = {}
end
end
def self.get_logger_properties(listener)
logger_properties = {}
logger_properties[:provider] = :qdmanage
logger_properties[:name] = logger["name"]
logger_properties[:module] = logger["module"]
logger_properties
end
def self.instances
loggers = []
get_list_of_loggers.each do |logger|
loggers << new( :name => logger["name"],
:module => logger["module"])
end
loggers
end
# def create
# @property_flush[:ensure] = :present
# end
def exists?
@property_hash[:ensure] == :present
end
# def destroy
# @property_flush[:ensure] = :absent
# end
def self.prefetch(resources)
instances.each do |prov|
if resource = resources[prov.name]
resource.provider = prov
end
end
end
def set_logger
# TODO(ansmith) - full CRUD once supported by qdmanage
begin
# TODO(ansmith) - name, addr:port uniqueness check
qdmanage('UPDATE',
'--type=log',
'--name',
resource[:name])
rescue Puppet::ExecutionFailure => e
return
end
end
def flush
set_logger
@property_hash = self.class.get_logger_properties(resource[:name])
end
end

View File

@ -1,44 +0,0 @@
Puppet::Type.type(:qdr_user).provide(:sasl) do
commands :saslpasswd2 => 'saslpasswd2'
optional_commands :sasldblistusers2 => 'sasldblistusers2'
def self.instances
users = []
userlist=sasldblistusers2('-f', '/var/lib/qdrouterd/qdrouterd.sasldb').split(/\n/).each do |line|
if line =~ /^(\S+)@(\S+):.*$/
users << new(:name => $1,
:ensure => :present)
else
raise Puppet::Error, "Cannot parse invalid user line: #{line}"
end
end
users
end
def create
# is there a way to pipe to commands?
if not system(%{echo "#{resource[:password]}" | saslpasswd2 -f '/var/lib/qdrouterd/qdrouterd.sasldb' #{resource[:name]}})
raise Puppet::Error, "Failed to create user"
end
system("chmod '0644' '/var/lib/qdrouterd/qdrouterd.sasldb'")
end
def destroy
saslpasswd2('-f', '/var/lib/qdrouterd/qdrouterd.sasldb', '-d', resource[:name])
rescue Puppet::ExecutionFailure => e
return
end
def exists?
begin
users = sasldblistusers2('-f', "/var/lib/qdrouterd/qdrouterd.sasldb").split(/\n/).detect do |user|
user.match(/^#{resource[:name]}@.*$/)
end
rescue
return false
end
end
end

View File

@ -1,58 +0,0 @@
Puppet::Type.newtype(:qdr_address) do
desc "Type for managing qdrouterd address prefixes for distribution and phasing"
ensurable do
defaultto(:present)
newvalue(:present) do
provider.create
end
newvalue(:absent) do
provider.destroy
end
end
autorequire(:service) { 'qdrouterd' }
newparam(:name, :namevar => true) do
desc "The name of the address prefix"
newvalues(/^\S+$/)
end
newproperty(:prefix) do
desc "The unique prefix for the address-space"
newvalues(/^\S+$/)
end
newproperty(:distribution) do
desc "The treatment of traffic associated with the address"
defaultto :balanced
newvalues(:balanced, :closest, :multicast)
end
newproperty(:waypoint) do
defaultto :false
newvalues(:true, :false)
def should_to_s(value)
value.inspect
end
def is_to_s(value)
value.inspect
end
end
newproperty(:ingressPhase) do
desc "Override for the ingress phase for this address"
defaultto ('0')
# newvalues(/^d+/)
end
newproperty(:egressPhase) do
desc "Override for the ingress phase for this address"
defaultto ('0')
# newvalues(/^d+/)
end
end

View File

@ -1,86 +0,0 @@
Puppet::Type.newtype(:qdr_connector) do
desc "Type for managing qdrouterd connection instances"
ensurable do
defaultto(:present)
newvalue(:present) do
provider.create
end
newvalue(:absent) do
provider.destroy
end
end
autorequire(:service) { 'qdrouterd' }
newparam(:name, :namevar => true) do
desc "The unique name for the connector"
newvalues(/^\s*\S+\s*$/)
end
newproperty(:addr) do
desc "The outgoing connection host's IP address, IPv4 or IPv6"
end
newproperty(:port) do
desc "The outgoing connection host port number"
newvalues(/^\d+/)
end
newproperty(:role) do
desc "The role for connections established by the listener"
defaultto :normal
newvalues(:normal, :inter_router, :on_demand)
end
newproperty(:sasl_mechanisms) do
desc "List of accepted SASL authentication mechansisms"
defaultto "ANONYMOUS,DIGEST-MD5,EXTERNAL,PLAIN"
end
newproperty(:allowRedirect) do
defaultto :false
newvalues(:true, :false)
def should_to_s(value)
value.inspect
end
def is_to_s(value)
value.inspect
end
end
newproperty(:max_frame_size) do
desc "The largest contiguous set of uninterrupted data that can be sent"
defaultto ('65536')
validate do |value|
unless value =~ /\d{1,5}/ &&
value.to_i <= 65536
fail("Invalid max frame size #{value}")
end
end
end
newproperty(:idle_timeout_seconds) do
desc "The largest contiguous set of uninterrupted data that can be sent"
defaultto ('16')
# what would the validation be? Max timeout value?
end
newproperty(:strip_annotations) do
defaultto :both
newvalues(:in, :out, :both, :no)
def should_to_s(value)
value.inspect
end
def is_to_s(value)
value.inspect
end
end
end

View File

@ -1,97 +0,0 @@
Puppet::Type.newtype(:qdr_listener) do
desc "Type for managing qdrouterd listener instances"
ensurable do
defaultto(:present)
newvalue(:present) do
provider.create
end
newvalue(:absent) do
provider.destroy
end
end
autorequire(:service) { 'qdrouterd' }
newparam(:name, :namevar => true) do
desc "The unique name for the listener"
newvalues(/^\S+$/)
end
newproperty(:addr) do
desc "The listening host's IP address, IPv4 or IPv6"
end
newproperty(:port) do
desc "The listening port number on the host"
end
newproperty(:role) do
desc "The role for connections established by the listener"
defaultto :normal
newvalues(:normal, :inter_router, :on_demand)
end
newproperty(:sasl_mechanisms) do
desc "List of accepted SASL authentication mechansisms"
defaultto "ANONYMOUS,DIGEST-MD5,EXTERNAL,PLAIN"
end
newproperty(:auth_peer) do
defaultto :false
newvalues(:true, :false)
def should_to_s(value)
value.inspect
end
def is_to_s(value)
value.inspect
end
end
newproperty(:require_encryption) do
desc "Require the connection to the peer to be encryped"
defaultto :false
newvalues(:true, :false)
def should_to_s(value)
value.inspect
end
def is_to_s(value)
value.inspect
end
end
newproperty(:require_ssl) do
desc "Require the use of SSL or TLS on the connection"
defaultto :false
newvalues(:true, :false)
def should_to_s(value)
value.inspect
end
def is_to_s(value)
value.inspect
end
end
newproperty(:max_frame_size) do
desc "The largest contiguous set of uninterrupted data that can be sent"
defaultto ('65536')
validate do |value|
unless value =~ /\d{1,5}/ &&
value.to_i <= 65536
fail("Invalid max frame size #{value}")
end
end
end
end

View File

@ -1,24 +0,0 @@
Puppet::Type.newtype(:qdr_log) do
desc "Type for managing qdrouterd module log instances"
ensurable do
defaultto(:present)
newvalue(:present) do
provider.create
end
newvalue(:absent) do
provider.destroy
end
end
autorequire(:service) { 'qdrouterd' }
newparam(:name, :namevar => true) do
desc "The unique name for the log module"
end
newproperty(:module) do
desc "The qdrouterd log module source"
end
end

View File

@ -1,31 +0,0 @@
Puppet::Type.newtype(:qdr_user) do
desc "Type for managing qdr users such as with sasl provider, etc."
ensurable do
defaultto(:present)
newvalue(:present) do
provider.create
end
newvalue(:absent) do
provider.destroy
end
end
autorequire(:service) { 'qdrouterd' }
newparam(:name, :namevar => true) do
desc "The name of user"
newvalues(/^\S+$/)
end
newparam(:password) do
desc "The user password to be set on creation"
end
validate do
if self[:ensure] == :present and ! self[:password]
raise Puppet::Error => 'Must set password when creating user' unless self[:password]
end
end
end

View File

@ -1,61 +0,0 @@
# == Class qdr::config
#
# This class is called from qdr for qdrouterd service configuration
#
class qdr::config inherits qdr {
$service_config_path = $::qdr::params::service_config_path
$service_home = $::qdr::params::service_home
$log_output = $::qdr::log_output
$router_debug_dump = $::qdr::router_debug_dump
$service_config_template = 'qdr/qdrouterd.conf.erb'
file { $service_home :
ensure => directory,
owner => '0',
group => '0',
mode => '0755',
}
file { '/etc/qpid-dispatch' :
ensure => directory,
owner => '0',
group => '0',
mode => '0644',
}
file { '/etc/qpid-dispatch/ssl' :
ensure => directory,
owner => '0',
group => '0',
mode => '0644',
}
$show_diff = ($::qdr::listener_ssl_password == undef)
file { 'qdrouterd.conf' :
ensure => file,
path => $service_config_path,
content => template($service_config_template),
owner => '0',
group => '0',
mode => '0644',
show_diff => $show_diff,
notify => Class['qdr::service'],
}
file { $router_debug_dump :
ensure => directory,
owner => '0',
group => '0',
mode => '0766',
}
file { $log_output :
ensure => file,
owner => '0',
group => '0',
mode => '0666',
}
}

View File

@ -1,208 +0,0 @@
# == Class: qdr
#
# Full description of class qdr here.
#
# === Parameters
#
# [*connectors*]
# (optional) An array of hashes containing connector configuration
# Defaults to []
#
# [*ssl_profiles*]
# (optional) An array of hashes containing the ssl profiles
# Defaults to []
#
# [*ensure_package*]
# (optional) The state of the qdr packages
# Defaults to 'installed'
#
# [*ensure_service*]
# (optional) The state of the qdr service
# Defaults to 'running'
#
# [*enable_service*]
# (optional) The administrative status of the qdr service
# Defaults to 'true'
#
# [*extra_listeners*]
# (optional) An array of hashes containing extra listener configuration
# Defaults to []
#
# [*listener_addr*]
# (optional) Service host name
# Defaults to '127.0.0.1'
#
# [*listener_auth_peer*]
# (optional)
# Defaults to false
#
# [*listener_idle_timeout*]
# (optional)
# Defaults to '16'
#
# [*listener_max_frame_size*]
# (optional) Maximum frame size used for a message delivery over the
# connection
# Defaults to '16384'
#
# [*listener_port*]
# (optional) Service port number (AMQP)
# Defaults to '5672'
#
# [*listener_require_encrypt*]
# (optional) Require the connection to the peer to be encrypted
# Defaults to false
#
# [*listener_require_ssl*]
# (optional) Require the use of SSL or TLS on the connection
# Defaults to false
#
# [*listener_sasl_mech*]
# (optional) List of accepted SASL auth mechanisms
# Defaults to 'ANONYMOUS'
#
# [*listener_ssl_cert_db*]
# (optional) Path to certificate db
# Defaults to undef
#
# [*listener_ssl_cert_file*]
# (optional) Path to certificat file
# Defaults to undef
#
# [*listener_ssl_key_file*]
# (optional) Path to private key file
# Defaults to undef
#
# [*listener_ssl_pw_file*]
# (optional) Path to password file for certificate key
# Defaults to undef
#
# [*listener_ssl_password*]
# (optional) Password to be supplied
# Defaults to undef
#
# [*listener_trusted_certs*]
# (optional) Path to file containing trusted certificates
# Defaults to 'UNSET'
#
# [*autolink_addresses*]
# (optional) An array of hashes containing the autoLink addresses
# Defaults to []
#
# [*extra_addresses*]
# (optional) An array of hashes containing extra address configuration
# Defaults to []
#
# [*log_module*]
# (optional) The log module to configure
# Defaults to 'DEFAULT'
#
# [*log_enable*]
# (optional) Log level for a module
# Defaults to 'debug+'
#
# [*log_output*]
# (optional) Target destination for log message
# Defaults to '/var/log/qdrouterd/qdrouterd.log'
#
# [*router_debug_dump*]
# (optional) Path to file for debugging information
# Defaults to '/var/log/qdrouterd'
#
# [*router_hello_interval*]
# (optional) Router HELLO message interval in seconds
# Defaults to 1
#
# [*router_hello_max_age*]
# (optional) Neighbor router age timeout in seconds
# Defaults to 3
#
# [*router_id*]
# (optional) Router unique identifer
# Defaults to 'Router.fqdn"
#
# [*router_mode*]
# (optional) Operational mode for Router (standalone, edge or interconnected)
# Defaults to 'standalone'
#
# [*router_ra_interval*]
# (optional) Router advertisement interval
# Defaults to 30
#
# [*router_ra_interval_flux*]
# (optional) Router advertisement interval during topology changes
# Defaults to 4
#
# [*router_remote_ls_max_age*]
# (optional) Router advertisement aging interval
# Defaults to 60
#
# [*router_sasl_name*]
# (optional) Name of SASL configuration
# Defaults to 'qdrouterd'
#
# [*router_sasl_path*]
# (optional) Path to the SASL configuration file
# Defaults to '/etc/sasl2'
#
# [*router_worker_threads*]
# (optional) Number of threads create to process message traffic
# Defaults to $::facts['processors']['count']
#
class qdr(
Array[Hash[String[1], Scalar]] $connectors = [],
Array[Hash[String[1], Scalar]] $ssl_profiles = [],
String $ensure_package = 'installed',
String $ensure_service = 'running',
Boolean $enable_service = true,
Array[Hash[String[1], String[1]]] $extra_listeners = [],
String $listener_addr = '127.0.0.1',
Boolean $listener_auth_peer = false,
Integer $listener_idle_timeout = 16,
Integer $listener_max_frame_size = 16384,
Integer $listener_port = 5672,
Boolean $listener_require_encrypt = false,
Boolean $listener_require_ssl = false,
String $listener_sasl_mech = 'ANONYMOUS',
Optional[Stdlib::Absolutepath] $listener_ssl_cert_db = undef,
Optional[Stdlib::Absolutepath] $listener_ssl_cert_file = undef,
Optional[Stdlib::Absolutepath] $listener_ssl_key_file = undef,
Optional[Stdlib::Absolutepath] $listener_ssl_pw_file = undef,
Optional[String] $listener_ssl_password = undef,
String $listener_trusted_certs = 'UNSET',
Array[Hash[String[1], Scalar]] $autolink_addresses = [],
Array[Hash[String[1], Scalar]] $extra_addresses = [],
String $log_enable = 'debug+',
String $log_module = 'DEFAULT',
Stdlib::Absolutepath $log_output = '/var/log/qdrouterd/qdrouterd.log',
Stdlib::Absolutepath $router_debug_dump = '/var/log/qdrouterd',
Integer $router_hello_interval = 1,
Integer $router_hello_max_age = 3,
String $router_id = "Router.${facts['networking']['fqdn']}",
Enum['standalone', 'edge', 'interior'] $router_mode = 'standalone',
Integer $router_ra_interval = 30,
Integer $router_ra_interval_flux = 4,
Integer $router_remote_ls_max_age = 60,
String[1] $router_sasl_name = 'qdrouterd',
Stdlib::Absolutepath $router_sasl_path = '/etc/sasl2',
Integer $router_worker_threads = $facts['processors']['count'],
) inherits qdr::params {
# TODO (ansmith) - manage repo via openstack-extras
# if $facts['os']['name'] == 'Ubuntu' {
# include apt
#
# Class['apt::update'] -> Package<| provider == 'apt' |>
#
# apt::ppa { 'ppa:qpid/testing' : }
# }
include qdr::install
include qdr::config
include qdr::service
Class['qdr::install']
-> Class['qdr::config']
-> Class['qdr::service']
}

View File

@ -1,53 +0,0 @@
# == Class qdr::install
#
# This class is called from qdr for qdrouterd service installation
#
# === Parameters
#
# [*ensure_package*]
# (optional) The state of the qdr packages
# Defaults to $::qdr::ensure_package
#
# [*service_package_name*]
# (optional) The service package name for osfamily
# Defaults to $::qdr::params::service_package_name
#
# [*package_provider*]
# (optional) The package repo application for osfamily
# Defaults to $::qdr::params::package_provider
#
# [*sasl_package_list*]
# (optional) The sasl package enumeration for osfamily
# Defaults to $::qdr::params::sasl_package_list
#
# [*tools_package_list*]
# (optional) The qdr tools package enumeration for osfamily
# Defaults to $::qdr::params::tools_package_list
#
class qdr::install (
String $ensure_package = $::qdr::ensure_package,
String $service_package_name = $::qdr::params::service_package_name,
String $package_provider = $::qdr::params::package_provider,
Variant[String[1], Array[String[1]]] $sasl_package_list = $::qdr::params::sasl_package_list,
Variant[String[1], Array[String[1]]] $tools_package_list = $::qdr::params::tools_package_list,
) inherits qdr {
package { $sasl_package_list :
ensure => $ensure_package,
provider => $package_provider,
}
package { $service_package_name :
ensure => $ensure_package,
provider => $package_provider,
notify => Class['qdr::service'],
require => Package[$sasl_package_list],
}
package { $tools_package_list :
ensure => $ensure_package,
provider => $package_provider,
require => Package[$service_package_name],
}
}

View File

@ -1,37 +0,0 @@
# Class: qdr::params
#
# The Qpid Dispatch Router Module configuration settings
#
class qdr::params {
case $facts['os']['family'] {
'Debian': {
$service_package_name = 'qdrouterd'
$service_name = 'qdrouterd'
$service_config_path = '/etc/qpid-dispatch/qdrouterd.conf'
$package_provider = 'apt'
$service_user = 'qdrouterd'
$service_group = 'qdrouterd'
$service_home = '/var/lib/qdrouterd'
$service_version = '1.5.0'
$sasl_package_list = 'sasl2-bin'
$tools_package_list = [ 'qdmanage' , 'qdstat' ]
}
'RedHat': {
$service_package_name = 'qpid-dispatch-router'
$service_name = 'qdrouterd'
$service_config_path = '/etc/qpid-dispatch/qdrouterd.conf'
$package_provider = 'dnf'
$service_user = 'qdrouterd'
$service_group = 'qdrouterd'
$service_home = '/var/lib/qdrouterd'
$service_version = '1.5.0'
$sasl_package_list = [ 'cyrus-sasl-lib', 'cyrus-sasl-plain' ]
$tools_package_list = [ 'qpid-dispatch-tools' ]
}
default: {
fail("Unsupported osfamily: ${facts['os']['family']}")
}
}
}

View File

@ -1,17 +0,0 @@
# == Class qdr::service
#
# This class is called from qdr for qdrouterd service management
class qdr::service inherits qdr {
$enable_service = $::qdr::enable_service
$ensure_service = $::qdr::ensure_service
$service_name = $::qdr::params::service_name
service { $service_name:
ensure => $ensure_service,
enable => $enable_service,
hasstatus => true,
hasrestart => true,
}
}

View File

@ -1,53 +0,0 @@
{
"name": "openstack-qdr",
"version": "12.0.0",
"author": "OpenStack Contributors",
"summary": "Puppet Qpid Dispatch Router Module",
"license": "Apache-2.0",
"source": "https://opendev.org/openstack/puppet-qdr.git",
"project_page": "https://launchpad.net/puppet-qdr",
"issues_url": "https://bugs.launchpad.net/puppet-qdr",
"requirements": [
{
"name": "puppet",
"version_requirement": ">= 7.0.0 < 8.0.0"
}
],
"operatingsystem_support": [
{
"operatingsystem": "Debian",
"operatingsystemrelease": [
"12"
]
},
{
"operatingsystem": "RedHat",
"operatingsystemrelease": [
"9"
]
},
{
"operatingsystem": "CentOS",
"operatingsystemrelease": [
"9"
]
},
{
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [
"22.04"
]
}
],
"description": "Puppet module to add useful utilities for OpenStack deployments",
"dependencies": [
{
"name": "puppetlabs/apt",
"version_requirement": ">=1.8.0 <10.0.0"
},
{
"name": "puppetlabs/stdlib",
"version_requirement": ">=5.0.0 <10.0.0"
}
]
}

View File

@ -1,15 +0,0 @@
---
fixes:
- |
Fixed the following ``qdr`` claas parameters ignored.
- ``router_hello_interval``
- ``router_hello_max_age``
- ``router_ra_interval``
- ``router_ra_interval_flux``
- ``router_remote_ls_max_age``
- ``listener_idle_timeout``
- ``listener_max_frame_size``
- ``listener_require_encrypt``
- ``listener_ssl_pw_file``
- ``listener_ssl_password``

View File

@ -1,5 +0,0 @@
---
fixes:
- |
Default value of the ``qdr::router_worker_threads`` parameter now matches
processor counts.

View File

@ -1,4 +0,0 @@
---
features:
- |
Now this module supports CentOS 9 and Red Hat Enterprise Linux 9.

View File

@ -1,4 +0,0 @@
---
upgrade:
- |
Fedora is no longer supported.

View File

@ -1,9 +0,0 @@
---
upgrade:
- |
The following parameters no longer accept string values(`yes` and `no`) and
requires boolean values.
- ``qdr::listener_auth_peer``
- ``qdr::listener_require_encrypt``
- ``qdr::listener_require_ssl``

View File

@ -1,4 +0,0 @@
---
upgrade:
- |
CentOS 8 Stream is no longer supported by this module.

View File

@ -1,4 +0,0 @@
---
upgrade:
- |
Puppet 6 is no longer supported.

View File

@ -1,8 +0,0 @@
---
features:
- |
This module now supports Ubuntu 22.04 (Jammy Jellyfish).
upgrade:
- |
This module no longer supports Ubuntu 20.04 (Focal Fossa).

View File

@ -1,10 +0,0 @@
---
deprecations:
- |
Expected type of the following parameters has been changed from string to
boolean. Usage of ``yes`` or ``no`` is still supported but deprecated,
and will be removed in a future release.
- ``qdr::listener_auth_peer``
- ``qdr::listener_require_encrypt``
- ``qdr::listener_require_ssl``

View File

@ -1,6 +0,0 @@
===========================
2023.1 Series Release Notes
===========================
.. release-notes::
:branch: stable/2023.1

View File

@ -1,6 +0,0 @@
===========================
2023.2 Series Release Notes
===========================
.. release-notes::
:branch: stable/2023.2

View File

@ -1,254 +0,0 @@
# -*- coding: utf-8 -*-
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'openstackdocstheme',
'reno.sphinxext',
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix of source filenames.
source_suffix = '.rst'
# The encoding of source files.
#source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
# General information about the project.
copyright = '2017, Puppet OpenStack Developers'
# Release do not need a version number in the title, they
# cover multiple versions.
# The short X.Y version.
version = ''
# The full version, including alpha/beta/rc tags.
release = ''
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = []
# The reST default role (used for this markup: `text`) to use for all
# documents.
#default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'native'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# If true, keep warnings as "system message" paragraphs in the built documents.
#keep_warnings = False
# -- Options for HTML output ----------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'openstackdocs'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
# html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
# directly to the root of the documentation.
#html_extra_path = []
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# If false, no module index is generated.
#html_domain_indices = True
# If false, no index is generated.
#html_use_index = True
# If true, the index is split into individual pages for each letter.
#html_split_index = False
# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None
# Output file base name for HTML help builder.
htmlhelp_basename = 'puppet-qdrReleaseNotesdoc'
# -- Options for LaTeX output ---------------------------------------------
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
('index', 'puppet-qdrReleaseNotes.tex', 'puppet-qdr Release Notes Documentation',
'2017, Puppet OpenStack Developers', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# If true, show page references after internal links.
#latex_show_pagerefs = False
# If true, show URL addresses after external links.
#latex_show_urls = False
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# If false, no module index is generated.
#latex_domain_indices = True
# -- Options for manual page output ---------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'puppet-qdrreleasenotes', 'puppet-qdr Release Notes Documentation',
['2017, Puppet OpenStack Developers'], 1)
]
# If true, show URL addresses after external links.
#man_show_urls = False
# -- Options for Texinfo output -------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'puppet-qdrReleaseNotes', 'puppet-qdr Release Notes Documentation',
'2017, Puppet OpenStack Developers', 'puppet-qdrReleaseNotes', 'One line description of project.',
'Miscellaneous'),
]
# Documents to append as an appendix to all manuals.
#texinfo_appendices = []
# If false, no module index is generated.
#texinfo_domain_indices = True
# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'
# If true, do not generate a @detailmenu in the "Top" node's menu.
#texinfo_no_detailmenu = False
# -- Options for Internationalization output ------------------------------
locale_dirs = ['locale/']
# openstackdocstheme options
openstackdocs_repo_name = 'openstack/puppet-qdr'
openstackdocs_bug_project = 'puppet-qdr'
openstackdocs_bug_tag = ''
openstackdocs_auto_name = False

View File

@ -1,29 +0,0 @@
=======================================
Welcome to qdr Release Notes!
=======================================
Contents
========
.. toctree::
:maxdepth: 2
unreleased
2023.2
2023.1
zed
yoga
xena
wallaby
victoria
ussuri
train
stein
rocky
Indices and tables
==================
* :ref:`genindex`
* :ref:`search`

View File

@ -1,6 +0,0 @@
===================================
Rocky Series Release Notes
===================================
.. release-notes::
:branch: stable/rocky

View File

@ -1,6 +0,0 @@
===================================
Stein Series Release Notes
===================================
.. release-notes::
:branch: stable/stein

View File

@ -1,6 +0,0 @@
==========================
Train Series Release Notes
==========================
.. release-notes::
:branch: stable/train

View File

@ -1,5 +0,0 @@
==============================
Current Series Release Notes
==============================
.. release-notes::

View File

@ -1,6 +0,0 @@
===========================
Ussuri Series Release Notes
===========================
.. release-notes::
:branch: stable/ussuri

View File

@ -1,6 +0,0 @@
=============================
Victoria Series Release Notes
=============================
.. release-notes::
:branch: stable/victoria

View File

@ -1,6 +0,0 @@
============================
Wallaby Series Release Notes
============================
.. release-notes::
:branch: stable/wallaby

View File

@ -1,6 +0,0 @@
=========================
Xena Series Release Notes
=========================
.. release-notes::
:branch: stable/xena

View File

@ -1,6 +0,0 @@
=========================
Yoga Series Release Notes
=========================
.. release-notes::
:branch: unmaintained/yoga

View File

@ -1,6 +0,0 @@
========================
Zed Series Release Notes
========================
.. release-notes::
:branch: stable/zed

View File

@ -1,36 +0,0 @@
require 'spec_helper_acceptance'
describe 'basic qdr' do
context 'default parameters' do
it 'should work with no errors' do
pp= <<-EOS
include openstack_integration
include openstack_integration::repos
# NOTE(tkajinam): qpid dispatch router is not available for Ubuntu Jammy
if $facts['os']['family'] == 'RedHat' {
class { 'qdr':
listener_addr => $::openstack_integration::config::host,
listener_port => $::openstack_integration::config::messaging_default_port,
listener_sasl_mech => 'PLAIN',
listener_auth_peer => true,
router_worker_threads => 2,
}
qdr_user { 'testuser':
password => 'secret',
provider => 'sasl',
require => Class['qdr'],
}
}
EOS
# Run it twice and test for idempotency
apply_manifest(pp, :catch_failures => true)
apply_manifest(pp, :catch_changes => true)
end
end
end

View File

@ -1,202 +0,0 @@
require 'spec_helper'
describe 'qdr' do
shared_examples 'qdr' do
it { is_expected.to contain_class('qdr') }
it { is_expected.to contain_class('qdr::params') }
it { is_expected.to contain_class('qdr::install') }
it { is_expected.to contain_class('qdr::config') }
it { is_expected.to contain_class('qdr::service') }
it 'installs the service package' do
is_expected.to contain_package(platform_params[:qdr_package_name]).with({ :ensure => :installed })
end
it 'installs the sasl packages' do
platform_params[:sasl_package_list].each do |p|
is_expected.to contain_package(p).with({ :ensure => :installed })
end
end
it 'installs the tools packages' do
platform_params[:tools_package_list].each do |p|
is_expected.to contain_package(p).with({ :ensure => :installed })
end
end
context 'with default parameters' do
it do
should contain_file(platform_params[:service_home]).with({
:ensure => :directory,
:owner => '0',
:group => '0',
:mode => '0755',
})
end
it do
should contain_file('/etc/qpid-dispatch').with({
:ensure => :directory,
:owner => '0',
:group => '0',
:mode => '0644',
})
end
it do
should contain_file('/etc/qpid-dispatch/ssl').with({
:ensure => :directory,
:owner => '0',
:group => '0',
:mode => '0644',
})
end
it do
should contain_file('qdrouterd.conf').with({
:ensure => :file,
:owner => '0',
:group => '0',
:mode => '0644',
})
end
it do
should contain_file(platform_params[:router_debug_dump]).with({
:ensure => :directory,
:owner => '0',
:group => '0',
:mode => '0766',
})
end
it do
should contain_service(platform_params[:service_name]).with({
:ensure => 'running',
:enable => 'true',
})
end
it do
should contain_file('qdrouterd.conf').with_content(/mode: standalone/)
should contain_file('qdrouterd.conf').with_content(/workerThreads: 1/)
should contain_file('qdrouterd.conf').with_content(/helloIntervalSeconds: 1/)
should contain_file('qdrouterd.conf').with_content(/helloMaxAgeSeconds: 3/)
should contain_file('qdrouterd.conf').with_content(/raIntervalSeconds: 30/)
should contain_file('qdrouterd.conf').with_content(/raIntervalFluxSeconds: 4/)
should contain_file('qdrouterd.conf').with_content(/remoteLsMaxAgeSeconds: 60/)
should contain_file('qdrouterd.conf').with_content(/host: 127.0.0.1/)
should contain_file('qdrouterd.conf').with_content(/port: 5672/)
should contain_file('qdrouterd.conf').with_content(/authenticatePeer: false/)
should contain_file('qdrouterd.conf').with_content(/idleTimeoutSeconds: 16/)
should contain_file('qdrouterd.conf').with_content(/maxFrameSize: 16384/)
should contain_file('qdrouterd.conf').with_content(/requireEncryption: false/)
should contain_file('qdrouterd.conf').with_content(/saslMechanisms: ANONYMOUS/)
should contain_file('qdrouterd.conf').without_content(/sslProfile {/)
should contain_file('qdrouterd.conf').without_content(/connector {/)
end
end
context 'with overridden paramters' do
let :params do
{
:router_worker_threads => 4,
:router_hello_interval => 2,
:router_hello_max_age => 6,
:router_ra_interval => 60,
:router_ra_interval_flux => 8,
:router_remote_ls_max_age => 120,
:listener_addr => '10.1.1.1',
:listener_port => 5671,
:listener_auth_peer => true,
:listener_idle_timeout => 32,
:listener_max_frame_size => 32768,
:listener_require_encrypt => true,
:listener_sasl_mech => 'ANONYMOUS DIGEST-MD5 EXTERNAL PLAIN',
:connectors => [{'role' => 'inter-router'}],
:extra_listeners => [{'mode' => 'interior'}],
:extra_addresses => [{'prefix' => 'exclusive'}],
}
end
it do
should contain_file('qdrouterd.conf').with_content(/workerThreads: 4/)
should contain_file('qdrouterd.conf').with_content(/helloIntervalSeconds: 2/)
should contain_file('qdrouterd.conf').with_content(/helloMaxAgeSeconds: 6/)
should contain_file('qdrouterd.conf').with_content(/raIntervalSeconds: 60/)
should contain_file('qdrouterd.conf').with_content(/raIntervalFluxSeconds: 8/)
should contain_file('qdrouterd.conf').with_content(/remoteLsMaxAgeSeconds: 120/)
should contain_file('qdrouterd.conf').with_content(/host: 10.1.1.1/)
should contain_file('qdrouterd.conf').with_content(/port: 5671/)
should contain_file('qdrouterd.conf').with_content(/authenticatePeer: true/)
should contain_file('qdrouterd.conf').with_content(/idleTimeoutSeconds: 32/)
should contain_file('qdrouterd.conf').with_content(/maxFrameSize: 32768/)
should contain_file('qdrouterd.conf').with_content(/requireEncryption: true/)
should contain_file('qdrouterd.conf').with_content(/saslMechanisms: ANONYMOUS DIGEST-MD5 EXTERNAL PLAIN/)
should contain_file('qdrouterd.conf').with_content(/role: inter-router/)
should contain_file('qdrouterd.conf').with_content(/mode: interior/)
should contain_file('qdrouterd.conf').with_content(/prefix: exclusive/)
end
end
context 'with qdr ssl enabled' do
let :params do
{
:listener_require_ssl => true,
:listener_ssl_cert_db => '/etc/ssl/certs/ca-bundle.crt',
:listener_ssl_cert_file => '/etc/pki/ca-trust/source/anchors/puppet_qdr.pem',
:listener_ssl_key_file => '/etc/qpid-dispatch/ssl/puppet_qdr.pem',
}
end
it do
should contain_file('qdrouterd.conf').with_content(/sslProfile {/)
should contain_file('qdrouterd.conf').with_content(/certDb: \/etc\/ssl\/certs\/ca-bundle.crt/)
should contain_file('qdrouterd.conf').with_content(/certFile: \/etc\/pki\/ca-trust\/source\/anchors\/puppet_qdr.pem/)
should contain_file('qdrouterd.conf').with_content(/keyFile: \/etc\/qpid-dispatch\/ssl\/puppet_qdr.pem/)
end
end
end
on_supported_os({
:supported_os => OSDefaults.get_supported_os
}).each do |os,os_facts|
let :facts do
os_facts.merge({'processors' => {'count' => 1}})
end
context "on #{os}" do
let (:platform_params) do
case facts[:os]['family']
when 'Debian'
{
:qdr_package_name => 'qdrouterd',
:service_name => 'qdrouterd',
:sasl_package_list => ['sasl2-bin'],
:tools_package_list => ['qdmanage' , 'qdstat'],
:service_home => '/var/lib/qdrouterd',
:router_debug_dump => '/var/log/qdrouterd'
}
when 'RedHat'
{
:qdr_package_name => 'qpid-dispatch-router',
:service_name => 'qdrouterd',
:sasl_package_list => ['cyrus-sasl-lib','cyrus-sasl-plain'],
:tools_package_list => ['qpid-dispatch-tools'],
:service_home => '/var/lib/qdrouterd',
:router_debug_dump => '/var/log/qdrouterd'
}
end
end
it_behaves_like 'qdr'
end
end
end

View File

@ -1,5 +0,0 @@
shared_examples_for "a Puppet::Error" do |description|
it "with message matching #{description.inspect}" do
expect { is_expected.to have_class_count(1) }.to raise_error(Puppet::Error, description)
end
end

View File

@ -1,14 +0,0 @@
require 'puppetlabs_spec_helper/module_spec_helper'
require 'shared_examples'
require 'puppet-openstack_spec_helper/facts'
fixture_path = File.expand_path(File.join(File.dirname(__FILE__), 'fixtures'))
RSpec.configure do |c|
c.alias_it_should_behave_like_to :it_configures, 'configures'
c.alias_it_should_behave_like_to :it_raises, 'raises'
c.module_path = File.join(fixture_path, 'modules')
end
at_exit { RSpec::Puppet::Coverage.report! }

View File

@ -1 +0,0 @@
require 'puppet-openstack_spec_helper/litmus_spec_helper'

View File

@ -1,14 +0,0 @@
require 'puppet'
require 'puppet/type/qdr_address'
describe 'Puppet::Type.type(:qdr_address)' do
before :each do
@qdr_address = Puppet::Type.type(:qdr_address).new(:name => 'test', :prefix => 'unicast', :distribution => 'closest' )
end
it 'should not expect a prefix with a whitespace' do
expect {
Puppet::Type.type(:qdr_address).new(:name => 'test', :prefix => 'multi cast')
}.to raise_error(Puppet::Error, /Parameter prefix failed/)
end
end

View File

@ -1,20 +0,0 @@
require 'puppet'
require 'puppet/type/qdr_connector'
describe 'Puppet::Type.type(:qdr_connector)' do
before :each do
@qdr_connector = Puppet::Type.type(:qdr_connector).new(:name => 'Conn1', :addr => '127.0.0.1', :port => '5273', :role => 'normal' )
end
it 'should require a name' do
expect {
Puppet::Type.type(:qdr_connector).new({})
}.to raise_error(Puppet::Error, 'Title or name must be provided')
end
it 'should not expect a name with a whitespace' do
expect {
Puppet::Type.type(:qdr_connector).new(:name => 'C onn2')
}.to raise_error(Puppet::Error, /Parameter name failed/)
end
end

View File

@ -1,20 +0,0 @@
require 'puppet'
require 'puppet/type/qdr_listener'
describe 'Puppet::Type.type(:qdr_listener)' do
before :each do
@qdr_listener = Puppet::Type.type(:qdr_listener).new(:name => 'Listener1', :addr => '127.0.0.1', :port => '5273', :role => 'normal' )
end
it 'should require a name' do
expect {
Puppet::Type.type(:qdr_listener).new({})
}.to raise_error(Puppet::Error, 'Title or name must be provided')
end
it 'should not expect a name with a whitespace' do
expect {
Puppet::Type.type(:qdr_listener).new(:name => 'L istener2')
}.to raise_error(Puppet::Error, /Parameter name failed/)
end
end

View File

@ -1,23 +0,0 @@
require 'puppet'
require 'puppet/type/qdr_user'
describe 'Puppet::Type.type(:qdr_user)' do
before :each do
@qdr_user = Puppet::Type.type(:qdr_user).new(:name => 'guest', :password => 'guestpw')
end
it 'should accept a user name' do
@qdr_user[:name] = 'bob'
expect(@qdr_user[:name]).to eq('bob')
end
it 'should accept a password' do
@qdr_user[:password] = 'pw'
expect(@qdr_user[:password]).to eq('pw')
end
it 'should require a name' do
expect {
Puppet::Type.type(:qdr_user).new({})
}.to raise_error(Puppet::Error, 'Title or name must be provided')
end
end

View File

@ -1,130 +0,0 @@
##
## Licensed to the Apache Software Foundation (ASF) under one
## or more contributor license agreements. See the NOTICE file
## distributed with this work for additional information
## regarding copyright ownership. The ASF licenses this file
## to you under the Apache License, Version 2.0 (the
## "License"); you may not use this file except in compliance
## with the License. You may obtain a copy of the License at
##
## http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing,
## software distributed under the License is distributed on an
## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
## KIND, either express or implied. See the License for the
## specific language governing permissions and limitations
## under the License
##
# See the qdrouterd.conf (5) manual page for information about this
# file's format and options.
router {
mode: <%= @router_mode %>
id: <%= @router_id %>
workerThreads: <%= @router_worker_threads %>
debugDump: <%= @router_debug_dump %>
saslConfigPath: <%= @router_sasl_path %>
saslConfigName: <%= @router_sasl_name %>
helloIntervalSeconds: <%= @router_hello_interval %>
helloMaxAgeSeconds: <%= @router_hello_max_age %>
raIntervalSeconds: <%= @router_ra_interval %>
raIntervalFluxSeconds: <%= @router_ra_interval_flux %>
remoteLsMaxAgeSeconds: <%= @router_remote_ls_max_age %>
}
<%- if @listener_require_ssl -%>
sslProfile {
name: <%= @router_id %>
certDb: <%= @listener_ssl_cert_db %>
certFile: <%= @listener_ssl_cert_file %>
keyFile: <%= @listener_ssl_key_file %>
<%- if @listener_ssl_pw_file -%>
passwordFile: <%= @listener_ssl_pw_file %>
<%- end -%>
<%- if @listener_ssl_password -%>
password: <%= @listener_ssl_password %>
<%- end -%>
}
<%- end -%>
<%- @ssl_profiles.each do |profile| -%>
sslProfile {
<%- profile.each do |k,v| -%>
<%= k %>: <%= v %>
<%- end -%>
}
<%- end -%>
listener {
host: <%= @listener_addr %>
port: <%= @listener_port %>
idleTimeoutSeconds: <%= @listener_idle_timeout %>
maxFrameSize: <%= @listener_max_frame_size %>
requireEncryption: <%= @listener_require_encrypt %>
<%- if @listener_require_ssl -%>
sslProfile: <%= @router_id %>
<%- end -%>
authenticatePeer: <%= @listener_auth_peer %>
saslMechanisms: <%= @listener_sasl_mech %>
}
<%- @extra_listeners.each do |listener| -%>
listener {
<%- listener.each do |k,v| -%>
<%= k %>: <%= v %>
<%- end -%>
}
<%- end -%>
<%- @connectors.each do |connector| -%>
connector {
<%- connector.each do |k,v| -%>
<%= k %>: <%= v %>
<%- end -%>
}
<%- end -%>
address {
prefix: unicast
distribution: closest
}
address {
prefix: exclusive
distribution: closest
}
address {
prefix: broadcast
distribution: multicast
}
<%- @extra_addresses.each do |address| -%>
address {
<%- address.each do |k,v| -%>
<%= k %>: <%= v %>
<%- end -%>
}
<%- end -%>
<%- @autolink_addresses.each do |autoLink| -%>
autoLink {
<%- autoLink.each do |k,v| -%>
<%=k %>: <%= v %>
<%- end -%>
}
<%- end -%>
log {
module: <%= @log_module %>
enable: <%= @log_enable %>
timestamp: true
output: <%= @log_output %>
}

13
tox.ini
View File

@ -1,13 +0,0 @@
[tox]
minversion = 3.1
skipsdist = True
envlist = releasenotes
ignore_basepython_conflict = True
[testenv]
basepython = python3
install_command = pip install -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages}
[testenv:releasenotes]
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html