Skip to content
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

implement list commands #122

Merged
merged 2 commits into from
Apr 25, 2022
Merged

implement list commands #122

merged 2 commits into from
Apr 25, 2022

Conversation

bacongobbler
Copy link
Contributor

@bacongobbler bacongobbler commented Apr 7, 2022

relies on #121

This is a rough implementation of hippo app list, hippo channel list, hippo env list, etc. It lists ALL objects of each resource. Eventually this will only be an endpoint available to administrators once deislabs/hippo#575 is implemented, but until then it's a handy introspection tool for developers/administrators.

note that several commands do not work due to fermyon/hippo-openapi#6. Once that's fixed, commands like hippo channel list and hippo app list should work.

@bacongobbler bacongobbler linked an issue Apr 11, 2022 that may be closed by this pull request
@bacongobbler bacongobbler changed the title implement list commands WIP: implement list commands Apr 13, 2022
@bacongobbler
Copy link
Contributor Author

issues should be resolved once #122 is merged

Signed-off-by: Matthew Fisher <matt.fisher@fermyon.com>
Signed-off-by: Matthew Fisher <matt.fisher@fermyon.com>
@bacongobbler bacongobbler changed the title WIP: implement list commands implement list commands Apr 25, 2022
@bacongobbler
Copy link
Contributor Author

bacongobbler commented Apr 25, 2022

output:

><> ./target/debug/hippo app list
[
  {
    "id": "57a4eaba-2b4b-41b6-b0ca-772c108e4868",
    "name": "carstar",
    "storageId": "carstar",
    "channels": [
      {
        "id": "c8f94b04-0ecb-4d3a-a583-79ddde9e051f",
        "appId": "57a4eaba-2b4b-41b6-b0ca-772c108e4868",
        "name": "latest",
        "domain": "latest.carstar.hippo.localdomain",
        "revisionSelectionStrategy": "UseRangeRule",
        "rangeRule": "*",
        "environmentVariables": [
          {
            "id": "7b57c6c8-66fb-46b0-98d6-c1573778844f",
            "channelId": "c8f94b04-0ecb-4d3a-a583-79ddde9e051f",
            "key": "FOO",
            "value": "bar"
          }
        ]
      }
    ],
    "revisions": []
  },
  {
    "id": "5971e71d-dea2-45a2-b23d-0937b3031b6d",
    "name": "docs",
    "storageId": "spin-docs",
    ...

This now allows someone to pipe this to jq:

><> ./target/debug/hippo app list | jq '.[0].id'
"57a4eaba-2b4b-41b6-b0ca-772c108e4868"

@bacongobbler bacongobbler merged commit 6c65c4a into deislabs:main Apr 25, 2022
@bacongobbler bacongobbler deleted the list branch April 25, 2022 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

hippo app list
1 participant