Commit 34e6dc31 authored by Valentin Reis's avatar Valentin Reis
Browse files

Adding ARGO_NODEOS_CONFIG environment variable check.

parent fd393d12
Pipeline #4562 passed with stages
in 1 minute and 3 seconds
......@@ -4,6 +4,7 @@ import logging
import xml.etree.ElementTree
import tornado.process as process
import subprocess
import os
logger = logging.getLogger('nrm')
resources = collections.namedtuple("Resources", ["cpus", "mems"])
......@@ -42,7 +43,13 @@ class NodeOSClient(object):
def __init__(self):
"""Load client configuration."""
self.prefix = "argo_nodeos_config"
if 'ARGO_NODEOS_CONFIG' in os.environ:
logger.info("NodeOSClient: bypassing argo_nodeos_config with %s\n"
% os.environ['ARGO_NODEOS_CONFIG'])
self.prefix = os.environ['ARGO_NODEOS_CONFIG']
else:
logger.info("NodeOSClient: using argo_nodeos_config from path")
self.prefix = "argo_nodeos_config"
def getavailable(self):
"""Gather available resources."""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment