Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add run #90

Merged
merged 2 commits into from
Feb 3, 2025
Merged

Add run #90

merged 2 commits into from
Feb 3, 2025

Conversation

strokyl
Copy link
Collaborator

@strokyl strokyl commented Jan 29, 2025

No description provided.

@strokyl
Copy link
Collaborator Author

strokyl commented Jan 29, 2025

See: https://github.com/conduktor/console-plus/pull/2771/files

The idea here is not to definitely expose through this mechanism the tokens endpoints because we already have custom command on the CLI but use them as an example to show how the current change could facilitate development latter.

Here is an example of the interaction with the conductor ctl:

$ conduktor run
execute an action

Usage:
  conduktor run [flags]
  conduktor run [command]

Available Commands:
  createAdminToken               Create an admin token
  createApplicationInstanceToken Create an application instance token
  deleteToken                    Delete a token
  listAdminToken                 List admin token
  listApplicationInstanceToken   List application instance token
  partnerZoneGenerateCredentials generate a token for a partner zone service account

Flags:
  -h, --help   help for execute

Global Flags:
      --permissive   permissive mode, allow undefined environment variables
  -v, --verbose      show more information for debugging

Use "conduktor run [command] --help" for more information about a command.

$ conduktor run partnerZoneGenerateCredentials                                                                                                                                1 ↵
Error: required flag(s) "partner-zone-name" not set
Usage:
  conduktor execute partnerZoneGenerateCredentials [flags]

Aliases:
  partnerZoneGenerateCredentials, partnerzonegeneratecredentials, partnerZoneGenerateCredential, partnerzonegeneratecredential

Flags:
  -h, --help                       help for partnerZoneGenerateCredentials
      --partner-zone-name string   Parent partner-zone-name

Global Flags:
      --permissive   permissive mode, allow undefined environment variables
  -v, --verbose      show more information for debugging

$ conduktor run partnerZoneGenerateCredentials --partner-zone-name "yo"                                                                                                       1 ↵
Error fetching resources: Partner zone not found: yo

$ conduktor execute createAdminToken --name "yo"
{
  "createdAt": "2025-01-29T18:35:21.634275782Z",
  "id": "747f2160-d6e7-4d2a-a840-448319af6fc5",
  "name": "yo",
  "token": "axDo4px/L0E=.9ccVDtrAszVgvHbT1MVV5KpEjDxO6KYvWR+IasyEaEULj0g0OO9RFYidJ/0GhZweilllxo33YxRy9V9oPiuCfW35nU75iEsnk/jn60c638B5neXa2AX5Rw1Gn0vbOWrhO4d8F24zYsE5HPkw9xSxo5tImbHjk08jdtXXqIzBoY/elppihxWiXfMwM5yl711wGg8xay5uzpHy+yUiQ03l+klLHkQheWkqIB47Phn7mHHnpTDXVVsZbFzf5msYnudnuS+bp5BaxSI8fdAgOaIoCF5syLx9URCPijphkMDiNboNEgrwg6fM3JwqA/1slkFwalY5jz8ibYNa9hKTYAHP5Q=="
}

@strokyl strokyl marked this pull request as ready for review January 31, 2025 08:44
@strokyl strokyl changed the title Add execute Add run Jan 31, 2025
cmd/utils.go Outdated Show resolved Hide resolved
schema/openapi_parser.go Show resolved Hide resolved
schema/openapi_parser_console_test.go Show resolved Hide resolved
@strokyl strokyl merged commit d6cf3b3 into main Feb 3, 2025
4 checks passed
@strokyl strokyl deleted the add_execute branch February 3, 2025 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants