Esempio n. 1
0
 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())
Esempio n. 2
0
 def removeFromHostsFile(self):
     self.logAdapter.info("Removing engine from local hosts file")
     return SubHosts.unregister(self.getDNSName())
Esempio n. 3
0
 def addToHostsFile(self):
     self.logAdapter.info("Registering engine as '%s' in local hosts file" %
                          self.getDNSName())
     return SubHosts.register(self.getDNSName(), self.getPublicIP())