-
Notifications
You must be signed in to change notification settings - Fork 69
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
refactor: moving list enterprise clusters to util package #1818
refactor: moving list enterprise clusters to util package #1818
Conversation
fb7f2d3
to
c8e5796
Compare
kafkamgmtclient "github.com/redhat-developer/app-services-sdk-core/app-services-sdk-go/kafkamgmt/apiv1/client" | ||
) | ||
|
||
func ListEnterpriseClusters(f *factory.Factory) (*kafkamgmtclient.EnterpriseClusterList, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shared utils
is a place where methods defined are used in different subcommands. For example - kafkautil.InteractiveSelect
is used in kafka
, connectors
and cluster
subcommands.
ListEnterpriseClusters
is used just in dedicated list, will it make sense to move it to pkg/cmd/dedicated/dedicatedcmdutil/dedicated_util.go
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it will also be used in the create kafka
cmd too, so that's the reason I moved it to shared
return nil, err | ||
} | ||
if len(clist.Items) == 0 { | ||
return nil, f.Localizer.MustLocalizeError("dedicated.list.cmd.errorNoRegisteredClusters") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be a normal case we handle instead of returning an error
c8e5796
to
b8e6058
Compare
b8e6058
to
930a1d4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* feat: add machine pool logic * chore(vendor): update vendoring (#1798) * chore(vendor): update vendoring * feat: add cluster id to create kafka * fix(dedicated): attempts to correctly parse the cluster ingress dns name (#1806) This is so that "apps." prefix is always included and required by KFM when it is running under certain configuration Related to bf2fc6cc711aee1a0c2a/kas-installer#266 (comment) * refactor: refactor ocm methods out of register cmd * fix: pass no params during the installation of managed kafka addon (#1815) 👍 * feat: addition of the new list cluster cmd (#1817) * feat: addition of the new list cluster cmd * refactor: now querying ocm for clusters by id, remove flags as kfm doesn't support pagination * test: add some tests and fix ocm call string * feat: now listing customer cloud in rhoas kafka list (#1816) * refactor: dedicated changes now use new SDK * refactor: moving list enterprise clusters to util package (#1818) * feat: added name of cluster to kafka list (#1825) * feat: added name of cluster to kafka list * feat: clustermgmt url and access token flag to kafka list * chore: localized kafka list customer cloud * feat: kafka create with dedicated --------- Co-authored-by: Jack Delahunt <45426048+jackdelahunt@users.noreply.github.com> --------- Co-authored-by: Dimitri Saridakis <dimitri.saridakis@gmail.com> * feat: added de-register command --------- Co-authored-by: Dimitri Saridakis <dimitri.saridakis@gmail.com> Co-authored-by: Ramakrishna Pattnaik <rkpattnaik780@gmail.com> * fix: now checking if reponse is empty in dedicated list * fix: now checking if reponse is empty in deregister * fix: correct output for deregister * feat: add clustermgmt flag to create kafka * chore: format & docs * chore: fix lint errors * refactor: hide flags, improves logic around passing cluster flag in register-cluster (#1836) --------- Co-authored-by: Dimitri Saridakis <dimitri.saridakis@gmail.com> Co-authored-by: Ramakrishna Pattnaik <rkpattnaik780@gmail.com> Co-authored-by: Manyanda Chitimbo <manyanda.chitimbo@gmail.com>
Moving this out for easy resuse
Closes #
Verification Steps
Type of change