Exemplo n.º 1
0
 def find_status_by_host(self, hostname=None, domainname=None):
     if (hostname is not None and
         hostname != "" and
         domainname is not None and
             domainname != ""):
         h = Hosts(self._rpcurl)
         host_rec = h.find_by_hostname(hostname, domainname)
         if host_rec is not None:
             installstate = self._proxy.dc2.deployment.installstate.get(
                 {"host_id": host_rec["_id"]})
             if installstate is not None:
                 return installstate
     return None
Exemplo n.º 2
0
 def update_status_by_host(
     self,
     hostname=None,
     domainname=None,
     status=None,
         progress=None):
     if (hostname is not None and
         hostname != "" and
         domainname is not None and
             domainname != ""):
         h = Hosts(self._rpcurl)
         host_rec = h.find_by_hostname(hostname, domainname)
         if host_rec is not None:
             installstate = self._proxy.dc2.deployment.installstate.get(
                 {"host_id": host_rec["_id"]})
             if installstate is not None:
                 result = self._update_status(
                     installstate, status, progress)
                 return result
     return None