Add a sm-api rehome class

This commit adds a puppet class for re-configuring the sm-api and
reloading the sm-api service during subcloud rehoming process.

Story: 2008774
Task: 42355
Signed-off-by: Yuxing Jiang <yuxing.jiang@windriver.com>
Change-Id: I0da0e702f6f7a9da9a858af0e3c2428d14c63d3d
This commit is contained in:
Yuxing Jiang 2021-06-07 08:42:17 -05:00
parent 3f1484556b
commit b597724821
1 changed files with 15 additions and 2 deletions

View File

@ -43,14 +43,13 @@ class platform::smapi::haproxy
}
}
class platform::smapi
class platform::smapi::common
inherits ::platform::smapi::params {
if ($::platform::params::init_keystone) {
include ::smapi::keystone::auth
}
include ::platform::params
include ::platform::smapi::haproxy
$bind_host_name = $::platform::params::hostname
file { '/etc/sm-api/sm-api.conf':
ensure => 'present',
@ -61,3 +60,17 @@ class platform::smapi
}
}
class platform::smapi {
include ::platform::smapi::common
include ::platform::smapi::haproxy
}
class platform::smapi::rehome {
include ::platform::smapi::common
File['/etc/sm-api/sm-api.conf']
~> service { 'sm-api.service':
ensure => 'running',
enable => true,
}
}