Commit e16c921f authored by douomo's avatar douomo
Browse files

RSL is now used instead of SNR, num of stauts changes is used instead of number of alarms

parent 60465798
Loading
Loading
Loading
Loading
+16 −16
Original line number Diff line number Diff line
@@ -38,12 +38,12 @@ Decrease TX Power
    #${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
    BuiltIn.Sleep    2s
    ${init_SNR} =    Get Iface Metrics    ${m}    ${par["testInterface"]}    "actual-snir"
    ${init_RSL} =    Get Iface Metrics    ${m}    ${par["testInterface"]}    "actual-received-level "
    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"
    Log    Got SNR: ${final_SNR}    console=yes
    Should Be True    ${final_SNR}<=${init_SNR}
    ${final_RSL} =    Get Iface Metrics    ${m}    ${par["testInterface"]}    "actual-received-level"
    Log    Got RSL: ${final_RSL}    console=yes
    Should Be True    ${final_RSL}<=${init_RSL}
    Close Current Session    ${m}
    Close Current Session    ${t}
    
@@ -57,7 +57,7 @@ Check alarm
    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    5s
    Set RSL Threshold    ${m}    ${par["testInterface"]}    ${par["rslThreshold"]}
    ${init_SNR} =    Get Iface Metrics    ${m}    ${par["testInterface"]}    "actual-snir"
    ${init_RSL} =    Get Iface Metrics    ${m}    ${par["testInterface"]}    "actual-received-level"
    ${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
    ${notif}=    Call Method    ${m}    take_notification    timeout=${TIMEOUT}
@@ -69,13 +69,13 @@ Check alarm
        ${notif_xml}=    Call Method    ${notif}    __getattribute__    notification_xml
        Log    Notification XML:\n${notif_xml}    console=yes
        Should Not Be Empty    ${notif_xml}
        ${final_SNR}=    Get Iface Metrics    ${m}    ${par["testInterface"]}    actual-snir
        Log    Initial SNR value: ${init_SNR}    console=yes
        Log    Final SNR value: ${final_SNR}    console=yes
        ${final_RSL}=    Get Iface Metrics    ${m}    ${par["testInterface"]}    actual-received-level
        Log    Initial RSL value: ${init_RSL}    console=yes
        Log    Final RSL value: ${final_RSL}    console=yes
    ELSE
        Fail    No notification received within timeout period (${TIMEOUT}s)
    END
    Should Be True    ${final_SNR}<${init_SNR}
    Should Be True    ${final_RSL}<${init_RSL}
    Close Current Session    ${m}
    Close Current Session    ${t}
    
@@ -89,7 +89,7 @@ Reaction to Alarm
    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    5s
    Set RSL Threshold    ${m}    ${par["testInterface"]}    -40.0
    ${init_SNR} =    Get Iface Metrics    ${m}    ${par["testInterface"]}    "actual-snir"
    ${init_RSL} =    Get Iface Metrics    ${m}    ${par["testInterface"]}    "actual-received-level"
    ${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
    ${notif}=    Call Method    ${m}    take_notification    timeout=${TIMEOUT}
@@ -103,17 +103,17 @@ Reaction to Alarm
        ${notif_xml}=    Call Method    ${notif}    __getattribute__    notification_xml
        Log    Notification XML:\n${notif_xml}    console=yes
        Should Not Be Empty    ${notif_xml}
        ${Degraded_SNR}=    Get Iface Metrics    ${m}    ${par["testInterface"]}    actual-snir
        Log    Initial SNR value: ${init_SNR}    console=yes
        Log    Degraded SNR value: ${Degraded_SNR}    console=yes
        ${Degraded_RSL}=    Get Iface Metrics    ${m}    ${par["testInterface"]}    actual-received-level
        Log    Initial RSL value: ${init_RSL}    console=yes
        Log    Degraded RSL value: ${Degraded_RSL}    console=yes
        Set TX Power    ${t}    ${transmitter["testInterface"]}    ${transmitter["maxTxPower"]}
        BuiltIn.Sleep    5s
    ELSE
        Fail    No notification received within timeout period (${TIMEOUT}s)
    END
    ${restoredSNR}=    Get Iface Metrics    ${m}    ${par["testInterface"]}    "actual-snir"
    Log    Restored SNR value: ${restoredSNR}    console=yes
    Should Be True    ${DegradedSNR}<${restoredSNR}
    ${restoredRSL}=    Get Iface Metrics    ${m}    ${par["testInterface"]}    "actual-received-level"
    Log    Restored RSL value: ${restoredRSL}    console=yes
    Should Be True    ${DegradedRSL}<${restoredRSL}
#    Set TX Power    ${t}    ${transmitter["testInterface"]}    ${transmitter["maxTxPower"]} # Restore initial condition
    Close Current Session    ${m}
    Close Current Session    ${t}
 No newline at end of file
+9 B (8.14 KiB)

File changed.

No diff preview for this file type.

+1 −1
Original line number Diff line number Diff line
@@ -154,5 +154,5 @@ def check_power_degradation(init_xml_power, final_xml_power):

def count_alarm(xml_reply):
    tree = ET.fromstring(xml_reply)
    alarm = tree.findall(".//ns0:alarm", namespaces={"ns0": "urn:ietf:params:xml:ns:yang:ietf-alarms"})
    alarm = tree.findall(".//ns0:status-change", namespaces={"ns0": "urn:ietf:params:xml:ns:yang:ietf-alarms"})
    return len(alarm)
 No newline at end of file