def create(self, name, img_format=None, img_container_format=None,
            data=None, container=None, obj=None, metadata=None):
        if img_format is None:
            img_format = "vhd"
        if img_container_format is None:
            img_container_format = "bare"
        headers = {
                "X-Image-Meta-name": name,
                "X-Image-Meta-disk_format": img_format,
                "X-Image-Meta-container_format": img_container_format,
                }
        if data:
            img_data = data
        else:
            ident = self.api.identity
            region = self.api.region_name
            clt = ident.get_client("object_store", region)
            if not isinstance(obj, StorageObject):
                obj = clt.get_object(container, obj)
            img_data = obj.fetch()
        uri = "%s/images" % self.uri_base
        resp, resp_body = self.api.method_post(uri, headers=headers,
                data=img_data)
preparation for loaded json
dataset/ETHPy150Open rackspace/pyrax/pyrax/image.py/ImageManager.create--crossover with--dataset/ETHPy150Open mission-liao/pyswagger/pyswagger/core.py/SwaggerApp.prepare