-
Notifications
You must be signed in to change notification settings - Fork 32
Add --kafka-cluster flag to usm connect register + update connect describe output for cloud Kafka
#3449
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
Open
Arman Garg (FlamedHunter)
wants to merge
5
commits into
main
Choose a base branch
from
argarg-usm-cli-changes
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add --kafka-cluster flag to usm connect register + update connect describe output for cloud Kafka
#3449
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
2ce4662
Add `--kafka-cluster flag` to usm connect register + update describe …
FlamedHunter 7d01983
Minor naming fix
FlamedHunter 56c4825
Use `confluent_platform_connect_cluster` for `--kafka-cluster`
FlamedHunter 9000620
Added cloud Kafka test for connect describe path
FlamedHunter 87dde54
Update the original response struct
FlamedHunter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
test/fixtures/input/usm/connect-cluster/read_cloud_connect_cluster.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| { | ||
| "api_version": "usm/v1", | ||
| "cloud": "AWS", | ||
| "confluent_platform_connect_cluster_id": "connect-group-cloud", | ||
| "environment": { | ||
| "environment": "", | ||
| "id": "env-00000", | ||
| "related": "https://api.confluent.cloud/v2/environments/env-00000", | ||
| "resource_name": "https://api.confluent.cloud/organization=9bb441c4-edef-46ac-8a41-c49e44a3fd9a/environment=env-00000" | ||
| }, | ||
| "id": "usmcc-cloud", | ||
| "kafka_cluster_id": "lkc-abc123", | ||
| "kind": "ConnectCluster", | ||
| "region": "us-east-1", | ||
| "usm_kafka_cluster_id": "" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
test/fixtures/output/usm/connect-cluster/create/create-cloud-kafka-json.golden
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "id": "usmcc-f3a90de", | ||
| "confluent_platform_connect_cluster": "test-name", | ||
| "kafka_cluster_id": "lkc-abc123", | ||
| "usm_kafka_cluster_id": "usmkc-00000", | ||
| "environment": "env-596", | ||
| "cloud": "AWS", | ||
| "region": "us-east-1" | ||
| } |
10 changes: 10 additions & 0 deletions
10
test/fixtures/output/usm/connect-cluster/create/create-cloud-kafka.golden
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| +--------------------------------+---------------+ | ||
| | ID | usmcc-f3a90de | | ||
| | Confluent Platform Connect | test-name | | ||
| | Cluster | | | ||
| | Kafka Cluster Id | lkc-abc123 | | ||
| | USM Kafka Cluster Id | usmkc-00000 | | ||
| | Environment | env-596 | | ||
| | Cloud | AWS | | ||
| | Region | us-east-1 | | ||
| +--------------------------------+---------------+ |
26 changes: 26 additions & 0 deletions
26
test/fixtures/output/usm/connect-cluster/create/create-fail-missing-kafka-flag.golden
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| Error: at least one of the flags in the group [confluent-platform-kafka-cluster kafka-cluster] is required | ||
| Usage: | ||
| confluent usm connect-cluster create <confluent-platform-connect-cluster-id> [flags] | ||
|
|
||
| Aliases: | ||
| create, register | ||
|
|
||
| Examples: | ||
| Register a Confluent Platform Connect cluster with the ID connect-group-xyz123. | ||
|
|
||
| $ confluent usm connect-cluster create connect-group-xyz123 --confluent-platform-kafka-cluster 4k0R9d1GTS5tI9f4Y2xZ0Q --cloud aws --region us-east-1 | ||
|
|
||
| Flags: | ||
| --confluent-platform-kafka-cluster string The unique identifier of the metadata Kafka cluster for the Connect Cluster. | ||
| --kafka-cluster string The unique identifier of the metadata Kafka cluster for the Connect Cluster. | ||
| --cloud string Specify the cloud provider as "aws", "azure", or "gcp". | ||
| --region string The home region of the Confluent Platform Connect cluster where the metadata should be stored. This field is optional. If provided, 'cloud' must also be provided. If neither 'cloud' nor 'region' are provided, the home region of the associated metadata Kafka cluster (identified by 'kafka_cluster_id') will be used as a fallback. | ||
| --environment string Environment ID. | ||
| --context string CLI context name. | ||
| -o, --output string Specify the output format as "human", "json", or "yaml". (default "human") | ||
|
|
||
| Global Flags: | ||
| -h, --help Show help for this command. | ||
| --unsafe-trace Equivalent to -vvvv, but also log HTTP requests and responses which might contain plaintext secrets. | ||
| -v, --verbose count Increase verbosity (-v for warn, -vv for info, -vvv for debug, -vvvv for trace). | ||
|
|
26 changes: 26 additions & 0 deletions
26
...tures/output/usm/connect-cluster/create/create-fail-mutually-exclusive-kafka-flags.golden
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| Error: if any flags in the group [confluent-platform-kafka-cluster kafka-cluster] are set none of the others can be; [confluent-platform-kafka-cluster kafka-cluster] were all set | ||
| Usage: | ||
| confluent usm connect-cluster create <confluent-platform-connect-cluster-id> [flags] | ||
|
|
||
| Aliases: | ||
| create, register | ||
|
|
||
| Examples: | ||
| Register a Confluent Platform Connect cluster with the ID connect-group-xyz123. | ||
|
|
||
| $ confluent usm connect-cluster create connect-group-xyz123 --confluent-platform-kafka-cluster 4k0R9d1GTS5tI9f4Y2xZ0Q --cloud aws --region us-east-1 | ||
|
|
||
| Flags: | ||
| --confluent-platform-kafka-cluster string The unique identifier of the metadata Kafka cluster for the Connect Cluster. | ||
| --kafka-cluster string The unique identifier of the metadata Kafka cluster for the Connect Cluster. | ||
| --cloud string Specify the cloud provider as "aws", "azure", or "gcp". | ||
| --region string The home region of the Confluent Platform Connect cluster where the metadata should be stored. This field is optional. If provided, 'cloud' must also be provided. If neither 'cloud' nor 'region' are provided, the home region of the associated metadata Kafka cluster (identified by 'kafka_cluster_id') will be used as a fallback. | ||
| --environment string Environment ID. | ||
| --context string CLI context name. | ||
| -o, --output string Specify the output format as "human", "json", or "yaml". (default "human") | ||
|
|
||
| Global Flags: | ||
| -h, --help Show help for this command. | ||
| --unsafe-trace Equivalent to -vvvv, but also log HTTP requests and responses which might contain plaintext secrets. | ||
| -v, --verbose count Increase verbosity (-v for warn, -vv for info, -vvv for debug, -vvvv for trace). | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
test/fixtures/output/usm/connect-cluster/describe/describe-cloud-json.golden
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "id": "usmcc-cloud", | ||
| "confluent_platform_connect_cluster": "connect-group-cloud", | ||
| "kafka_cluster_id": "lkc-abc123", | ||
| "usm_kafka_cluster_id": "", | ||
| "environment": "env-00000", | ||
| "cloud": "AWS", | ||
| "region": "us-east-1" | ||
| } |
7 changes: 7 additions & 0 deletions
7
test/fixtures/output/usm/connect-cluster/describe/describe-cloud-yaml.golden
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| id: usmcc-cloud | ||
| confluent_platform_connect_cluster: connect-group-cloud | ||
| kafka_cluster_id: lkc-abc123 | ||
| usm_kafka_cluster_id: "" | ||
| environment: env-00000 | ||
| cloud: AWS | ||
| region: us-east-1 |
10 changes: 10 additions & 0 deletions
10
test/fixtures/output/usm/connect-cluster/describe/describe-cloud.golden
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| +--------------------------------+---------------------+ | ||
| | ID | usmcc-cloud | | ||
| | Confluent Platform Connect | connect-group-cloud | | ||
| | Cluster | | | ||
| | Kafka Cluster Id | lkc-abc123 | | ||
| | USM Kafka Cluster Id | | | ||
| | Environment | env-00000 | | ||
| | Cloud | AWS | | ||
| | Region | us-east-1 | | ||
| +--------------------------------+---------------------+ |
4 changes: 2 additions & 2 deletions
4
test/fixtures/output/usm/connect-cluster/describe/describe-json.golden
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,9 @@ | ||
| { | ||
| "id": "usmcc-f3a90de", | ||
| "confluent_platform_connect_cluster": "connect-group-xyz123", | ||
| "confluent_platform_kafka_cluster_id": "4k0R9d1GTS5tI9f4Y2xZ0Q", | ||
| "environment": "env-00000", | ||
| "kafka_cluster_id": "4k0R9d1GTS5tI9f4Y2xZ0Q", | ||
| "usm_kafka_cluster_id": "usmkc-00000", | ||
| "environment": "env-00000", | ||
| "cloud": "AWS", | ||
| "region": "us-east-1" | ||
| } |
4 changes: 2 additions & 2 deletions
4
test/fixtures/output/usm/connect-cluster/describe/describe-yaml.golden
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| id: usmcc-f3a90de | ||
| confluent_platform_connect_cluster: connect-group-xyz123 | ||
| confluent_platform_kafka_cluster_id: 4k0R9d1GTS5tI9f4Y2xZ0Q | ||
| environment: env-00000 | ||
| kafka_cluster_id: 4k0R9d1GTS5tI9f4Y2xZ0Q | ||
| usm_kafka_cluster_id: usmkc-00000 | ||
| environment: env-00000 | ||
| cloud: AWS | ||
| region: us-east-1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
test/fixtures/output/usm/connect-cluster/list/list-yaml.golden
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| - id: usmcc-f3a90de | ||
| confluent_platform_connect_cluster: connect-group-xyz123 | ||
| confluent_platform_kafka_cluster_id: 4k0R9d1GTS5tI9f4Y2xZ0Q | ||
| environment: env-00000 | ||
| kafka_cluster_id: 4k0R9d1GTS5tI9f4Y2xZ0Q | ||
| usm_kafka_cluster_id: usmkc-00000 | ||
| environment: env-00000 | ||
| cloud: AWS | ||
| region: us-east-1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| ID | Confluent Platform Connect | Confluent Platform Kafka | Environment | USM Kafka Cluster Id | Cloud | Region | ||
| | Cluster | Cluster Id | | | | | ||
| ----------------+--------------------------------+--------------------------------+-------------+----------------------+-------+------------ | ||
| usmcc-f3a90de | connect-group-xyz123 | 4k0R9d1GTS5tI9f4Y2xZ0Q | env-00000 | usmkc-00000 | AWS | us-east-1 | ||
| ID | Confluent Platform Connect | Kafka Cluster Id | USM Kafka Cluster Id | Environment | Cloud | Region | ||
| | Cluster | | | | | | ||
| ----------------+--------------------------------+------------------------+----------------------+-------------+-------+------------ | ||
| usmcc-f3a90de | connect-group-xyz123 | 4k0R9d1GTS5tI9f4Y2xZ0Q | usmkc-00000 | env-00000 | AWS | us-east-1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.