From d5d4ab0c2ce0840021a07237e580ee8f1221870d Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 17 May 2021 16:23:48 -0500 Subject: [PATCH] qa/tasks/cephadm: add whitespace between functions Signed-off-by: Sage Weil (cherry picked from commit b6d1536a67428b4ffa0df3791e9eff667736c765) --- qa/tasks/cephadm.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/qa/tasks/cephadm.py b/qa/tasks/cephadm.py index 76ee7f3c87178..f109db448902e 100644 --- a/qa/tasks/cephadm.py +++ b/qa/tasks/cephadm.py @@ -46,6 +46,7 @@ def _shell(ctx, cluster_name, remote, args, extra_cephadm_args=[], **kwargs): **kwargs ) + def build_initial_config(ctx, config): cluster_name = config['cluster'] @@ -65,6 +66,7 @@ def build_initial_config(ctx, config): return conf + def update_archive_setting(ctx, key, value): """ Add logs directory to job's info log file @@ -80,6 +82,7 @@ def update_archive_setting(ctx, key, value): info_yaml['archive'] = {key: value} yaml.safe_dump(info_yaml, info_file, default_flow_style=False) + @contextlib.contextmanager def normalize_hostnames(ctx): """ @@ -98,6 +101,7 @@ def normalize_hostnames(ctx): finally: pass + @contextlib.contextmanager def download_cephadm(ctx, config, ref): cluster_name = config['cluster'] @@ -168,6 +172,7 @@ def download_cephadm(ctx, config, ref): ], ) + @contextlib.contextmanager def ceph_log(ctx, config): cluster_name = config['cluster'] @@ -276,6 +281,7 @@ def ceph_log(ctx, config): except ReadError: pass + @contextlib.contextmanager def ceph_crash(ctx, config): """ @@ -310,6 +316,7 @@ def ceph_crash(ctx, config): except ReadError: pass + @contextlib.contextmanager def ceph_bootstrap(ctx, config): """ @@ -516,6 +523,7 @@ def ceph_bootstrap(ctx, config): '/etc/ceph/{}.client.admin.keyring'.format(cluster_name), ]) + @contextlib.contextmanager def ceph_mons(ctx, config): """ @@ -631,6 +639,7 @@ def ceph_mons(ctx, config): finally: pass + @contextlib.contextmanager def ceph_mgrs(ctx, config): """ @@ -672,6 +681,7 @@ def ceph_mgrs(ctx, config): finally: pass + @contextlib.contextmanager def ceph_osds(ctx, config): """ @@ -727,6 +737,7 @@ def ceph_osds(ctx, config): finally: pass + @contextlib.contextmanager def ceph_mdss(ctx, config): """ @@ -763,6 +774,7 @@ def ceph_mdss(ctx, config): yield + @contextlib.contextmanager def ceph_monitoring(daemon_type, ctx, config): """ @@ -798,6 +810,7 @@ def ceph_monitoring(daemon_type, ctx, config): yield + @contextlib.contextmanager def ceph_rgw(ctx, config): """ @@ -888,6 +901,7 @@ def ceph_iscsi(ctx, config): yield + @contextlib.contextmanager def ceph_clients(ctx, config): cluster_name = config['cluster'] @@ -918,6 +932,7 @@ def ceph_clients(ctx, config): remote.sudo_write_file(client_keyring, keyring, mode='0644') yield + @contextlib.contextmanager def ceph_initial(): try: @@ -925,6 +940,7 @@ def ceph_initial(): finally: log.info('Teardown complete') + ## public methods @contextlib.contextmanager def stop(ctx, config): @@ -963,6 +979,7 @@ def stop(ctx, config): yield + def shell(ctx, config): """ Execute (shell) commands @@ -1106,6 +1123,7 @@ def tweaked_option(ctx, config): for option, value in saved_options.items(): manager.inject_args(type_, id_, option, value) + @contextlib.contextmanager def restart(ctx, config): """ @@ -1159,6 +1177,7 @@ def restart(ctx, config): ctx.managers[cluster].wait_for_all_osds_up() yield + @contextlib.contextmanager def distribute_config_and_admin_keyring(ctx, config): """ @@ -1184,6 +1203,7 @@ def distribute_config_and_admin_keyring(ctx, config): '/etc/ceph/{}.client.admin.keyring'.format(cluster_name), ]) + @contextlib.contextmanager def crush_setup(ctx, config): cluster_name = config['cluster'] @@ -1194,6 +1214,7 @@ def crush_setup(ctx, config): args=['ceph', 'osd', 'crush', 'tunables', profile]) yield + @contextlib.contextmanager def create_rbd_pool(ctx, config): if config.get('create_rbd_pool', False): @@ -1216,10 +1237,12 @@ def create_rbd_pool(ctx, config): ]) yield + @contextlib.contextmanager def _bypass(): yield + @contextlib.contextmanager def initialize_config(ctx, config): cluster_name = config['cluster'] @@ -1303,6 +1326,7 @@ def initialize_config(ctx, config): ctx.ceph[cluster_name].first_mgr = first_mgr yield + @contextlib.contextmanager def task(ctx, config): """ -- 2.39.5