]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/log
ceph-deploy.git
10 years agoMerge pull request #336 from trhoden/RM-12477
Alfredo Deza [Wed, 5 Aug 2015 18:47:09 +0000 (14:47 -0400)]
Merge pull request #336 from trhoden/RM-12477

Only install priorities plugin when using Yum

10 years ago[RM-12477] kill install_priorities_plugin() 336/head
Travis Rhoden [Tue, 4 Aug 2015 21:08:04 +0000 (14:08 -0700)]
[RM-12477] kill install_priorities_plugin()

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12477] centos: more selective install of yum-plugin-priorities
Travis Rhoden [Tue, 4 Aug 2015 21:06:36 +0000 (14:06 -0700)]
[RM-12477] centos: more selective install of yum-plugin-priorities

Only install plugin if using Yum for repo_install and mirror_install.

This is needed because Fedora re-uses these methods

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12477] fedora: priorities plugin only on Yum
Travis Rhoden [Tue, 4 Aug 2015 20:59:04 +0000 (13:59 -0700)]
[RM-12477] fedora: priorities plugin only on Yum

Fixes: #12477
Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12477] Add 'name' attribute to pkg manager classes
Travis Rhoden [Wed, 5 Aug 2015 16:19:14 +0000 (09:19 -0700)]
[RM-12477] Add 'name' attribute to pkg manager classes

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years agoMerge pull request #335 from trhoden/RM-12553
Alfredo Deza [Tue, 4 Aug 2015 20:53:17 +0000 (16:53 -0400)]
Merge pull request #335 from trhoden/RM-12553

Add "ceph-deploy repo" command

10 years ago[RM-12553] remote write_file - remove file first if it exists 335/head
Travis Rhoden [Tue, 4 Aug 2015 20:07:47 +0000 (13:07 -0700)]
[RM-12553] remote write_file - remove file first if it exists

This way a new file mode can be applied if it has changed.

Since we are always writing the whole file (mode 'w') rather than
appending, we aren't losing anything by doing this.

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12553] Apt repo file mode 0600 when URL has pw
Travis Rhoden [Tue, 4 Aug 2015 19:25:59 +0000 (12:25 -0700)]
[RM-12553] Apt repo file mode 0600 when URL has pw

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12553] Allow a file mode when writing apt repo
Travis Rhoden [Tue, 4 Aug 2015 19:21:51 +0000 (12:21 -0700)]
[RM-12553] Allow a file mode when writing apt repo

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12553] repo: Allow URLs to be passed by env var
Travis Rhoden [Tue, 4 Aug 2015 18:34:17 +0000 (11:34 -0700)]
[RM-12553] repo: Allow URLs to be passed by env var

This is more secure if the repo URL contains a user:pass combo

Refs: #12553

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12553] Clarify comments when writing repo files
Travis Rhoden [Tue, 4 Aug 2015 18:30:56 +0000 (11:30 -0700)]
[RM-12553] Clarify comments when writing repo files

These comments get printed to the console, and were a bit
misleading/ambiguous.

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12553] Add Apt package pinning after repo add
Travis Rhoden [Tue, 4 Aug 2015 18:27:57 +0000 (11:27 -0700)]
[RM-12553] Add Apt package pinning after repo add

Refs: #12553

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12553] Remove beginning newline from Yum repo template
Travis Rhoden [Tue, 4 Aug 2015 05:22:03 +0000 (22:22 -0700)]
[RM-12553] Remove beginning newline from Yum repo template

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12553] Call add_repo() to create repo file
Travis Rhoden [Tue, 4 Aug 2015 05:03:24 +0000 (22:03 -0700)]
[RM-12553] Call add_repo() to create repo file

Refs: #12553

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12553] RPM: write out repo file
Travis Rhoden [Tue, 4 Aug 2015 05:02:31 +0000 (22:02 -0700)]
[RM-12553] RPM: write out repo file

Refs: #12553

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12553] Add ability to delete a repo file
Travis Rhoden [Tue, 4 Aug 2015 04:14:22 +0000 (21:14 -0700)]
[RM-12553] Add ability to delete a repo file

Refs: #12553

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years agoMerge pull request #332 from ceph/wip-systemd
Travis Rhoden [Tue, 4 Aug 2015 18:08:18 +0000 (11:08 -0700)]
Merge pull request #332 from ceph/wip-systemd

systemd changes for F22

Reviewed-By: Travis Rhoden <trhoden@redhat.com>
10 years agoMerge pull request #334 from trhoden/RM-12439
Alfredo Deza [Mon, 3 Aug 2015 23:10:05 +0000 (19:10 -0400)]
Merge pull request #334 from trhoden/RM-12439

Use package manager classes for remaining distros

10 years ago[RM-12439] suse: Use Zypper Class pkg manager 334/head
Travis Rhoden [Sat, 1 Aug 2015 03:15:22 +0000 (20:15 -0700)]
[RM-12439] suse: Use Zypper Class pkg manager

Refs: #12439

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12439] Add Zypper Class for pkg management
Travis Rhoden [Sat, 1 Aug 2015 02:45:15 +0000 (19:45 -0700)]
[RM-12439] Add Zypper Class for pkg management

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12439] debian: use Apt Class pkg manager
Travis Rhoden [Fri, 31 Jul 2015 23:58:53 +0000 (16:58 -0700)]
[RM-12439] debian: use Apt Class pkg manager

Refs: #12439

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12439] Add Apt Class for pkg management
Travis Rhoden [Fri, 31 Jul 2015 23:46:00 +0000 (16:46 -0700)]
[RM-12439] Add Apt Class for pkg management

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12439] rhel: use Yum Class package manager
Travis Rhoden [Fri, 31 Jul 2015 22:55:38 +0000 (15:55 -0700)]
[RM-12439] rhel: use Yum Class package manager

Refs: #12439

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12439] centos: use Yum Class package manager
Travis Rhoden [Thu, 30 Jul 2015 16:54:52 +0000 (09:54 -0700)]
[RM-12439] centos: use Yum Class package manager

Refs: #12439

10 years agoMerge pull request #333 from trhoden/RM-12543
Alfredo Deza [Mon, 3 Aug 2015 20:45:11 +0000 (16:45 -0400)]
Merge pull request #333 from trhoden/RM-12543

Only install requested packages for Debian, CentOS, Fedora

10 years ago[RM-12543] suse: use common map_components() 333/head
Travis Rhoden [Mon, 3 Aug 2015 20:25:47 +0000 (13:25 -0700)]
[RM-12543] suse: use common map_components()

Update the SUSE tests to use the right pieces as well.

Removed the "invalid" test because the common map_components()
does not have a whitelist of packages (though it could).  It
doesn't police what package names go through it, it just modifies
specific ones that you ask it to.

Refs: #12543

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12543] fedora: only install requested packages
Travis Rhoden [Fri, 31 Jul 2015 19:23:55 +0000 (12:23 -0700)]
[RM-12543] fedora: only install requested packages

Refs: #12543

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12543] centos: only install requested packages
Travis Rhoden [Fri, 31 Jul 2015 19:12:30 +0000 (12:12 -0700)]
[RM-12543] centos: only install requested packages

Refs: #12543

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12543] debian: only install requested packages
Travis Rhoden [Fri, 31 Jul 2015 18:56:39 +0000 (11:56 -0700)]
[RM-12543] debian: only install requested packages

Refs: #12543

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12543] Add map_components() for sorting out split pkgs
Travis Rhoden [Mon, 3 Aug 2015 20:03:52 +0000 (13:03 -0700)]
[RM-12543] Add map_components() for sorting out split pkgs

Refs: #12543

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years agorgw: fix systemd creation 332/head
Sage Weil [Fri, 31 Jul 2015 19:44:41 +0000 (15:44 -0400)]
rgw: fix systemd creation

Analogous changes to mds create.

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agomds: fix create on systemd
Sage Weil [Fri, 31 Jul 2015 19:33:57 +0000 (15:33 -0400)]
mds: fix create on systemd

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agofedora: use systemd
Sage Weil [Fri, 31 Jul 2015 19:33:42 +0000 (15:33 -0400)]
fedora: use systemd

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agorgw: enable appropriate ceph-radosgw@ if systemd
Sage Weil [Fri, 31 Jul 2015 19:30:44 +0000 (15:30 -0400)]
rgw: enable appropriate ceph-radosgw@ if systemd

Note that this still doesn't work quite right... perhaps the pass in init
is not systemd?

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #331 from trhoden/RM-12541
Alfredo Deza [Fri, 31 Jul 2015 19:25:41 +0000 (15:25 -0400)]
Merge pull request #331 from trhoden/RM-12541

Drop explicit gdisk in debian/install

10 years ago[RM-12541] Drop explicit gdisk in debian/install 331/head
Travis Rhoden [Fri, 31 Jul 2015 18:37:38 +0000 (11:37 -0700)]
[RM-12541] Drop explicit gdisk in debian/install

gdisk has been a proper dependency in Ceph packages since before
Firefly.  There is no need to install it directly.

Fixes: #12541
Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years agoMerge pull request #330 from trhoden/RM-12083-argparse-cleanup
Travis Rhoden [Fri, 31 Jul 2015 18:14:17 +0000 (11:14 -0700)]
Merge pull request #330 from trhoden/RM-12083-argparse-cleanup

More help/argparse cleanup

Reviewed-By: Dan Mick <dmick@redhat.com>
10 years agomon: fix create on fedora to use systemd
Sage Weil [Tue, 28 Jul 2015 19:09:44 +0000 (15:09 -0400)]
mon: fix create on fedora to use systemd

Signed-off-by: Sage Weil <sage@redhat.com>
10 years ago[RM-12083] Remove unused code re: argparse "prog" 330/head
Travis Rhoden [Fri, 19 Jun 2015 21:25:24 +0000 (14:25 -0700)]
[RM-12083] Remove unused code re: argparse "prog"

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12083] "Ceph" Should be capitalized in help output
Travis Rhoden [Fri, 19 Jun 2015 21:06:43 +0000 (14:06 -0700)]
[RM-12083] "Ceph" Should be capitalized in help output

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago1.5.26 v1.5.26
Jenkins [Mon, 20 Jul 2015 18:09:38 +0000 (11:09 -0700)]
1.5.26

10 years ago[RM-12414] Bump version
Travis Rhoden [Mon, 20 Jul 2015 17:45:02 +0000 (10:45 -0700)]
[RM-12414] Bump version

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12414] Update changelog
Travis Rhoden [Mon, 20 Jul 2015 17:43:36 +0000 (10:43 -0700)]
[RM-12414] Update changelog

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years agoMerge pull request #329 from trhoden/RM-12259-dnf
Travis Rhoden [Sat, 18 Jul 2015 00:49:59 +0000 (17:49 -0700)]
Merge pull request #329 from trhoden/RM-12259-dnf

Class-based package managers to add DNF support for Fedora 22

Reviewed-by: Alfredo Deza <adeza@redhat.com>
Reviewed-by: Dan Mick <dmick@redhat.com>
10 years agoMerge pull request #328 from trhoden/RM-12374
Alfredo Deza [Thu, 16 Jul 2015 21:56:23 +0000 (17:56 -0400)]
Merge pull request #328 from trhoden/RM-12374

[RM-12374] Pass mon host list from ceph.conf to mon_create

10 years ago[RM-12374] Pass mon host list from ceph.conf to mon_create 328/head
Travis Rhoden [Thu, 16 Jul 2015 21:48:33 +0000 (14:48 -0700)]
[RM-12374] Pass mon host list from ceph.conf to mon_create

When using mon_create_initial(), we already have list of initial mon
members from the config file.  Pass it to mon_create() in args.mon
so that mon_create() does not throw an exception when it finds that
args.mon does not exist.

This is actually an optimization as well. mon_create_initial() always
looked up mon_initial_members from the config file, but didn't pass that
to mon_create().  mon_create() would then see that args.mon was empty
and then look up mon_initial_members *again*.  Now we only need to open
and read the file once.

Fixes: #12374
Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years agoMerge pull request #327 from trhoden/BZ-1228842
Alfredo Deza [Thu, 16 Jul 2015 21:45:13 +0000 (17:45 -0400)]
Merge pull request #327 from trhoden/BZ-1228842

[BZ-1228842] Echo RGW default port during rgw create

10 years ago[BZ-1228842] Echo RGW default port during rgw create 327/head
Travis Rhoden [Thu, 16 Jul 2015 20:33:13 +0000 (13:33 -0700)]
[BZ-1228842] Echo RGW default port during rgw create

Let the user know the default port has been used for RGW, as the
default port is probably not one people will guess.

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12259] Use packager object for Fedora uninstall 329/head
Travis Rhoden [Wed, 15 Jul 2015 21:50:00 +0000 (21:50 +0000)]
[RM-12259] Use packager object for Fedora uninstall

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12259] Pass full distro module to uninstall()
Travis Rhoden [Wed, 15 Jul 2015 21:28:12 +0000 (21:28 +0000)]
[RM-12259] Pass full distro module to uninstall()

Not having the distro modules be objects shows it's limitations
here, as there is no easy way for a module to reference itself.
Technically you could reference itself by name (e.g. have the
fedora module use ceph_deploy.hosts.fedora.packager), but that
is pretty ugly and continues to rely on global vars.

For now, just pass the full distro module instead of distro.conn
so that we can easily access distro.* attributes.

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12259] Set packager to module top-level (Fedora only)
Travis Rhoden [Wed, 15 Jul 2015 21:12:21 +0000 (21:12 +0000)]
[RM-12259] Set packager to module top-level (Fedora only)

Put the logic of selecting the appropriate packager into the hosts.get(),
that way the packager is available to all module methods (like install()
and uninstall()) without having to figure it out each time.

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12259] Fedora: install priority plugin using packager class
Travis Rhoden [Wed, 15 Jul 2015 06:24:26 +0000 (06:24 +0000)]
[RM-12259] Fedora: install priority plugin using packager class

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12259] Use DNF by default for Fedora >=22
Travis Rhoden [Wed, 15 Jul 2015 05:52:35 +0000 (05:52 +0000)]
[RM-12259] Use DNF by default for Fedora >=22

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12259] Add classes for Yum and DNF package managers
Travis Rhoden [Thu, 16 Jul 2015 01:14:38 +0000 (01:14 +0000)]
[RM-12259] Add classes for Yum and DNF package managers

Introduce Yum and DNF classes that extend a base RPMManager class
that contains all the commonalities between Yum and DNF.

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years agoMerge pull request #314 from mbroz/master
Travis Rhoden [Tue, 14 Jul 2015 22:29:27 +0000 (15:29 -0700)]
Merge pull request #314 from mbroz/master

Set owner of directory and keyrings according to owner of /var/lib/ceph.

Reviewed-by: Travis Rhoden <trhoden@redhat.com>
Reviewed-by: Boris Ranto <branto@redhat.com>
Reviewed-by: Alfredo Deza <adeza@redhat.com>
Reviewed-by: Owen Synge <osynge@suse.com>
10 years agoSet owner of directory and keyrings according to owner of /var/lib/ceph. 314/head
Milan Broz [Thu, 2 Jul 2015 13:03:31 +0000 (15:03 +0200)]
Set owner of directory and keyrings according to owner of /var/lib/ceph.

If Ceph is running under a separate ceph user, it requires access
to various files under this user.
This patch tries to set owner of these files to the current owner
of base_dir (/var/lib/ceph).

If the ceph directory is owned by root, it expects old installation
and should work with old tools as well (avoids --setuser option).

Signed-off-by: Milan Broz <mbroz@redhat.com>
10 years agoMerge pull request #325 from trhoden/RM-12330
Alfredo Deza [Tue, 14 Jul 2015 18:17:44 +0000 (14:17 -0400)]
Merge pull request #325 from trhoden/RM-12330

[RM-12330] Pin mock version to work on Python 2.6

10 years ago[RM-12330] Pin mock version to work on Python 2.6 325/head
Travis Rhoden [Tue, 14 Jul 2015 18:14:01 +0000 (11:14 -0700)]
[RM-12330] Pin mock version to work on Python 2.6

Fixes: #12330
Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years agoMerge pull request #324 from ddiss/suse_install_bundled_v3
Travis Rhoden [Fri, 10 Jul 2015 18:44:30 +0000 (11:44 -0700)]
Merge pull request #324 from ddiss/suse_install_bundled_v3

Install SUSE-built packages by default for SUSE distros

Reviewed-by: Travis Rhoden <trhoden@redhat.com>
10 years agoMerge pull request #323 from trhoden/RM-12147
Alfredo Deza [Fri, 10 Jul 2015 16:25:03 +0000 (12:25 -0400)]
Merge pull request #323 from trhoden/RM-12147

Fix mutex groups in ceph-deploy install

10 years agoMerge pull request #322 from trhoden/RM-12168
Alfredo Deza [Fri, 10 Jul 2015 16:24:22 +0000 (12:24 -0400)]
Merge pull request #322 from trhoden/RM-12168

[RM-12168] Don't use store_true and default=None

10 years agoMerge pull request #321 from trhoden/RM-12171
Alfredo Deza [Fri, 10 Jul 2015 16:23:29 +0000 (12:23 -0400)]
Merge pull request #321 from trhoden/RM-12171

[RM-12171] Make pkg --install and --remove mutually exclusive

10 years agoAdd tests for component to SUSE package mapping 324/head
David Disseldorp [Mon, 29 Jun 2015 16:46:19 +0000 (18:46 +0200)]
Add tests for component to SUSE package mapping

Signed-off-by: David Disseldorp <ddiss@suse.de>
10 years agosuse/uninstall: use the zypper remove helper
David Disseldorp [Fri, 12 Jun 2015 12:50:21 +0000 (14:50 +0200)]
suse/uninstall: use the zypper remove helper

Signed-off-by: David Disseldorp <ddiss@suse.de>
10 years agosuse/uninstall: remove the ceph-common package
David Disseldorp [Fri, 12 Jun 2015 12:19:55 +0000 (14:19 +0200)]
suse/uninstall: remove the ceph-common package

ceph-common can be installed individually via ceph-deploy install
--common parameter, so it should also be present in the uninstall
package list.

Signed-off-by: David Disseldorp <ddiss@suse.de>
10 years agosuse/install: only install requested components
David Disseldorp [Fri, 12 Jun 2015 12:09:21 +0000 (14:09 +0200)]
suse/install: only install requested components

Until now, the SUSE back-end has ignored requests for installation of
specific components and always installed the base ceph and ceph-radosgw
packages.
This change maps component specific installation requests to SUSE
package names using the previously added map_components() helper.

Signed-off-by: David Disseldorp <ddiss@suse.de>
10 years agosuse/install: map from component to pkg names
David Disseldorp [Fri, 12 Jun 2015 11:52:43 +0000 (13:52 +0200)]
suse/install: map from component to pkg names

ceph-deploy uses ceph-osd, ceph-mds and ceph-mon component names. On
SUSE platforms, these are all provided by the base ceph-package.
ceph-radosgw and ceph-common are separate, so can be installed
independently.

Signed-off-by: David Disseldorp <ddiss@suse.de>
10 years agosuse/install: use zypper helpers for mirror_install
David Disseldorp [Fri, 12 Jun 2015 09:03:16 +0000 (11:03 +0200)]
suse/install: use zypper helpers for mirror_install

Signed-off-by: David Disseldorp <ddiss@suse.de>
10 years agosuse/install: use distribution packages by default
David Disseldorp [Thu, 11 Jun 2015 18:11:12 +0000 (20:11 +0200)]
suse/install: use distribution packages by default

SUSE and openSUSE are moving to ship Ceph with distribution media.
ceph-deploy should therefore default to using these packages, unless
directed otherwise via --repo-url.

This change is similar to a previous patch by Owen Synge.

Signed-off-by: David Disseldorp <ddiss@suse.de>
10 years agopkg_managers: add zypper refresh helper
David Disseldorp [Thu, 11 Jun 2015 17:57:35 +0000 (19:57 +0200)]
pkg_managers: add zypper refresh helper

Add "zypper refresh" alongside the existing installation and removal
helper functions.

Signed-off-by: David Disseldorp <ddiss@suse.de>
10 years ago[RM-12147] Put repo mod flags in a mutex 323/head
Travis Rhoden [Fri, 10 Jul 2015 00:09:29 +0000 (17:09 -0700)]
[RM-12147] Put repo mod flags in a mutex

--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>
10 years ago[RM-12147] Set arg defaults in correct places
Travis Rhoden [Thu, 9 Jul 2015 23:59:42 +0000 (16:59 -0700)]
[RM-12147] Set arg defaults in correct places

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12147] Take non version related switches out of version mutex
Travis Rhoden [Thu, 9 Jul 2015 23:57:43 +0000 (16:57 -0700)]
[RM-12147] Take non version related switches out of version mutex

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12168] Don't use store_true and default=None 322/head
Travis Rhoden [Thu, 9 Jul 2015 23:48:20 +0000 (16:48 -0700)]
[RM-12168] Don't use store_true and default=None

Not sure why this was ever seen as necessary.  With the store_true
action, it will be False if not present, True if passed on the CLI.

We just need to the boolean value, and there is no need to set
the flag to None instead of False when it is not present.

Fixes: #12168
Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12171] Make pkg --install and --remove mutually exclusive 321/head
Travis Rhoden [Thu, 9 Jul 2015 23:33:32 +0000 (16:33 -0700)]
[RM-12171] Make pkg --install and --remove mutually exclusive

The code could not handle both being present, so make sure that we
don't allow that on the CLI.

Add unit tests for pkg.

Remove nargs=?. Using '?' doesn't make any sense unless a default
or const flag is also provided, which they aren't.  We want to make
sure there is one string provided, which is the default behavior.

Fixes: #12171
Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years agoMerge pull request #316 from trhoden/RM-12150
Alfredo Deza [Mon, 6 Jul 2015 18:11:10 +0000 (14:11 -0400)]
Merge pull request #316 from trhoden/RM-12150

Enforce proper number of hosts on CLI

10 years ago[RM-12150] Require at least one host for 'rgw create' 316/head
Travis Rhoden [Wed, 1 Jul 2015 21:04:30 +0000 (14:04 -0700)]
[RM-12150] Require at least one host for 'rgw create'

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12150] Require at least one host for 'mon destroy'
Travis Rhoden [Wed, 1 Jul 2015 21:01:40 +0000 (14:01 -0700)]
[RM-12150] Require at least one host for 'mon destroy'

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12150] Don't create new list from mon_host when we already have one
Travis Rhoden [Wed, 1 Jul 2015 20:12:00 +0000 (13:12 -0700)]
[RM-12150] Don't create new list from mon_host when we already have one

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12150] Enforce 1 host only for 'mon add' via argparse
Travis Rhoden [Wed, 1 Jul 2015 20:11:02 +0000 (13:11 -0700)]
[RM-12150] Enforce 1 host only for 'mon add' via argparse

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12150] Require at least one host for 'mds create'
Travis Rhoden [Wed, 1 Jul 2015 18:55:17 +0000 (11:55 -0700)]
[RM-12150] Require at least one host for 'mds create'

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12150] Require at least one host for 'config'
Travis Rhoden [Wed, 1 Jul 2015 18:49:11 +0000 (11:49 -0700)]
[RM-12150] Require at least one host for 'config'

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12150] update help entry for 'ceph-deploy config'
Travis Rhoden [Wed, 1 Jul 2015 18:47:54 +0000 (11:47 -0700)]
[RM-12150] update help entry for 'ceph-deploy config'

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years agoMerge pull request #313 from trhoden/BZ-12151-subcommands
Alfredo Deza [Sun, 5 Jul 2015 14:09:41 +0000 (10:09 -0400)]
Merge pull request #313 from trhoden/BZ-12151-subcommands

Use argparse subparsers when subcommands have their own subcommands

10 years ago[RM-12151] Add description to ToggleRawTextHelpFormatter 313/head
Travis Rhoden [Wed, 1 Jul 2015 20:45:44 +0000 (13:45 -0700)]
[RM-12151] Add description to ToggleRawTextHelpFormatter

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12151] args.fs_type is always set
Travis Rhoden [Wed, 1 Jul 2015 20:35:22 +0000 (13:35 -0700)]
[RM-12151] args.fs_type is always set

It has a default value, no need to check 'if args.fs_type:'.

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12151] Remove redundant check for allowed fstypes
Travis Rhoden [Wed, 1 Jul 2015 20:33:09 +0000 (13:33 -0700)]
[RM-12151] Remove redundant check for allowed fstypes

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12151] Enable tests for disk subcommands
Travis Rhoden [Tue, 30 Jun 2015 20:44:56 +0000 (13:44 -0700)]
[RM-12151] Enable tests for disk subcommands

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12151] Move disk subcmds to subparser
Travis Rhoden [Tue, 30 Jun 2015 20:44:29 +0000 (13:44 -0700)]
[RM-12151] Move disk subcmds to subparser

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12151] Enable 'osd' tests related to subcommand options and help
Travis Rhoden [Tue, 30 Jun 2015 19:21:51 +0000 (12:21 -0700)]
[RM-12151] Enable 'osd' tests related to subcommand options and help

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12151] Move 'osd' subcommands to a subparser
Travis Rhoden [Tue, 30 Jun 2015 19:21:21 +0000 (12:21 -0700)]
[RM-12151] Move 'osd' subcommands to a subparser

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12151] Move 'rgw create' to a subparser
Travis Rhoden [Tue, 30 Jun 2015 18:36:22 +0000 (11:36 -0700)]
[RM-12151] Move 'rgw create' to a subparser

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12151] Redo mon sub command help text
Travis Rhoden [Mon, 29 Jun 2015 21:41:27 +0000 (14:41 -0700)]
[RM-12151] Redo mon sub command help text

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-12151] Add new 'ToggleRawTextHelpFormatter'
Travis Rhoden [Mon, 29 Jun 2015 21:32:55 +0000 (14:32 -0700)]
[RM-12151] Add new 'ToggleRawTextHelpFormatter'

The existing use of argparse.RawDescriptionHelpFormatter seems to stem
from wanting to use newlines in argparse help output.  To use the raw
text formatter, you have to provide a static string that is always
output with --help.

The problem is that the defintion of this help string is pretty
disconnected from the rest of the code. You are documenting options many
lines away from where they are defined instead of normally being at the
same time.

To solve this, introduce a new ToggleRawTextHelpFormatter that allows
for the optional use of Raw text on any individual help item by
prefixing it with 'R|'.

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years agoMerge pull request #311 from trhoden/RM-11742-test-cleanup
Alfredo Deza [Fri, 26 Jun 2015 21:02:26 +0000 (17:02 -0400)]
Merge pull request #311 from trhoden/RM-11742-test-cleanup

Add tests for argparse

10 years ago[RM-11742] Remove more duplicate tests 311/head
Travis Rhoden [Fri, 26 Jun 2015 00:06:22 +0000 (17:06 -0700)]
[RM-11742] Remove more duplicate tests

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-11742] Add argparse tests for ceph-deploy calamari
Travis Rhoden [Thu, 25 Jun 2015 23:55:31 +0000 (16:55 -0700)]
[RM-11742] Add argparse tests for ceph-deploy calamari

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-11742] Add argparse tests for ceph-deploy config
Travis Rhoden [Thu, 25 Jun 2015 23:30:11 +0000 (16:30 -0700)]
[RM-11742] Add argparse tests for ceph-deploy config

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-11742] Add argparse tests for ceph-deploy admin
Travis Rhoden [Thu, 25 Jun 2015 23:14:31 +0000 (16:14 -0700)]
[RM-11742] Add argparse tests for ceph-deploy admin

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
10 years ago[RM-11742] Add argparse tests for ceph-deploy osd
Travis Rhoden [Thu, 25 Jun 2015 22:57:12 +0000 (15:57 -0700)]
[RM-11742] Add argparse tests for ceph-deploy osd

Signed-off-by: Travis Rhoden <trhoden@redhat.com>