]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
[RM-12147] Put repo mod flags in a mutex 323/head
authorTravis Rhoden <trhoden@redhat.com>
Fri, 10 Jul 2015 00:09:29 +0000 (17:09 -0700)
committerTravis Rhoden <trhoden@redhat.com>
Fri, 10 Jul 2015 00:09:29 +0000 (17:09 -0700)
--adjust-repos and --no-adjust-repos were not in a mutex group.
Fix that.

Also --repo will always install a new repo file, regardless of
--[no]-adjust-repos, so it might as well be in the same mutex
group.

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
ceph_deploy/install.py
ceph_deploy/tests/parser/test_install.py

index 7081ab8da781ddbfecf70deb3b387316d50bc420..19ccea8a0b1f52fd5d541be065dc28500da3c3f5 100644 (file)
@@ -528,25 +528,31 @@ def make(parser):
         help='install all ceph components (e.g. mon,osd,mds,rgw). This is the default',
     )
 
-    parser.add_argument(
+    repo = parser.add_mutually_exclusive_group()
+
+    repo.add_argument(
         '--adjust-repos',
         dest='adjust_repos',
         action='store_true',
         help='install packages modifying source repos',
     )
 
-    parser.add_argument(
+    repo.add_argument(
         '--no-adjust-repos',
         dest='adjust_repos',
         action='store_false',
         help='install packages without modifying source repos',
     )
 
-    parser.add_argument(
+    repo.add_argument(
         '--repo',
         action='store_true',
         help='install repo files only (skips package installation)',
-        )
+    )
+
+    repo.set_defaults(
+        adjust_repos=True,
+    )
 
     parser.add_argument(
         'host',
@@ -580,7 +586,6 @@ def make(parser):
 
     parser.set_defaults(
         func=install,
-        adjust_repos=True,
     )
 
 
index df94de558a1aefea49dff2ee31830de42f779857..190a984331f7c04e27606dc444cfd3060f6bf11f 100644 (file)
@@ -106,7 +106,6 @@ class TestParserInstall(object):
         args = self.parser.parse_args(('install --%s host1' % comp).split())
         assert getattr(args, 'install_%s' % comp) is True
 
-    @pytest.mark.skipif(reason="http://tracker.ceph.com/issues/12147")
     def test_install_multi_component(self):
         args = self.parser.parse_args(('install --mon --rgw host1').split())
         assert args.install_mon
@@ -120,7 +119,6 @@ class TestParserInstall(object):
         args = self.parser.parse_args('install --no-adjust-repos host1'.split())
         assert not args.adjust_repos
 
-    @pytest.mark.skipif(reason="http://tracker.ceph.com/issues/12147")
     def test_install_adjust_repos_false_with_custom_release(self):
         args = self.parser.parse_args('install --release firefly --no-adjust-repos host1'.split())
         assert args.release == "firefly"