From: John Spray Date: Thu, 1 Nov 2018 11:58:55 +0000 (-0400) Subject: pybind: update python callers of force flags X-Git-Tag: v14.1.0~969^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a3e1a3e048cf8bb77ae55e892cd5d861d5ce8ede;p=ceph.git pybind: update python callers of force flags Signed-off-by: John Spray --- diff --git a/src/pybind/ceph_volume_client.py b/src/pybind/ceph_volume_client.py index 53675b066c90..5f79fdf2c280 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 9dd63b261ca5..b432e1fd039b 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 bf27e1b36f27..7f0254c6d814 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 abf3e98133a6..b7a771810d57 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)