def upload_image(self, **attrs):

        data = attrs.pop('data')
        img = self._create(_image.Image, **attrs)

        img.data = data
        img.upload_image(self.session)

        return img
Upload a new image from attributes
dataset/ETHPy150Open openstack/python-openstacksdk/openstack/image/v2/_proxy.py/Proxy.upload_image