Skip to content
Snippets Groups Projects
Commit e73f1e60 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

NBI component:

- Fixed mock_nbi_dependencies tool
parent cd2f8ca6
No related branches found
No related tags found
3 merge requests!359Release TeraFlowSDN 5.0,!322Resolve "(CTTC) Update NBI WebSocket endpoints to Flask-SocketIO and use gunicorn",!286Resolve "(CTTC) Implement integration test between E2E-IP-Optical SDN Controllers"
...@@ -12,8 +12,26 @@ ...@@ -12,8 +12,26 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from common.Settings import get_log_level, get_setting import os
from common.Constants import ServiceNameEnum
from common.Settings import (
ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_GRPC,
get_env_var_name, get_log_level, get_setting
)
LOCAL_HOST = '127.0.0.1'
MOCK_PORT = 10000
BIND_ADDRESS = str(get_setting('BIND_ADDRESS', default='0.0.0.0')) BIND_ADDRESS = str(get_setting('BIND_ADDRESS', default='0.0.0.0'))
BIND_PORT = int(get_setting('BIND_PORT', default=10000 )) BIND_PORT = int(get_setting('BIND_PORT', default=MOCK_PORT))
LOG_LEVEL = str(get_log_level()) LOG_LEVEL = str(get_log_level())
MOCKED_SERVICES = [
ServiceNameEnum.CONTEXT,
ServiceNameEnum.DEVICE,
ServiceNameEnum.SERVICE,
ServiceNameEnum.SLICE,
]
for mocked_service in MOCKED_SERVICES:
os.environ[get_env_var_name(mocked_service, ENVVAR_SUFIX_SERVICE_HOST )] = str(LOCAL_HOST)
os.environ[get_env_var_name(mocked_service, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(BIND_PORT )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment