Loading src/tests/tools/mock_nce_t_ctrl/nce_t_ctrl/app.py +41 −37 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ # limitations under the License. import json, logging, secrets import json, logging, os, secrets from flask import Flask from flask_restful import Api from .Dispatch import RestConfDispatch Loading Loading @@ -46,8 +46,12 @@ with open(STARTUP_FILE, mode='r', encoding='UTF-8') as fp: YANG_STARTUP_DATA = json.loads(fp.read()) SIMAP_ADDRESS = os.environ.get('SIMAP_ADDRESS') SIMAP_PORT = os.environ.get('SIMAP_PORT' ) if SIMAP_ADDRESS is not None and SIMAP_PORT is not None: restconf_client = RestConfClient( '172.17.0.1', port=8080, SIMAP_ADDRESS, port=SIMAP_PORT, logger=logging.getLogger('RestConfClient') ) simap_client = SimapClient(restconf_client) Loading Loading
src/tests/tools/mock_nce_t_ctrl/nce_t_ctrl/app.py +41 −37 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ # limitations under the License. import json, logging, secrets import json, logging, os, secrets from flask import Flask from flask_restful import Api from .Dispatch import RestConfDispatch Loading Loading @@ -46,8 +46,12 @@ with open(STARTUP_FILE, mode='r', encoding='UTF-8') as fp: YANG_STARTUP_DATA = json.loads(fp.read()) SIMAP_ADDRESS = os.environ.get('SIMAP_ADDRESS') SIMAP_PORT = os.environ.get('SIMAP_PORT' ) if SIMAP_ADDRESS is not None and SIMAP_PORT is not None: restconf_client = RestConfClient( '172.17.0.1', port=8080, SIMAP_ADDRESS, port=SIMAP_PORT, logger=logging.getLogger('RestConfClient') ) simap_client = SimapClient(restconf_client) Loading