Support customizing package state
... so that users can install specific versions or even update some packages. Change-Id: I09318d95d905ef9c298f3b58c605be585b9a20f1
This commit is contained in:
parent
db18c16911
commit
2698b1c19e
@ -9,14 +9,19 @@
|
||||
# (Required) URL of the remote ovn southbound db.
|
||||
# Example: 'tcp:127.0.0.1:6642'
|
||||
#
|
||||
# [*ovn_encap_ip*]
|
||||
# (Required) IP address of the hypervisor(in which this module is installed)
|
||||
# to which the other controllers would use to create a tunnel to this
|
||||
# controller
|
||||
#
|
||||
# [*package_ensure*]
|
||||
# (Optional) State of the openvswitch package
|
||||
# Defaults to 'present'.
|
||||
#
|
||||
# [*ovn_encap_type*]
|
||||
# (Optional) The encapsulation type to be used
|
||||
# Defaults to 'geneve'
|
||||
#
|
||||
# [*ovn_encap_ip*]
|
||||
# (Required) IP address of the hypervisor(in which this module is installed) to which
|
||||
# the other controllers would use to create a tunnel to this controller
|
||||
#
|
||||
# [*ovn_encap_tos*]
|
||||
# (Optional) The value to be applied to OVN tunnel interface's option:tos.
|
||||
# Defaults to undef
|
||||
@ -108,6 +113,7 @@
|
||||
class ovn::controller(
|
||||
$ovn_remote,
|
||||
$ovn_encap_ip,
|
||||
$package_ensure = 'present',
|
||||
$ovn_encap_type = 'geneve',
|
||||
$ovn_encap_tos = undef,
|
||||
$ovn_bridge_mappings = [],
|
||||
@ -155,9 +161,9 @@ class ovn::controller(
|
||||
}
|
||||
|
||||
package { $::ovn::params::ovn_controller_package_name:
|
||||
ensure => present,
|
||||
ensure => $package_ensure,
|
||||
notify => Service['controller'],
|
||||
name => $::ovn::params::ovn_controller_package_name,
|
||||
before => Service['controller']
|
||||
}
|
||||
|
||||
$config_items = {
|
||||
|
@ -3,6 +3,10 @@
|
||||
#
|
||||
# installs ovn package starts the ovn-northd service
|
||||
#
|
||||
# [*package_ensure*]
|
||||
# (Optional) State of the openvswitch package
|
||||
# Defaults to 'present'.
|
||||
#
|
||||
# [*dbs_listen_ip*]
|
||||
# The IP-Address where OVN DBs should be listening
|
||||
# Defaults to '0.0.0.0'
|
||||
@ -16,6 +20,7 @@
|
||||
# Defaults to undef
|
||||
#
|
||||
class ovn::northd(
|
||||
$package_ensure = 'present',
|
||||
$dbs_listen_ip = '0.0.0.0',
|
||||
$dbs_cluster_local_addr = undef,
|
||||
$dbs_cluster_remote_addr = undef,
|
||||
@ -69,9 +74,9 @@ class ovn::northd(
|
||||
}
|
||||
|
||||
package { $::ovn::params::ovn_northd_package_name:
|
||||
ensure => present,
|
||||
ensure => $package_ensure,
|
||||
name => $::ovn::params::ovn_northd_package_name,
|
||||
before => Service['northd'],
|
||||
notify => Service['northd'],
|
||||
require => Package[$::vswitch::params::ovs_package_name]
|
||||
}
|
||||
}
|
||||
|
5
releasenotes/notes/package_ensure-00a5cd380097f2af.yaml
Normal file
5
releasenotes/notes/package_ensure-00a5cd380097f2af.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The ``ovn::northd`` class and the ``ovn::controller`` class now support
|
||||
customizing state of the packages, by the ``package_ensure`` parameter.
|
@ -32,7 +32,7 @@ describe 'ovn::controller' do
|
||||
is_expected.to contain_package(platform_params[:ovn_controller_package_name]).with(
|
||||
:ensure => 'present',
|
||||
:name => platform_params[:ovn_controller_package_name],
|
||||
:before => 'Service[controller]'
|
||||
:notify => 'Service[controller]'
|
||||
)
|
||||
end
|
||||
|
||||
|
@ -31,7 +31,7 @@ describe 'ovn::northd' do
|
||||
is_expected.to contain_package(platform_params[:ovn_northd_package_name]).with(
|
||||
:ensure => 'present',
|
||||
:name => platform_params[:ovn_northd_package_name],
|
||||
:before => 'Service[northd]'
|
||||
:notify => 'Service[northd]'
|
||||
)
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user