From 0b29c4ffabe59cd89dee06f557af1f26f7e54bd3 Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Mon, 18 Nov 2013 14:16:58 -0500 Subject: [PATCH] add firewall_install to suse Signed-off-by: Alfredo Deza --- ceph_deploy/hosts/suse/__init__.py | 2 +- ceph_deploy/hosts/suse/install.py | 33 ++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/ceph_deploy/hosts/suse/__init__.py b/ceph_deploy/hosts/suse/__init__.py index 3d105e7..b6f4858 100644 --- a/ceph_deploy/hosts/suse/__init__.py +++ b/ceph_deploy/hosts/suse/__init__.py @@ -1,5 +1,5 @@ import mon -from install import install +from install import install, firewall_install from uninstall import uninstall # Allow to set some information about this distro diff --git a/ceph_deploy/hosts/suse/install.py b/ceph_deploy/hosts/suse/install.py index 87feed9..71d1158 100644 --- a/ceph_deploy/hosts/suse/install.py +++ b/ceph_deploy/hosts/suse/install.py @@ -1,3 +1,4 @@ +from ceph_deploy.util import templates from ceph_deploy.lib.remoto import process @@ -64,3 +65,35 @@ def install(distro, version_kind, version, adjust_repos): 'ceph', ], ) + + +def firewall_install(distro, repo_url, gpg_url, adjust_repos): + repo_url = repo_url.strip('/') # Remove trailing slashes + + if adjust_repos: + process.run( + distro.conn, + [ + 'rpm', + '--import', + gpg_url, + ] + ) + + ceph_repo_content = templates.ceph_repo.format( + repo_url=repo_url, + gpg_url=gpg_url + ) + + distro.conn.remote_module.write_yum_repo(ceph_repo_content) + + process.run( + distro.conn, + [ + 'zypper', + '--non-interactive', + '--quiet', + 'install', + 'ceph', + ], + ) -- 2.47.3