|
39 | 39 | import com.dtsx.astra.cli.db.exception.KeyspaceAlreadyExistException; |
40 | 40 | import com.dtsx.astra.cli.db.keyspace.DbCreateKeyspaceCmd; |
41 | 41 | import com.dtsx.astra.cli.db.keyspace.DbListKeyspacesCmd; |
42 | | -import com.dtsx.astra.cli.iam.*; |
43 | | -import com.dtsx.astra.cli.iam.exception.RoleNotFoundException; |
44 | | -import com.dtsx.astra.cli.iam.exception.UserAlreadyExistException; |
45 | | -import com.dtsx.astra.cli.iam.exception.UserNotFoundException; |
| 42 | +import com.dtsx.astra.cli.db.region.*; |
| 43 | +import com.dtsx.astra.cli.db.tool.DbGraphqlPlaygroundCmd; |
| 44 | +import com.dtsx.astra.cli.db.tool.DbSwaggerUICmd; |
| 45 | +import com.dtsx.astra.cli.iam.role.exception.RoleNotFoundException; |
| 46 | +import com.dtsx.astra.cli.iam.user.exception.UserAlreadyExistException; |
| 47 | +import com.dtsx.astra.cli.iam.user.exception.UserNotFoundException; |
| 48 | +import com.dtsx.astra.cli.iam.role.RoleGetCmd; |
| 49 | +import com.dtsx.astra.cli.iam.role.RoleListCmd; |
| 50 | +import com.dtsx.astra.cli.iam.token.TokenCreateCmd; |
| 51 | +import com.dtsx.astra.cli.iam.token.TokenDeleteCmd; |
| 52 | +import com.dtsx.astra.cli.iam.token.TokenListCmd; |
| 53 | +import com.dtsx.astra.cli.iam.user.UserDeleteCmd; |
| 54 | +import com.dtsx.astra.cli.iam.user.UserGetCmd; |
| 55 | +import com.dtsx.astra.cli.iam.user.UserInviteCmd; |
| 56 | +import com.dtsx.astra.cli.iam.user.UserListCmd; |
46 | 57 | import com.dtsx.astra.cli.org.*; |
47 | 58 | import com.dtsx.astra.cli.streaming.*; |
48 | 59 | import com.dtsx.astra.cli.streaming.cdc.StreamingCreateCdcCmd; |
|
103 | 114 | DbListCmd.class, DbGetCmd.class, DbStatusCmd.class, |
104 | 115 | // Operation |
105 | 116 | DbResumeCmd.class, DbDownloadScbCmd.class, DbCreateDotEnvCmd.class, |
106 | | - // Keyspaces |
107 | | - DbCreateKeyspaceCmd.class, DbListKeyspacesCmd.class, |
108 | 117 | // DsBulk |
109 | 118 | DbCountCmd.class, DbLoadCmd.class, DbUnLoadCmd.class, |
110 | 119 | // Cqlshell |
111 | 120 | DbCqlShellCmd.class, |
112 | | - // List Regions |
113 | | - DbListRegionsClassicCmd.class, DbListRegionsServerlessCmd.class |
| 121 | + // Work with Keyspaces |
| 122 | + DbCreateKeyspaceCmd.class, DbListKeyspacesCmd.class, |
| 123 | + // Work with Regions |
| 124 | + DbCreateRegionCmd.class, DbListRegionsCmd.class, DbDeleteRegionCmd.class, |
| 125 | + // List Region |
| 126 | + DbListRegionsClassicCmd.class, DbListRegionsServerlessCmd.class, |
| 127 | + // External Tools |
| 128 | + DbSwaggerUICmd.class, DbGraphqlPlaygroundCmd.class |
114 | 129 | }), |
115 | 130 |
|
116 | 131 | @Group( |
|
124 | 139 | StreamingListCmd.class, StreamingGetCmd.class, |
125 | 140 | StreamingExistCmd.class, StreamingStatusCmd.class, |
126 | 141 | StreamingPulsarTokenCmd.class, StreamingCreateDotEnvCmd.class, |
| 142 | + // list Regions |
127 | 143 | StreamingListRegionsCmd.class, |
128 | 144 | // Pulsar Shell |
129 | 145 | PulsarShellCmd.class, |
130 | | - // Create CDC |
| 146 | + // Change Data Capture |
131 | 147 | StreamingCreateCdcCmd.class, StreamingDeleteCdcCmd.class, StreamingGetCdcCmd.class |
132 | 148 | }), |
133 | 149 |
|
|
147 | 163 | UserGetCmd.class, UserInviteCmd.class, UserDeleteCmd.class, |
148 | 164 | UserListCmd.class |
149 | 165 | }), |
| 166 | + |
| 167 | + @Group( |
| 168 | + name= "token", |
| 169 | + description = "Manage tokens", |
| 170 | + defaultCommand = TokenListCmd.class, |
| 171 | + commands = { |
| 172 | + TokenListCmd.class, TokenCreateCmd.class, TokenDeleteCmd.class |
| 173 | + }) |
150 | 174 | }) |
151 | 175 | public class AstraCli { |
152 | 176 |
|
@@ -239,6 +263,7 @@ public static ExitCode run(Class<?> clazz, String[] args) { |
239 | 263 | AstraCliConsole.outputError(ExitCode.UNAVAILABLE, ex.getMessage()); |
240 | 264 | return ExitCode.UNAVAILABLE; |
241 | 265 | } catch (Exception ex) { |
| 266 | + ex.printStackTrace(); |
242 | 267 | AstraCliConsole.outputError(ExitCode.INTERNAL_ERROR, ex.getMessage()); |
243 | 268 | return ExitCode.INTERNAL_ERROR; |
244 | 269 | } |
|
0 commit comments