Skip to content

Commit b8c9a7e

Browse files
Merge pull request #53 from CheckmarxDev/feature/default_config
Removed AST description references
2 parents f04fd04 + 33f5de2 commit b8c9a7e

File tree

11 files changed

+32
-33
lines changed

11 files changed

+32
-33
lines changed

internal/commands/app.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,25 @@ import (
1010

1111
const (
1212
deployScriptPath = "./installation-scripts/ast-install.sh"
13-
failedDeployingApp = "Failed deploying AST app"
14-
failedShowingApp = "Failed showing AST app"
13+
failedDeployingApp = "Failed deploying app"
14+
failedShowingApp = "Failed showing app"
1515
)
1616

1717
func NewAppCommand() *cobra.Command {
1818
appCmd := &cobra.Command{
1919
Use: "app",
20-
Short: "Manage AST resources",
20+
Short: "Manage resources",
2121
}
2222

2323
deployAppCmd := &cobra.Command{
2424
Use: "deploy",
25-
Short: "Deploy AST into existing cluster",
25+
Short: "Deploy into existing cluster",
2626
RunE: runDeployAppCommand(),
2727
}
2828

2929
showAppCmd := &cobra.Command{
3030
Use: "show",
31-
Short: "Show AST resources condition",
31+
Short: "Show resources state",
3232
RunE: runShowAppCommand(),
3333
}
3434
appCmd.AddCommand(deployAppCmd, showAppCmd)

internal/commands/cluster.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const (
2020
func NewClusterCommand() *cobra.Command {
2121
clusterCmd := &cobra.Command{
2222
Use: "cluster",
23-
Short: "Manage AST cluster",
23+
Short: "Manage cluster",
2424
}
2525

2626
installClusterCmd := &cobra.Command{
@@ -35,7 +35,7 @@ func NewClusterCommand() *cobra.Command {
3535

3636
showClusterCmd := &cobra.Command{
3737
Use: "show",
38-
Short: "Show AST resources",
38+
Short: "Show resources",
3939
RunE: runShowClusterCommand(),
4040
}
4141
clusterCmd.AddCommand(installClusterCmd, showClusterCmd)

internal/commands/default_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ log:
1313
database:
1414
host:
1515
port:
16-
instance: instance
16+
instance: instance_from_default
1717
username:
1818
password:
1919
network:

internal/commands/health.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
func NewHealthCheckCommand(healthCheckWrapper wrappers.HealthCheckWrapper) *cobra.Command {
1313
return &cobra.Command{
1414
Use: "health-check",
15-
Short: "Run AST health check",
15+
Short: "Run health check",
1616
RunE: runAllHealthChecks(healthCheckWrapper),
1717
}
1818
}

internal/commands/project.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ var (
3636
func NewProjectCommand(projectsWrapper wrappers.ProjectsWrapper) *cobra.Command {
3737
projCmd := &cobra.Command{
3838
Use: "project",
39-
Short: "Manage AST projects",
39+
Short: "Manage projects",
4040
}
4141

4242
createProjCmd := &cobra.Command{

internal/commands/result.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ var (
3434
func NewResultCommand(resultsWrapper wrappers.ResultsWrapper) *cobra.Command {
3535
resultCmd := &cobra.Command{
3636
Use: "result",
37-
Short: "Retrieve AST results",
37+
Short: "Retrieve results",
3838
}
3939

4040
listResultsCmd := &cobra.Command{

internal/commands/rm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func NewSastResourcesCommand(rmWrapper wrappers.SastRmWrapper) *cobra.Command {
3838
sastrmCmd := &cobra.Command{
3939
Use: "sast-resources",
4040
Aliases: []string{"sr"},
41-
Short: "AST sast queue status (short form: 'sr')",
41+
Short: "SAST queue status (short form: 'sr')",
4242
}
4343
sastrmCmd.AddCommand(scansCmd, enginesCmd, statsCmd)
4444
return sastrmCmd

internal/commands/root.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ const (
3030
scanTagsFlag = "tag"
3131
scanTagsFlagSh = "t"
3232
accessKeyIDFlag = "key"
33-
accessKeyIDFlagUsage = "The access key ID for AST"
33+
accessKeyIDFlagUsage = "The access key ID"
3434
accessKeySecretFlag = "secret"
35-
accessKeySecretFlagUsage = "The access key secret for AST"
35+
accessKeySecretFlagUsage = "The access key secret"
3636
astAuthenticationURIFlag = "auth-uri"
37-
astAuthenticationURIFlagUsage = "The authentication URI for AST"
37+
astAuthenticationURIFlagUsage = "The authentication URI"
3838
insecureFlag = "insecure"
3939
insecureFlagUsage = "Ignore TLS certificate validations"
4040
formatFlag = "format"
@@ -57,8 +57,7 @@ func NewAstCLI(
5757
defaultConfigFileLocation string,
5858
) *cobra.Command {
5959
rootCmd := &cobra.Command{
60-
Use: "ast",
61-
Short: "A CLI wrapping Checkmarx AST APIs",
60+
Use: "ast",
6261
}
6362

6463
rootCmd.PersistentFlags().BoolP(verboseFlag, verboseFlagSh, false, verboseUsage)

internal/commands/scan.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ var (
4343
func NewScanCommand(scansWrapper wrappers.ScansWrapper, uploadsWrapper wrappers.UploadsWrapper) *cobra.Command {
4444
scanCmd := &cobra.Command{
4545
Use: "scan",
46-
Short: "Manage AST scans",
46+
Short: "Manage scans",
4747
}
4848

4949
createScanCmd := &cobra.Command{

internal/commands/single_node.go

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const (
2626
)
2727

2828
var (
29-
astRoleFlagUsage = fmt.Sprintf("The AST runtime role. Available roles are: %s",
29+
astRoleFlagUsage = fmt.Sprintf("The runtime role. Available roles are: %s",
3030
strings.Join([]string{
3131
commonParams.ScaAgent,
3232
commonParams.SastALlInOne,
@@ -37,30 +37,30 @@ var (
3737
func NewSingleNodeCommand(healthCheckWrapper wrappers.HealthCheckWrapper, defaultConfigFileLocation string) *cobra.Command {
3838
singleNodeCmd := &cobra.Command{
3939
Use: "single-node",
40-
Short: "Single Node AST",
40+
Short: "Single Node",
4141
}
4242

4343
upSingleNodeCmd := &cobra.Command{
4444
Use: "up",
45-
Short: "Start AST",
45+
Short: "Start the system",
4646
RunE: runUpSingleNodeCommand(defaultConfigFileLocation),
4747
}
4848
downSingleNodeCmd := &cobra.Command{
4949
Use: "down",
50-
Short: "Stop AST",
50+
Short: "Stop the system",
5151
RunE: runDownSingleNodeCommand(),
5252
}
5353

5454
updateSingleNodeCmd := &cobra.Command{
5555
Use: "update",
56-
Short: "Update AST",
56+
Short: "Update the system",
5757
RunE: runUpdateSingleNodeCommand(defaultConfigFileLocation),
5858
}
5959

6060
healthSingleNodeCmd := NewHealthCheckCommand(healthCheckWrapper)
6161

62-
installationConfigFileUsage := "Configuration file path for AST (optional)"
63-
installationFolderUsage := "AST installation folder path"
62+
installationConfigFileUsage := "Configuration file path (optional)"
63+
installationFolderUsage := "Installation folder path"
6464
installationFolderDefault := "./"
6565

6666
upSingleNodeCmd.PersistentFlags().String(configFileFlag, "", installationConfigFileUsage)
@@ -84,27 +84,27 @@ func NewSingleNodeCommand(healthCheckWrapper wrappers.HealthCheckWrapper, defaul
8484

8585
func runUpSingleNodeCommand(defaultConfigFileLocation string) func(cmd *cobra.Command, args []string) error {
8686
return func(cmd *cobra.Command, args []string) error {
87-
writeToStandardOutput("Trying to start AST...")
87+
writeToStandardOutput("Trying to start...")
8888
err := runUpScript(cmd, defaultConfigFileLocation)
8989
if err != nil {
90-
msg := "Failed to start AST"
90+
msg := "Failed to start"
9191
return errors.Wrapf(err, msg)
9292
}
93-
writeToStandardOutput("AST is up!")
93+
writeToStandardOutput("System is up!")
9494
return nil
9595
}
9696
}
9797

9898
func runDownSingleNodeCommand() func(cmd *cobra.Command, args []string) error {
9999
return func(cmd *cobra.Command, args []string) error {
100-
writeToStandardOutput("Trying to stop AST...")
100+
writeToStandardOutput("Trying to stop...")
101101
err := runDownScript(cmd)
102102

103103
if err != nil {
104-
msg := "Failed to stop AST"
104+
msg := "Failed to stop"
105105
return errors.Wrapf(err, msg)
106106
}
107-
writeToStandardOutput("AST is down!")
107+
writeToStandardOutput("System is down!")
108108
return nil
109109
}
110110
}
@@ -119,7 +119,7 @@ func runUpdateSingleNodeCommand(defaultConfigFileLocation string) func(cmd *cobr
119119
if err != nil {
120120
return err
121121
}
122-
writeToStandardOutput("AST updated successfully!")
122+
writeToStandardOutput("System updated successfully!")
123123
return nil
124124
}
125125
}

0 commit comments

Comments
 (0)