def show_environment( workspace=None, environment_name=None, environment_version=None, # We should enforce a logger logger=None): return Environment._serialize_to_dict(Environment.get(workspace, environment_name, environment_version))
def register_environment( workspace=None, environment_directory=None, # We should enforce a logger logger=None): definition = Environment.load_from_directory(environment_directory) result = definition.register(workspace) return Environment._serialize_to_dict(result)
def list_environments( workspace=None, # We should enforce a logger logger=None): return [Environment._serialize_to_dict(x) for x in workspace.environments.values()]