def test_mgr_update(self):
self._orch_cmd("mgr", "update", "3")
+
+ def test_nfs_update(self):
+ self._orch_cmd("nfs", "update", "service_name", "2")
def _nfs_rm(self, svc_id):
return self._rm_stateless_svc("nfs", svc_id)
+ @CLIWriteCommand('orchestrator nfs update',
+ "name=svc_id,type=CephString "
+ "name=num,type=CephInt",
+ 'Scale an NFS service')
+ @handle_exceptions
+ def _nfs_update(self, svc_id, num):
+ spec = orchestrator.StatelessServiceSpec()
+ spec.name = svc_id
+ spec.count = num
+ completion = self.update_stateless_service("nfs", spec)
+ self._orchestrator_wait([completion])
+ return HandleCommandResult()
+
@CLIWriteCommand('orchestrator service',
"name=action,type=CephChoices,strings=start|stop|reload "
"name=svc_type,type=CephString "
def remove_stateless_service(self, service_type, id_):
pass
+ @deferred_write("update_stateless_service")
+ def update_stateless_service(self, service_type, spec):
+ pass
+
@deferred_read
def get_hosts(self):
return [orchestrator.InventoryNode('localhost', [])]