summaryrefslogtreecommitdiffstats
path: root/csit/tests/sdnr/healthcheck/30_pipeCleanerPNFReg.robot
blob: 0024fb4ec2330cfb88809a16ac8d2ec69b3bb025 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
*** Settings ***
Documentation     In a new deployment of sdnc, ves collector and message router 
...  the first pnf registration request fails.
...  Therefore some requets are send to ensure proper working of the use case
...  VES endpoint details test environemnt variable file <environment>.py
...  as dictionary NETWORK_FUNCTIONS = {}, VESCOLLECTOR ={}


Library  ConnectLibrary
Library  SDNCBaseLibrary
Library  NTSimManagerNG
Library  ConnectApp


Suite Setup  global suite setup    &{GLOBAL_SUITE_SETUP_CONFIG}
Suite Teardown  global suite teardown


*** Variables ***
${DEVICE_TYPE}  O_RAN_FH
${CHECK_CONNECTION_STATUS}  Connected
${SIM_COUNT}  1
${PNF_REGISTRATION_TIMEOUT}  60s
${FAULT_DELAY}  5
${TIME_PERIOD_SEND_NOTIF}  30s

*** Test Cases ***
Add Network Function O-RAN-FH in connectApp
  [Tags]  healthcheck  sim
  [Documentation]  add nf as network element connection and verifies connection status

  ConnectApp.add_network_element_connection_from_dict  ${NETWORK_FUNCTIONS['${DEVICE_TYPE}']}  check_connection_status=${CHECK_CONNECTION_STATUS}

Send pnf registration request to VES collector
  [Tags]  healthcheck  sim
  [Documentation]  set details for VES endpoint details and 
  ...              send pnf registration requests

  NTSimManagerNG.set_ves_endpoint_details_nf  ${NETWORK_FUNCTIONS['${DEVICE_TYPE}']['NAME']}
  ...  ves-endpoint-ip=${VESCOLLECTOR}[IP]
  ...  ves-endpoint-port=${VESCOLLECTOR}[PORT]
  ...  ves-endpoint-auth-method=${VESCOLLECTOR}[AUTHMETHOD]
  ...  ves-endpoint-username=${VESCOLLECTOR}[USERNAME]
  ...  ves-endpoint-password=${VESCOLLECTOR}[PASSWORD]
  NTSimManagerNG.set_ves_config_nf  ${NETWORK_FUNCTIONS['${DEVICE_TYPE}']['NAME']}
  ...  pnf-registration=${True}

Send VES notifications
  [Tags]  healthcheck  sim
  [Documentation]  send some notifications for VES messages
  NTSimManagerNG.set_ves_config_nf  ${NETWORK_FUNCTIONS['${DEVICE_TYPE}']['NAME']}  faults-enabled=${True}
  NTSimManagerNG.set_fault_delay_list_nf  ${NETWORK_FUNCTIONS['${DEVICE_TYPE}']['NAME']}  delay-period=${FAULT_DELAY}
  Log  Send notification every ${FAULT_DELAY} sec for ${TIME_PERIOD_SEND_NOTIF}  level=INFO  html=False  console=True  repr=False
  Sleep  ${TIME_PERIOD_SEND_NOTIF}
  NTSimManagerNG.set_fault_delay_list_nf  ${NETWORK_FUNCTIONS['${DEVICE_TYPE}']['NAME']}  delay-period=${0}
  NTSimManagerNG.set_ves_config_nf  ${NETWORK_FUNCTIONS['${DEVICE_TYPE}']['NAME']}  faults-enabled=${False}

Remove mounted devices
  [Documentation]  cleanup all mounted devices
  [Tags]  healthcheck  sim
  NTSimManagerNG.set_ves_config_nf  ${NETWORK_FUNCTIONS['${DEVICE_TYPE}']['NAME']}
  ...  pnf-registration=${False}
  ConnectApp.remove_network_element_connection_filtered  validate=${True}  node-id=.*