Files
odo/docs/dev/machine-output.adoc
Charlie Drage b9bdb6bbbb Add machine output documentation (#2678)
**What type of PR is this?**

> /kind documentation

**What does does this PR do / why we need it**:

Adds a table and references to machine output documentation

**Which issue(s) this PR fixes**:

N/A

**How to test changes / Special notes to the reviewer**:

View the doc

Signed-off-by: Charlie Drage <charlie@charliedrage.com>
2020-03-13 19:47:53 +01:00

397 lines
4.7 KiB
Plaintext

= Machine readable output
This document outlines all the machine readable output options and examples.
See the below table for a list of all possible machine readable output commands:
|===
| Command | Subcommand | Implemented?
| application
| delete
| N
|
| <<application-describe,describe>>
| Y
|
| <<application-list,list>>
| Y
| catalog
| describe
| N
|
| search
| N
|
| <<catalog-list-components,list components>>
| Y
|
| <<catalog-list-services,list services>>
| Y
| component
| <<component-create,create>>
| Y
|
| delete
| N
|
| describe
| N
|
| link
| N
|
| list
| N
|
| log
| N
|
| push
| N
|
| unlink
| N
|
| update
| N
|
| watch
| N
| config
| set
| N
|
| unset
| N
|
| view
| N
| debug
| info
| N
|
| port-forward
| N
| preference
| set
| N
|
| unset
| N
|
| view
| N
| project
| <<project-create,create>>
| Y
|
| <<project-delete,delete>>
| Y
|
| get
| N
|
| <<project-list,list>>
| Y
|
| set
| N
| service
| <<service-create,create>>
| Y
|
| delete
| N
|
| <<service-list,list>>
| Y
| storage
| <<storage-create,create>>
| Y
|
| delete
| N
|
| <<storage-list,list>>
| Y
| url
| create
| N
|
| delete
| N
|
| <<url-list,list>>
| Y
|===
== application describe
[source,json]
----
{
"kind": "Application",
"apiVersion": "odo.openshift.io/v1alpha1",
"metadata": {
"name": "app",
"namespace": "myproject",
"creationTimestamp": null
},
"spec": {},
"status": {
"active": false
}
}
----
== application list
[source,json]
----
{
"kind": "List",
"apiVersion": "odo.openshift.io/v1alpha1",
"metadata": {},
"items": [
{
"kind": "Application",
"apiVersion": "odo.openshift.io/v1alpha1",
"metadata": {
"name": "app",
"namespace": "myproject",
"creationTimestamp": null
},
"spec": {
"components": [
"nodejs-nvnh"
]
},
"status": {
"active": false
}
}
]
}
----
== component describe
[source,json]
----
{
"kind": "Component",
"apiVersion": "odo.openshift.io/v1alpha1",
"metadata": {
"name": "nodejs-nvnh",
"creationTimestamp": null
},
"spec": {
"type": "nodejs",
"source": "file://./",
"url": [
"example",
"json",
"nodejs-nvnh-8080"
],
"storage": [
"mystorage"
]
},
"status": {
"state": "Pushed"
}
}
----
== component list
[source,json]
----
{
"kind": "List",
"apiVersion": "odo.openshift.io/v1alpha1",
"metadata": {},
"items": [
{
"kind": "Component",
"apiVersion": "odo.openshift.io/v1alpha1",
"metadata": {
"name": "nodejs-nvnh",
"creationTimestamp": null
},
"spec": {
"type": "nodejs",
"source": "file://./",
"url": [
"example",
"json",
"nodejs-nvnh-8080"
],
"storage": [
"mystorage"
]
},
"status": {
"state": "Pushed"
}
}
]
}
----
== project list
[source,json]
----
{
"kind": "List",
"apiVersion": "odo.openshift.io/v1alpha1",
"metadata": {},
"items": [
{
"kind": "Project",
"apiVersion": "odo.openshift.io/v1alpha1",
"metadata": {
"name": "myproject",
"creationTimestamp": null
},
"spec": {
"apps": [
"app"
]
},
"status": {
"active": true
}
}
]
}
----
== storage create
[source,json]
----
{
"kind": "storage",
"apiVersion": "odo.openshift.io/v1alpha1",
"metadata": {
"name": "mystorage",
"creationTimestamp": null
},
"spec": {
"size": "1Gi"
"path": "/opt/foobar"
},
}
----
== storage list
[source,json]
----
{
"kind": "List",
"apiVersion": "odo.openshift.io/v1aplha1",
"metadata": {},
"items": [
{
"kind": "Storage",
"apiVersion": "odo.openshift.io/v1alpha1",
"metadata": {
"name": "mystorage",
"creationTimestamp": null
},
"spec": {
"size": "1Gi"
"path": "/opt/foobar"
},
}
]
}
----
== url create
[source,json]
----
{
"kind": "url",
"apiVersion": "odo.openshift.io/v1alpha1",
"metadata": {
"name": "foobar-8080",
"creationTimestamp": null
},
"spec": {
"host": "foobar-8080-odo-cmac-foobar.e8ca.engint.openshiftapps.com",
"protocol": "http",
"port": 8080
}
}
----
== url list
[source,json]
----
{
"kind": "List",
"apiVersion": "odo.openshift.io/v1alpha1",
"metadata": {},
"items": [
{
"kind": "url",
"apiVersion": "odo.openshift.io/v1alpha1",
"metadata": {
"name": "foobar-8080",
"creationTimestamp": null
},
"spec": {
"host": "foobar-8080-odo-cmac-foobar.e8ca.engint.openshiftapps.com",
"protocol": "http",
"port": 8080
}
}
]
}
----