From a3e1a3e048cf8bb77ae55e892cd5d861d5ce8ede Mon Sep 17 00:00:00 2001 From: John Spray Date: Thu, 1 Nov 2018 07:58:55 -0400 Subject: [PATCH] pybind: update python callers of force flags Signed-off-by: John Spray --- src/pybind/ceph_volume_client.py | 2 +- src/pybind/mgr/dashboard/controllers/osd.py | 4 ++-- src/pybind/mgr/dashboard/controllers/pool.py | 4 ++-- src/pybind/mgr/restful/api/pool.py | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/pybind/ceph_volume_client.py b/src/pybind/ceph_volume_client.py index 53675b066c9..5f79fdf2c28 100644 --- a/src/pybind/ceph_volume_client.py +++ b/src/pybind/ceph_volume_client.py @@ -755,7 +755,7 @@ class CephFSVolumeClient(object): { "pool": pool_name, "pool2": pool_name, - "sure": "--yes-i-really-really-mean-it" + "yes_i_really_really_mean_it": True }) def _get_ancestor_xattr(self, path, attr): diff --git a/src/pybind/mgr/dashboard/controllers/osd.py b/src/pybind/mgr/dashboard/controllers/osd.py index 9dd63b261ca..b432e1fd039 100644 --- a/src/pybind/mgr/dashboard/controllers/osd.py +++ b/src/pybind/mgr/dashboard/controllers/osd.py @@ -124,7 +124,7 @@ class Osd(RESTController): 'mon', 'osd lost', id=int(svc_id), - sure='--yes-i-really-mean-it') + yes_i_really_mean_it=True) def create(self, uuid=None, svc_id=None): """ @@ -157,7 +157,7 @@ class Osd(RESTController): The osd must be marked down before being destroyed. """ CephService.send_command( - 'mon', 'osd destroy-actual', id=int(svc_id), sure='--yes-i-really-mean-it') + 'mon', 'osd destroy-actual', id=int(svc_id), yes_i_really_mean_it=True) @RESTController.Resource('GET') def safe_to_destroy(self, svc_id): diff --git a/src/pybind/mgr/dashboard/controllers/pool.py b/src/pybind/mgr/dashboard/controllers/pool.py index bf27e1b36f2..7f0254c6d81 100644 --- a/src/pybind/mgr/dashboard/controllers/pool.py +++ b/src/pybind/mgr/dashboard/controllers/pool.py @@ -74,7 +74,7 @@ class Pool(RESTController): @handle_send_command_error('pool') def delete(self, pool_name): return CephService.send_command('mon', 'osd pool delete', pool=pool_name, pool2=pool_name, - sure='--yes-i-really-really-mean-it') + yes_i_really_really_mean_it=True) @pool_task('edit', ['{pool_name}']) def set(self, pool_name, flags=None, application_metadata=None, **kwargs): @@ -101,7 +101,7 @@ class Pool(RESTController): if application_metadata is not None: def set_app(what, app): CephService.send_command('mon', 'osd pool application ' + what, pool=pool, app=app, - force='--yes-i-really-mean-it') + yes_i_really_mean_it=True) if update_existing: original_app_metadata = set( current_pool.get('application_metadata')) diff --git a/src/pybind/mgr/restful/api/pool.py b/src/pybind/mgr/restful/api/pool.py index abf3e98133a..b7a771810d5 100644 --- a/src/pybind/mgr/restful/api/pool.py +++ b/src/pybind/mgr/restful/api/pool.py @@ -72,7 +72,7 @@ class PoolId(RestController): 'prefix': 'osd pool delete', 'pool': pool['pool_name'], 'pool2': pool['pool_name'], - 'sure': '--yes-i-really-really-mean-it' + 'yes_i_really_really_mean_it': True }]], **kwargs) -- 2.39.5