Skip to content
Constants.py 2.13 KiB
Newer Older
rahhal's avatar
rahhal committed
# Copyright 2025 Telefonica Innovación Digital S.L.
# Copyright 2025 Telefonica Innovación Digital S.L.
Javier Velázquez's avatar
Javier Velázquez committed

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

#     http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# This file includes original contributions from Telefonica Innovación Digital S.L.

import logging, os, json

Javier Velázquez's avatar
Javier Velázquez committed
# Default logging level
DEFAULT_LOGGING_LEVEL = logging.INFO
Javier Velázquez's avatar
Javier Velázquez committed

# Default port for NSC deployment
NSC_PORT = 8081

# Paths
# Obtain the absolute path of the current file
SRC_PATH = os.path.dirname(os.path.abspath(__file__))
Javier Velázquez's avatar
Javier Velázquez committed
with open(os.path.join(SRC_PATH, 'IPs.json')) as f:
    ips = json.load(f)
Javier Velázquez's avatar
Javier Velázquez committed

# Create the path to the desired file relative to the current file
TEMPLATES_PATH = os.path.join(SRC_PATH, "templates")

Javier Velázquez's avatar
Javier Velázquez committed
# Dump templates
Javier Velázquez's avatar
Javier Velázquez committed
DUMP_TEMPLATES = False
Javier Velázquez's avatar
Javier Velázquez committed

# Mapper 

# Flag to determine if the NSC performs NRPs
NRP_ENABLED = False
# Planner Flags
PLANNER_ENABLED = True
# Flag to determine if external PCE is used
PCE_EXTERNAL = False

# Realizer 

Javier Velázquez's avatar
Javier Velázquez committed
# Controller Flags
# If True, config is not sent to controllers
Javier Velázquez's avatar
Javier Velázquez committed
# Teraflow IP
Javier Velázquez's avatar
Javier Velázquez committed
TFS_IP = ips.get('TFS_IP')
UPLOAD_TYPE = "WEBUI"  # "WEBUI" or "NBI"
NBI_L2_PATH = "restconf/data/ietf-l2vpn-svc:l2vpn-svc/vpn-services"
rahhal's avatar
rahhal committed
#path = "restconf/data/ietf-l2vpn-svc:l2vpn-svc/vpn-services"
path_l3 = "restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services"

#json_file = "/home/tfs/nsc-hackfest7/src/hackfest7/slice_request.json"
#/home/tfs/nsc-hackfest7/src/hackfest7/slice_request.json
Javier Velázquez's avatar
Javier Velázquez committed
# Flag to determine if additional L2VPN configuration support is required for deploying L2VPNs with path selection
Javier Velázquez's avatar
Javier Velázquez committed
TFS_L2VPN_SUPPORT = False
Javier Velázquez's avatar
Javier Velázquez committed
# IXIA NEII IP
IXIA_IP = ips.get('IXIA_IP')

# WebUI
Javier Velázquez's avatar
Javier Velázquez committed
# Flag to deploy the WebUI
WEBUI_DEPLOY = True