Commit 60465798 authored by douomo's avatar douomo
Browse files

RSL TH is now configurable

parent f21a8cad
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -41,7 +41,7 @@ Mute ODU and Query Alarms
    #${t}=    Connect With Credentials    ${transmitter["host"]}    ${transmitter["port"]}    ${transmitter["username"]}    ${transmitter["password"]}
    #${t}=    Connect With Credentials    ${transmitter["host"]}    ${transmitter["port"]}    ${transmitter["username"]}    ${transmitter["password"]}
    Set TX Power    ${t}    ${transmitter["testInterface"]}    ${transmitter["maxTxPower"]}    
    Set TX Power    ${t}    ${transmitter["testInterface"]}    ${transmitter["maxTxPower"]}    
    BuiltIn.Sleep    2s
    BuiltIn.Sleep    2s
    #Set RSL Threshold    ${m}    ${par["testInterface"]}    -40.0    #check this
    #Set RSL Threshold    ${m}    ${par["testInterface"]}    ${par["rslThreshold"]}    #check this
    ${alarms}=    Get Filtered Config    ${m}    filters/alarms-list.xml
    ${alarms}=    Get Filtered Config    ${m}    filters/alarms-list.xml
    ${alarms_num_start}=    Count Alarm    ${alarms}
    ${alarms_num_start}=    Count Alarm    ${alarms}
    Log    ${alarms}    console=yes
    Log    ${alarms}    console=yes
@@ -66,7 +66,7 @@ Mute ODU and Receive RSL Alarms
    #${t}=    Connect With Credentials    ${transmitter["host"]}    ${transmitter["port"]}    ${transmitter["username"]}    ${transmitter["password"]}
    #${t}=    Connect With Credentials    ${transmitter["host"]}    ${transmitter["port"]}    ${transmitter["username"]}    ${transmitter["password"]}
    Unmute ODU    ${t}    ${transmitter["testInterface"]}    #Interface name to mute #On transmitter node: need to connect to the TX and change ${m} with the reference to the transmitter
    Unmute ODU    ${t}    ${transmitter["testInterface"]}    #Interface name to mute #On transmitter node: need to connect to the TX and change ${m} with the reference to the transmitter
    Set TX Power    ${t}    ${transmitter["testInterface"]}    ${transmitter["maxTxPower"]}    
    Set TX Power    ${t}    ${transmitter["testInterface"]}    ${transmitter["maxTxPower"]}    
    Set RSL Threshold    ${m}    ${par["testInterface"]}    -40.0
    Set RSL Threshold    ${m}    ${par["testInterface"]}    ${par["rslThreshold"]}
    BuiltIn.Sleep    2s
    BuiltIn.Sleep    2s
    ${resp}=    Call Method    ${m}    create_subscription    stream_name=NETCONF
    ${resp}=    Call Method    ${m}    create_subscription    stream_name=NETCONF
    Mute ODU    ${t}    ${transmitter["testInterface"]}
    Mute ODU    ${t}    ${transmitter["testInterface"]}
@@ -87,7 +87,7 @@ Mute ODU Receive RSL Alarms and Unmute
    Unmute ODU    ${t}    ${transmitter["testInterface"]}
    Unmute ODU    ${t}    ${transmitter["testInterface"]}
    Set TX Power    ${t}    ${transmitter["testInterface"]}    ${transmitter["maxTxPower"]}    
    Set TX Power    ${t}    ${transmitter["testInterface"]}    ${transmitter["maxTxPower"]}    
    BuiltIn.Sleep    2s
    BuiltIn.Sleep    2s
    Set RSL Threshold    ${m}    ${par["testInterface"]}    -40
    Set RSL Threshold    ${m}    ${par["testInterface"]}    ${par["rslThreshold"]}
    #${resp}=    Evaluate    ${m}.create_subscription()
    #${resp}=    Evaluate    ${m}.create_subscription()
    ${resp}=    Call Method    ${m}    create_subscription    stream_name=NETCONF
    ${resp}=    Call Method    ${m}    create_subscription    stream_name=NETCONF
    Mute ODU    ${t}    ${transmitter["testInterface"]}
    Mute ODU    ${t}    ${transmitter["testInterface"]}
+7 −6
Original line number Original line Diff line number Diff line
@@ -37,8 +37,10 @@ Decrease TX Power
    ${t}=    Connect With Key    ${transmitter["host"]}    ${transmitter["port"]}    ${transmitter["username"]}    ${transmitter["key_filename"]}
    ${t}=    Connect With Key    ${transmitter["host"]}    ${transmitter["port"]}    ${transmitter["username"]}    ${transmitter["key_filename"]}
    #${t}=    Connect With Credentials    ${transmitter["host"]}    ${transmitter["port"]}    ${transmitter["username"]}    ${transmitter["password"]}
    #${t}=    Connect With Credentials    ${transmitter["host"]}    ${transmitter["port"]}    ${transmitter["username"]}    ${transmitter["password"]}
    Set TX Power    ${t}    ${transmitter["testInterface"]}    ${transmitter["maxTxPower"]}    #On transmitter node: need to connect to the TX and change ${m} with the reference to the transmitter
    Set TX Power    ${t}    ${transmitter["testInterface"]}    ${transmitter["maxTxPower"]}    #On transmitter node: need to connect to the TX and change ${m} with the reference to the transmitter
    BuiltIn.Sleep    2s
    ${init_SNR} =    Get Iface Metrics    ${m}    ${par["testInterface"]}    "actual-snir"
    ${init_SNR} =    Get Iface Metrics    ${m}    ${par["testInterface"]}    "actual-snir"
    Set TX Power    ${t}    ${transmitter["testInterface"]}    ${transmitter["minTxPower"]}    #On transmitter node: need to connect to the TX and change ${m} with the reference to the transmitter
    Set TX Power    ${t}    ${transmitter["testInterface"]}    ${transmitter["minTxPower"]}    #On transmitter node: need to connect to the TX and change ${m} with the reference to the transmitter
    BuiltIn.Sleep    2s
    ${final_SNR} =    Get Iface Metrics    ${m}    ${par["testInterface"]}    "actual-snir"
    ${final_SNR} =    Get Iface Metrics    ${m}    ${par["testInterface"]}    "actual-snir"
    Log    Got SNR: ${final_SNR}    console=yes
    Log    Got SNR: ${final_SNR}    console=yes
    Should Be True    ${final_SNR}<=${init_SNR}
    Should Be True    ${final_SNR}<=${init_SNR}
@@ -53,10 +55,10 @@ Check alarm
    ${t}=    Connect With Key    ${transmitter["host"]}    ${transmitter["port"]}    ${transmitter["username"]}    ${transmitter["key_filename"]}
    ${t}=    Connect With Key    ${transmitter["host"]}    ${transmitter["port"]}    ${transmitter["username"]}    ${transmitter["key_filename"]}
    # ${t}=    Connect With Credentials    ${transmitter["host"]}    ${transmitter["port"]}    ${transmitter["username"]}    ${transmitter["password"]}
    # ${t}=    Connect With Credentials    ${transmitter["host"]}    ${transmitter["port"]}    ${transmitter["username"]}    ${transmitter["password"]}
    Set TX Power    ${t}    ${transmitter["testInterface"]}    ${transmitter["maxTxPower"]}    #On transmitter node: need to connect to the TX and change ${m} with the reference to the transmitter
    Set TX Power    ${t}    ${transmitter["testInterface"]}    ${transmitter["maxTxPower"]}    #On transmitter node: need to connect to the TX and change ${m} with the reference to the transmitter
    BuiltIn.Sleep    2s
    BuiltIn.Sleep    5s
    Set RSL Threshold    ${m}    ${par["testInterface"]}    -20.0
    Set RSL Threshold    ${m}    ${par["testInterface"]}    ${par["rslThreshold"]}
    ${init_SNR} =    Get Iface Metrics    ${m}    ${par["testInterface"]}    "actual-snir"
    ${init_SNR} =    Get Iface Metrics    ${m}    ${par["testInterface"]}    "actual-snir"
    ${resp}=    Evaluate    ${m}.create_subscription()
    ${resp}=    Call Method    ${m}    create_subscription    stream_name=NETCONF
    Set TX Power    ${t}    ${transmitter["testInterface"]}    ${transmitter["minTxPower"]}    #On transmitter node: need to connect to the TX and change ${m} with the reference to the transmitter
    Set TX Power    ${t}    ${transmitter["testInterface"]}    ${transmitter["minTxPower"]}    #On transmitter node: need to connect to the TX and change ${m} with the reference to the transmitter
    ${notif}=    Call Method    ${m}    take_notification    timeout=${TIMEOUT}
    ${notif}=    Call Method    ${m}    take_notification    timeout=${TIMEOUT}
    ${notif_type}=    Evaluate    str(type($notif))    modules=sys
    ${notif_type}=    Evaluate    str(type($notif))    modules=sys
@@ -112,7 +114,6 @@ Reaction to Alarm
    ${restoredSNR}=    Get Iface Metrics    ${m}    ${par["testInterface"]}    "actual-snir"
    ${restoredSNR}=    Get Iface Metrics    ${m}    ${par["testInterface"]}    "actual-snir"
    Log    Restored SNR value: ${restoredSNR}    console=yes
    Log    Restored SNR value: ${restoredSNR}    console=yes
    Should Be True    ${DegradedSNR}<${restoredSNR}
    Should Be True    ${DegradedSNR}<${restoredSNR}
#    Set TX Power    ${t}    ${transmitter["testInterface"]}    ${transmitter["maxTxPower"]} # Restore initial condition
    Close Current Session    ${m}
    Close Current Session    ${m}
    Close Current Session    ${t}
    Close Current Session    ${t}
 No newline at end of file

+10 B (481 B)

File changed.

No diff preview for this file type.

+22 −21
Original line number Original line Diff line number Diff line
vendor_1=    {"host": "192.168.13.134", 
vendor_1=   {"host": "192.168.74.49",
              "port": 830, 
             "port": 33100,
              "username": "domenico", 
             "username": "admin",
              "password":"MySecurePassword", 
             "password":"admin",
              "key_filename":"/home/douomo/.ssh/netconf_key", 
             "key_filename":"/home/devel/.ssh/netconf",
              "testInterface":"ens0",
             "testInterface":"ct1",
             "minTxPower":0.0,
             "minTxPower":0.0,
              "maxTxPower":99.0, 
             "maxTxPower":22.0, 
             "rslThreshold":-40.0,
             "ODUName":"name"
             "ODUName":"name"
             }
             }


vendor_2=    {"host": "192.168.13.134", 
vendor_2=   {"host": "192.168.74.49",
              "port": 830, 
             "port": 33101,
              "username": "domenico", 
             "username": "admin",
              "password":"MySecurePassword", 
             "password":"admin",
              "key_filename":"/home/douomo/.ssh/netconf_key", 
             "key_filename":"/home/devel/.ssh/netconf",
              "testInterface":"ens0",
             "testInterface":"ct1",
             "minTxPower":0.0,
             "minTxPower":0.0,
              "maxTxPower":99.0, 
             "maxTxPower":22.0, 
             "rslThreshold":-40.0,
             "ODUName":"name"
             "ODUName":"name"
             }
             }