Comment 4 for bug 1444343

Revision history for this message
Vitalii Kulanov (vitaliy-t) wrote :

A few comments to proposed bug/feature fix, that can be discussed.

1. The first thing that the core logic doesn't make 'great' difference between these two commands

     'fuel snapshot'

     'fuel snapshot --dir /some/path'

In the first case a default directory value ('.') is used:
https://github.com/openstack/python-fuelclient/blob/master/fuelclient/cli/arguments.py#L394 I.e. first command is just equivalent to second one with the following params 'fuel snapshot --dir .' So it's hard to recognize them. That's why we can't use 'fuel snapshot' cli just for creating snapshot and not downloading. Of course we can change core logic, but I'm not sure that we should modify it and make any changes to get_dir_arg method (see link above) as it is used by the rest of cli commands. So I've added some additional option: '--download'. Now we can use this flag if we want to download snapshot after its creation.
2. Now we have the following command format:

        """To create diagnostic snapshot:
                fuel snapshot

            To create and download diagnostic snapshot to specific directory:
                fuel snapshot --download --dir path/to/directory

            To create and download diagnostic snapshot to current directory:
                fuel snapshot --download
         """