Hi,
I'm trying to update shell scripts that use nova/neutron/cinder to use only the 'openstack' cli.
The nova command I try to convert is (note the instance have only mapped block devices ):
nova boot --poll --flavor tiny --block-device source= volume, id=47844285- 7c51-4993- 995b-468ff7fd21 23,dest= volume, shutdown= preserve, bootindex= 0 --block-device source= volume, id=a17ead3d- b3a7-4032- 9ad7-b1c60eb6a2 4e,dest= volume, shutdown= preserve, bootindex= 1 --nic port-id= d955c492- 69e6-426f- b723-e78ae85cd1 01 --availability-zone nova:foobar my_instance
In:
openstack server create --wait --nic port-id= d955c492- 69e6-426f- b723-e78ae85cd1 01 --availability-zone nova:foobar --flavor tiny --block- device- mapping vda=47844285- 7c51-4993- 995b-468ff7fd21 23 --block- device- mapping= a17ead3d- b3a7-4032- 9ad7-b1c60eb6a2 4e my_instance
I have some issues:
* I cannot provide the 'shutdown=' option
* I cannot set the device type (ie: volume or snapshot)
* I got the following error message: openstack server create: error: one of the arguments --image --volume is required
Only the last one really blocks me.
The code seems doing wrong assumptions here: https:/ /github. com/openstack/ python- openstackclient /blob/master/ openstackclient /compute/ v2/server. py#L419
And perhaps block-device- mapping should be part of the disk options group: https:/ /github. com/openstack/ python- openstackclient /blob/master/ openstackclient /compute/ v2/server. py#L250
Cheers,