Skip to content

Commit

Permalink
fix(connector create): remove namespace flag (#1793)
Browse files Browse the repository at this point in the history
BREAKING: namespace flag has been deprecated
  • Loading branch information
rkpattnaik780 authored Jan 14, 2023
1 parent ddd600f commit 5671df5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 17 deletions.
9 changes: 4 additions & 5 deletions docs/commands/rhoas_connector_update.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 3 additions & 9 deletions pkg/cmd/connector/update/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@ import (
)

type options struct {
namespaceID string
kafkaID string
name string
id string
kafkaID string
name string
id string

outputFormat string
f *factory.Factory
Expand Down Expand Up @@ -68,7 +67,6 @@ func NewUpdateCommand(f *factory.Factory) *cobra.Command {
flags := flagutil.NewFlagSet(cmd, f.Localizer)
flags.StringVar(&opts.id, "id", "", f.Localizer.MustLocalize("connector.flag.id.description"))
flags.StringVar(&opts.name, "name", "", f.Localizer.MustLocalize("connector.flag.name.description"))
flags.StringVar(&opts.namespaceID, "namespace-id", "", f.Localizer.MustLocalize("connector.flag.namespaceID.description"))
flags.StringVar(&opts.kafkaID, "kafka-id", "", f.Localizer.MustLocalize("connector.flag.kafkaID.description"))
flags.AddOutput(&opts.outputFormat)

Expand All @@ -94,10 +92,6 @@ func runUpdate(opts *options) error {
connector.SetName(opts.name)
connectorChanged = true
}
if opts.namespaceID != "" {
connector.SetNamespaceId(opts.namespaceID)
connectorChanged = true
}
if opts.kafkaID != "" {
kafkaInstance, _, kafkaErr := kafkautil.GetKafkaByID(opts.f.Context, conn.API().KafkaMgmt(), opts.kafkaID)
if kafkaErr != nil {
Expand Down
3 changes: 0 additions & 3 deletions pkg/core/localize/locales/en/cmd/connectors.toml
Original file line number Diff line number Diff line change
Expand Up @@ -415,9 +415,6 @@ one = 'The location of the configuration file that defines the Connectors instan
[connector.flag.kafka.description]
one = 'ID of the Kafka instance (the default is the Kafka instance for the current context)'

[connector.flag.namespaceID.description]
one = 'ID of the namespace in which you want to deploy the Connectors instance'

[connector.flag.kafkaID.description]
one = 'ID of of the Kafka instance that you want the Connectors instance to use'

Expand Down

0 comments on commit 5671df5

Please sign in to comment.