Esempio n. 1
0
    def config(self, spec: NFSServiceSpec) -> None:
        assert self.TYPE == spec.service_type
        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()))
        self.mgr.spec_store.save(spec)
Esempio n. 2
0
    def config(self, spec: NFSServiceSpec, daemon_id: str) -> None:  # type: ignore
        assert self.TYPE == spec.service_type
        assert spec.pool
        self.mgr._check_pool_exists(spec.pool, spec.service_name())

        # TODO: Fail here, in case of no spec
        logger.info('Saving service %s spec with placement %s' % (
            spec.service_name(), spec.placement.pretty_str()))
        self.mgr.spec_store.save(spec)
Esempio n. 3
0
    def __init__(self,
                 mgr: "CephadmOrchestrator",
                 daemon_id: str,
                 spec: NFSServiceSpec) -> None:
        assert spec.service_id and daemon_id.startswith(spec.service_id)
        mgr._check_pool_exists(spec.pool, spec.service_name())

        self.mgr = mgr
        self.daemon_id = daemon_id
        self.spec = spec
Esempio n. 4
0
 def config(self, spec: NFSServiceSpec,
            daemon_id: str) -> None:  # type: ignore
     assert self.TYPE == spec.service_type
     assert spec.pool
     self.mgr._check_pool_exists(spec.pool, spec.service_name())