-
Notifications
You must be signed in to change notification settings - Fork 541
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[sunbeam] Add new plugin for sunbeam
Refactor ovn_host and openswitch plugins to utilise the commands from sunbeam Closes: #3297 Resolves: #3586 Related: SET-87 Signed-off-by: Arif Ali <arif.ali@canonical.com>
- Loading branch information
1 parent
700c1a5
commit ad397e3
Showing
4 changed files
with
246 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# This file is part of the sos project: https://github.com/sosreport/sos | ||
# | ||
# This copyrighted material is made available to anyone wishing to use, | ||
# modify, copy, or redistribute it subject to the terms and conditions of | ||
# version 2 of the GNU General Public License. | ||
# | ||
# See the LICENSE file in the source distribution for further information. | ||
|
||
from sos.report.plugins import Plugin, UbuntuPlugin | ||
|
||
|
||
class Sunbeam(Plugin, UbuntuPlugin): | ||
|
||
short_desc = "Sunbeam Openstack Controller" | ||
|
||
plugin_name = "sunbeam" | ||
profiles = ('cloud',) | ||
packages = ('openstack',) | ||
|
||
common_dir = '/var/snap/openstack/common' | ||
|
||
def setup(self): | ||
|
||
self.add_service_status('snap.openstack.*') | ||
|
||
self.add_copy_spec([ | ||
f'{self.common_dir}/hooks.log', | ||
f'{self.common_dir}/state/daemon.yaml', | ||
f'{self.common_dir}/state/truststore/sunbeam.maas.yaml', | ||
f'{self.common_dir}/state/database/info.yaml', | ||
f'{self.common_dir}/state/database/cluster.yaml', | ||
'/var/snap/openstack/current/config.yaml', | ||
]) | ||
|
||
self.add_cmd_output([ | ||
'sunbeam cluster list', | ||
'sunbeam cluster list --format yaml', | ||
]) | ||
|
||
def postproc(self): | ||
|
||
self.do_file_private_sub( | ||
f'{self.common_dir}/state/truststore/sunbeam.maas.yaml' | ||
) | ||
|
||
# vim: et ts=4 sw=4 |
Oops, something went wrong.