From: Travis Rhoden Date: Wed, 1 Jul 2015 21:04:30 +0000 (-0700) Subject: [RM-12150] Require at least one host for 'rgw create' X-Git-Tag: v1.5.26~12^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c60bceee9a54560d8ce165f0976aec7dd4558617;p=ceph-deploy.git [RM-12150] Require at least one host for 'rgw create' Signed-off-by: Travis Rhoden --- diff --git a/ceph_deploy/rgw.py b/ceph_deploy/rgw.py index 92abb00..1c37a79 100644 --- a/ceph_deploy/rgw.py +++ b/ceph_deploy/rgw.py @@ -118,9 +118,6 @@ def rgw_create(args): ' '.join(':'.join(x or '' for x in t) for t in args.rgw), ) - if not args.rgw: - raise exc.NeedHostError() - key = get_bootstrap_rgw_key(cluster=args.cluster) bootstrapped = set() @@ -195,7 +192,7 @@ def make(parser): rgw_create.add_argument( 'rgw', metavar='HOST[:NAME]', - nargs='*', + nargs='+', type=colon_separated, help='host (and optionally the daemon name) to deploy on. \ NAME is automatically prefixed with \'rgw.\'', diff --git a/ceph_deploy/tests/parser/test_rgw.py b/ceph_deploy/tests/parser/test_rgw.py index 3cd0f6c..69adb57 100644 --- a/ceph_deploy/tests/parser/test_rgw.py +++ b/ceph_deploy/tests/parser/test_rgw.py @@ -16,7 +16,6 @@ class TestParserRGW(object): assert 'positional arguments:' in out assert 'optional arguments:' in out - @pytest.mark.skipif(reason="http://tracker.ceph.com/issues/12150") def test_rgw_create_host_required(self, capsys): with pytest.raises(SystemExit): self.parser.parse_args('rgw create'.split())