How to use the centos ISO url as source_image in packer using the openstack builder

my file is here
  "builders": [
      "type": "openstack",
      "provider": "http://<openstack>",
      "openstack_provider": "",
      "region": "RegionOne",
      "ssh_username": "monkey",
      "image_name": "ubuntu1404_packer_test_1",
      "source_image": "https:////",
      "flavor": "2"
the error i am getting is : openstack: Error launching source server: Bad request with: [POST], error message: {"badRequest": {"message": "Invalid input for field/attribute imageRef. Value: u'' is not valid under any of the given schemas", "code": 400}}
i want to download the image from the site https://// and then create a image out of it.

i do not want to give the image id from the existing image in openstack.

how can i achieve this.

Hi @allaboutsunil,

Prior to OpenStack Newton, Nova supports providing an image reference (imageRef) in URL format (e.g. http://localhost/v2/fake/images/76fa36fc-c930-4bf3-8c8a-ea2a2420deb6) during server creation. The URL needs to contain the UUID as the last part of the path, which Nova will use when booting the server (nova/api/openstack/ Nova requires that the image UUID already exist within Glance, and will not attempt to download it from a remote source.

Providing a URL-formatted imageRef was removed in the Newton release (Oct 2016) of OpenStack Nova (version 14.1.0) with (commit cbd3ec4). imageRefs must now be specified as a UUID, or omitted completely (i.e., when using boot from volume).

Excerpt from Nova 14.1.0 release notes.

imageRef input to the REST API is now restricted to be UUID or an empty string only. imageRef input while create, rebuild and rescue server etc must be a valid UUID now. Previously, a random image ref url containing image UUID was accepted. But now all the reference of imageRef must be a valid UUID (with below exception) otherwise API will return 400. Exception- In case boot server from volume. Previously empty string was allowed in imageRef and which is ok in case of boot from volume. Nova will keep the same behavior and allow empty string in case of boot from volume only and 400 in all other case.

I hope this helps. Please let me know if you have any other questions.

i m using type qemu to build the centos from scratch as i dont think so its possible by using type=openstack