Rename vm_flavour to vm_type
This commit is contained in:
parent
e7e84f04e7
commit
4704565869
|
@ -25,7 +25,7 @@ const testBuilderAccBasic = `
|
|||
{
|
||||
"builders": [{
|
||||
"type": "test",
|
||||
"vm_flavour": "a1.nano",
|
||||
"vm_type": "a1.nano",
|
||||
"source_image": "5c3fef425ceadc3d412beee5",
|
||||
"disk_size": 10
|
||||
}]
|
||||
|
|
|
@ -45,9 +45,9 @@ type Config struct {
|
|||
ImageTags map[string]interface{} `mapstructure:"image_tags"`
|
||||
ImageService string `mapstructure:"image_service"`
|
||||
|
||||
VmFlavour string `mapstructure:"vm_flavour"`
|
||||
VmName string `mapstructure:"vm_name"`
|
||||
VmTags map[string]interface{} `mapstructure:"vm_tags"`
|
||||
VmType string `mapstructure:"vm_type"`
|
||||
VmName string `mapstructure:"vm_name"`
|
||||
VmTags map[string]interface{} `mapstructure:"vm_tags"`
|
||||
|
||||
DiskName string `mapstructure:"disk_name"`
|
||||
DiskType string `mapstructure:"disk_type"`
|
||||
|
@ -207,8 +207,8 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) {
|
|||
errs = packer.MultiErrorAppend(errs, errors.New("token is required"))
|
||||
}
|
||||
|
||||
if c.VmFlavour == "" {
|
||||
errs = packer.MultiErrorAppend(errs, errors.New("vm flavour is required"))
|
||||
if c.VmType == "" {
|
||||
errs = packer.MultiErrorAppend(errs, errors.New("vm type is required"))
|
||||
}
|
||||
|
||||
if c.DiskSize == 0 {
|
||||
|
|
|
@ -48,7 +48,7 @@ func (s *stepCreateVM) Run(ctx context.Context, state multistep.StateBag) multis
|
|||
options := openapi.VmCreate{
|
||||
Name: config.VmName,
|
||||
Image: config.SourceImage,
|
||||
Service: config.VmFlavour,
|
||||
Service: config.VmType,
|
||||
SshKeys: sshKeys,
|
||||
Disk: disks,
|
||||
Netadp: []openapi.VmCreateNetadp{netAdapter},
|
||||
|
|
|
@ -24,7 +24,7 @@ func (s *stepCreateVMFromDisk) Run(ctx context.Context, state multistep.StateBag
|
|||
|
||||
options := openapi.VmCreate{
|
||||
Name: config.VmName,
|
||||
Service: config.VmFlavour,
|
||||
Service: config.VmType,
|
||||
Disk: []openapi.VmCreateDisk{
|
||||
{
|
||||
Id: chrootDiskID,
|
||||
|
|
|
@ -108,7 +108,7 @@ builder.
|
|||
- In `~/.h1-cli/conf.json` config file used by [h1-cli](https://github.com/hyperonecom/h1-cli).
|
||||
- By using SSH authentication if `token_login` variable has been set.
|
||||
|
||||
- `vm_flavour` (string) - ID or name of the type this server should be created with.
|
||||
- `vm_type` (string) - ID or name of the type this server should be created with.
|
||||
|
||||
### Optional:
|
||||
|
||||
|
@ -215,7 +215,7 @@ token.
|
|||
"type": "hyperone",
|
||||
"token": "YOUR_AUTH_TOKEN",
|
||||
"source_image": "ubuntu-18.04",
|
||||
"vm_flavour": "a1.nano",
|
||||
"vm_type": "a1.nano",
|
||||
"disk_size": 10
|
||||
}
|
||||
```
|
||||
|
@ -228,7 +228,7 @@ token.
|
|||
"type": "hyperone",
|
||||
"token": "YOUR_AUTH_TOKEN",
|
||||
"source_image": "ubuntu-18.04",
|
||||
"vm_flavour": "a1.nano",
|
||||
"vm_type": "a1.nano",
|
||||
"disk_size": 10,
|
||||
"chroot_disk": true,
|
||||
"pre_mount_commands": [
|
||||
|
|
Loading…
Reference in New Issue