Example #1
0
func (command *commandCreate) Execute(resource *handler.Resource) {
	params := resource.Params.(*paramsCreate)
	volumeAttachment, err := osVolumeAttach.Create(command.Ctx.ServiceClient, params.serverID, params.opts).Extract()
	if err != nil {
		resource.Err = err
		return
	}
	resource.Result = structs.Map(volumeAttachment)
}
Example #2
0
// Create requests the creation of a new volume attachment on the server
func Create(client *gophercloud.ServiceClient, serverID string, opts os.CreateOptsBuilder) os.CreateResult {
	return os.Create(client, serverID, opts)
}