odo icon indicating copy to clipboard operation
odo copied to clipboard

`odo list services` - list bindable services

Open kadel opened this issue 3 years ago • 0 comments

/kind user-story

User Story

As an odo user (developer working on IDE plugin based on odo) I want to be able to list all bindable services So that I can run odo add binding command non-interactively

Acceptance Criteria

  • [ ] odo list services should list all bindable services in the current namespace
  • [ ] odo list services --namespace <foo> should list all bindable services in the <foo> namespace
  • [ ] odo list services --all-namespaces should list all bindable services in all the namespace that user has access to.
  • [ ] odo list services -o json should print the output in the json format, applies when any of the flag is used as well.
$ odo list services

 ✓  Listing bindable services from namespace 'asdf' [5s]
 NAME                                                        NAMESPACE
 hippo/PerconaXtraDBCluster.pxc.percona.com                  asdf
 cluster1/PostgresCluster.postgres-operator.crunchydata.com  asdf

$ odo list services -o json

{
  bindableServices: [
    name: hippo/PerconaXtraDBCluster.pxc.percona.com,
    namespace: asdf
  ],
  [
    cluster1: hippo/PostgresCluster.postgres-operator.crunchydata.com,
    namespace: asdf
  ]
}
$ odo list services --all-namespaces

 ✓  Listing bindable services from namespace 'asdf' [5s]
 NAME                                                        NAMESPACE
 hippo/PerconaXtraDBCluster.pxc.percona.com                  asdf
 cluster1/PostgresCluster.postgres-operator.crunchydata.com  asdf
 cluster2/PostgresCluster.postgres-operator.crunchydata.com  ffff


$ odo list services -o json

{
  bindableServices: [
    name: hippo/PerconaXtraDBCluster.pxc.percona.com,
    namespace: asdf
  ],
  [
    cluster1: hippo/PostgresCluster.postgres-operator.crunchydata.com,
    namespace: asdf
  ],
  [
    cluster2: cluster2/PostgresCluster.postgres-operator.crunchydata.com,
    namespace: ffff
  ]
}

Links

  • Related Epic (mandatory): #5994

/kind user-story

kadel avatar Aug 01 '22 13:08 kadel