Commit d9dd4666 authored by douomo's avatar douomo
Browse files

set tx power to max before muting/unmuting the ODU

parent d7dc61b1
Loading
Loading
Loading
Loading
+10 −6
Original line number Original line Diff line number Diff line
@@ -39,6 +39,7 @@ Mute ODU and Query Alarms
    #${m}=    Connect With Credentials    ${par["host"]}    ${par["port"]}    ${par["username"]}    ${par["password"]}
    #${m}=    Connect With Credentials    ${par["host"]}    ${par["port"]}    ${par["username"]}    ${par["password"]}
    ${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"]}    
    Set RSL Threshold    ${m}    ${par["testInterface"]}    -40.0
    Set RSL Threshold    ${m}    ${par["testInterface"]}    -40.0
    ${alarms}=    Get Filtered Config    ${m}    filters/alarms-list.xml
    ${alarms}=    Get Filtered Config    ${m}    filters/alarms-list.xml
    #opt: retrieve "number-of-alarms" and check if the number increases after the mute of the ODU
    #opt: retrieve "number-of-alarms" and check if the number increases after the mute of the ODU
@@ -60,6 +61,7 @@ Mute ODU and Receive RSL Alarms
    ${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"]}
    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 RSL Threshold    ${m}    ${par["testInterface"]}    -40.0
    Set RSL Threshold    ${m}    ${par["testInterface"]}    -40.0
#    ${resp}=    Evaluate    ${m}.create_subscription(stream_name="NETCONF")
#    ${resp}=    Evaluate    ${m}.create_subscription(stream_name="NETCONF")
    ${resp}=    Call Method    ${m}    create_subscription    stream_name=NETCONF
    ${resp}=    Call Method    ${m}    create_subscription    stream_name=NETCONF
@@ -75,23 +77,25 @@ Mute ODU and Receive RSL Alarms
    Close Current Session    ${t}
    Close Current Session    ${t}


Mute ODU Receive RSL Alarms and Unmute
Mute ODU Receive RSL Alarms and Unmute
    [Arguments]    ${par}    ${transimitter}
    [Arguments]    ${par}    ${transmitter}
    ${m}=    Connect With Key    ${par["host"]}    ${par["port"]}    ${par["username"]}    ${par["key_filename"]}
    ${m}=    Connect With Key    ${par["host"]}    ${par["port"]}    ${par["username"]}    ${par["key_filename"]}
    #${m}=    Connect With Credentials    ${par["host"]}    ${par["port"]}    ${par["username"]}    ${par["password"]}
    #${m}=    Connect With Credentials    ${par["host"]}    ${par["port"]}    ${par["username"]}    ${par["password"]}
    ${t}=    Connect With Key    ${transimitter["host"]}    ${transimitter["port"]}    ${transimitter["username"]}    ${transimitter["key_filename"]}
    ${t}=    Connect With Key    ${transmitter["host"]}    ${transmitter["port"]}    ${transmitter["username"]}    ${transmitter["key_filename"]}
    #${t}=    Connect With Credentials    ${transimitter["host"]}    ${transimitter["port"]}    ${transimitter["username"]}    ${transimitter["password"]}
    #${t}=    Connect With Credentials    ${transmitter["host"]}    ${transmitter["port"]}    ${transmitter["username"]}    ${transmitter["password"]}
    Unmute ODU    ${t}    ${transimitter["ODUName"]}
    Unmute ODU    ${t}    ${transmitter["ODUName"]}
    Set TX Power    ${t}    ${transmitter["testInterface"]}    ${transmitter["maxTxPower"]}    
    Set RSL Threshold    ${m}    ${par["testInterface"]}    -40
    Set RSL Threshold    ${m}    ${par["testInterface"]}    -40
    #${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}    ${transimitter["testInterface"]}
    Mute ODU    ${t}    ${transmitter["testInterface"]}
    #${notif}=    Evaluate    next(${m}.take_notification(timeout=60))
    #${notif}=    Evaluate    next(${m}.take_notification(timeout=60))
    ${notif}=    Call Method    ${m}    take_notification    timeout=${TIMEOUT}
    ${notif}=    Call Method    ${m}    take_notification    timeout=${TIMEOUT}
    ${notif_xml}=    Set Variable    ${notif.notification_xml}
    ${notif_xml}=    Set Variable    ${notif.notification_xml}
    Should Not Be Empty    ${notif_xml}
    Should Not Be Empty    ${notif_xml}
    Log    ${notif_xml}    console=yes
    Log    ${notif_xml}    console=yes
    Should Not Be Empty    ${notif}
    Should Not Be Empty    ${notif}
    Unmute ODU    ${t}    ${transimitter["testInterface"]}
    Unmute ODU    ${t}    ${transmitter["testInterface"]}
    Set TX Power    ${t}    ${transmitter["testInterface"]}    ${transmitter["maxTxPower"]}    
    ${actual-recevied}=    Get Iface Metrics    ${m}    ${par["testInterface"]}    "actual-received-level"
    ${actual-recevied}=    Get Iface Metrics    ${m}    ${par["testInterface"]}    "actual-received-level"
    #Should Be True    ${actual-recevied}>0
    #Should Be True    ${actual-recevied}>0
    ${ok}=    Evaluate    float(${actual-recevied}) > -40
    ${ok}=    Evaluate    float(${actual-recevied}) > -40