Make parameter names more sensible
This updates the parameters introduced by [1] during this cycle, to
better represent for what the parameter is used.
[1] 02512cccbc
Change-Id: If3630e6a08abc8216fbd5e059fb5a8e51294b6da
This commit is contained in:
parent
bdffc5bb6b
commit
22e4982217
|
@ -1,9 +1,9 @@
|
|||
---
|
||||
ovn::controller::package_name: 'ovn-host'
|
||||
ovn::controller::service_name: 'ovn-host'
|
||||
ovn::controller::config_file_path: '/etc/default/ovn-host'
|
||||
ovn::controller::config_option_name: 'OVN_CTL_OPTS'
|
||||
ovn::controller::environment_file_path: '/etc/default/ovn-host'
|
||||
ovn::controller::opts_envvar_name: 'OVN_CTL_OPTS'
|
||||
ovn::northd::package_name: 'ovn-central'
|
||||
ovn::northd::service_name: 'ovn-central'
|
||||
ovn::northd::config_file_path: '/etc/default/ovn-central'
|
||||
ovn::northd::config_option_name: 'OVN_CTL_OPTS'
|
||||
ovn::northd::environment_file_path: '/etc/default/ovn-central'
|
||||
ovn::northd::opts_envvar_name: 'OVN_CTL_OPTS'
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
---
|
||||
ovn::controller::package_name: 'openvswitch-ovn-host'
|
||||
ovn::controller::service_name: 'ovn-controller'
|
||||
ovn::controller::config_file_path: '/etc/sysconfig/ovn-controller'
|
||||
ovn::controller::config_option_name: 'OVN_CONTROLLER_OPTS'
|
||||
ovn::controller::environment_file_path: '/etc/sysconfig/ovn-controller'
|
||||
ovn::controller::opts_envvar_name: 'OVN_CONTROLLER_OPTS'
|
||||
ovn::northd::package_name: 'openvswitch-ovn-central'
|
||||
ovn::northd::service_name: 'ovn-northd'
|
||||
ovn::northd::config_file_path: '/etc/sysconfig/ovn-northd'
|
||||
ovn::northd::config_option_name: 'OVN_NORTHD_OPTS'
|
||||
ovn::northd::environment_file_path: '/etc/sysconfig/ovn-northd'
|
||||
ovn::northd::opts_envvar_name: 'OVN_NORTHD_OPTS'
|
||||
|
|
|
@ -11,10 +11,10 @@
|
|||
# [*service_name*]
|
||||
# (required) Name of ovn-controller service.
|
||||
#
|
||||
# [*config_file_path*]
|
||||
# (required) File path of the ovn-controller config file
|
||||
# [*environment_file_path*]
|
||||
# (required) File path of the ovn-controller environment file
|
||||
#
|
||||
# [*config_option_name*]
|
||||
# [*opts_envvar_name*]
|
||||
# (required) Name of the environment variable to customize options to launch
|
||||
# the ovn-controller service.
|
||||
#
|
||||
|
@ -142,8 +142,8 @@
|
|||
class ovn::controller(
|
||||
String[1] $service_name,
|
||||
String[1] $package_name,
|
||||
Stdlib::Absolutepath $config_file_path,
|
||||
String[1] $config_option_name,
|
||||
Stdlib::Absolutepath $environment_file_path,
|
||||
String[1] $opts_envvar_name,
|
||||
String $ovn_remote,
|
||||
String $ovn_encap_ip,
|
||||
String $package_ensure = 'present',
|
||||
|
@ -213,8 +213,8 @@ class ovn::controller(
|
|||
$ovn_controller_opts = join($ovn_controller_ssl_opts + $ovn_controller_extra_opts, ' ')
|
||||
|
||||
augeas { 'config-ovn-controller':
|
||||
context => "/files${config_file_path}",
|
||||
changes => "set ${config_option_name} '\"${ovn_controller_opts}\"'",
|
||||
context => "/files${environment_file_path}",
|
||||
changes => "set ${opts_envvar_name} '\"${ovn_controller_opts}\"'",
|
||||
require => Package['ovn-controller'],
|
||||
notify => Service['controller'],
|
||||
}
|
||||
|
|
|
@ -9,10 +9,10 @@
|
|||
# [*service_name*]
|
||||
# (required) Name of ovn-northd service.
|
||||
#
|
||||
# [*config_file_path*]
|
||||
# (required) File path of the ovn-controller config file
|
||||
# [*environment_file_path*]
|
||||
# (required) File path of the ovn-controller environment file
|
||||
#
|
||||
# [*config_option_name*]
|
||||
# [*opts_envvar_name*]
|
||||
# (required) Name of the environment variable to customize options to launch
|
||||
# the ovn-controller service.
|
||||
#
|
||||
|
@ -83,8 +83,8 @@
|
|||
class ovn::northd(
|
||||
String[1] $package_name,
|
||||
String[1] $service_name,
|
||||
Stdlib::Absolutepath $config_file_path,
|
||||
String[1] $config_option_name,
|
||||
Stdlib::Absolutepath $environment_file_path,
|
||||
String[1] $opts_envvar_name,
|
||||
String $package_ensure = 'present',
|
||||
String $dbs_listen_ip = '0.0.0.0',
|
||||
Optional[String] $dbs_cluster_local_addr = undef,
|
||||
|
@ -228,8 +228,8 @@ class ovn::northd(
|
|||
' ')
|
||||
|
||||
augeas { 'config-ovn-northd':
|
||||
context => "/files${config_file_path}",
|
||||
changes => "set ${config_option_name} '\"${ovn_northd_opts}\"'",
|
||||
context => "/files${environment_file_path}",
|
||||
changes => "set ${opts_envvar_name} '\"${ovn_northd_opts}\"'",
|
||||
require => Package['ovn-northd'],
|
||||
before => Service['northd'],
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ describe 'ovn::controller' do
|
|||
it 'creates systemd conf' do
|
||||
is_expected.to contain_augeas('config-ovn-controller').with({
|
||||
:context => platform_params[:ovn_controller_context],
|
||||
:changes => "set " + platform_params[:ovn_controller_option_name] + " '\"\"'",
|
||||
:changes => "set " + platform_params[:ovn_controller_opts_envvar_name] + " '\"\"'",
|
||||
})
|
||||
end
|
||||
|
||||
|
@ -243,7 +243,7 @@ describe 'ovn::controller' do
|
|||
it 'creates systemd conf' do
|
||||
is_expected.to contain_augeas('config-ovn-controller').with({
|
||||
:context => platform_params[:ovn_controller_context],
|
||||
:changes => "set " + platform_params[:ovn_controller_option_name] + " '\"" +
|
||||
:changes => "set " + platform_params[:ovn_controller_opts_envvar_name] + " '\"" +
|
||||
"--ovn-controller-ssl-key=/path/to/key.pem --ovn-controller-ssl-cert=/path/to/cert.pem --ovn-controller-ssl-ca-cert=/path/to/cacert.pem" +
|
||||
"\"'",
|
||||
})
|
||||
|
@ -263,20 +263,20 @@ describe 'ovn::controller' do
|
|||
when 'Debian'
|
||||
let :platform_params do
|
||||
{
|
||||
:ovn_controller_package_name => 'ovn-host',
|
||||
:ovn_controller_service_name => 'ovn-host',
|
||||
:ovn_controller_context => '/files/etc/default/ovn-host',
|
||||
:ovn_controller_option_name => 'OVN_CTL_OPTS'
|
||||
:ovn_controller_package_name => 'ovn-host',
|
||||
:ovn_controller_service_name => 'ovn-host',
|
||||
:ovn_controller_context => '/files/etc/default/ovn-host',
|
||||
:ovn_controller_opts_envvar_name => 'OVN_CTL_OPTS'
|
||||
}
|
||||
end
|
||||
it_behaves_like 'ovn controller'
|
||||
when 'RedHat'
|
||||
let :platform_params do
|
||||
{
|
||||
:ovn_controller_package_name => 'openvswitch-ovn-host',
|
||||
:ovn_controller_service_name => 'ovn-controller',
|
||||
:ovn_controller_context => '/files/etc/sysconfig/ovn-controller',
|
||||
:ovn_controller_option_name => 'OVN_CONTROLLER_OPTS'
|
||||
:ovn_controller_package_name => 'openvswitch-ovn-host',
|
||||
:ovn_controller_service_name => 'ovn-controller',
|
||||
:ovn_controller_context => '/files/etc/sysconfig/ovn-controller',
|
||||
:ovn_controller_opts_envvar_name => 'OVN_CONTROLLER_OPTS'
|
||||
}
|
||||
end
|
||||
it_behaves_like 'ovn controller'
|
||||
|
|
|
@ -10,7 +10,7 @@ describe 'ovn::northd' do
|
|||
it 'creates systemd conf' do
|
||||
is_expected.to contain_augeas('config-ovn-northd').with({
|
||||
:context => platform_params[:ovn_northd_context],
|
||||
:changes => "set " + platform_params[:ovn_northd_option_name] + " '\"" +
|
||||
:changes => "set " + platform_params[:ovn_northd_opts_envvar_name] + " '\"" +
|
||||
"--db-nb-addr=0.0.0.0 --db-sb-addr=0.0.0.0" +
|
||||
" --db-nb-create-insecure-remote=yes --db-sb-create-insecure-remote=yes" +
|
||||
"\"'",
|
||||
|
@ -31,7 +31,7 @@ describe 'ovn::northd' do
|
|||
it 'creates systemd conf' do
|
||||
is_expected.to contain_augeas('config-ovn-northd').with({
|
||||
:context => platform_params[:ovn_northd_context],
|
||||
:changes => "set " + platform_params[:ovn_northd_option_name] +
|
||||
:changes => "set " + platform_params[:ovn_northd_opts_envvar_name] +
|
||||
" '\"--db-nb-addr=[::1] --db-sb-addr=[::1] --db-nb-create-insecure-remote=yes --db-sb-create-insecure-remote=yes\"'",
|
||||
})
|
||||
end
|
||||
|
@ -51,7 +51,7 @@ describe 'ovn::northd' do
|
|||
it 'creates systemd conf' do
|
||||
is_expected.to contain_augeas('config-ovn-northd').with({
|
||||
:context => platform_params[:ovn_northd_context],
|
||||
:changes => "set " + platform_params[:ovn_northd_option_name] + " '\"" +
|
||||
:changes => "set " + platform_params[:ovn_northd_opts_envvar_name] + " '\"" +
|
||||
"--db-nb-addr=0.0.0.0 --db-sb-addr=0.0.0.0" +
|
||||
" --db-nb-create-insecure-remote=yes --db-sb-create-insecure-remote=yes" +
|
||||
" --ovn-northd-nb-db=ssl:192.0.2.1:6645,ssl:192.0.2.2:6645,ssl:192.0.2.3:6645" +
|
||||
|
@ -78,7 +78,7 @@ describe 'ovn::northd' do
|
|||
it 'creates systemd conf' do
|
||||
is_expected.to contain_augeas('config-ovn-northd').with({
|
||||
:context => platform_params[:ovn_northd_context],
|
||||
:changes => "set " + platform_params[:ovn_northd_option_name] + " '\"" +
|
||||
:changes => "set " + platform_params[:ovn_northd_opts_envvar_name] + " '\"" +
|
||||
"--db-nb-addr=0.0.0.0 --db-sb-addr=0.0.0.0" +
|
||||
" --db-nb-create-insecure-remote=no --db-sb-create-insecure-remote=yes" +
|
||||
" --ovn-nb-db-ssl-key=/path/to/dbkey.pem --ovn-nb-db-ssl-cert=/path/to/dbcert.pem --ovn-nb-db-ssl-ca-cert=/path/to/dbcacert.pem" +
|
||||
|
@ -110,7 +110,7 @@ describe 'ovn::northd' do
|
|||
it 'creates systemd conf' do
|
||||
is_expected.to contain_augeas('config-ovn-northd').with({
|
||||
:context => platform_params[:ovn_northd_context],
|
||||
:changes => "set " + platform_params[:ovn_northd_option_name] + " '\"" +
|
||||
:changes => "set " + platform_params[:ovn_northd_opts_envvar_name] + " '\"" +
|
||||
"--db-nb-addr=[::1] --db-sb-addr=[::1]" +
|
||||
" --db-nb-create-insecure-remote=no --db-sb-create-insecure-remote=yes" +
|
||||
" --ovn-nb-db-ssl-key=/path/to/dbkey.pem --ovn-nb-db-ssl-cert=/path/to/dbcert.pem --ovn-nb-db-ssl-ca-cert=/path/to/dbcacert.pem" +
|
||||
|
@ -141,7 +141,7 @@ describe 'ovn::northd' do
|
|||
it 'creates systemd conf' do
|
||||
is_expected.to contain_augeas('config-ovn-northd').with({
|
||||
:context => platform_params[:ovn_northd_context],
|
||||
:changes => "set " + platform_params[:ovn_northd_option_name] + " '\"" +
|
||||
:changes => "set " + platform_params[:ovn_northd_opts_envvar_name] + " '\"" +
|
||||
"--db-nb-addr=0.0.0.0 --db-sb-addr=0.0.0.0" +
|
||||
" --db-nb-create-insecure-remote=yes --db-sb-create-insecure-remote=no" +
|
||||
" --ovn-sb-db-ssl-key=/path/to/dbkey.pem --ovn-sb-db-ssl-cert=/path/to/dbcert.pem --ovn-sb-db-ssl-ca-cert=/path/to/dbcacert.pem" +
|
||||
|
@ -173,7 +173,7 @@ describe 'ovn::northd' do
|
|||
it 'creates systemd conf' do
|
||||
is_expected.to contain_augeas('config-ovn-northd').with({
|
||||
:context => platform_params[:ovn_northd_context],
|
||||
:changes => "set " + platform_params[:ovn_northd_option_name] + " '\"" +
|
||||
:changes => "set " + platform_params[:ovn_northd_opts_envvar_name] + " '\"" +
|
||||
"--db-nb-addr=[::1] --db-sb-addr=[::1]" +
|
||||
" --db-nb-create-insecure-remote=yes --db-sb-create-insecure-remote=no" +
|
||||
" --ovn-sb-db-ssl-key=/path/to/dbkey.pem --ovn-sb-db-ssl-cert=/path/to/dbcert.pem --ovn-sb-db-ssl-ca-cert=/path/to/dbcacert.pem" +
|
||||
|
@ -253,10 +253,10 @@ describe 'ovn::northd' do
|
|||
when 'Debian'
|
||||
let(:platform_params) do
|
||||
{
|
||||
:ovn_northd_package_name => 'ovn-central',
|
||||
:ovn_northd_service_name => 'ovn-central',
|
||||
:ovn_northd_context => '/files/etc/default/ovn-central',
|
||||
:ovn_northd_option_name => 'OVN_CTL_OPTS'
|
||||
:ovn_northd_package_name => 'ovn-central',
|
||||
:ovn_northd_service_name => 'ovn-central',
|
||||
:ovn_northd_context => '/files/etc/default/ovn-central',
|
||||
:ovn_northd_opts_envvar_name => 'OVN_CTL_OPTS'
|
||||
}
|
||||
end
|
||||
it_behaves_like 'ovn northd'
|
||||
|
@ -264,10 +264,10 @@ describe 'ovn::northd' do
|
|||
when 'RedHat'
|
||||
let(:platform_params) do
|
||||
{
|
||||
:ovn_northd_package_name => 'openvswitch-ovn-central',
|
||||
:ovn_northd_service_name => 'ovn-northd',
|
||||
:ovn_northd_context => '/files/etc/sysconfig/ovn-northd',
|
||||
:ovn_northd_option_name => 'OVN_NORTHD_OPTS'
|
||||
:ovn_northd_package_name => 'openvswitch-ovn-central',
|
||||
:ovn_northd_service_name => 'ovn-northd',
|
||||
:ovn_northd_context => '/files/etc/sysconfig/ovn-northd',
|
||||
:ovn_northd_opts_envvar_name => 'OVN_NORTHD_OPTS'
|
||||
}
|
||||
end
|
||||
it_behaves_like 'ovn northd'
|
||||
|
|
Loading…
Reference in New Issue