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

perfiles delay actualizados

parent 0c6e465d
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -37,8 +37,7 @@ TEMPLATES_PATH = os.path.join(SRC_PATH, "templates")
# Dump templates
#DUMP_TEMPLATES = False
DUMP_TEMPLATES = True #MR
#DUMP_TEMPLATES = False
DUMP_TEMPLATES = True #MR


# Mapper 

@@ -53,9 +52,7 @@ PCE_EXTERNAL = False
#sat imp options:
#option 1: SDN CONTROLLER
#SAT_SDN = True
#sat imp options:
#option 1: SDN CONTROLLER
#SAT_SDN = True
CHANGE_CONSTELLATION = True

# Controller Flags
# If True, config is not sent to controllers
+11 −1
Original line number Diff line number Diff line
@@ -9,7 +9,17 @@
            "links": {
                "link": [
                    {
                        "id": "1",
                        "id": "2",
                        "vlan-id": "108",
                        "slo-profile": "B",
                        "type": "LEO",
                        "bandwidth-Mbps": 100.0,
                        "latency": 20,
                        "FRW_frequency": 1200000,
                        "RTN_frequency": 1338000
                    },
                    {
                        "id": "2",
                        "vlan-id": "106",
                        "slo-profile": "B",
                        "type": "GEO",
+5 −4
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@

from .sat_profiles_ne2 import automatizacion
import ipaddress, logging
from src.Constants import IXIA_IP
from src.Constants import IXIA_IP, CHANGE_CONSTELLATION
import json

class SAT_RM:
@@ -25,16 +25,17 @@ class SAT_RM:

    def nscSATRM(self, json_data):
       
        configuraciones = {}
        #configuraciones = {}
        ip = self.ixia_ip
        puerto = "5"
        activacion = False #cambiar a true para activar perfiles IXIA
        activacion = CHANGE_CONSTELLATION #cambiar a true para activar perfiles IXIA

        latency = json_data.get("latency", None)

        if activacion is True:

            configuracion = self.delay(latency,activacion)
            #configuracion = self.delay(latency,activacion)
            configuracion = self.delay(latency)
            # Enviar la configuración
            automatizacion.envio_peticion(ip, puerto, configuracion)
            return automatizacion.obtener_informacion_puerto(ip, puerto)
+3 −3
Original line number Diff line number Diff line
@@ -108,11 +108,11 @@ class automatizacion:
    def cambiar_perfil_puerto_delay(delay):

        configuracion=None
        if delay<=30:
             configuracion = {"profiles": [ { "tag": "Port5-SAT_delay", "enabled": "true", "ethernetDelay": { "delay": 30, "pdvMode": "NONE", "units": "MS", "enabled": "true" } } ] }
        if delay<250:
             configuracion = {"profiles": [ { "tag": "Port5-SAT_delay_LEO", "enabled": "true", "ethernetDelay": { "delay": 10, "pdvMode": "NONE", "units": "MS", "enabled": "true" } } ] }

        else:
            configuracion = {"profiles": [ { "tag": "Port5-SAT_delay", "enabled": "true", "ethernetDelay": { "delay": 250, "pdvMode": "NONE", "units": "MS", "enabled": "true" } } ] }
            configuracion = {"profiles": [ { "tag": "Port5-SAT_delay_GEO", "enabled": "true", "ethernetDelay": { "delay": 250, "pdvMode": "NONE", "units": "MS", "enabled": "true" } } ] }
       
        print(f"\n\nConf Delay: {configuracion}\n")    
        return configuracion
+810 −0

File changed.

Preview size limit exceeded, changes collapsed.

Loading