]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
[RM-11406] Get GPG key URL by function call
authorTravis Rhoden <trhoden@redhat.com>
Thu, 28 May 2015 01:53:28 +0000 (21:53 -0400)
committerTravis Rhoden <trhoden@redhat.com>
Thu, 28 May 2015 13:53:33 +0000 (09:53 -0400)
Everywhere but SUSE.  SUSE requires a bit more work to handle
http vs https.

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
ceph_deploy/hosts/centos/install.py
ceph_deploy/hosts/debian/install.py
ceph_deploy/hosts/fedora/install.py
ceph_deploy/install.py

index bb91b4a26559bf14e822dc3b69e9716a575961b7..fbec63f4f422f1dcf716f2a42bf2ac2b36539dd2 100644 (file)
@@ -1,6 +1,7 @@
 from ceph_deploy.util import pkg_managers, templates
 from ceph_deploy.lib import remoto
 from ceph_deploy.hosts.util import install_yum_priorities
+from ceph_deploy.util.paths import gpg
 
 
 def rpm_dist(distro):
@@ -63,7 +64,7 @@ def install(distro, version_kind, version, adjust_repos, **kw):
                 [
                     'rpm',
                     '--import',
-                    "https://git.ceph.com/?p=ceph.git;a=blob_plain;f=keys/{key}.asc".format(key=key)
+                    gpg.url(key)
                 ]
             )
 
@@ -94,7 +95,7 @@ def install(distro, version_kind, version, adjust_repos, **kw):
                     release=release.split(".", 1)[0],
                     machine=machine,
                     version=version),
-                "https://git.ceph.com/?p=ceph.git;a=blob_plain;f=keys/{key}.asc".format(key=key),
+                gpg.url(key),
                 adjust_repos=True,
                 extra_installs=False
             )
index db4c431dd6212c50e3cbe3b3a7bcbc1c78328536..b1ffb7629971f2326a1f3f6ba2316aaeddc21db2 100644 (file)
@@ -2,6 +2,7 @@ from urlparse import urlparse
 
 from ceph_deploy.lib import remoto
 from ceph_deploy.util import pkg_managers
+from ceph_deploy.util.paths import gpg
 
 
 def install(distro, version_kind, version, adjust_repos, **kw):
@@ -36,7 +37,7 @@ def install(distro, version_kind, version, adjust_repos, **kw):
                 'wget',
                 '-O',
                 '{key}.asc'.format(key=key),
-                'https://git.ceph.com/?p=ceph.git;a=blob_plain;f=keys/{key}.asc'.format(key=key),
+                gpg.url(key),
             ],
             stop_on_nonzero=False,
         )
index 59a42fa885320221613e613ad4a897f6be28a537..900fbab8e3caae2260b5b28f976cd0c9fdbf6796 100644 (file)
@@ -1,6 +1,7 @@
 from ceph_deploy.lib import remoto
 from ceph_deploy.hosts.centos.install import repo_install, mirror_install  # noqa
 from ceph_deploy.hosts.util import install_yum_priorities
+from ceph_deploy.util.paths import gpg
 
 
 def install(distro, version_kind, version, adjust_repos, **kw):
@@ -26,7 +27,7 @@ def install(distro, version_kind, version, adjust_repos, **kw):
                 [
                     'rpm',
                     '--import',
-                    "https://git.ceph.com/?p=ceph.git;a=blob_plain;f=keys/{key}.asc".format(key=key)
+                    gpg.url(key)
                 ]
             )
 
@@ -64,7 +65,7 @@ def install(distro, version_kind, version, adjust_repos, **kw):
                     release=release.split(".", 1)[0],
                     machine=machine,
                     version=version),
-                "https://git.ceph.com/?p=ceph.git;a=blob_plain;f=keys/{key}.asc".format(key=key),
+                gpg.url(key),
                 adjust_repos=True,
                 extra_installs=False
             )
index b64f3e724a4780a2701516b7c609408c8f3a6a5a..49c8be2ccbbeb38b5fdf30631aa1dfa1a0e3edb2 100644 (file)
@@ -6,6 +6,7 @@ from ceph_deploy import hosts
 from ceph_deploy.cliutil import priority
 from ceph_deploy.lib import remoto
 from ceph_deploy.util.constants import default_components
+from ceph_deploy.util.paths import gpg
 
 LOG = logging.getLogger(__name__)
 
@@ -137,7 +138,7 @@ def install(args):
         # custom repo arguments
         repo_url = os.environ.get('CEPH_DEPLOY_REPO_URL') or args.repo_url
         gpg_url = os.environ.get('CEPH_DEPLOY_GPG_URL') or args.gpg_url
-        gpg_fallback = 'https://git.ceph.com/?p=ceph.git;a=blob_plain;f=keys/release.asc'
+        gpg_fallback = gpg.url('release')
 
         if gpg_url is None and repo_url:
             LOG.warning('--gpg-url was not used, will fallback')