diff --git a/create/mysql.go b/create/mysql.go index 3cbad47..1982f48 100644 --- a/create/mysql.go +++ b/create/mysql.go @@ -114,14 +114,14 @@ func (cmd *mySQLCmd) newMySQL(namespace string) *storage.MySQL { // ApplicationKongVars returns all variables which are used in the application // create command func MySQLKongVars() kong.Vars { - vmTypes := make([]string, len(infra.MachineTypes)) - for i, machineType := range infra.MachineTypes { + vmTypes := make([]string, len(storage.MySQLMachineTypes)) + for i, machineType := range storage.MySQLMachineTypes { vmTypes[i] = string(machineType) } result := make(kong.Vars) result["mysql_machine_types"] = strings.Join(vmTypes, ", ") - result["mysql_machine_default"] = string(infra.MachineTypes[0]) + result["mysql_machine_default"] = string(storage.MySQLMachineTypeDefault) result["mysql_location_options"] = strings.Join(storage.MySQLLocationOptions, ", ") result["mysql_location_default"] = string(storage.MySQLLocationDefault) result["mysql_user"] = string(storage.MySQLUser) diff --git a/create/mysql_test.go b/create/mysql_test.go index 8cba942..767b17e 100644 --- a/create/mysql_test.go +++ b/create/mysql_test.go @@ -7,7 +7,6 @@ import ( "testing" "time" - infra "github.com/ninech/apis/infrastructure/v1alpha1" meta "github.com/ninech/apis/meta/v1alpha1" storage "github.com/ninech/apis/storage/v1alpha1" "github.com/ninech/nctl/api" @@ -43,8 +42,8 @@ func TestMySQL(t *testing.T) { }, { name: "machineType", - create: mySQLCmd{MachineType: infra.MachineType("nine-standard-1")}, - want: storage.MySQLParameters{MachineType: infra.MachineType("nine-standard-1")}, + create: mySQLCmd{MachineType: storage.MySQLMachineTypeDefault}, + want: storage.MySQLParameters{MachineType: storage.MySQLMachineTypeDefault}, }, { name: "sshKeys", diff --git a/create/postgres.go b/create/postgres.go index b4fcbdc..4c49b96 100644 --- a/create/postgres.go +++ b/create/postgres.go @@ -102,14 +102,14 @@ func (cmd *postgresCmd) newPostgres(namespace string) *storage.Postgres { // ApplicationKongVars returns all variables which are used in the application // create command func PostgresKongVars() kong.Vars { - vmTypes := make([]string, len(infra.MachineTypes)) - for i, machineType := range infra.MachineTypes { + vmTypes := make([]string, len(storage.PostgresMachineTypes)) + for i, machineType := range storage.PostgresMachineTypes { vmTypes[i] = string(machineType) } result := make(kong.Vars) result["postgres_machine_types"] = strings.Join(vmTypes, ", ") - result["postgres_machine_default"] = string(infra.MachineTypes[0]) + result["postgres_machine_default"] = string(storage.PostgresMachineTypeDefault) result["postgres_location_options"] = strings.Join(storage.PostgresLocationOptions, ", ") result["postgres_location_default"] = string(storage.PostgresLocationDefault) result["postgres_version_default"] = string(storage.PostgresVersionDefault) diff --git a/create/postgres_test.go b/create/postgres_test.go index ab4df25..c1ffbeb 100644 --- a/create/postgres_test.go +++ b/create/postgres_test.go @@ -7,7 +7,6 @@ import ( "testing" "time" - infra "github.com/ninech/apis/infrastructure/v1alpha1" meta "github.com/ninech/apis/meta/v1alpha1" storage "github.com/ninech/apis/storage/v1alpha1" "github.com/ninech/nctl/api" @@ -43,8 +42,8 @@ func TestPostgres(t *testing.T) { }, { name: "machineType", - create: postgresCmd{MachineType: infra.MachineType("nine-standard-1")}, - want: storage.PostgresParameters{MachineType: infra.MachineType("nine-standard-1")}, + create: postgresCmd{MachineType: storage.PostgresMachineTypeDefault}, + want: storage.PostgresParameters{MachineType: storage.PostgresMachineTypeDefault}, }, { name: "sshKeys",