def __init__(self, tasker, workflow,
                 pulp_registry_name,
                 docker_registry,
                 delete_from_registry=False,
                 pulp_secret_path=None,
                 username=None, password=None,
                 dockpulp_loglevel=None):
        """
        constructor

        :param tasker: DockerTasker instance
        :param workflow: DockerBuildWorkflow instance
        :param pulp_registry_name: str, name of pulp registry to use,
               specified in /etc/dockpulp.conf
        :param docker_registry: str, URL of docker registry to sync from
        :param delete_from_registry: bool, whether to delete the image
               from the docker v2 registry after sync
        :param pulp_secret_path: path to pulp.cer and pulp.key
        :param username: pulp username, used in preference to
               certificate and key
        :param password: pulp password, used in preference to
               certificate and key
        """
        # call parent constructor
        super(PulpSyncPlugin, self).__init__(tasker, workflow)
        self.pulp_registry_name = pulp_registry_name
        self.docker_registry = docker_registry
        self.pulp_secret_path = pulp_secret_path
        self.username = username
        self.password = password

        if dockpulp_loglevel is not None:
            logger = dockpulp.setup_logger(dockpulp.log)
            try:
                logger.setLevel(dockpulp_loglevel)
            except (__HOLE__, TypeError) as ex:
                self.log.error("Can't set provided log level %r: %r",
                               dockpulp_loglevel, ex)

        if delete_from_registry:
            self.log.error("will not delete from registry as instructed: "
                           "not implemented")
dataset/ETHPy150Open projectatomic/atomic-reactor/atomic_reactor/plugins/post_pulp_sync.py/PulpSyncPlugin.__init__