]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
cephfs-shell: put cmd must accept both paths and validate local_path
authordparmar18 <dparmar@redhat.com>
Fri, 8 Apr 2022 14:25:24 +0000 (19:55 +0530)
committerdparmar18 <dparmar@redhat.com>
Wed, 11 May 2022 11:40:36 +0000 (17:10 +0530)
commitcfeab92ec8d5a258d7eb48318e3e083d90383bfb
tree144a36e074272eb5c4e8e3c5edf19efd1f4d8860
parent6f459d8bf2396ca28597e87f5fc74593b7a49a84
cephfs-shell: put cmd must accept both paths and validate local_path

Description:

- `put` command didn't display any error when file at local_path was not
   found. This PR intends to add that check.
   - Rationale: Till now, there used to be a default path of `remote_path` as
                `default='.'` but wasn't mentioned anywhere. It could lead to confusion.
                On top of it, considering put command to be a ssh inspired utlity,
                or any other CLI tool that copies file between filesystems, source
                and destination path are always mandatory. Therefore in order to
                simulate this behavior in cephfs-shell`s command(s), my opinion is
                to make put command accept both the paths.

Fixes: https://tracker.ceph.com/issues/55242
Signed-off-by: dparmar18 <dparmar@redhat.com>
src/tools/cephfs/cephfs-shell