[Openstack] How to list all volumes attached to a particular instance?

2015-11-24 Thread Laohu
Given an instance name/id, is there a API call or filter option to list ALL volumes attached? Thanks, John___ Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack Post to : openstack@lists.openstack.org Unsubscribe : http://lis

[Openstack] failed to create instance with block_device_mapping_v2 option

2015-11-30 Thread Laohu
I was able to create an instance with CLI $ nova boot --flavor gc1.small --image c85b0898-2bbd-46be-8950-3c031f07cb93 --key-name dev_key --block-device id=c85b0898-2bbd-46be-8950-3c031f07cb93,source=image,dest=volume,type=disk,device=vda,size=30,bootindex=1,shutdown=remove --availability-zone de

[Openstack] how to get image size

2015-12-02 Thread Laohu
I want to use Python API to create a volume from an image. To do so, I need to know the size of image. I noticed that image class has OS-EXT-IMG-SIZE:size property, but I don't know how to get the size from there. Thanks, John ___ Mailing list: htt

[Openstack] tag instance and volume

2015-12-06 Thread Laohu
I worked on AWS EC2 before, it has API to tag sources.  I checked API, and did not find similar calls.    So my questions is:   does Openstack have similar feature? Thanks, John ___ Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/ope

[Openstack] API call to attach volume does not work ?

2015-12-07 Thread Laohu
I called cinderclient.volumes.attach(...)  to attach a block volume to an instance, the volume is in  'In-Use' status and attached to the volume.   However, when I got on Openstack dashboard and clicked on the instance, i could not find the volume in the 'Volumes Attached' section. I use cinde

Re: [Openstack] API call to attach volume does not work ?

2015-12-08 Thread Laohu
I switched to Nova API, and it is working now.  Thanks a lot. John On Monday, December 7, 2015 8:26 PM, hao wang wrote: Hi, Laohu You shouldn't use cinder attach API to attach a volume to an instance. Cinder attach API worked with Nova attach API, so you should call Nova attac

[Openstack] State map of newly created instace and associated IP address

2015-12-08 Thread Laohu
I am developing an application in Python.  In simplistic ways, the application has threesteps, which will runs in batch 1. create an instance with volumes; 2. associate floating IP to the instance; 3. run ssh remote commands on the instance to get work done I know there is latency in step 1 & 2,