def __envRegister(self, lr): vars = lr.stdout.split("\n") env = Try.attempt(parseDotEnv, vars) if env.isFail(): return env env = env.getOK() if 'SUBENV_FQDN' in env: return SubHosts.register(env['SUBENV_FQDN'], self.getPublicIP()) elif 'SUBENV_NAME' in env: return SubHosts.register(env['SUBENV_NAME'] + self.core.config.get('tld'), self.getPublicIP())
def removeFromHostsFile(self): self.logAdapter.info("Removing engine from local hosts file") return SubHosts.unregister(self.getDNSName())
def addToHostsFile(self): self.logAdapter.info("Registering engine as '%s' in local hosts file" % self.getDNSName()) return SubHosts.register(self.getDNSName(), self.getPublicIP())