Skip to content

Commit

Permalink
Updated message for nal (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
Etourneau Gwenn authored Mar 1, 2023
1 parent 92818bf commit 80ba6b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cmd/cluster/assign_nal_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ var assignClusterCmd = &cobra.Command{
logrus.Fatalf("Error when calling `ClusterApi.EditClusterNetworkAllowLists`: %s", ybmAuthClient.GetApiErrorDetails(err))
}

msg := fmt.Sprintf("The cluster %s is being assigned the network allow list %s", formatter.Colorize(clusterName, formatter.GREEN_COLOR), formatter.Colorize(newNetworkAllowListName, formatter.GREEN_COLOR))
msg := fmt.Sprintf("The network allow list %s is being assigned to the cluster %s", formatter.Colorize(newNetworkAllowListName, formatter.GREEN_COLOR), formatter.Colorize(clusterName, formatter.GREEN_COLOR))

if viper.GetBool("wait") {
returnStatus, err := authApi.WaitForTaskCompletion(clusterId, "CLUSTER", "EDIT_ALLOW_LIST", []string{"FAILED", "SUCCEEDED"}, msg, 600)
Expand All @@ -75,7 +75,7 @@ var assignClusterCmd = &cobra.Command{
if returnStatus != "SUCCEEDED" {
logrus.Fatalf("Operation failed with error: %s", returnStatus)
}
fmt.Printf("The cluster %s has been assigned the network allow list %s\n", formatter.Colorize(clusterName, formatter.GREEN_COLOR), formatter.Colorize(newNetworkAllowListName, formatter.GREEN_COLOR))
fmt.Printf("The network allow list %s has been assigned to the cluster %s\n", formatter.Colorize(newNetworkAllowListName, formatter.GREEN_COLOR), formatter.Colorize(clusterName, formatter.GREEN_COLOR))

} else {
fmt.Println(msg)
Expand Down
4 changes: 2 additions & 2 deletions cmd/cluster/unassign_nal_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ var unassignClusterCmd = &cobra.Command{
logrus.Fatalf("Error when calling `ClusterApi.EditClusterNetworkAllowLists`: %s", ybmAuthClient.GetApiErrorDetails(err))
}

msg := fmt.Sprintf("The cluster %s is being unassigned the network allow list %s", formatter.Colorize(clusterName, formatter.GREEN_COLOR), formatter.Colorize(newNetworkAllowListName, formatter.GREEN_COLOR))
msg := fmt.Sprintf("The network allow list %s is being unassigned from the cluster %s", formatter.Colorize(newNetworkAllowListName, formatter.GREEN_COLOR), formatter.Colorize(clusterName, formatter.GREEN_COLOR))

if viper.GetBool("wait") {
returnStatus, err := authApi.WaitForTaskCompletion(clusterId, "CLUSTER", "EDIT_ALLOW_LIST", []string{"FAILED", "SUCCEEDED"}, msg, 600)
Expand All @@ -83,7 +83,7 @@ var unassignClusterCmd = &cobra.Command{
if returnStatus != "SUCCEEDED" {
logrus.Fatalf("Operation failed with error: %s", returnStatus)
}
fmt.Printf("The cluster %s has been unassigned the network allow list %s\n", formatter.Colorize(clusterName, formatter.GREEN_COLOR), formatter.Colorize(newNetworkAllowListName, formatter.GREEN_COLOR))
fmt.Printf("The network allow list %s has been unassigned from the cluster %s\n", formatter.Colorize(newNetworkAllowListName, formatter.GREEN_COLOR), formatter.Colorize(clusterName, formatter.GREEN_COLOR))

} else {
fmt.Println(msg)
Expand Down

0 comments on commit 80ba6b6

Please sign in to comment.