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

Addition of PORT(s) in the output for application list command | Feature Request #9

Open
shubhamwaghe opened this issue Sep 18, 2024 · 1 comment

Comments

@shubhamwaghe
Copy link

shubhamwaghe commented Sep 18, 2024

On running the following command for listing appinstances, various ports (especially HTTP/DEBUG/OTHER) also would be a good addition to the output

drove -c stage appinstances list my-application-01

Example Output (PORT(s) column requirement) -

Instance ID    Executor Host            State       Error Message  Created                Last Updated
------------  ------------------------  ----------  -------------  ---------------------  --------------------
AI-INSTANCE   stg-instance.website.com  HEALTHY                    18/09/2024, 11:00:00   18/09/2024, 18:00:00

Proposal:

  1. Addition of Ports column
  2. Addition of comma separated name, port as values Eg =
    admin: 23959,http: 27271

Implementation:

In list_instances -

Addition of "Ports" in headers list & following snippet -

try:
    instance_row.append(", ".join("{}: {}".format(key, value['hostPort']) for key, value in instance["localInfo"]["ports"].items()))
except KeyError:
    instance_row.append("")

Sample ports raw output -

"ports": {
    "admin": {
        "containerPort": 10001,
        "hostPort": 23959,
        "portType": "HTTP"
    },
    "http": {
        "containerPort": 10000,
        "hostPort": 27271,
        "portType": "HTTP"
    }
}
@santanusinha
Copy link
Contributor

santanusinha commented Nov 25, 2024

Sorry missed this. Can be done, need to figure out a way to show this in a consistent manner. It would be an issue since the ports list can change in length. Will address in next release.

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

No branches or pull requests

2 participants