Hi J, This code calls the model volume.create which takes attributes. So you should call it like so:
v = volume_service.volumes.create(size: 20, display_name: 'tester123', display_description: 'Fog Testing1', imageRef: 'da5e5085-db75-4b0b-90fd-c82e887f4a1a') Just from the top of my head, so I might be incorrect. Let me know. Thanks, Rupak Ganguly 678-648-7434 On Oct 15, 2014, at 3:54 PM, geemus (Wesley Beary) <[email protected]> wrote: Hey, I don't have the most experience with the openstack side of things myself. Could you create an issue with this info on github? From there I can usually summon somebody with more direct experience to help out. Thanks! wes On Wed, Oct 15, 2014 at 8:18 AM, J Ro <[email protected]> wrote: > Hi, > > When I use cinder to create a volume from an image, it works. Here is the > debug HTTP request: > > DEBUG:keystoneclient.session:REQ: curl -i -X POST > http://XXX:8776/v1/96b7fa2fb01c47bb884a1f97e091b8a0/volumes -H > "User-Agent: python-cinderclient" -H "Content-Type: application/json" -H > "Accept: application/json" -H "X-Auth-Token: TOKEN_REDACTED" -d '{"volume": > {"status": "creating", "availability_zone": null, "source_volid": null, > "display_description": null, "snapshot_id": null, "user_id": null, "size": > 20, "display_name": "volfromsnap", "imageRef": > "da5e5085-db75-4b0b-90fd-c82e887f4a1a", "attach_status": "detached", > "volume_type": null, "project_id": null, "metadata": {}}}' > > However, when attempting this with fog, the imageRef is not being sent: > > Ruby code: > > v = volume_service.volumes.create(size: 20, display_name: 'tester123', > display_description: 'Fog Testing1', options: {imageRef: > 'da5e5085-db75-4b0b-90fd-c82e887f4a1a'}) > HTTP Request: > > POST /v1/c297330967f242549e184e648d657e6f/volumes HTTP/1.1 > > {"volume":{"display_name":"tester123","display_description":"Fog > Testing1","size":20}} > > From > https://github.com/fog/fog/blob/master/lib/fog/openstack/requests/volume/create_volume.rb, > it looks like these options should be parsed, but they are not being sent > by the client. Any ideas? > > Thanks! > > -- > You received this message because you are subscribed to the Google Groups > "ruby-fog" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "ruby-fog" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "ruby-fog" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
