diff --git a/cmd/database/database_backup_create.go b/cmd/database/database_backup_create.go index 9e46e409..c01bd96f 100644 --- a/cmd/database/database_backup_create.go +++ b/cmd/database/database_backup_create.go @@ -81,8 +81,8 @@ var dbBackupCreateCmd = &cobra.Command{ "database_id": bk.DatabaseID, "database_name": bk.DatabaseName, "software": bk.Software, - "name": bk.Name, - "schedule": bk.Schedule, + "name": bk.Scheduled.Name, + "schedule": bk.Scheduled.Schedule, "count": fmt.Sprintf("%d", count), }) switch common.OutputFormat { @@ -91,7 +91,7 @@ var dbBackupCreateCmd = &cobra.Command{ case "custom": ow.WriteCustomOutput(common.OutputFields) default: - fmt.Printf("Database backup (%s) for database %s has been created\n", utility.Green(bk.Name), utility.Green(bk.DatabaseName)) + fmt.Printf("Database backup (%s) for database %s has been created\n", utility.Green(bk.Scheduled.Name), utility.Green(bk.DatabaseName)) } }, } diff --git a/cmd/database/database_backup_list.go b/cmd/database/database_backup_list.go index 7f890113..4f1b96db 100644 --- a/cmd/database/database_backup_list.go +++ b/cmd/database/database_backup_list.go @@ -49,14 +49,14 @@ var dbBackupListCmd = &cobra.Command{ ow.StartLine() ow.AppendDataWithLabel("database_id", utility.TrimID(backups.DatabaseID), "Database ID") ow.AppendDataWithLabel("database_name", backups.DatabaseName, "Database Name") - ow.AppendDataWithLabel("name", backups.Name, "Backup Name") - ow.AppendDataWithLabel("schedule", backups.Schedule, "Schedule") - ow.AppendDataWithLabel("count", fmt.Sprintf("%d", backups.Count), "Count") + ow.AppendDataWithLabel("name", backups.Scheduled.Name, "Backup Name") + ow.AppendDataWithLabel("schedule", backups.Scheduled.Schedule, "Schedule") + ow.AppendDataWithLabel("count", fmt.Sprintf("%d", backups.Scheduled.Count), "Count") bk := "" - for i, backup := range backups.Backups { + for i, backup := range backups.Scheduled.Backups { bk += backup - if i < len(backups.Backups)-1 { + if i < len(backups.Scheduled.Backups)-1 { bk += "\n" } } diff --git a/cmd/database/database_backup_update.go b/cmd/database/database_backup_update.go index 72bcfc36..1281efc4 100644 --- a/cmd/database/database_backup_update.go +++ b/cmd/database/database_backup_update.go @@ -69,8 +69,8 @@ var dbBackupUpdateCmd = &cobra.Command{ "database_id": bk.DatabaseID, "database_name": bk.DatabaseName, "software": bk.Software, - "name": bk.Name, - "schedule": bk.Schedule, + "name": bk.Scheduled.Name, + "schedule": bk.Scheduled.Schedule, "count": fmt.Sprintf("%d", count), }) switch common.OutputFormat { @@ -79,7 +79,7 @@ var dbBackupUpdateCmd = &cobra.Command{ case "custom": ow.WriteCustomOutput(common.OutputFields) default: - fmt.Printf("Database backup (%s) for database %s has been update\n", utility.Green(bk.Name), utility.Green(bk.DatabaseName)) + fmt.Printf("Database backup (%s) for database %s has been update\n", utility.Green(bk.Scheduled.Name), utility.Green(bk.DatabaseName)) } }, } diff --git a/cmd/kubernetes/kubernetes_nodepool_create.go b/cmd/kubernetes/kubernetes_nodepool_create.go index 5c6496bf..b5c8d0ca 100644 --- a/cmd/kubernetes/kubernetes_nodepool_create.go +++ b/cmd/kubernetes/kubernetes_nodepool_create.go @@ -58,7 +58,7 @@ var kubernetesNodePoolCreateCmd = &cobra.Command{ os.Exit(1) } - poolConfig := civogo.KubernetesClusterPoolConfig{ID: poolID, Count: numTargetNodesPool, Size: targetNodesPoolSize} + poolConfig := civogo.KubernetesClusterPoolUpdateConfig{ID: poolID, Count: numTargetNodesPool, Size: targetNodesPoolSize} if publicIpNodePool { if config.Current.RegionToFeatures != nil { if !config.Current.RegionToFeatures[client.Region].PublicIPNodePools { @@ -69,13 +69,13 @@ var kubernetesNodePoolCreateCmd = &cobra.Command{ poolConfig.PublicIPNodePool = publicIpNodePool } - kubernetesCluster, err := client.CreateKubernetesPool(kubernetesFindCluster.ID, &poolConfig) + kubernetesCluster, err := client.CreateKubernetesClusterPool(kubernetesFindCluster.ID, &poolConfig) if err != nil { utility.Error("%s", err) os.Exit(1) } - ow := utility.NewOutputWriterWithMap(map[string]string{"id": kubernetesCluster.ID, "name": kubernetesCluster.Name, "pool_id": poolID[:6]}) + ow := utility.NewOutputWriterWithMap(map[string]string{"id": kubernetesCluster.ID, "name": kubernetesFindCluster.Name, "pool_id": poolID[:6]}) switch common.OutputFormat { case "json": @@ -83,7 +83,7 @@ var kubernetesNodePoolCreateCmd = &cobra.Command{ case "custom": ow.WriteCustomOutput(common.OutputFields) default: - fmt.Printf("The pool (%s) was added to the cluster (%s)\n", utility.Green(poolID), utility.Green(kubernetesCluster.Name)) + fmt.Printf("The pool (%s) was added to the cluster (%s)\n", utility.Green(poolID), utility.Green(kubernetesFindCluster.Name)) } }, } diff --git a/go.mod b/go.mod index d1c21553..6cd59120 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/bradfitz/iter v0.0.0-20191230175014-e8f45d346db8 // indirect github.com/briandowns/spinner v1.11.1 github.com/c4milo/unpackit v0.0.0-20170704181138-4ed373e9ef1c // indirect - github.com/civo/civogo v0.3.46 + github.com/civo/civogo v0.3.52 github.com/dsnet/compress v0.0.1 // indirect github.com/fatih/color v1.13.0 // indirect github.com/google/go-github v17.0.0+incompatible diff --git a/go.sum b/go.sum index 5aae0b0a..d3b4b373 100644 --- a/go.sum +++ b/go.sum @@ -61,8 +61,8 @@ github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghf github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/civo/civogo v0.3.46 h1:F95+85P2sqM73bsJVQEgOmDTYCNMkg8uDL/dano6jTU= -github.com/civo/civogo v0.3.46/go.mod h1:54lv/FOf7gh6wE9ZwVdw4yBehk8V1CvU9aWa4v6dvW0= +github.com/civo/civogo v0.3.52 h1:x300yiN6N8cK3kd79RMxLCzsKCWnm4Nxv8+Nn8hjAEI= +github.com/civo/civogo v0.3.52/go.mod h1:54lv/FOf7gh6wE9ZwVdw4yBehk8V1CvU9aWa4v6dvW0= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=