Improve Manila client for consistency and function

Registered by Bill Owen

Current Manila client is a good start, but it can be improved in several areas. A starting list is:
1. have all commands allow passing share name OR share id, as well as snapshot name OR snapshot id. For example, delete requires a share id (won't accept share name), but allow-access / deny-access accept either share name or share id.
2. command names should be consistent: <type>-<operation>. For example, "allow-access" and "deny-access" should be "access-allow" & "access-deny". (If type is share, only operation is specified).
3. support passing metadata on share create for use by driver implementation
4. add force-delete command to force deletion of db entities when normal delete fails for some reason
5. add service-list command (provided by manila-manage service list now but may be useful to end user in some cases)
6. add reset-state command (may not be needed if taskflow implementation can gracefully handle error conditions)

Blueprint information

Status:
Complete
Approver:
None
Priority:
Medium
Drafter:
None
Direction:
Approved
Assignee:
Valeriy Ponomaryov
Definition:
Approved
Series goal:
Accepted for juno
Implementation:
Implemented
Milestone target:
milestone icon juno-1
Started by
Valeriy Ponomaryov
Completed by
Valeriy Ponomaryov

Related branches

Sprints

Whiteboard

-- Valeriy Ponomaryov (vponomaryov) --
1) Agree
2) Agree
3) Good point.
4) Agree
5) Need discussion. What cases?
6) It means, reset state to error, for possibility to delete entity?

Also, there can be added more options, like:
7) Add multiple creation
8) Add multiple deletion

Gerrit topic: https://review.openstack.org/#q,topic:bp/manila-client-enhancements,n,z

Addressed by: https://review.openstack.org/59082
    Adds share_metadata to share parameters

-- Bill Owen (bill_az) --
5) What should be discussed is os services extension (including the ability to enable/disable services). See cinder blueprint https://blueprints.launchpad.net/cinder/+spec/os-services-extension. It looks like this may be implemented in manila/api/contrib/services, but not in manilaclient code.

6) Yes. See os-admin-actions here: https://review.openstack.org/#/c/12004/2/cinder/api/openstack/volume/contrib/admin_actions.py

Note: In Cinder code, both 4) and 6) are implemented in os-admin-actions.

Addressed by: https://review.openstack.org/63087
    Adds admin actions extension to provide reset-state command

Addressed by: https://review.openstack.org/63146
    Adds an ability to reset snapshot state

Addressed by: https://review.openstack.org/97480
    Added force-delete action to admin actions

Addressed by: https://review.openstack.org/97432
    Added force-delete api support

(?)

Work Items

Work items:
1. have all commands allow passing share name/id, as well as snapshot name/id: DONE
2. make consistent command names like <type>-<operation>: DONE
3. add metadata for share: DONE
4. add force-delete command to force deletion of db entities: DONE
5. add service-list command: DONE
6. add reset-state command: DONE

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.