volume transfer request commands refactor

Registered by aohuanxuan on 2016-11-17

Looks like "volume transfer" is a status condition of a volume,
not a top-level resource, it describes something about a volume,
so we plan to refactor "volume transfer request" commands as
options of volume commands.

This is my plan for refactoring:

1.The command now:
    volume transfer request create <volume> [--name]
Change to:
    volume set <volume> [--prepare-transfer]
        (1) find the <volume>
        (2) create the transfer for the volume.
        * problem: Do we need to specify the transfer name
          (if not, name is always None). Actually we will see
          transfer name is not used in all transfer commands
          after refactoring.

2.The command now:
    volume transfer request delete <transfer-request> [<transfer-request> ...]
Change to:
    volume unset <volume> [--transfer]
        (1) find the <volume>
            (volume must be in waiting-transfer status)
        (2) find the transfer by the volume ID
        (3) delete the transfer

3.The command now:
    volume transfer request list [--all-project]
Change to:
    volume list [--transfer] [--all-project]
        (1) if "--transfer" option specified, call transfers.list() API
            and list transfers.

4.The command now:
    volume transfer request show <transfer-request>
Change to:
    volume show <volume> [--transfer]
        (1) find the <volume>
            (volume must be in waiting-transfer status)
        (2) find the transfer by the volume ID
        (3) show the transfer

5.The command now:
    volume transfer request accept <transfer-request> <auth-key>
Change to:
    volume set <volume> [--accept-transfer <auth-key>]
        (1) find the <volume>
            (volume must be in waiting-transfer status)
        (2) find the transfer by the volume ID
        (3) accept the transfer
        * problem: "--accept-transfer <auth-key>" looks a bit weird.
          what about "--accept-transfer-with-key <auth-key>" or others,
          I do not sure about it.

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
aohuanxuan
Direction:
Needs approval
Assignee:
aohuanxuan
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.