Commit a6461e63 authored by Maria Ruiz's avatar Maria Ruiz
Browse files

final

parent e22ce8b7
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -19,9 +19,8 @@ import logging, os, json

# Default logging level
DEFAULT_LOGGING_LEVEL = logging.INFO
#DEFAULT_LOGGING_LEVEL = logging.DEBUG #MR
DEFAULT_LOGGING_LEVEL = logging.INFO
#DEFAULT_LOGGING_LEVEL = logging.DEBUG #MR
DEFAULT_LOGGING_LEVEL = logging.DEBUG #MR


# Default port for NSC deployment
NSC_PORT = 8081
+8 −19
Original line number Diff line number Diff line
@@ -18,17 +18,13 @@ import json, time, os, logging, uuid, traceback, sys
from datetime import datetime
from src.helpers import tfs_connector, cisco_connector
from src.Constants import DEFAULT_LOGGING_LEVEL, TFS_IP, TFS_L2VPN_SUPPORT, IXIA_IP, SRC_PATH, TEMPLATES_PATH, DUMMY_MODE, DUMP_TEMPLATES, PLANNER_ENABLED, NRP_ENABLED, UPLOAD_TYPE, NBI_L2_PATH, NBI_L3_PATH, SATNMS_IP
from src.Constants import DEFAULT_LOGGING_LEVEL, TFS_IP, TFS_L2VPN_SUPPORT, IXIA_IP, SRC_PATH, TEMPLATES_PATH, DUMMY_MODE, DUMP_TEMPLATES, PLANNER_ENABLED, NRP_ENABLED, UPLOAD_TYPE, NBI_L2_PATH, NBI_L3_PATH, SATNMS_IP
from src.realizers.ixia.NEII_V4 import NEII_controller
from src.realizers.sat.SATNMS import SAT_NMS 
from src.realizers.sat.SATRM import SAT_RM
from src.realizers.sat.SATSDN import SAT_SDN
from src.realizers.sat.SATNMS import SAT_NMS 
from src.realizers.sat.SATRM import SAT_RM
from src.realizers.sat.SATSDN import SAT_SDN
from src.planner.planner import Planner
from src.planner.sat_planner import SATPlanner
from src.planner.sat_planner import SATPlanner


# Configure logging to provide clear and informative log messages
logging.basicConfig(
@@ -52,7 +48,7 @@ class NSController:
    """

    def __init__(self, controller_type = None, tfs_ip=TFS_IP, ixia_ip =IXIA_IP, need_l2vpn_support=TFS_L2VPN_SUPPORT, satnms_ip=SATNMS_IP): 
    def __init__(self, controller_type = None, tfs_ip=TFS_IP, ixia_ip =IXIA_IP, need_l2vpn_support=TFS_L2VPN_SUPPORT, satnms_ip=SATNMS_IP): 
    #def __init__(self, controller_type = None, tfs_ip=TFS_IP, ixia_ip =IXIA_IP, need_l2vpn_support=TFS_L2VPN_SUPPORT, satnms_ip=SATNMS_IP): 
        """
        Initialize the Network Slice Controller.

@@ -978,10 +974,10 @@ class NSController:
            return realizing_request

       
        if controller == "sat":
        """  if controller == "sat":
            return realizing_request_nms, realizing_request_sat
        else:
            return realizing_request
            return realizing_request """

    def __tfs_l2vpn(self, ietf_intent):
        """
@@ -1732,20 +1728,13 @@ class NSController:
        """
        Prepare an SDN sat controller service request based on the IETF intent

        This method configures an Satellite NMS service request by:
        (L2 bridge)

        1. Defining endpoint: HUB-STATION
        2. Loading a service template
        3. Generating a unique service UUID
        4. Configuring service 
        5. Adding QoS constraints
        This method translates the IETF intent to SDN ODL controller

        Args:
            ietf_intent (dict): IETF-formatted network slice intent.

        Returns:
            dict: An Satellite NMS service request for configuration.
            dict: An Satellite SDN ODL request for configuration.

        """

+2 −20
Original line number Diff line number Diff line
@@ -8,26 +8,8 @@
            "destination": "STATION",
            "links": {
                "link": [
                    {
                        "id": "1",
                        "vlan-id": "106",
                        "slo-profile": "B",
                        "type": "GEO",
                        "bandwidth-Mbps": 100.0,
                        "latency": 250,
                        "FRW_frequency": 1200000,
                        "RTN_frequency": 1338000
                    },
                    {
                        "id": "2",
                        "vlan-id": "104",
                        "slo-profile": "A",
                        "type": "GEO",
                        "bandwidth-Mbps": 80.0,
                        "latency": 250,
                        "FRW_frequency": 1200000,
                        "RTN_frequency": 1338000
                    }
                  
        
                ]
            }
        }
+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ class SAT_SDN:
            session = response.cookies
            
        else:
            print(f"Error to connect with SDN controller; {response.status_code}")
            logging.info(f"Error to connect with SDN controller; {response.status_code}")
            
        

Loading