Skip to content

Commit

Permalink
Merge pull request #146 from singularityhub/add/instance-list-ip
Browse files Browse the repository at this point in the history
adding support for instance list to include ip
  • Loading branch information
vsoch committed Jan 29, 2020
2 parents 1ae3e85 + 48ad349 commit a2bc383
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -17,6 +17,7 @@ The client here will eventually be released as "spython" (and eventually to
singularity on pypi), and the versions here will coincide with these releases.

## [master](https://github.com/singularityhub/singularity-cli/tree/master)
- instance list includes ip address (0.0.76)
- export lines aren't ignored from environment, but replaced (0.0.75)
- instance logging functions for Singularity 3.5 and up (0.0.74)
- add sudo_options option to spython.main.Client.build (0.0.73)
Expand Down
10 changes: 7 additions & 3 deletions spython/main/instances.py
Expand Up @@ -57,9 +57,13 @@ def list_instances(self, name=None, return_json=False, quiet=False, sudo=False):
print("".join(output["message"]))

# Prepare json result from table

header = ["daemon_name", "pid", "container_image"]
instances = parse_table(output["message"][0], header)
# Singularity after 3.5.2 has an added ipaddress
try:
header = ["daemon_name", "pid", "container_image"]
instances = parse_table(output["message"][0], header)
except:
header = ["daemon_name", "pid", "ip", "container_image"]
instances = parse_table(output["message"][0], header)

# Does the user want instance objects instead?
listing = []
Expand Down
2 changes: 1 addition & 1 deletion spython/version.py
Expand Up @@ -5,7 +5,7 @@
# with this file, You can obtain one at http://mozilla.org/MPL/2.0/.


__version__ = "0.0.75"
__version__ = "0.0.76"
AUTHOR = "Vanessa Sochat"
AUTHOR_EMAIL = "vsochat@stanford.edu"
NAME = "spython"
Expand Down

0 comments on commit a2bc383

Please sign in to comment.