<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 19, 2016 at 10:17 PM, Martinx - ジェームズ <span dir="ltr"><<a href="mailto:thiagocmartinsc@gmail.com" target="_blank">thiagocmartinsc@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Guys,<div><br></div><div> I want to formalize my protest against Glance V2 usability.</div><div><br></div><div> With Glance V1, you can straight away, add an image based on its remote URL location, then, Glance will download the image ONLY when someone launch it.</div><div><br></div><div> This is very cool and I can add, easily and automatically by Ansible, for example, dozens of images at once, right after deploying OpenStack.</div><div><br></div><div> However, this is much worse now, when with Glance V2, as follows:</div><div><br></div><div>-----</div><div>*** Glance V1 procedure:</div><div><br></div><div> 1) Add an image and its remote location at once:</div><div><br></div><div> glance image-create --location <a href="http://cdimage.debian.org/cdimage/openstack/8.3.0/debian-8.3.0-openstack-amd64.qcow2" target="_blank">http://cdimage.debian.org/cdimage/openstack/8.3.0/debian-8.3.0-openstack-amd64.qcow2</a> --is-public true --name "Debian 8.3.0 - Jessie - 64-bit - Cloud Based Image" --container-format bare --disk-format qcow2</div><div><br></div><div> See it? Glance V1 is awesome!</div><div><br></div><div>--</div><div><br></div><div>*** Glance V2 procedure:</div><div><br></div><div> 1) Add an Image WITHOUT a location:</div><div><br></div><div> glance image-create --visibility public --name \"Debian 8.3.0 - Jessie - 64-bit - Cloud Based Image\" --container-format bare --disk-format qcow2</div><div><br></div><div> 2) Look (or parse somehow) the stdout, copy to clipboad the Image ID.</div><div><br></div><div> 3) Add the location of the image:</div><div><br></div><div> glance location-add --url <a href="http://cdimage.debian.org/cdimage/openstack/8.3.0/debian-8.3.0-openstack-amd64.qcow2" target="_blank">http://cdimage.debian.org/cdimage/openstack/8.3.0/debian-8.3.0-openstack-amd64.qcow2</a> $PASTE_IMAGE_ID</div><div><br></div><div><br></div></div></blockquote><div><br></div><div>Hey Thiago,</div><div><br></div><div>Thanks for your feedback.</div><div><br></div><div>I just wanted to provide some feedback on why this change was made. In V2, the image location is a resource and you can have multiple locations per image. In order to allow you to add locations, we had to add the `location-add` subcommand. Then the `--location` argument was removed so that we would have 1 way to do things rather than 2.</div><div><br></div><div>I do understand where your frustration comes from and I'd also prefer a single command rather than 2 (or 3) but in this case consistency with the API was favored over having 2 ways of doing things in the CLI. </div><div><br></div><div>Thanks again. I certainly hope glanceclient v2 is not causing you more frustrations.</div><div>Flavio</div></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><span style="font-size:12.8px">@flaper87</span><br></div><div>Flavio Percoco</div><div><br></div></div></div></div></div>
</div></div>