summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Fritch <mfritch@suse.com>2020-07-14 15:18:48 +0200
committerMichael Fritch <mfritch@suse.com>2020-07-16 23:02:47 +0200
commit414e5507034f6380edac78de86419cd98dc59295 (patch)
tree3b83941f46d305b155cc54743fdabd4bf0be588b
parentmgr/cephadm: clean-up service module type checking (diff)
downloadceph-414e5507034f6380edac78de86419cd98dc59295.tar.xz
ceph-414e5507034f6380edac78de86419cd98dc59295.zip
mgr/cephadm: clean-up service module type checking
- add return type to `config` func - add missing `NFSServiceSpec` annotation to `config` func Signed-off-by: Michael Fritch <mfritch@suse.com>
Diffstat (limited to '')
-rw-r--r--src/pybind/mgr/cephadm/module.py2
-rw-r--r--src/pybind/mgr/cephadm/services/cephadmservice.py4
-rw-r--r--src/pybind/mgr/cephadm/services/iscsi.py2
-rw-r--r--src/pybind/mgr/cephadm/services/nfs.py2
4 files changed, 5 insertions, 5 deletions
diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py
index 1b3d18b8292..5605f5e2319 100644
--- a/src/pybind/mgr/cephadm/module.py
+++ b/src/pybind/mgr/cephadm/module.py
@@ -1799,7 +1799,7 @@ you may want to run:
'rgw': self.rgw_service.config,
'nfs': self.nfs_service.config,
'iscsi': self.iscsi_service.config,
- }.get(service_type)
+ }.get(service_type) # type: ignore
def _apply_service(self, spec: ServiceSpec) -> bool:
"""
diff --git a/src/pybind/mgr/cephadm/services/cephadmservice.py b/src/pybind/mgr/cephadm/services/cephadmservice.py
index e53de818925..64e67740b8f 100644
--- a/src/pybind/mgr/cephadm/services/cephadmservice.py
+++ b/src/pybind/mgr/cephadm/services/cephadmservice.py
@@ -319,7 +319,7 @@ class MgrService(CephadmService):
class MdsService(CephadmService):
TYPE = 'mds'
- def config(self, spec: ServiceSpec):
+ def config(self, spec: ServiceSpec) -> None:
# ensure mds_join_fs is set for these daemons
assert spec.service_id
ret, out, err = self.mgr.check_mon_command({
@@ -348,7 +348,7 @@ class MdsService(CephadmService):
class RgwService(CephadmService):
TYPE = 'rgw'
- def config(self, spec: RGWSpec):
+ def config(self, spec: RGWSpec) -> None:
# ensure rgw_realm and rgw_zone is set for these daemons
ret, out, err = self.mgr.check_mon_command({
'prefix': 'config set',
diff --git a/src/pybind/mgr/cephadm/services/iscsi.py b/src/pybind/mgr/cephadm/services/iscsi.py
index 127783c13e4..1c46dd674de 100644
--- a/src/pybind/mgr/cephadm/services/iscsi.py
+++ b/src/pybind/mgr/cephadm/services/iscsi.py
@@ -15,7 +15,7 @@ logger = logging.getLogger(__name__)
class IscsiService(CephadmService):
TYPE = 'iscsi'
- def config(self, spec: IscsiServiceSpec):
+ def config(self, spec: IscsiServiceSpec) -> None:
self.mgr._check_pool_exists(spec.pool, spec.service_name())
logger.info('Saving service %s spec with placement %s' % (
diff --git a/src/pybind/mgr/cephadm/services/nfs.py b/src/pybind/mgr/cephadm/services/nfs.py
index 54d3e244f2a..a7b3060c5fb 100644
--- a/src/pybind/mgr/cephadm/services/nfs.py
+++ b/src/pybind/mgr/cephadm/services/nfs.py
@@ -66,7 +66,7 @@ class NFSService(CephadmService):
return cephadm_config, deps
- def config(self, spec):
+ def config(self, spec: NFSServiceSpec) -> None:
self.mgr._check_pool_exists(spec.pool, spec.service_name())
logger.info('Saving service %s spec with placement %s' % (
spec.service_name(), spec.placement.pretty_str()))