| osBFV "github.com/rackspace/gophercloud/openstack/compute/v2/extensions/bootfromvolume" |
| "github.com/rackspace/gophercloud/openstack/compute/v2/servers" |
| th "github.com/rackspace/gophercloud/testhelper" |
| func TestCreateOpts(t *testing.T) { |
| base := servers.CreateOpts{ |
| ImageRef: "asdfasdfasdf", |
| FlavorRef: "performance1-1", |
| ext := osBFV.CreateOptsExt{ |
| BlockDevice: []osBFV.BlockDevice{ |
| DestinationType: "volume", |
| "imageRef": "asdfasdfasdf", |
| "flavorRef": "performance1-1", |
| "block_device_mapping_v2":[ |
| "destination_type":"volume", |
| "delete_on_termination": "false", |
| actual, err := ext.ToServerCreateMap() |
| th.CheckJSONEquals(t, expected, actual) |