Beispiel #1
0
 def _template_options(self, compute, deploycommand):
     login = LoginCredentials.builder() \
             .authenticateSudo(self.__config.getboolean(deploycommand,
                 "requires_sudo")) \
             .user(self.__config.get(deploycommand, "template_user")) \
             .password(self.__config.get(deploycommand, "template_pass")) \
             .build()
     return compute.templateOptions() \
             .overrideLoginCredentials(login) \
             .virtualDatacenter(self.__config.get("mothership", "vdc"))
Beispiel #2
0
 def _template_options(self, compute, deploycommand):
     locations = compute.listAssignableLocations()
     vdc = self.__config.get("scalability", "vdc")
     location = filter(lambda l: l.getDescription() == vdc, locations)[0]
     log.debug("Found VDC %s %s" % (location.getId(),
         location.getDescription()))
     login = LoginCredentials.builder() \
         .authenticateSudo(self.__config.getboolean(deploycommand,
                 "requires_sudo")) \
         .user(self.__config.get(deploycommand, "template_user")) \
         .password(self.__config.get(deploycommand, "template_pass")) \
         .build()
     return (location, compute.templateOptions()
         .overrideLoginCredentials(login))