Re: [Openstack] [Liberty] What happened with "glance image-create --location http://..." ?

2015-10-19 Thread Martinx - ジェームズ
Hey guys,

The recommended workaround worked! On Liberty, I'm using it like this now:

---
glance --os-image-api-version 1 image-create --location
http://uec-images.ubuntu.com/releases/14.04.3/release/ubuntu-14.04-server-cloudimg-amd64-disk1.img
--is-public true --disk-format qcow2 --container-format bare --name
"Ubuntu 14.04.3 LTS - Trusty Tahr - 64-bit - Cloud Based Image"

glance --os-image-api-version 1 image-update --property
hw_scsi_model=virtio-scsi --property hw_disk_bus=scsi "Ubuntu 14.04.3
LTS - Trusty Tahr - 64-bit - Cloud Based Image"
---

Nevertheless, how can we achieve the same results, but using new OS
Image API version 2?

I mean, with "--location" from API 1, we can add lots of images in
advance and then, Glance will only download those images, on demand
(i.e., on first launch). So, how to do the same but, using API 2? This
is a very important feature...

Also, it seems that "image-update" is different on v2 as well...

Thanks!
Thiago


On 19 October 2015 at 01:06, Morales, Victor  wrote:
> Agree, it has been implemented that argument for V2(new default version)
> for python glance client
> (https://github.com/openstack/python-glanceclient/blob/master/glanceclient/
> v2/shell.py#L46-L59). A workaround could be use the OS_IMAGE_API_VERSION=1
> to use the --location argument of the
> client(https://github.com/openstack/python-glanceclient/blob/master/glancec
> lient/v1/shell.py#L195-L200)
>
> Regards/Saludos
> Victor Morales
>
> On 10/18/15, 6:31 PM, "James Denton"  wrote:
>
>>Hi Thiago,
>>
>>I'm not sure, but this may be a change from v1 API to v2 API. Here's a
>>bug I found a few months ago that may be related:
>>
>>https://bugs.launchpad.net/python-glanceclient/+bug/1399778
>>
>>James
>>
>>From: Martinx - ジェームズ 
>>Sent: Sunday, October 18, 2015 2:28 AM
>>To: openstack@lists.openstack.org
>>Subject: [Openstack] [Liberty] What happened with "glance image-create
>>--location http://..."; ?
>>
>>Hey guys,
>>
>>I'm trying Liberty (on Trusty) for the first time now... I'm facing
>>one problem that I think it might be easy to obtain help...
>>
>>To begin with:
>>
>>source admin-openrc.sh
>>glance image-list
>>
>>...works...
>>
>>But, I'm trying to add an image to it and it fails, like this:
>>
>>---
>>myuser@liberty-1:~$ glance image-create --location
>>http://uec-images.ubuntu.com/releases/14.04.3/release/ubuntu-14.04-server-
>>cloudimg-amd64-disk1.img
>>--visibility public --disk-format qcow2 --container-format bare --name
>>"Ubuntu 14.04.3 LTS - Trusty Tahr - 64-bit - Cloud Based Image"
>>usage: glance [--version] [-d] [-v] [--get-schema] [--timeout TIMEOUT]
>>  [--no-ssl-compression] [-f] [--os-image-url OS_IMAGE_URL]
>>  [--os-image-api-version OS_IMAGE_API_VERSION]
>>  [--profile HMAC_KEY] [-k] [--os-cert OS_CERT]
>>  [--cert-file OS_CERT] [--os-key OS_KEY] [--key-file OS_KEY]
>>  [--os-cacert ] [--ca-file OS_CACERT]
>>  [--os-username OS_USERNAME] [--os-user-id OS_USER_ID]
>>  [--os-user-domain-id OS_USER_DOMAIN_ID]
>>  [--os-user-domain-name OS_USER_DOMAIN_NAME]
>>  [--os-project-id OS_PROJECT_ID]
>>  [--os-project-name OS_PROJECT_NAME]
>>  [--os-project-domain-id OS_PROJECT_DOMAIN_ID]
>>  [--os-project-domain-name OS_PROJECT_DOMAIN_NAME]
>>  [--os-password OS_PASSWORD] [--os-tenant-id OS_TENANT_ID]
>>  [--os-tenant-name OS_TENANT_NAME] [--os-auth-url
>>OS_AUTH_URL]
>>  [--os-region-name OS_REGION_NAME]
>>  [--os-auth-token OS_AUTH_TOKEN]
>>  [--os-service-type OS_SERVICE_TYPE]
>>  [--os-endpoint-type OS_ENDPOINT_TYPE]
>>   ...
>>glance: error: unrecognized arguments: --location
>>http://uec-images.ubuntu.com/releases/14.04.3/release/ubuntu-14.04-server-
>>cloudimg-amd64-disk1.img
>>---
>>
>>What happens to "--location" option?
>>
>>I'm using a very similar line to add images to Kilo, only difference
>>is that on Kilo, I'm using "--is-public true", instead of
>>"--visibility public" (Liberty)...
>>
>>If I download the file, and use "--file", instead of "--location" as
>>before, then it works... But I prefer to add download the images on
>>demand...
>>
>>Workaround:
>>
>>---
>>wget
>>http://uec-images.ubuntu.com/releases/14.04.3/release/ubuntu-14.04-server-
>>cloudimg-amd64-disk1.img
>>
>>glance image-create --file
>>ubuntu-14.04-server-cloudimg-amd64-disk1.img --disk-format qcow2
>>--container-format bare --name "Ubuntu 14.04.3 LTS - Trusty Tahr -
>>64-bit - Cloud Based Image"
>>+--+--
>>-+
>>| Property | Value
>>|
>>+--+--
>>-+
>>| checksum | cf12c9878c9fb71c95d8f8c288761a99
>>|
>>| container_format | bare
>>|
>>| created_

Re: [Openstack] [Liberty] What happened with "glance image-create --location http://..." ?

2015-10-18 Thread Morales, Victor
Agree, it has been implemented that argument for V2(new default version)
for python glance client
(https://github.com/openstack/python-glanceclient/blob/master/glanceclient/
v2/shell.py#L46-L59). A workaround could be use the OS_IMAGE_API_VERSION=1
to use the --location argument of the
client(https://github.com/openstack/python-glanceclient/blob/master/glancec
lient/v1/shell.py#L195-L200)

Regards/Saludos
Victor Morales

On 10/18/15, 6:31 PM, "James Denton"  wrote:

>Hi Thiago,
>
>I'm not sure, but this may be a change from v1 API to v2 API. Here's a
>bug I found a few months ago that may be related:
>
>https://bugs.launchpad.net/python-glanceclient/+bug/1399778
>
>James
>
>From: Martinx - ジェームズ 
>Sent: Sunday, October 18, 2015 2:28 AM
>To: openstack@lists.openstack.org
>Subject: [Openstack] [Liberty] What happened with "glance image-create
>--location http://..."; ?
>
>Hey guys,
>
>I'm trying Liberty (on Trusty) for the first time now... I'm facing
>one problem that I think it might be easy to obtain help...
>
>To begin with:
>
>source admin-openrc.sh
>glance image-list
>
>...works...
>
>But, I'm trying to add an image to it and it fails, like this:
>
>---
>myuser@liberty-1:~$ glance image-create --location
>http://uec-images.ubuntu.com/releases/14.04.3/release/ubuntu-14.04-server-
>cloudimg-amd64-disk1.img
>--visibility public --disk-format qcow2 --container-format bare --name
>"Ubuntu 14.04.3 LTS - Trusty Tahr - 64-bit - Cloud Based Image"
>usage: glance [--version] [-d] [-v] [--get-schema] [--timeout TIMEOUT]
>  [--no-ssl-compression] [-f] [--os-image-url OS_IMAGE_URL]
>  [--os-image-api-version OS_IMAGE_API_VERSION]
>  [--profile HMAC_KEY] [-k] [--os-cert OS_CERT]
>  [--cert-file OS_CERT] [--os-key OS_KEY] [--key-file OS_KEY]
>  [--os-cacert ] [--ca-file OS_CACERT]
>  [--os-username OS_USERNAME] [--os-user-id OS_USER_ID]
>  [--os-user-domain-id OS_USER_DOMAIN_ID]
>  [--os-user-domain-name OS_USER_DOMAIN_NAME]
>  [--os-project-id OS_PROJECT_ID]
>  [--os-project-name OS_PROJECT_NAME]
>  [--os-project-domain-id OS_PROJECT_DOMAIN_ID]
>  [--os-project-domain-name OS_PROJECT_DOMAIN_NAME]
>  [--os-password OS_PASSWORD] [--os-tenant-id OS_TENANT_ID]
>  [--os-tenant-name OS_TENANT_NAME] [--os-auth-url
>OS_AUTH_URL]
>  [--os-region-name OS_REGION_NAME]
>  [--os-auth-token OS_AUTH_TOKEN]
>  [--os-service-type OS_SERVICE_TYPE]
>  [--os-endpoint-type OS_ENDPOINT_TYPE]
>   ...
>glance: error: unrecognized arguments: --location
>http://uec-images.ubuntu.com/releases/14.04.3/release/ubuntu-14.04-server-
>cloudimg-amd64-disk1.img
>---
>
>What happens to "--location" option?
>
>I'm using a very similar line to add images to Kilo, only difference
>is that on Kilo, I'm using "--is-public true", instead of
>"--visibility public" (Liberty)...
>
>If I download the file, and use "--file", instead of "--location" as
>before, then it works... But I prefer to add download the images on
>demand...
>
>Workaround:
>
>---
>wget 
>http://uec-images.ubuntu.com/releases/14.04.3/release/ubuntu-14.04-server-
>cloudimg-amd64-disk1.img
>
>glance image-create --file
>ubuntu-14.04-server-cloudimg-amd64-disk1.img --disk-format qcow2
>--container-format bare --name "Ubuntu 14.04.3 LTS - Trusty Tahr -
>64-bit - Cloud Based Image"
>+--+--
>-+
>| Property | Value
>|
>+--+--
>-+
>| checksum | cf12c9878c9fb71c95d8f8c288761a99
>|
>| container_format | bare
>|
>| created_at   | 2015-10-18T06:06:34Z
>|
>| disk_format  | qcow2
>|
>| id   | 9f1a7acf-d217-4def-9de2-8fc497f395ba
>|
>| min_disk | 0
>|
>| min_ram  | 0
>|
>| name | Ubuntu 14.04.3 LTS - Trusty Tahr - 64-bit - Cloud
>Based Image |
>| owner| 8c4863fc865e4050b58cb6353c44724a
>|
>| protected| False
>|
>| size | 258540032
>|
>| status   | active
>|
>| tags | []
>|
>| updated_at   | 2015-10-18T06:06:35Z
>|
>| virtual_size | None
>|
>| visibility   | private
>|
>+--+--
>-+
>---
>
>What am I missing with Liberty?
>
>I also tried the "--os-image-url" option but I don't think it is the
>same, plus, it returned the very same "glance: error: unrecognized
>arguments: --os-image-url" error!
>
>BTW, I'm trying Liberty on Trusty, following this:
>
>http://docs.openstack.org/liberty/install-guide-ubuntu/glan

Re: [Openstack] [Liberty] What happened with "glance image-create --location http://..." ?

2015-10-18 Thread James Denton
Hi Thiago,

I'm not sure, but this may be a change from v1 API to v2 API. Here's a bug I 
found a few months ago that may be related:

https://bugs.launchpad.net/python-glanceclient/+bug/1399778

James

From: Martinx - ジェームズ 
Sent: Sunday, October 18, 2015 2:28 AM
To: openstack@lists.openstack.org
Subject: [Openstack] [Liberty] What happened with "glance image-create 
--location http://..."; ?

Hey guys,

I'm trying Liberty (on Trusty) for the first time now... I'm facing
one problem that I think it might be easy to obtain help...

To begin with:

source admin-openrc.sh
glance image-list

...works...

But, I'm trying to add an image to it and it fails, like this:

---
myuser@liberty-1:~$ glance image-create --location
http://uec-images.ubuntu.com/releases/14.04.3/release/ubuntu-14.04-server-cloudimg-amd64-disk1.img
--visibility public --disk-format qcow2 --container-format bare --name
"Ubuntu 14.04.3 LTS - Trusty Tahr - 64-bit - Cloud Based Image"
usage: glance [--version] [-d] [-v] [--get-schema] [--timeout TIMEOUT]
  [--no-ssl-compression] [-f] [--os-image-url OS_IMAGE_URL]
  [--os-image-api-version OS_IMAGE_API_VERSION]
  [--profile HMAC_KEY] [-k] [--os-cert OS_CERT]
  [--cert-file OS_CERT] [--os-key OS_KEY] [--key-file OS_KEY]
  [--os-cacert ] [--ca-file OS_CACERT]
  [--os-username OS_USERNAME] [--os-user-id OS_USER_ID]
  [--os-user-domain-id OS_USER_DOMAIN_ID]
  [--os-user-domain-name OS_USER_DOMAIN_NAME]
  [--os-project-id OS_PROJECT_ID]
  [--os-project-name OS_PROJECT_NAME]
  [--os-project-domain-id OS_PROJECT_DOMAIN_ID]
  [--os-project-domain-name OS_PROJECT_DOMAIN_NAME]
  [--os-password OS_PASSWORD] [--os-tenant-id OS_TENANT_ID]
  [--os-tenant-name OS_TENANT_NAME] [--os-auth-url OS_AUTH_URL]
  [--os-region-name OS_REGION_NAME]
  [--os-auth-token OS_AUTH_TOKEN]
  [--os-service-type OS_SERVICE_TYPE]
  [--os-endpoint-type OS_ENDPOINT_TYPE]
   ...
glance: error: unrecognized arguments: --location
http://uec-images.ubuntu.com/releases/14.04.3/release/ubuntu-14.04-server-cloudimg-amd64-disk1.img
---

What happens to "--location" option?

I'm using a very similar line to add images to Kilo, only difference
is that on Kilo, I'm using "--is-public true", instead of
"--visibility public" (Liberty)...

If I download the file, and use "--file", instead of "--location" as
before, then it works... But I prefer to add download the images on
demand...

Workaround:

---
wget 
http://uec-images.ubuntu.com/releases/14.04.3/release/ubuntu-14.04-server-cloudimg-amd64-disk1.img

glance image-create --file
ubuntu-14.04-server-cloudimg-amd64-disk1.img --disk-format qcow2
--container-format bare --name "Ubuntu 14.04.3 LTS - Trusty Tahr -
64-bit - Cloud Based Image"
+--+---+
| Property | Value
|
+--+---+
| checksum | cf12c9878c9fb71c95d8f8c288761a99
|
| container_format | bare
|
| created_at   | 2015-10-18T06:06:34Z
|
| disk_format  | qcow2
|
| id   | 9f1a7acf-d217-4def-9de2-8fc497f395ba
|
| min_disk | 0
|
| min_ram  | 0
|
| name | Ubuntu 14.04.3 LTS - Trusty Tahr - 64-bit - Cloud
Based Image |
| owner| 8c4863fc865e4050b58cb6353c44724a
|
| protected| False
|
| size | 258540032
|
| status   | active
|
| tags | []
|
| updated_at   | 2015-10-18T06:06:35Z
|
| virtual_size | None
|
| visibility   | private
|
+--+---+
---

What am I missing with Liberty?

I also tried the "--os-image-url" option but I don't think it is the
same, plus, it returned the very same "glance: error: unrecognized
arguments: --os-image-url" error!

BTW, I'm trying Liberty on Trusty, following this:

http://docs.openstack.org/liberty/install-guide-ubuntu/glance-verify.html

Thanks in advance!

-
Thiago

___
Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to : openstack@lists.openstack.org
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
___
Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to : openstack@lists.openstack.org
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack