diff --git a/client/client.go b/client/client.go index 56450cb..d78721a 100644 --- a/client/client.go +++ b/client/client.go @@ -209,6 +209,7 @@ type UpgradeRequest struct { type VersionInfo struct { RabbitMQVersions []string `json:"rabbitmq_versions"` ErlangVersions []string `json:"erlang_versions"` + LavinMQVersions []string `json:"lavinmq_versions"` } func (c *Client) ToggleHiPE(instanceID string, req *HiPERequest) error { diff --git a/cmd/instance_nodes.go b/cmd/instance_nodes.go index 6777f91..9c1d9df 100644 --- a/cmd/instance_nodes.go +++ b/cmd/instance_nodes.go @@ -79,7 +79,7 @@ var instanceNodesListCmd = &cobra.Command{ var instanceNodesVersionsCmd = &cobra.Command{ Use: "versions --id ", Short: "Get available versions", - Long: `Lists RabbitMQ and Erlang versions to which the instance can be upgraded.`, + Long: `Lists available versions to which the instance can be upgraded. For RabbitMQ instances, shows RabbitMQ and Erlang versions. For LavinMQ instances, shows LavinMQ versions.`, Example: ` cloudamqp instance nodes versions --id 1234`, RunE: func(cmd *cobra.Command, args []string) error { idFlag, _ := cmd.Flags().GetString("id") @@ -102,8 +102,12 @@ var instanceNodesVersionsCmd = &cobra.Command{ } fmt.Printf("Available versions:\n") - fmt.Printf("RabbitMQ versions: %v\n", versions.RabbitMQVersions) - fmt.Printf("Erlang versions: %v\n", versions.ErlangVersions) + if len(versions.LavinMQVersions) > 0 { + fmt.Printf("LavinMQ versions: %v\n", versions.LavinMQVersions) + } else { + fmt.Printf("RabbitMQ versions: %v\n", versions.RabbitMQVersions) + fmt.Printf("Erlang versions: %v\n", versions.ErlangVersions) + } return nil }, }