From 9fc1a05c84e10bfaa1f613585f291e48f0994ba9 Mon Sep 17 00:00:00 2001 From: Goutham Pacha Ravi Date: Mon, 11 Sep 2023 17:09:31 -0700 Subject: [PATCH] Fix decoder path and add transfer commands the file path to the decoder is better resolved with the module path. share transfer commands exist in the manila shell, it'll be helpful to show the OSC translations to these as well. Implements: bp/openstack-client-support Change-Id: I85d7ebd5c5c34c95402c0ea95f358bef91d26657 (cherry picked from commit 946c11373f5536c3912dc2753f41cd72292a6626) --- manilaclient/osc/v2/data/manila.csv | 5 +++++ manilaclient/shell.py | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/manilaclient/osc/v2/data/manila.csv b/manilaclient/osc/v2/data/manila.csv index 9b7781eaf..dbfeba344 100644 --- a/manilaclient/osc/v2/data/manila.csv +++ b/manilaclient/osc/v2/data/manila.csv @@ -115,6 +115,11 @@ share-server-reset-state,share server set --status,Explicitly update the state o share-server-reset-task-state,share server set --task-state,Explicitly update the task state of a share share-server-show,share server show,Show share server info share-server-unmanage,share server abandon,Unmanage share server +share-transfer-accept,share transfer accept,Accepts a share transfer. +share-transfer-create,share transfer create,Creates a share transfer. +share-transfer-delete,share transfer delete,Remove one or more transfers +share-transfer-list,share transfer list,Lists all transfers +share-transfer-show,share transfer show,Delete a transfer show,share show,Show details about a NAS share shrink,share resize,Decreases the size of an existing share snapshot-access-allow,share snapshot access create,Allow read only access to a snapshot diff --git a/manilaclient/shell.py b/manilaclient/shell.py index 0fa0aeba8..d379f736e 100644 --- a/manilaclient/shell.py +++ b/manilaclient/shell.py @@ -610,8 +610,9 @@ class OpenStackManilaShell(object): osprofiler_profiler.init(options.profile) try: - decoder_path = os.path.abspath( - 'manilaclient/osc/v2/data/manila.csv' + decoder_path = ( + '%s/%s' % (os.path.dirname(os.path.abspath(__file__)), + 'osc/v2/data/manila.csv') ) with open(decoder_path) as f: decoder_data = {