Skip to content

Commit

Permalink
Added a new flag
Browse files Browse the repository at this point in the history
Signed-off-by: Tejaswi Bondila <[email protected]>
  • Loading branch information
bvtejaswi committed Oct 23, 2023
1 parent 494a2e4 commit b343a44
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions components/automate-cli/cmd/chef-automate/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ type StatusCmdFlags struct {
postgresql bool
opensearch bool
node string
acceptHabLicense bool
}
type StatusCmdResult struct {
cmdResult map[string][]*CmdResult
Expand Down Expand Up @@ -63,10 +64,11 @@ type FeStatus []FeStatusValue
type BeStatus []BeStatusValue

const (
STATUS_ERROR_ON_SELF_MANAGED = "Showing the status for externally configured %s is not supported."
CMD_FAIL_MSG = "Command failed on %s node : %s with error:\n %s\n"
BACKEND_STATUS_CMD = "sudo HAB_LICENSE=accept-no-persist hab svc status"
FRONTEND_STATUS_CMD = "sudo chef-automate status"
STATUS_ERROR_ON_SELF_MANAGED = "Showing the status for externally configured %s is not supported."
CMD_FAIL_MSG = "Command failed on %s node : %s with error:\n %s\n"
BACKEND_STATUS_CMD = "sudo HAB_LICENSE=accept-no-persist hab svc status"
ACCEPTED_LICENENSE_BACKEND_STATUS_CMD = "sudo echo yes | hab svc status"
FRONTEND_STATUS_CMD = "sudo chef-automate status"
)

func newStatusCmd() *cobra.Command {
Expand Down Expand Up @@ -116,6 +118,7 @@ func newStatusCmd() *cobra.Command {
statusCmd.Flags().SetAnnotation("os", docs.Compatibility, []string{docs.CompatiblewithHA})
statusCmd.Flags().StringVar(&statusCmdFlag.node, "node", "", "Pass this flag to check status of perticular node in the cluster")
statusCmd.Flags().SetAnnotation("node", docs.Compatibility, []string{docs.CompatiblewithHA})
statusCmd.Flags().StringVar(&statusCmdFlag.node, "--accept-hab-license", "", "Pass this flag to accept hab license for PostgresQL/OpenSearch nodes")

statusCmd.AddCommand(newStatusSummaryCmd())
return statusCmd
Expand Down

0 comments on commit b343a44

Please sign in to comment.