<!--

 Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
 contributor license agreements.  See the NOTICE file distributed with
 this work for additional information regarding copyright ownership.
 The OpenAirInterface Software Alliance licenses this file to You under
 the OAI Public License, Version 1.1  (the "License"); you may not use this file
 except in compliance with the License.
 You may obtain a copy of the License at

      http://www.openairinterface.org/?page_id=698

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.

 For more information about the OpenAirInterface (OAI) Software Alliance:
      contact@openairinterface.org

-->
<testCaseList>
  <htmlTabRef>TEST-MONO-N2-HO-B210</htmlTabRef>
  <htmlTabName>Monolithic N2 Handover 20 MHz TDD SA</htmlTabName>
  <htmlTabIcon>tasks</htmlTabIcon>
  <TestCaseRequestedList>
    000001
    000002
    000023
    000003
    000004
    000005
    000006
    000007
    000008
    000009
    000010
    000011
    000012
    000013
    000014
    000015
    000017
    000018
    000019
    000016
    000020
    000021
    000022
  </TestCaseRequestedList>
  <TestCaseExclusionList></TestCaseExclusionList>
	
  <testCase id="000001">
    <class>DeployCoreNetwork</class>
    <desc>Initialize 5G Core</desc>
    <cn_id>oc-cn5g-00103-ho</cn_id>
  </testCase>

  <testCase id="000002">
    <class>Pull_Local_Registry</class>
    <desc>Pull Images from Local Registry</desc>
    <images>oai-gnb</images>
    <node>groot</node>
  </testCase>

  <testCase id="000023">
    <class>Pull_Local_Registry</class>
    <desc>Pull Images from Local Registry</desc>
    <images>oai-gnb</images>
    <node>rocket</node>
  </testCase>

  <testCase id="000003">
    <class>Create_Workspace</class>
    <desc>Create new Workspace for groot</desc>
    <node>groot</node>
  </testCase>

  <testCase id="000005">
    <class>Create_Workspace</class>
    <desc>Create new Workspace on rocket</desc>
    <node>rocket</node>
  </testCase>

  <testCase id="000004">
    <class>Custom_Command</class>
    <desc>Set initial attenuation on target gNB</desc>
    <node>rocket</node>
    <command>python3 %%workspace%%/ci-scripts/attenuatorctl.py -s 1,2 0 -s 3,4 25</command>
  </testCase>

  <testCase id="000005">
    <class>Deploy_Object</class>
    <desc>Deploy Monolithic gNB-PCI0 (TDD/Band77/20MHz/B210) in a container</desc>
    <yaml_path>ci-scripts/yaml_files/5g_sa_n2_ho_b210</yaml_path>
    <node>groot</node>
    <services>oai-gnb-pci0</services>
  </testCase>

  <testCase id="000006">
    <class>Deploy_Object</class>
    <desc>Deploy Monolithic gNB-PCI1 (TDD/Band77/20MHz/B210) in a container</desc>
    <yaml_path>ci-scripts/yaml_files/5g_sa_n2_ho_b210</yaml_path>
    <node>rocket</node>
    <services>oai-gnb-pci1</services>
  </testCase>

  <testCase id="000007">
    <class>Attach_UE</class>
    <desc>Attach Quectel</desc>
    <id>raspix</id>
  </testCase>

  <testCase id="000008">
    <class>Ping</class>
    <desc>Ping: 100pings in 20sec</desc>
    <id>raspix</id>
    <svr_id>oc-cn5g-00103-ho</svr_id>
    <ping_args>-c 100 -i 0.2</ping_args>
    <ping_packetloss_threshold>5</ping_packetloss_threshold>
  </testCase>

  <testCase id="000009">
    <class>IdleSleep</class>
    <desc>Sleep</desc>
    <idle_sleep_time_in_sec>5</idle_sleep_time_in_sec>
  </testCase>

  <testCase id="000010">
    <class>Custom_Command</class>
    <desc>Gradually attenuate gNB-PCI0 (ch1-2=15dB) and gNB-PCI1 (ch3-4=0dB) over 5s to trigger N2 Handover to gNB-PCI1</desc>
    <node>rocket</node>
    <command>python3 %%workspace%%/ci-scripts/attenuatorctl.py -r 1,2 15 -r 3,4 0 -d 5</command>
  </testCase>

  <testCase id="000011">
    <class>Ping</class>
    <desc>Ping: 50pings in 10sec</desc>
    <id>raspix</id>
    <svr_id>oc-cn5g-00103-ho</svr_id>
    <ping_args>-c 50 -i 0.2</ping_args>
    <ping_packetloss_threshold>5</ping_packetloss_threshold>
  </testCase>

  <testCase id="000012">
    <class>Custom_Command</class>
    <desc>UE connected to gNB-PCI1?</desc>
    <node>rocket</node>
    <command>echo ci fetch_du_by_ue_id 1 | ncat 127.0.0.1 9090 | grep "3585"</command>
  </testCase>

  <testCase id="000013">
    <class>Custom_Command</class>
    <desc>Gradually attenuate gNB-PCI0 (ch1-2=0dB) and gNB-PCI1 (ch3-4=15dB) over 5s to trigger N2 Handover back to gNB-PCI0</desc>
    <node>rocket</node>
    <command>python3 %%workspace%%/ci-scripts/attenuatorctl.py -r 1,2 0 -r 3,4 25 -d 5</command>
  </testCase>

  <testCase id="000014">
    <class>Ping</class>
    <desc>Ping: 50pings in 10sec</desc>
    <id>raspix</id>
    <svr_id>oc-cn5g-00103-ho</svr_id>
    <ping_args>-c 50 -i 0.2</ping_args>
    <ping_packetloss_threshold>5</ping_packetloss_threshold>
  </testCase>

  <testCase id="000015">
    <class>Custom_Command</class>
    <desc>UE connected to gNB-PCI0?</desc>
    <node>groot</node>
    <command>echo ci fetch_du_by_ue_id 1 | ncat 127.0.0.1 9090 | grep "3584"</command>
  </testCase>

  <testCase id="000016">
    <class>Custom_Command</class>
    <always_exec>true</always_exec>
    <desc>Reset all attenuators to 0dB</desc>
    <node>rocket</node>
    <command>python3 %%workspace%%/ci-scripts/attenuatorctl.py -s 1-4 0</command>
  </testCase>

  <testCase id="000017">
    <class>Detach_UE</class>
    <always_exec>true</always_exec>
    <desc>Detach Quectel</desc>
    <id>raspix</id>
  </testCase>

  <testCase id="000018">
    <class>Undeploy_Object</class>
    <always_exec>true</always_exec>
    <desc>Undeploy Monolithic gNB-PCI0</desc>
    <node>groot</node>
    <yaml_path>ci-scripts/yaml_files/5g_sa_n2_ho_b210</yaml_path>
  </testCase>

  <testCase id="000019">
    <class>Undeploy_Object</class>
    <always_exec>true</always_exec>
    <desc>Undeploy Monolithic gNB-PCI1</desc>
    <node>rocket</node>
    <yaml_path>ci-scripts/yaml_files/5g_sa_n2_ho_b210</yaml_path>
  </testCase>

  <testCase id="000020">
    <class>Clean_Test_Server_Images</class>
    <always_exec>true</always_exec>
    <desc>Clean Test Images on Test Server</desc>
    <node>groot</node>
    <images>oai-gnb</images>
  </testCase>

  <testCase id="000021">
    <class>Clean_Test_Server_Images</class>
    <always_exec>true</always_exec>
    <desc>Clean Test Images on Test Server</desc>
    <node>rocket</node>
    <images>oai-gnb</images>
  </testCase>

  <testCase id="000022">
    <class>UndeployCoreNetwork</class>
    <always_exec>true</always_exec>
    <desc>Terminate 5G Core</desc>
    <cn_id>oc-cn5g-00103-ho</cn_id>
  </testCase>

</testCaseList>
