Skip to content

Getting an instance object using client.instances('instance_name') returns list of all instances #83

@adl2db

Description

@adl2db

Expected Behavior

using client.instances('name_of_instance') should return an Instance object

Following Sample from Documentation

Actual Behavior

using client.instances('name_of_instance') should returns list of instances

Steps to Reproduce

>>> from spython.main import Client as client  
>>> client.instances()
INSTANCE NAME    PID      IMAGE
instance0        23991    /redacted/alpine_latest.sif
instance1        24313    /redacted/alpine_latest.sif
>>> myinstance = client.instances('instance0')
INSTANCE NAME    PID      IMAGE
instance0        23991   /redacted/alpine_latest.sif
instance1        24313    /redacted/alpine_latest.sif
>>>print(type(myinstance))
<class 'list'>
>>>myinstance = myinstance[0]
>>>print(type(myinstance))
<class 'spython.instance.Instance'>

Context

[provide more detailed introduction to the issue itself . This is for make a reproducible issue.]

  • Operating System: Ubuntu16.04
  • singularity version: 3.0.1-94.g7de6fa2
  • spython version: 0.0.49
  • python version: 3.5.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions