From 17039a592c633a81044581027813d5251a0d6613 Mon Sep 17 00:00:00 2001 From: Lev Berman Date: Thu, 3 Sep 2015 10:53:31 +0300 Subject: [PATCH] Rename MemoryGB into MemoryGb for consistency Also, rename IsManagedOS into IsManagedOs --- autocomplete/autocomplete_test.go | 2 +- init.go | 2 +- models/server/create.go | 4 ++-- models/server/import.go | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/autocomplete/autocomplete_test.go b/autocomplete/autocomplete_test.go index 33ebe33..93bcdc8 100644 --- a/autocomplete/autocomplete_test.go +++ b/autocomplete/autocomplete_test.go @@ -141,7 +141,7 @@ func TestArgumentsAutocomplete(t *testing.T) { t.Errorf("Invalid result.\n Expected: %s,\n obtained: %s", arguments, got) } - args = []string{"server", "create", "--cpu", "0", "--memoryGB"} + args = []string{"server", "create", "--cpu", "0", "--memory-gb"} got = strings.Split(autocomplete.Run(args), " ") sort.Strings(got) if !reflect.DeepEqual(got, arguments) { diff --git a/init.go b/init.go index a9b5717..c26858b 100644 --- a/init.go +++ b/init.go @@ -663,7 +663,7 @@ func init() { }, }, { - "--memoryGB", + "--memory-gb", []string{ "Required. Number of GB of memory to configure the server with (1-128). If this value is different from the one specified in the OVF,", "the import process will resize the server according to the value specified here.", diff --git a/models/server/create.go b/models/server/create.go index 4d08b10..ed3418c 100644 --- a/models/server/create.go +++ b/models/server/create.go @@ -17,7 +17,7 @@ type CreateReq struct { SourceServerId string TemplateId string TemplateName string `json:",omitempty"` - IsManagedOS bool `json:",omitempty"` + IsManagedOs bool `json:",omitempty"` IsManagedBackup bool `json:",omitempty"` PrimaryDns string `json:",omitempty"` SecondaryDns string `json:",omitempty"` @@ -27,7 +27,7 @@ type CreateReq struct { SourceServerPassword string `json:",omitempty"` Cpu int64 `valid:"required"` CpuAutoscalePolicyId string `json:",omitempty"` - MemoryGB int64 `valid:"required"` + MemoryGb int64 `valid:"required"` Type string `valid:"required" oneOf:"standard,hyperscale,bareMetal"` StorageType string `json:",omitempty" oneOf:"standard,premium,hyperscale"` AntiAffinityPolicyId string `json:",omitempty"` diff --git a/models/server/import.go b/models/server/import.go index 008a7be..cefcadc 100644 --- a/models/server/import.go +++ b/models/server/import.go @@ -9,7 +9,7 @@ type Import struct { NetworkId string `json:",omitempty"` RootPassword string `valid:"required"` Cpu int64 `valid:"required"` - MemoryGB int64 `valid:"required"` + MemoryGb int64 `valid:"required"` Type string `valid:"required" oneOf:"standard,hyperscale"` StorageType string `json:",omitempty" oneOf:"standard,premium,hyperscale"` CustomFields []CustomFieldDef `json:",omitempty"`