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
Review JSON output for all odo commands #1739
Comments
/priority high |
if we want single project json, we can use |
Tracking
|
Charlie's listOther stuff being done:
Functions to go overCrossed out = it's done / PR merged in
Other todo:
|
odo will need command to display this information. The extensions should never read the localconfig files directly. |
|
Hey @dgolovin I'm going over I was thinking of this in terms of implementation, or of course something similar, this is a super rough draft... "kind": "Success",
"apiVersion": "odo.openshift.io/v1alpha1",
"metadata": {
"namespace": "myproject",
},
"message": "Deleted foobar"
"project": foobar,
} Or is there something specific we should implement in a certain way? |
Update: So currently I have to implement a few changes in order to correctly add creation / deletion json output for
|
/label points/13 /unassign @cdrage |
@kadel: The label(s) In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
/lifecycle frozen |
This issues is not valid anymore. With coming v3 the json output will have to be reworked in a completely different way. |
2 similar comments
This issues is not valid anymore. With coming v3 the json output will have to be reworked in a completely different way. |
This issues is not valid anymore. With coming v3 the json output will have to be reworked in a completely different way. |
One more acceptance criteria would be to
JSON Output for devfile needs to have long term design as we cannot break it after v2
review existing commands as mentioned below
List of all commands that vscode adapter uses - https://github.com/redhat-developer/vscode-openshift-tools/blob/8b9baa56a77d02a54a37fd4532a3d1948ed53a01/src/odo.ts#L36
listProjects
vscode plugin executes:
oc get project -o jsonpath="{range .items[?(.status.phase == \\"Active\\" )]}{.metadata.name}{\\"\\n\\"}{end}"'
odo project list -o json
Note: (we don't need/have --project flag for odo project list )
Question: do we need this flag to retrieve specific project (equivalent can be
odo project get
)TODO:
removestatus.active
fieldlistApplications
vscode plugin executes:
odo application list --project ${project} -o json
TODO:
status.active
fielddeleteProject
vscode plugin executes:
odo project delete ${name} -f
odo project delete ${name} -f -o json
On success:
On failure:
TODO:
-o json
waitForProjectToBeGone
vscode plugin executes:
oc wait project/${project} --for delete
This command should not be needed, as
odo project delete
should wait for the project to be deleted.TODO:
--wait
flagcreateProject
vscode plugin executes:
odo project create ${name}
odo project create ${name} -o json
if error, return error exit code (>0) and stderr :
TODO:
-o json
listComponents
odo list --app ${app} --project ${project} -o json
STATUS: we already have this
listCatalogComponents
odo catalog list components
STATUS: we already have this & we don't need json for this
listCatalogServices
odo catalog list services
STATUS: we already have this & we don't need json for this
listStorageNames
odo storage list --app ${app} --project ${project} --component ${component} -o json
listServiceInstances:
oc get ServiceInstance -o jsonpath="{range .items[?(.metadata.labels.app == \\"${app}\\")]}{.metadata.labels.app\\.kubernetes\\.io/component-name}{\\"\\n\\"}{end}" --namespace ${project}
createApplication
odo app create ${app} --project ${project}
describeApplication
odo app describe ${app} --project ${project}
STATUS: we already have this command and json output
deleteApplication
odo app delete ${app} --project ${project} -f
,createStorage
odo storage create ${storageName} --path=${mountPath} --size=${storageSize} --project ${project} --app ${app} --component ${component}
deleteStorage
odo storage delete ${storage} -f --project ${project} --app ${app} --component ${component}
waitForStorageToBeGone
oc wait pvc/${storage}-${app}-pvc --for=delete --namespace ${project}
deleteComponent
odo delete ${component} -f --app ${app} --project ${project}
describeComponent
odo describe ${component} --app ${app} --project ${project}
STATUS: we already have this command & json output
describeService
odo catalog describe service ${service}
STATUS: we already have this command & we don't need json output for this
showLog
odo log ${component} --app ${app} --project ${project}
STATUS: we already have this command & we don't need json output for this
showLogAndFollow
odo log ${component} -f --app ${app} --project ${project}
STATUS: we already have this command & we don't need json output for this
listComponentPorts
oc get service ${component}-${app} --namespace ${project} -o jsonpath="{range .spec.ports[*]}{.port}{','}{end}"
STATUS: I think #1828 will solve this problem partially. as after this PR,
odo create
will get all the ports and put it in localconfig files, from their, vscode extensions can grab.linkComponentTo
odo project set ${project} && odo application set ${app} && odo component set ${component} && odo link ${componentToLink} --wait${port ? ' --port ' + port : ''}
pushComponent
odo push ${component} --app ${app} --project ${project}
ALERT:
--app
and--project
flag toodo push
instead we have--context
flagpushLocalComponent
${Command.pushComponent(project, app, component)} --local ${location}
watchComponent
odo watch ${component} --app ${app} --project ${project}
STATUS: we already have this & we don't need json output for this
getRouteHostName
oc get route --namespace ${namespace} -o jsonpath="{range .items[?(.metadata.labels.app\\.kubernetes\\.io/component-name=='${component}')]}{.spec.host}{end}"
TODO:
equivalent command should be
odo url list --component nodejs-zeaa --project myproject -q
-q
flag which will return urlcreateLocalComponent
odo create ${type}:${version} ${name} --local ${folder} --app ${app} --project ${project}
createGitComponent
odo create ${type}:${version} ${name} --git ${git} --ref ${ref} --app ${app} --project ${project}
createBinaryComponent
odo create ${type}:${version} ${name} --binary ${binary} --app ${app} --project ${project}
createService
odo service create ${template} --plan ${plan} ${name} --app ${app} --project ${project} -w
deleteService
odo service delete ${name} -f --project ${project} --app ${app}
getServiceTemplate
oc get ServiceInstance ${service} --namespace ${project} -o jsonpath="{$.metadata.labels.app\\.kubernetes\\.io/component-type}"
waitForServiceToBeGone
oc wait ServiceInstance/${service} --for delete --namespace ${project}
createComponentCustomUrl
odo url create ${name} --port ${port} --project ${project} --app ${app} --component ${component}
STATUS:
odo url create
just modifies local config, so I think we don't need json outputgetComponentUrl
odo url list --component ${component} --app ${app} --project ${project} -o json
STATUS: we already have this
getComponentJson
oc get service ${component}-${app} --namespace ${project} -o json
QUERY: why we need output of service ?
The text was updated successfully, but these errors were encountered: