(self, guest)
Setups the guest to run the provisioner if applicable.
Setups the guest to run the provisioner if applicable.
Setups the guest to run the provisioner if applicable .
def setup_single(self, guest):
        """ Setups the guest to run the provisioner if applicable. """
        # Ensure that the packages required to properly use the considered provisioner are installed
        # on the guest.
        logger.info('Preparing {0} up for provisioner {1}'.format(
            guest.container.name, self.name))
        required_packages = getattr(
            self, 'guest_required_packages_{}'.format(guest.name), None)
        if required_packages is not None:
            logger.info(
                'Installing packages required for the {} provisioner '
                'on the guest'.format(self.name))
            guest.install_packages(required_packages)

        # We allow `Provisioner` subclasses to define their own "setup_guest_{guestname}" methods
        # if setup operations have to be done on some specific guest prior to any provisioning
        # actions.
        guest_setup_method = getattr(self, 'setup_guest_{}'.format(guest.name), None)
        if guest_setup_method is not None:
            guest_setup_method(guest)
def setup_single ( self , guest ) : # Ensure that the packages required to properly use the considered provisioner are installed # on the guest. logger . info ( 'Preparing {0} up for provisioner {1}' . format ( guest . container . name , self . name ) ) required_packages = getattr ( self , 'guest_required_packages_{}' . format ( guest . name ) , None ) if required_packages is not None : logger . info ( 'Installing packages required for the {} provisioner ' 'on the guest' . format ( self . name ) ) guest . install_packages ( required_packages ) # We allow `Provisioner` subclasses to define their own "setup_guest_{guestname}" methods # if setup operations have to be done on some specific guest prior to any provisioning # actions. guest_setup_method = getattr ( self , 'setup_guest_{}' . format ( guest . name ) , None ) if guest_setup_method is not None : guest_setup_method ( guest )