How to use the spython.main.base.generate.RobotNamer function in spython

To help you get started, we’ve selected a few spython examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github singularityhub / singularity-cli / spython / main / base / __init__.py View on Github external
# Image Utils
Client.load = load
Client._get_filename = get_filename
Client._get_uri = get_uri
Client.setenv = setenv

# Commands
Client._generate_bind_list = generate_bind_list
Client._init_command = init_command
Client._run_command = run_command

# Flags and Logger
Client._parse_verbosity = parse_verbosity
Client._println = println
Client._init_level = init_level
Client.RobotNamer = RobotNamer()
github singularityhub / singularity-cli / spython / instance / cmd / __init__.py View on Github external
client via the environment variable MESSAGELEVEL.

    '''
    from spython.instance import Instance

    from spython.main.base.logger import println
    from spython.main.instances import list_instances
    from spython.utils import run_command as run_cmd

    # run_command uses run_cmd, but wraps to catch error
    from spython.main.base.command import (init_command, run_command)
    from spython.main.base.generate import RobotNamer
    from .start import start
    from .stop import stop

    Instance.RobotNamer = RobotNamer()
    Instance._init_command = init_command
    Instance.run_command = run_cmd
    Instance._run_command = run_command
    Instance._list = list_instances  # list command is used to get metadata
    Instance._println = println
    Instance.start = start     # intended to be called on init, not by user
    Instance.stop = stop

    # Give an instance the ability to breed :)
    Instance.instance = Instance
 
    return Instance
github singularityhub / singularity-cli / spython / oci / cmd / __init__.py View on Github external
OciImage.mount = mount
    OciImage.umount = umount
    OciImage.state = state
    OciImage.resume = resume
    OciImage.pause = pause
    OciImage.attach = attach
    OciImage.create = create
    OciImage.delete = delete
    OciImage.execute = execute
    OciImage.update = update
    OciImage.kill = kill
    OciImage.run = run
    OciImage._run = _run
    OciImage._state_command = _state_command

    OciImage.RobotNamer = RobotNamer()
    OciImage._send_command = send_command # send and disregard stderr, stdout
    OciImage._run_command = run_command
    OciImage._println = println
    OciImage.OciImage = OciImage

    return OciImage