github.com/rahart/packer@v0.12.2-0.20161229105310-282bb6ad370f/builder/amazon/ebsvolume/block_device.go (about)

     1  package ebsvolume
     2  
     3  import (
     4  	awscommon "github.com/mitchellh/packer/builder/amazon/common"
     5  )
     6  
     7  type BlockDevice struct {
     8  	awscommon.BlockDevice `mapstructure:"-,squash"`
     9  	Tags                  map[string]string `mapstructure:"tags"`
    10  }
    11  
    12  func commonBlockDevices(mappings []BlockDevice) awscommon.BlockDevices {
    13  	result := make([]awscommon.BlockDevice, len(mappings))
    14  	for i, mapping := range mappings {
    15  		result[i] = mapping.BlockDevice
    16  	}
    17  
    18  	return awscommon.BlockDevices{
    19  		LaunchBlockDevices: awscommon.LaunchBlockDevices{
    20  			LaunchMappings: result,
    21  		},
    22  	}
    23  }