Commit ba7decfb authored by douomo's avatar douomo
Browse files

added transimitter

parent 8cfb5bec
Loading
Loading
Loading
Loading
+26 −16
Original line number Diff line number Diff line
@@ -9,13 +9,13 @@ Test_1
    Query Alarms    ${vendor_1}
    
Test_2
    Mute ODU and Query Alarms    ${vendor_1}
    Mute ODU and Query Alarms    ${vendor_1}    ${vendor_2}

Test_3
    Mute ODU and Receive SNR Alarms    ${vendor_1}
    Mute ODU and Receive SNR Alarms    ${vendor_1}    ${vendor_2}

Test_4
    Mute ODU and Receive RSL Alarms    ${vendor_1}
    Mute ODU and Receive RSL Alarms    ${vendor_1}    ${vendor_2}
    
*** Keywords ***
Query Alarms
@@ -23,45 +23,55 @@ Query Alarms
    ${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"]}
    ${alarms}=    Get Filtered Config    ${m}    filters/alarms.xml
    Close Session     ${m}
    Log    ${alarms}    console=yes
    Should Not Be Empty    ${alarms}
    Close Current Session    ${m}

Mute ODU and Query Alarms    
    [Arguments]    ${par}
    [Arguments]    ${par}    ${transimitter}
    ${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"]}
    Mute ODU    ${m}    ${par["ODUName"]}    #Interface name to mute #On transimitter node: need to connect to the TX and change ${m} with the reference to the transmitter
    ${t}=    Connect With Key    ${transimitter["host"]}    ${transimitter["port"]}    ${transimitter["username"]}    ${transimitter["key_filename"]}
    #${t}=    Connect With Credentials    ${transimitter["host"]}    ${transimitter["port"]}    ${transimitter["username"]}    ${transimitter["password"]}
    Mute ODU    ${t}    ${par["ODUName"]}    #Interface name to mute #On transimitter node: need to connect to the TX and change ${m} with the reference to the transmitter
    ${alarms}=    Get Filtered Config    ${m}    filters/alarms.xml
    Close Session     ${m}
    Log    ${alarms}    console=yes
    ${SNR}=    Get Iface Metrics    ${m}    ${par["testInterface"]}    "actual-snir"
    Should Be Equal    ${SNR}    0
    Close Current Session    ${m}
    Close Current Session    ${t}

Mute ODU and Receive SNR Alarms
    [Arguments]    ${par}
    [Arguments]    ${par}    ${transimitter}
    ${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"]}
    Unmute ODU    ${m}    ${par["ODUName"]}    #Interface name to mute #On transimitter node: need to connect to the TX and change ${m} with the reference to the transmitter
    ${t}=    Connect With Key    ${transimitter["host"]}    ${transimitter["port"]}    ${transimitter["username"]}    ${transimitter["key_filename"]}
    #${t}=    Connect With Credentials    ${transimitter["host"]}    ${transimitter["port"]}    ${transimitter["username"]}    ${transimitter["password"]}
    Unmute ODU    ${t}    ${par["ODUName"]}    #Interface name to mute #On transimitter node: need to connect to the TX and change ${m} with the reference to the transmitter
    Set RSL Threshold    ${m}    ${par["testInterface"]}    20
    ${resp}=    Evaluate    ${m}.create_subscription()
    Mute ODU    ${m}    ${par["ODUName"]}
    Mute ODU    ${t}    ${par["ODUName"]}
    ${notif}=    Evaluate    next(${m}.take_notification(timeout=60))
    Log    ${notif}    console=yes
    Should Not Be Empty    ${notif}
    Close Session    ${m}
    Close Current Session    ${m}
    Close Current Session    ${t}

Mute ODU and Receive RSL Alarms
    [Arguments]    ${par}
    [Arguments]    ${par}    ${transimitter}
    ${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"]}
    Unmute ODU    ${m}    ${par["ODUName"]}
    ${t}=    Connect With Key    ${transimitter["host"]}    ${transimitter["port"]}    ${transimitter["username"]}    ${transimitter["key_filename"]}
    #${t}=    Connect With Credentials    ${transimitter["host"]}    ${transimitter["port"]}    ${transimitter["username"]}    ${transimitter["password"]}
    Unmute ODU    ${t}    ${par["ODUName"]}
    Set RSL Threshold    ${m}    ${par["testInterface"]}    20
    ${resp}=    Evaluate    ${m}.create_subscription()
    Mute ODU    ${m}    ${par["ODUName"]}
    Mute ODU    ${t}    ${par["ODUName"]}
    ${notif}=    Evaluate    next(${m}.take_notification(timeout=60))
    Log    ${notif}    console=yes
    Should Not Be Empty    ${notif}
    Unmute ODU    ${m}    ${par["ODUName"]}
    Unmute ODU    ${t}    ${par["ODUName"]}
    ${actual-recevied}=    Get Iface Metrics    ${m}    ${par["testInterface"]}    "actual-received-level"
    Should Be True    ${actual-recevied}>0
    Close Current Session    ${m}
    Close Current Session    ${t}
 No newline at end of file
+25 −14
Original line number Diff line number Diff line
@@ -9,13 +9,13 @@ Test_1
    Get Power    ${vendor_1}
 
Test_2
    Decrease TX Power    ${vendor_1}
    Decrease TX Power    ${vendor_1}    ${vendor_2}
    
Test_3
    Check alarm    ${vendor_1}
    Check alarm    ${vendor_1}    ${vendor_2}
    
Test_4
    Reaction to Alarm    ${vendor_1}
    Reaction to Alarm    ${vendor_1}    ${vendor_2}


*** Keywords ***
@@ -29,47 +29,58 @@ Get Power
    Close Current Session    ${m}

Decrease TX Power
    [Arguments]    ${par}
    [Arguments]    ${par}    ${transimitter}
    ${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"]}
    ${t}=    Connect With Key    ${transimitter["host"]}    ${transimitter["port"]}    ${transimitter["username"]}    ${transimitter["key_filename"]}
    #${t}=    Connect With Credentials    ${transimitter["host"]}    ${transimitter["port"]}    ${transimitter["username"]}    ${transimitter["password"]}
    ${init_SNR} =    Get Iface Metrics    ${m}    ${par["testInterface"]}    "actual-snir"
    Set TX Power    ${m}    ${par["testInterface"]}    ${par["minTxPower"]}    #On transimitter node: need to connect to the TX and change ${m} with the reference to the transmitter
    Set TX Power    ${t}    ${transimitter["testInterface"]}    ${transimitter["minTxPower"]}    #On transimitter node: need to connect to the TX and change ${m} with the reference to the transmitter
    ${final_SNR} =    Get Iface Metrics    ${m}    ${par["testInterface"]}    "actual-snir"
    Log    Got SNR: ${final_SNR}    console=yes
    Should Be True    ${final_SNR}<=${init_SNR}
    Close Current Session    ${m}
    Close Current Session    ${t}
    

Check alarm
    [Arguments]    ${par}
    [Arguments]    ${par}    ${transimitter}
    ${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"]}
    Set TX Power    ${m}    ${par["testInterface"]}    ${par["maxTxPower"]}    #On transimitter node: need to connect to the TX and change ${m} with the reference to the transmitter
    ${t}=    Connect With Key    ${transimitter["host"]}    ${transimitter["port"]}    ${transimitter["username"]}    ${transimitter["key_filename"]}
    # ${t}=    Connect With Credentials    ${transimitter["host"]}    ${transimitter["port"]}    ${transimitter["username"]}    ${transimitter["password"]}
    Set TX Power    ${t}    ${transimitter["testInterface"]}    ${transimitter["maxTxPower"]}    #On transimitter node: need to connect to the TX and change ${m} with the reference to the transmitter
    Set RSL Threshold    ${m}    ${par["testInterface"]}    -20.0
    ${init_SNR} =    Get Iface Metrics    ${m}    ${par["testInterface"]}    "actual-snir"
    ${resp}=    Evaluate    ${m}.create_subscription()
    Set TX Power    ${m}    ${par["testInterface"]}    ${par["minTxPower"]}    #On transimitter node: need to connect to the TX and change ${m} with the reference to the transmitter
    Set TX Power    ${t}    ${transimitter["testInterface"]}    ${transimitter["minTxPower"]}    #On transimitter node: need to connect to the TX and change ${m} with the reference to the transmitter
    ${notif}=    Evaluate    next(${m}.take_notification(timeout=60))
    IF     ${notif}!=${None}
        Log    ${notif}    console=yes
        ${final_SNR} =    Get Iface Metrics    ${m}    ${par["testInterface"]}    "actual-snir"
    END
    Should Be True    ${final_SNR}<${init_SNR}
    Close Current Session    ${m}
    Close Current Session    ${t}
    
Reaction to Alarm
    [Arguments]    ${par}
    [Arguments]    ${par}    ${transimitter}
    ${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"]}
    Set TX Power    ${m}    ${par["testInterface"]}    ${par["maxTxPower"]}    #On transimitter node: need to connect to the TX and change ${m} with the reference to the transmitter
    ${t}=    Connect With Key    ${transimitter["host"]}    ${transimitter["port"]}    ${transimitter["username"]}    ${transimitter["key_filename"]}
    # ${t}=    Connect With Credentials    ${transimitter["host"]}    ${transimitter["port"]}    ${transimitter["username"]}    ${transimitter["password"]}
    Set TX Power    ${m}    ${transimitter["testInterface"]}    ${transimitter["maxTxPower"]}    #On transimitter node: need to connect to the TX and change ${m} with the reference to the transmitter
    Set RSL Threshold    ${m}    ${par["testInterface"]}    -20.0
    ${resp}=    Evaluate    ${m}.create_subscription()
    Set TX Power    ${m}    ${par["testInterface"]}    ${par["minTxPower"]}    #On transimitter node: need to connect to the TX and change ${m} with the reference to the transmitter
    Set TX Power    ${t}    ${transimitter["testInterface"]}    ${transimitter["minTxPower"]}    #On transimitter node: need to connect to the TX and change ${m} with the reference to the transmitter
    ${notif}=    Evaluate    next(${m}.take_notification(timeout=60))
    IF    ${notif}!=${None}
        ${DegradedSNR}=    Get Iface Metrics    ${m}    ${par["testInterface"]}    "actual-snir"
        Set TX Power    ${m}    ${par["testInterface"]}    ${par["minTxPower"]}    #On transimitter node: need to connect to the TX and change ${m} with the reference to the transmitter
        Set TX Power    ${t}    ${transimitter["testInterface"]}    ${transimitter["maxTxPower"]}    #On transimitter node: need to connect to the TX and change ${m} with the reference to the transmitter
    END
    ${restoredSNR}=    Get Iface Metrics    ${m}    ${par["testInterface"]}    "actual-snir"
    Should Be True    ${DegradedSNR}<${restoredSNR}
    Close Current Session    ${m}
    
    Close Current Session    ${t}

+27 B (471 B)

File changed.

No diff preview for this file type.

+22 −1
Original line number Diff line number Diff line
vendor_1=    {"host": "192.168.13.134", "port": 830, "username": "domenico", "password":"MySecurePassword", "key_filename":"/home/douomo/.ssh/netconf_key", "testInterface":"ens0","minTxPower":0.0,"maxTxPower":99.0, "transmitterIP":"192.168.13.134", "ODUName":"name"}
vendor_1=    {"host": "192.168.13.134", 
              "port": 830, 
              "username": "domenico", 
              "password":"MySecurePassword", 
              "key_filename":"/home/douomo/.ssh/netconf_key", 
              "testInterface":"ens0",
              "minTxPower":0.0,
              "maxTxPower":99.0, 
              "ODUName":"name"
              }

vendor_2=    {"host": "192.168.13.134", 
              "port": 830, 
              "username": "domenico", 
              "password":"MySecurePassword", 
              "key_filename":"/home/douomo/.ssh/netconf_key", 
              "testInterface":"ens0",
              "minTxPower":0.0,
              "maxTxPower":99.0, 
              "ODUName":"name"
              }
Loading