]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/volumes: Use operation type during subvolume open
authorShyamsundar Ranganathan <srangana@redhat.com>
Thu, 2 Jul 2020 01:08:34 +0000 (21:08 -0400)
committerShyamsundar Ranganathan <srangana@redhat.com>
Thu, 30 Jul 2020 01:14:39 +0000 (21:14 -0400)
commitf380bf79435ccae21df12d19e530ef0d89a5cc8d
tree15ea9f761dff2c3f662280d147cbf00744b2aa12
parent9487ddb3a4616674ef69dbc59e8e3f3afcf30b2f
mgr/volumes: Use operation type during subvolume open

Subvolume open currently takes in 2 optional parameters to
denote desired state and type. This enables the open to
allow the operation to suceed based on the (type, state)
tuple.

Instead, pass an operation type to be performed on a subvolume
during open, and decide internal to a subvolume version if the
operation is allowed based on its state and type.

Also modifies the state machine code, to be more amenable to
modifications and improves redability.

Signed-off-by: Shyamsundar Ranganathan <srangana@redhat.com>
src/pybind/mgr/volumes/fs/async_cloner.py
src/pybind/mgr/volumes/fs/operations/op_sm.py
src/pybind/mgr/volumes/fs/operations/subvolume.py
src/pybind/mgr/volumes/fs/operations/template.py
src/pybind/mgr/volumes/fs/operations/versions/__init__.py
src/pybind/mgr/volumes/fs/operations/versions/subvolume_base.py
src/pybind/mgr/volumes/fs/operations/versions/subvolume_v1.py
src/pybind/mgr/volumes/fs/volume.py