Adds odo catalog list services -o json (#2066)

Adds the ability to list catalog services and output to json.

The format is as follows:

```json
{
  "kind": "ServiceList",
  "apiVersion": "odo.openshift.io/v1alpha1",
  "metadata": {
    "creationTimestamp": null
  },
  "items": [
    {
      "name": "cakephp-mysql-persistent",
      "hidden": false,
      "planList": [
        "default"
      ]
    },
  ]
}
```
This commit is contained in:
Charlie Drage
2019-09-09 04:57:03 -04:00
committed by OpenShift Merge Robot
parent bff81fcda4
commit 66662e4e8d
6 changed files with 50 additions and 12 deletions

View File

@@ -107,7 +107,7 @@ func GetMachineReadableFormat(projectName string, isActive bool, apps []string)
// MachineReadableSuccessOutput outputs a success output that includes
// project information and namespace
func MachineReadableSuccessOutput(projectName string, message string) {
machineOutput := machineoutput.Success{
machineOutput := machineoutput.GenericSuccess{
TypeMeta: metav1.TypeMeta{
Kind: "Project",
APIVersion: "odo.openshift.io/v1alpha1",