]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
add firewall_install to suse
authorAlfredo Deza <alfredo.deza@inktank.com>
Mon, 18 Nov 2013 19:16:58 +0000 (14:16 -0500)
committerAlfredo Deza <alfredo.deza@inktank.com>
Mon, 18 Nov 2013 19:29:57 +0000 (14:29 -0500)
Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
ceph_deploy/hosts/suse/__init__.py
ceph_deploy/hosts/suse/install.py

index 3d105e7d0b2e105ee3473cbc89974b2d0760c899..b6f4858e5f4d99ab6607101be51ee6d804b35fb1 100644 (file)
@@ -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
index 87feed9e8d64299d69c8008e5cd0523e61691c0c..71d115856268ab61935891599cf6c0a4493d55ad 100644 (file)
@@ -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',
+            ],
+        )