Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add json format option to
get podcommandAlways produces a list output, even if a specific pod ID is provided. Stays semantically aligned with the text table view which also shows collection outputs regardless of matched pod(s).
Addresses #148 (comment) but not the entire issue #148 which seems to ask for json output for all commands.
How I tested it
Example output
output:
[ { "Id": "wwp6rwl5wucng8", "ContainerDiskInGb": 20, "CostPerHr": 0.24, "DesiredStatus": "RUNNING", "DataCenterId": "", "DockerArgs": "", "Env": [ "PUBLIC_KEY=ssh..." ], "GpuCount": 1, "ImageName": "runpod/pytorch:2.4.0-py3.11-cuda12.4.1-devel-ubuntu22.04", "MemoryInGb": 31, "Name": "young_purple_kangaroo", "PodType": "RESERVED", "Ports": "8888/http,22/tcp", "VcpuCount": 6, "VolumeInGb": 20, "VolumeMountPath": "/workspace", "Machine": { "GpuDisplayName": "RTX 2000 Ada", "Location": "RO" }, "Runtime": { "Ports": [ { "Ip": "100.65.24.183", "IsIpPublic": false, "PrivatePort": 19123, "PublicPort": 60755, "PortType": "http" }, { "Ip": "213.173.102.150", "IsIpPublic": true, "PrivatePort": 22, "PublicPort": 31696, "PortType": "tcp" }, { "Ip": "100.65.24.183", "IsIpPublic": false, "PrivatePort": 8888, "PublicPort": 60754, "PortType": "http" } ] } } ]