:return:

def load_dockercfg(self):
        """
        :return:
        """
        if self.ssl_cert_path:
            self._validate_ssl_certs()

        if self.auth_type == 'registry_rubber':
            self.user, self.passwd = self._registry_rubber_uonce('add')
            self._config_path = self._create_dockercfg(
                self.user,
                self.passwd,
                os.path.join(os.environ.get('HOME'), '.{0}.dockercfg'.format(self.user))
            )
        else:
            if not os.path.isfile(self.config_path):
                raise ValueError("Couldn't find dockercfg file: {0}".format(self.config_path))

            with open(self.config_path, 'r') as f:
                try:
                    config = json.loads(f.read())
                except Exception:
                    raise SyntaxError("{0} doesn't container valid json.".format(self.config_path))

            if self.registry not in config:
                raise LookupError("Was unable to find {0} in {1}".format(self.registry, self.config_path))

            registry_config = config[self.registry]
            if 'auth' not in registry_config:
                raise LookupError("Was unable to find 'auth' obj for {0} in {1}".format(self.registry, self.config_path))

            credentials = base64.decodestring(registry_config['auth'])

            self.user = credentials.get('user')
            self.user = credentials.get('password')