# type: (Optional[str]) -> List[str]
return list(self.inventory.filter_by_label(label))
- @async_completion
+ @trivial_completion
def add_host(self, spec):
# type: (HostSpec) -> str
"""
self.log.info('Added host %s' % spec.hostname)
return "Added host '{}'".format(spec.hostname)
- @async_completion
+ @trivial_completion
def remove_host(self, host):
# type: (str) -> str
"""
self.log.info('Removed host %s' % host)
return "Removed host '{}'".format(host)
- @async_completion
+ @trivial_completion
def update_host_addr(self, host, addr):
self.inventory.set_addr(host, addr)
self._reset_con(host)
"""
return list(self.inventory.all_specs())
- @async_completion
+ @trivial_completion
def add_host_label(self, host, label):
self.inventory.add_label(host, label)
self.log.info('Added label %s to host %s' % (label, host))
return 'Added label %s to host %s' % (label, host)
- @async_completion
+ @trivial_completion
def remove_host_label(self, host, label):
self.inventory.rm_label(host, label)
self.log.info('Removed label %s to host %s' % (label, host))
self.cache.invalidate_host_daemons(host)
return "{} {} from host '{}'".format(action, name, host)
+ @trivial_completion
def daemon_action(self, action, daemon_type, daemon_id):
args = []
for host, dm in self.cache.daemons.items():
def apply_rgw(self, spec):
return self._apply(spec)
+ @trivial_completion
def add_iscsi(self, spec):
# type: (ServiceSpec) -> orchestrator.Completion
return self._add_daemon('iscsi', spec, self.iscsi_servcie.create, self.iscsi_servcie.config)
def apply_iscsi(self, spec):
return self._apply(spec)
+ @trivial_completion
def add_rbd_mirror(self, spec):
return self._add_daemon('rbd-mirror', spec, self.rbd_mirror_service.create)
def apply_rbd_mirror(self, spec):
return self._apply(spec)
+ @trivial_completion
def add_nfs(self, spec):
return self._add_daemon('nfs', spec, self.nfs_service.create, self.nfs_service.config)