these flags and return the default if none are passed in (which is, install
everything)
"""
+ # the flag that prevents all logic here is the `--repo` flag which is used
+ # when no packages should be installed, just the repo files, so check for
+ # that here and return an empty list (which is equivalent to say 'no
+ # packages should be installed')
+ if args.repo:
+ return []
+
flags = {
'install_osd': 'ceph-osd',
'install_rgw': 'ceph-radosgw',
for k, v in flags.items():
if getattr(args, k, False):
components.append(v)
- return components
+ # if we have some components selected from flags then return that,
+ # otherwise return defaults because no flags and no `--repo` means we
+ # should get all of them by default
+ return components or defaults
def install(args):