Skip to content

Commit

Permalink
cephadm:expose gather-facts orch api
Browse files Browse the repository at this point in the history
Fixes: https://tracker.ceph.com/issues/51209

This PR intends to expose host metadata(gather-facts) orch api

Signed-off-by: Avan Thakkar <athakkar@redhat.com>
Signed-off-by: Aashish Sharma <aasharma@redhat.com>
  • Loading branch information
Aashish Sharma committed Jun 14, 2021
1 parent 32c78cf commit b769f47
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/pybind/mgr/cephadm/inventory.py
Expand Up @@ -33,7 +33,6 @@ class Inventory:
def __init__(self, mgr: 'CephadmOrchestrator'):
self.mgr = mgr
adjusted_addrs = False
self.facts = {} # type: Dict[str, Dict[str, Any]]

def is_valid_ip(ip: str) -> bool:
try:
Expand Down Expand Up @@ -92,13 +91,8 @@ def assert_host(self, host: str) -> None:
if host not in self._inventory:
raise OrchestratorError('host %s does not exist' % host)

def get_facts(self, host: str) -> Dict[str, Any]:
return self.facts.get(host, {})

def add_host(self, spec: HostSpec) -> None:
self._inventory[spec.hostname] = spec.to_json()
host_facts = self.get_facts(spec.hostname)
self._inventory['host_facts'] = host_facts
self.save()

def rm_host(self, host: str) -> None:
Expand Down

0 comments on commit b769f47

Please sign in to comment.