ENV ROBOT_OPTIONS="-T -d /robot/log --console verbose -C off -P /robot/lib/python"
ENV KUBECONFIG="/robot/etc/kubernetes-admin-conf"
ENV PYTHONPATH="/robot/lib/python"
-ENV RICPLT_NAMESPACE=ricplatform
+ENV RICPLT_NAMESPACE=ricplt
ENV RICPLT_RELEASE_NAME=ric-full
-ENV RICPLT_COMPONENTS="appmgr rtmgr dbaas e2mgr e2term"
+ENV RICPLT_COMPONENTS="a1mediator appmgr dbaas e2mgr e2term rtmgr"
RUN mkdir -p /robot/lib/python
RUN mkdir /robot/resources
COPY robot/resources/json_templater.robot /robot/resources
COPY robot/resources/appmgr /robot/resources/appmgr
+COPY robot/resources/dashboard /robot/resources/dashboard
COPY robot/resources/e2mgr /robot/resources/e2mgr
COPY robot/resources/e2sim /robot/resources/e2sim
COPY robot/resources/e2term /robot/resources/e2term
RUN python -m compileall /robot/lib/python
+WORKDIR /
+
CMD ["sleep", "9125d"]
files in nanobot/configmap-src/testsuites. Template expansion is
performed on files in that directory.
-To install the chart, edit values.yaml to reflect your environment
-and desired tests and run
+Configuration of the chart is split between the "recipe" used to
+deploy the RIC (and consumed by the ric-common chart, which is
+required for this chart) and the chart's own values.yaml file.
+Generally, RIC platform configuration is specified by the recipe, and
+robot and xapp configuration from the chart's values.yaml, although
+there is some overlap.
-$ helm install --namespace <namespace> nanobot
+Support files (testsuites, keyword definition libraries, scripts, and
+variable definition files) for the robot framework itself are supplied
+by k8s configmaps generated from the contents of subdirectories of the
+configmap-src directory; those subdirectories may contain one or more of
+the following directories:
+
+bin/: scripts/binaries, mounted at /robot/bin
+testsuites/: test suites, mounted at /robot/testsuites
+properties/: variable definition (properties) files;
+ contents mounted at /robot/resources
+resources/: robot keyword definition libraries, contents
+ mounted at /robot/resources
+
+Helm template expansion is performed on the contents of all
+directories.
+Because both resources/ and properties/ are mounted at
+robot/resources, care should be taken to ensure that names do not
+collide across those directories, particularly between trees.
+
+
+To install the chart (which creates and runs a single Kubernetes job),
+edit values.yaml to reflect your environment and desired tests and run
+
+$ helm install [--values <override-file> ] --namespace <namespace> nanobot
+
+... where <override-file> is the recipe override file used when
+deploying the RIC, if any.
The namespace selected will be where the job's service account is
created and the job runs. It may but need not be the same as the RIC
-platform or xapp namespace.
+platform or xapp namespace —- the chart may be deployed in any
+namespace.
+++ /dev/null
-{{- $ns := default "ricplt" .Values.ric.platform.namespace }}
-{{- $release := default "r0" .Values.ric.platform.releaseName }}
-{{- $domain := default "cluster.local" .Values.ric.cluster.domain }}
-{{- $hostPrefix := printf "service-%s" $ns }}
-{{- $hostSuffix := printf "%s.svc.%s" $ns $domain }}
-{{- $appmgrHost := printf "%s-appmgr-http.%s" $hostPrefix $hostSuffix }}
-{{- $e2mgrHost := printf "%s-e2mgr-http.%s" $hostPrefix $hostSuffix }}
-{{- $rtmgrHost := printf "%s-rtmgr-rmr.%s" $hostPrefix $hostSuffix }}
-{{- $dbaasHost := printf "%s-dbaas-tcp.%s" $hostPrefix $hostSuffix }}
-{{- $a1MediatorHost := printf "%s-a1mediator-http.%s" $hostPrefix $hostSuffix }}
-
-*** Settings ***
-Documentation store all properties that can change or are used in multiple places here
-... format is all caps with underscores between words and prepended with GLOBAL
-... make sure you prepend them with GLOBAL so that other files can easily see it is from this file.
-
-
-*** Variables ***
-${GLOBAL_APPLICATION_ID} {{- printf "nanobot-%s" $release | indent 4}}
-${GLOBAL_BUILD_NUMBER} {{- default "0" .Values.ric.platform.build | indent 4 }}
-#
-${GLOBAL_APPMGR_SERVER_PROTOCOL} {{- default "http" .Values.ric.platform.components.appmgr.protocol | indent 4 }}
-${GLOBAL_INJECTED_APPMGR_IP_ADDR} {{- default $appmgrHost .Values.ric.platform.components.appmgr.address | indent 4 }}
-${GLOBAL_APPMGR_SERVER_PORT} {{- default "8080" .Values.ric.platform.components.appmgr.port | indent 4 }}
-${GLOBAL_INJECTED_APPMGR_USER} {{- .Values.ric.platform.components.appmgr.user | indent 4 }}
-${GLOBAL_INJECTED_APPMGR_PASSWORD} {{- .Values.ric.platform.components.appmgr.password | indent 4 }}
-#
-${GLOBAL_E2MGR_SERVER_PROTOCOL} {{- default "http" .Values.ric.platform.components.e2mgr.protocol | indent 4 }}
-${GLOBAL_INJECTED_E2MGR_IP_ADDR} {{- default $e2mgrHost .Values.ric.platform.components.e2mgr.address | indent 4 }}
-${GLOBAL_E2MGR_SERVER_PORT} {{- default "3800" .Values.ric.platform.components.e2mgr.port | indent 4 }}
-${GLOBAL_INJECTED_E2MGR_USER} {{- .Values.ric.platform.components.e2mgr.user | indent 4 }}
-${GLOBAL_INJECTED_E2MGR_PASSWORD} {{- .Values.ric.platform.components.e2mgr.password | indent 4 }}
-#
-${GLOBAL_RTMGR_SERVER_PROTOCOL} {{- default "http" .Values.ric.platform.components.rtmgr.protocol | indent 4 }}
-${GLOBAL_INJECTED_RTMGR_IP_ADDR} {{- default $rtmgrHost .Values.ric.platform.components.rtmgr.address | indent 4 }}
-${GLOBAL_RTMGR_SERVER_PORT} {{- default "5656" .Values.ric.platform.components.rtmgr.port | indent 4 }}
-${GLOBAL_INJECTED_RTMGR_USER} {{- .Values.ric.platform.components.rtmgr.user | indent 4 }}
-${GLOBAL_INJECTED_RTMGR_PASSWORD} {{- .Values.ric.platform.components.rtmgr.password | indent 4 }}
-#
-${GLOBAL_INJECTED_DBAAS_IP_ADDR} {{- default $dbaasHost .Values.ric.platform.components.dbaas.address | indent 4 }}
-${GLOBAL_DBAAS_SERVER_PORT} {{- default "6379" .Values.ric.platform.components.dbaas.port | indent 4 }}
--- /dev/null
+{{- $domain := default "cluster.local" .Values.ric.cluster.domain }}
+{{- $ricpltNS := include "common.namespace.platform" . }}
+{{- $xappNS := include "common.namespace.xapp" . }}
+{{- $ricplt := printf "%s.svc.%s" $ricpltNS $domain }}
+{{- $release := default "r1" .Values.ric.robot.release }}
+#
+*** Settings ***
+Documentation store all properties that can change or are used in multiple places here
+... format is all caps with underscores between words and prepended with GLOBAL
+... make sure you prepend them with GLOBAL so that other files can easily see it is from this file.
+
+
+*** Variables ***
+&{GLOBAL_RICPLT_COMPONENTS} {{- range keys .Values.ric.platform.components }}
+... {{.}}={{include (printf "common.deploymentname.%s" .) $}}
+ {{- end }}
+&{GLOBAL_RICPLT_XAPPS} {{- range keys .Values.ric.xapp }}
+... {{.}}={{ printf "%s-%s" $xappNS . }}
+ {{- end }}
+#
+${GLOBAL_APPLICATION_ID} {{ default "r0" .Values.ric.robot.release | printf "nanobot-%s" }}
+${GLOBAL_BUILD_NUMBER} {{ default "0" .Values.ric.platform.build }}
+${GLOBAL_RICPLT_NAMESPACE} {{ $ricpltNS }}
+#
+${GLOBAL_APPMGR_SERVER_PROTOCOL} {{ default "http" .Values.ric.platform.components.appmgr.protocol }}
+${GLOBAL_INJECTED_APPMGR_IP_ADDR} {{ printf "%s.%s" (include "common.servicename.appmgr.http" .) $ricplt }}
+${GLOBAL_APPMGR_SERVER_PORT} {{ include "common.serviceport.appmgr.http" . }}
+${GLOBAL_INJECTED_APPMGR_USER} {{ .Values.ric.platform.components.appmgr.user }}
+${GLOBAL_INJECTED_APPMGR_PASSWORD} {{ .Values.ric.platform.components.appmgr.password }}
+#
+${GLOBAL_E2MGR_SERVER_PROTOCOL} {{ default "http" .Values.ric.platform.components.e2mgr.protocol }}
+${GLOBAL_INJECTED_E2MGR_IP_ADDR} {{ printf "%s.%s" (include "common.servicename.e2mgr.http" .) $ricplt }}
+${GLOBAL_E2MGR_SERVER_PORT} {{ include "common.serviceport.e2mgr.http" . }}
+${GLOBAL_INJECTED_E2MGR_USER} {{ .Values.ric.platform.components.e2mgr.user }}
+${GLOBAL_INJECTED_E2MGR_PASSWORD} {{ .Values.ric.platform.components.e2mgr.password }}
+#
+${GLOBAL_RTMGR_SERVER_PROTOCOL} {{ default "http" .Values.ric.platform.components.rtmgr.protocol }}
+${GLOBAL_INJECTED_RTMGR_IP_ADDR} {{ printf "%s.%s" (include "common.servicename.rtmgr.http" .) $ricplt }}
+${GLOBAL_RTMGR_SERVER_PORT} {{ include "common.serviceport.e2mgr.http" . }}
+${GLOBAL_INJECTED_RTMGR_USER} {{ .Values.ric.platform.components.rtmgr.user }}
+${GLOBAL_INJECTED_RTMGR_PASSWORD} {{ .Values.ric.platform.components.rtmgr.password }}
+#
+${GLOBAL_INJECTED_DBAAS_IP_ADDR} {{ printf "%s.%s" (include "common.servicename.dbaas.tcp" .) $ricplt }}
+${GLOBAL_DBAAS_SERVER_PORT} {{ include "common.serviceport.dbaas.tcp" . }}
[Tags] etetests xapptests
Run AppMgr Health Check
Deploy An XApp
- [Tags] etetests xapptests
+ [Tags] etetests xapptests intrusive
Deploy XApp ${TEST_XAPPNAME}
Retrieve The Deployed XApp
[Tags] etetests xapptests
Get XApp By Name ${TEST_XAPPNAME}
Attempt To Deploy A Duplicate XApp
- [Tags] etetests xapptests
+ [Tags] etetests xapptests intrusive
Deploy Duplicate XApp And Expect Error
Undeploy The Deployed XApp
- [Tags] etetests xapptests
+ [Tags] etetests xapptests intrusive
Undeploy XApp ${TEST_XAPPNAME}
Attempt To Undeploy An Already Undeployed XApp
- [Tags] etetests xapptests
+ [Tags] etetests xapptests intrusive
Undeploy Nondeployed XApp And Expect Error
Attempt To Request A Nonexistent XApp
- [Tags] etetests xapptests
+ [Tags] etetests xapptests intrusive
Request Nonexistent XApp And Expect Error
Setup RAN Via E2Mgr X2
*** Settings ***
Documentation Tests for the existence and functionality of RIC components
-Library KubernetesEntity ${NAMESPACE}
+Resource /robot/resources/global_properties.robot
+
+Library KubernetesEntity ${GLOBAL_RICPLT_NAMESPACE}
Library Collections
Library String
-# Resource ../resources/appmgr/appmgr_interface.robot
-# Resource ../resources/e2mgr/e2mgr_interface.robot
-
-*** Variables ***
-${NAMESPACE} %{RICPLT_NAMESPACE}
-${PFX} %{RICPLT_RELEASE_NAME}
-
*** Test Cases ***
-Deployments
- [Tags] etetests k8stests
- @{Components} = Split String %{RICPLT_COMPONENTS}
- :FOR ${Component} IN @{Components}
- \ Log Retrieving Deployment for ${Component}
- \ ${deploy} = Deployment ${PFX}-${Component}
- \ ${status} = Most Recent Availability Condition @{deploy.status.conditions}
+Ensure RIC components are deployed and available
+ [Tags] etetests k8stests ci_tests
+ :FOR ${component} IN @{GLOBAL_RICPLT_COMPONENTS}
+ \ ${deploymentName} = Get From Dictionary ${GLOBAL_RICPLT_COMPONENTS} ${Component}
+ \ ${deploy} = Deployment ${deploymentName}
+ \ ${status} = Most Recent Availability Condition @{deploy.status.conditions}
\ Should Be Equal As Strings ${status} True ignore_case=True msg=${Component} is not available
-
+
*** Keywords ***
Most Recent Availability Condition
# this makes the probably-unsafe assumption that the conditions are ordered
--- /dev/null
+*** Settings ***
+Documentation Initializes RIC Test Web Page and Password
+
+Library Collections
+Library OperatingSystem
+Library StringTemplater
+
+
+Test Timeout 5 minutes
+
+*** Variables ***
+${URLS_HTML_TEMPLATE} robot/assets/templates/web/index.html.template
+
+${HOSTS_PREFIX} vm
+${WEB_USER} test
+${WEB_PASSWORD}
+
+${URLS_HTML} html/index.html
+${CREDENTIALS_FILE} /etc/lighttpd/authorization
+#${CREDENTIALS_FILE} authorization
+
+*** Test Cases ***
+Update RIC Page
+ [Tags] UpdateWebPage
+ Run Keyword If '${WEB_PASSWORD}' == '' Fail "WEB Password must not be empty"
+ Run Keyword If '${WEB_PASSWORD}' != '' Create File ${CREDENTIALS_FILE} ${WEB_USER}:${WEB_PASSWORD}
+
+*** Keywords ***
--- /dev/null
+################################################################################
+# Copyright (c) 2019 AT&T Intellectual Property. #
+# Copyright (c) 2019 Nokia. #
+# #
+# Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 #
+# #
+# 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. #
+################################################################################
+
+dependencies:
+ - name: ric-common
+ version: ~2.0.0
+ repository: http://127.0.0.1:8879
+
\ No newline at end of file
+++ /dev/null
-{{/*
- Copyright (c) 2019 AT&T Intellectual Property.
- Copyright (c) 2019 Nokia.
-
- Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
-
- 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.
-*/}}
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: robot-bin
- namespace: {{ .Release.Namespace }}
-data:
- {{ (.Files.Glob "configmap-src/bin/*").AsConfig | nindent 2 }}
+++ /dev/null
-{{/*
- Copyright (c) 2019 AT&T Intellectual Property.
- Copyright (c) 2019 Nokia.
-
- Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
-
- 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.
-*/}}
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: robot-properties
- namespace: {{ .Release.Namespace }}
-data:
- {{ (tpl (.Files.Glob "configmap-src/properties/*.robot").AsConfig . ) | nindent 2 }}
{{/*
Copyright (c) 2019 AT&T Intellectual Property.
- Copyright (c) 2019 Nokia.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
+{{- range $map := list "bin" "properties" "resources" "testsuites" }}
+---
apiVersion: v1
kind: ConfigMap
metadata:
- name: robot-testsuites
- namespace: {{ .Release.Namespace }}
+ name: robot-{{ $map }}
+ namespace: {{ $.Release.Namespace }}
data:
- {{ (tpl (.Files.Glob "configmap-src/testsuites/*.robot").AsConfig . ) | nindent 2 }}
+{{- $path := printf "configmap-src/*/%s/*" $map }}
+{{- $content := $.Files.Glob $path }}
+{{- if $content }}
+{{ tpl ($content).AsConfig $ | indent 2 }}
+{{- end }}
+{{- end }}
See the License for the specific language governing permissions and
limitations under the License.
*/}}
-{{- $platformNamespace := default .Release.Namespace .Values.ric.platform.namespace }}
-{{- $xappNamespace := default $platformNamespace .Values.ric.xapp.namespace }}
+{{- $platformNamespace := include "common.namespace.platform" . }}
+{{- $xappNamespace := include "common.namespace.xapp" . }}
{{- $releaseName := default "ric-full" .Values.ric.platform.releaseName }}
{{- $jobName := printf "%s-%s" .Release.Name $releaseName }}
{{- $acctName := randAlpha 6 | lower | printf "%s-%s" $jobName }}
- name: robot-bin
mountPath: /robot/bin
readOnly: true
- {{- $secrets := dict }}
+ {{- $secrets := dict }}
{{- range $index, $container := .Values.images.ric.robot.job }}
{{- if index $container "repositoryCred" }}
{{- $_ := set $secrets $container.repositoryCred (dict "name" $container.repositoryCred) }}
- "verbose"
- "-C"
- "off"
- {{- if .Values.ric.robot.tags }}
- {{- range .Values.ric.robot.tags }}
+ {{- if .Values.ric.robot.tags.enabled }}
+ {{- range .Values.ric.robot.tags.enabled }}
- "-i"
- "{{.}}"
{{- end }}
{{- end }}
+ {{- if .Values.ric.robot.tags.disabled }}
+ {{- range .Values.ric.robot.tags.disabled }}
+ - "-e"
+ - "{{.}}"
+ {{- end }}
+ {{- end }}
{{- if .Values.ric.robot.testsuites }}
{{- range .Values.ric.robot.testsuites }}
- "/robot/testsuites/{{.}}.robot"
- name: robot-log
mountPath: /robot/log
readOnly: false
+ # for compatability with the ric robot, we mount
+ # both properties files and interface libraries
+ # under resources/.
+{{- range $map, $ignore := $.Files.Glob "configmap-src/*/properties/*.robot" }}
- name: robot-properties
- mountPath: /robot/resources/global_properties.robot
- subPath: global_properties.robot
+ mountPath: /robot/resources/{{ base $map }}
+ subPath: {{ base $map }}
+ readOnly: true
+{{- end }}
+{{- range $map, $ignore := $.Files.Glob "configmap-src/*/resources/*.robot" }}
+ - name: robot-resources
+ mountPath: /robot/resources/{{ base $map }}
+ subPath: {{ base $map }}
readOnly: true
+{{- end }}
volumes:
- name: robot-etc
emptyDir: {}
configMap:
name: robot-properties
defaultMode: 0644
+ - name: robot-resources
+ configMap:
+ name: robot-resources
+ defaultMode: 0644
# See the License for the specific language governing permissions and
# limitations under the License.
+#
+# configuration for this chart is split between this file and the "recipe"
+# used by the ric-common chart. For the most part, platform configuration
+# is defined by that recipe, and robot configuration is here.
+#
+
images:
ric:
robot:
# for these can typically be found in
# the ricplt/ric_env.sh file from the ric
# platform source tree
- namespace: ricplt
releaseName: r0
components:
appmgr:
rtmgr:
user: test
password: test
- dbaas:
- port: "6379"
e2mgr:
user: test
password: test
e2term:
+ a1mediator:
xapp:
- namespace: ricxapp
+ anr:
+ servicename: anr
robot:
+ release: r1
#
# host filesystem path where robot
# output will be stored
# - ricdeployment
# - healthcheck
tags:
- # - etetests
- # - k8stests
+ enabled:
+ # - etetests
+ # - k8stests
+ disabled:
+ # - intrusive
+ # - artificialdata
+ - UpdateWebPage
+ - e2setup_dash
+ - x2setup_dash
#
job:
# set this to a true value to cause
create: true
# ... and specify the serviceaccount here:
# name: nanobot
-
\ No newline at end of file
Deploy All Available XApps
[Documentation] Attempt to deploy any not-currently-deployed XApp
@{d} = Get Deployed XApps
- @{deployed} = Pluck Name ${d}
+ @{deployed} = Pluck name ${d}
@{available} = Get Deployable XApps
@{toDeploy} = Subtract From List ${available} ${deployed}
Deploy XApps @{toDeploy}
Undeploy All Running XApps
[Documentation] Undeploy any deployed XApps
@{d} = Get Deployed XApps
- @{deployed} = Pluck Name ${d}
+ @{deployed} = Pluck name ${d}
Run Keyword If ${deployed} Undeploy XApps @{deployed}
Run AppMgr GET Request
Pluck
[Documentation] Get the values of a specific key from a list of dictionaries
[Arguments] ${k} ${l}
- @{names} = Evaluate filter(lambda v: v != None, [i.get(${k}, None) for i in ${l}])
+ @{names} = Evaluate filter(lambda v: v != None, [i.get('${k}', None) for i in ${l}])
[Return] ${names}
Subtract From List
[Documentation] Ensure AppMgr produces an appropriate error when an already-running XApp is deployed
@{d} = Get Deployed XApps
Should Not Be Empty ${d} No XApps currently deployed
- @{names} = Pluck Name ${d}
+ @{names} = Pluck name ${d}
${xapp} = Evaluate random.choice(${names}) random
- ${status} = Run Keyword And Ignore Error Deploy XApp ${xapp}
+ ${status} ${u} = Run Keyword And Ignore Error Deploy XApp ${xapp}
Should Be Equal As Strings ${status} FAIL
Undeploy Nondeployed XApp And Expect Error
@{d} = Get Deployed XApps
@{a} = Get Deployable XApps
Should Not Be Empty ${a} No XApps available to deploy
- @{dNames} = Pluck Name ${d}
+ @{dNames} = Pluck name ${d}
@{a} = Subtract From List ${a} ${dNames}
+ Should Not Be Empty ${a} No undeployed XApps
${xapp} = Evaluate random.choice(${a}) random
${status} ${u} = Run Keyword And Ignore Error Undeploy XApp ${xapp}
Should Be Equal As Strings ${status} FAIL
*** Settings ***
-Documentation The main interface for interacting with RIC E2 Manager (E2Mgr) . It handles low level stuff like managing the http request library and E2Mgr required fields
+Documentation The main interface for interacting with RIC E2 Manager (E2Mgr).
+... It handles low level stuff like managing the http request library and
+... E2Mgr required fields
Library RequestsLibrary
Library UUID
Resource ../json_templater.robot
*** Variables ***
-${E2MGR_BASE_PATH} /v1/nodeb #/nodeb /nodeb/setup
-${E2MGR_BASE_VERSION} /v1
-${E2MGR_ENDPOINT} ${GLOBAL_E2MGR_SERVER_PROTOCOL}://${GLOBAL_INJECTED_E2MGR_IP_ADDR}:${GLOBAL_E2MGR_SERVER_PORT}
+${E2MGR_BASE_PATH} v1/nodeb
+${E2MGR_ENDPOINT} ${GLOBAL_E2MGR_SERVER_PROTOCOL}://${GLOBAL_INJECTED_E2MGR_IP_ADDR}:${GLOBAL_E2MGR_SERVER_PORT}
${E2MGR_SETUP_NODEB_TEMPLATE} robot/assets/templates/e2mgr_setup_nodeb.template
*** Keywords ***
Run E2Mgr Health Check
- [Documentation] Runs E2Mgr Health check
- ${data_path}= Set Variable /v1/health
- ${resp}= Run Keyword Run E2Mgr Get Request ${data_path}
+ [Documentation] Runs E2Mgr Health check
+ ${data_path} = Set Variable /v1/health
+ ${resp} = Run E2Mgr GET Request ${data_path}
Check NodeB Status
- [Documentation] Check NodeB Status
+ [Documentation] Check NodeB Status
[Arguments] ${ran_name}
- ${resp}= Run Keyword Run E2Mgr Get NodeB Request ${ran_name}
- Should Be Equal As Strings ${resp.json()['connectionStatus']} CONNECTED
+ ${resp} = Run E2Mgr Get NodeB Request ${ran_name}
+ Should Be Equal As Strings ${resp.json()['connectionStatus']} CONNECTED
+ [Return] ${resp}
Run E2Mgr Get NodeB Request
- [Documentation] Runs E2Mgr Get NodeB Request
+ [Documentation] Runs E2Mgr Get NodeB Request
[Arguments] ${ran_name}
- ${data_path}= Set Variable ${E2MGR_BASE_PATH}/${ran_name}
- ${resp}= Run Keyword Run E2Mgr Get Request ${data_path}
- Should Be Equal As Strings ${resp.status_code} 200
- [Return] ${resp}
+ ${data_path} = Set Variable ${E2MGR_BASE_PATH}/${ran_name}
+ ${resp} = Run E2Mgr GET Request ${data_path}
+ Should Be Equal As Strings ${resp.json()['ranName']} ${ran_name}
+ [Return] ${resp}
Run E2Mgr Get All NodeBs Request
- [Documentation] Runs E2Mgr Get All NodeBs Request
- ${data_path}= Set Variable ${E2MGR_BASE_VERSION}/nodeb-ids
- ${resp}= Run Keyword Run E2Mgr Get Request ${data_path}
+ [Documentation] Runs E2Mgr Get All NodeBs Request
+ ${data_path} = Set Variable ${E2MGR_BASE_PATH}/ids
+ ${resp} = Run E2Mgr GET Request ${data_path}
+ [Return] ${resp}
Run E2Mgr Setup NodeB X2
- [documentation] Setup X2 NodeB via E2 Manager
- [Arguments] ${ran_name} ${ran_ip} ${ran_port}
- ${data_path}= Set Variable ${E2MGR_BASE_PATH}/x2-setup
- ${dict}= Create Dictionary ran_name=${ran_name} ran_ip=${ran_ip} ran_port=${ran_port}
- ${data}= Fill JSON Template File ${E2MGR_SETUP_NODEB_TEMPLATE} ${dict}
- ${auth}= Create List ${GLOBAL_INJECTED_E2MGR_USER} ${GLOBAL_INJECTED_E2MGR_PASSWORD}
- ${session}= Create Session e2mgr ${E2MGR_ENDPOINT} auth=${auth}
- ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
- ${resp}= Post Request e2mgr ${data_path} data=${data} headers=${headers}
- Log Received response from E2Mgr ${resp.text}
- Should Be Equal As Strings ${resp.status_code} 200
- [Return] ${resp}
+ [documentation] Setup X2 NodeB via E2 Manager
+ [Arguments] ${ran_name} ${ran_ip} ${ran_port}
+ ${data_path} = Set Variable ${E2MGR_BASE_PATH}/x2-setup
+ ${dict} = Create Dictionary
+ ... ran_name=${ran_name}
+ ... ran_ip=${ran_ip}
+ ... ran_port=${ran_port}
+ ${data} = Fill JSON Template File ${E2MGR_SETUP_NODEB_TEMPLATE} ${dict}
+ ${resp} = Run E2Mgr POST Request ${data_path} ${data}
+ [Return] ${resp}
Run E2Mgr Setup NodeB Endc
- [documentation] Setup Endc NodeB via E2 Manager
- [Arguments] ${ran_name} ${ran_ip} ${ran_port}
- ${data_path}= Set Variable ${E2MGR_BASE_PATH}/endc-setup
- ${dict}= Create Dictionary ran_name=${ran_name} ran_ip=${ran_ip} ran_port=${ran_port}
- ${data}= Fill JSON Template File ${E2MGR_SETUP_NODEB_TEMPLATE} ${dict}
- ${auth}= Create List ${GLOBAL_INJECTED_E2MGR_USER} ${GLOBAL_INJECTED_E2MGR_PASSWORD}
- ${session}= Create Session e2mgr ${E2MGR_ENDPOINT} auth=${auth}
- ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
- ${resp}= Post Request e2mgr ${data_path} data=${data} headers=${headers}
- Log Received response from E2Mgr ${resp.text}
- Should Be Equal As Strings ${resp.status_code} 200
- [Return] ${resp}
+ [documentation] Setup Endc NodeB via E2 Manager
+ [Arguments] ${ran_name} ${ran_ip} ${ran_port}
+ ${data_path} = Set Variable ${E2MGR_BASE_PATH}/endc-setup
+ ${dict} = Create Dictionary ran_name=${ran_name} ran_ip=${ran_ip} ran_port=${ran_port}
+ ${data} = Fill JSON Template File ${E2MGR_SETUP_NODEB_TEMPLATE} ${dict}
+ ${resp} = Run E2Mgr POST Request ${data_path} ${data}
+ [Return] ${resp}
Run E2Mgr Delete NodeB
- [documentation] Delete NodeB via E2 Manager
+ [documentation] Delete NodeB via E2 Manager
[Arguments] ${ran_name}
- ${data_path}= Set Variable ${E2MGR_BASE_PATH}/${ran_name}
- ${resp}= Run E2Mgr Delete Request ${data_path}
- Should Be Equal As Strings ${resp.status_code} 200
+ ${data_path} = Set Variable ${E2MGR_BASE_PATH}/${ran_name}
+ ${resp} = Run E2Mgr DELETE Request ${data_path}
+#
+Run E2Mgr GET Request
+ [Documentation] Runs E2Mgr GET Request
+ [Arguments] ${data_path}
+ ${auth} = Create List
+ ... ${GLOBAL_INJECTED_E2MGR_USER}
+ ... ${GLOBAL_INJECTED_E2MGR_PASSWORD}
+ ${session} = Create Session e2mgr ${E2MGR_ENDPOINT} auth=${auth}
+ ${uuid} = Generate UUID
+ ${headers} = Create Dictionary
+ ... Accept=application/json
+ ... Content-Type=application/json
+ ${resp} = Get Request e2mgr ${data_path} headers=${headers}
+ Log Received response from E2Mgr ${resp.text}
+ Should Be True ${resp}
+ [Return] ${resp}
-Run E2Mgr Get Request
- [Documentation] Runs E2Mgr Get Request
- [Arguments] ${data_path}
- ${auth}= Create List ${GLOBAL_INJECTED_E2MGR_USER} ${GLOBAL_INJECTED_E2MGR_PASSWORD}
- ${session}= Create Session e2mgr ${E2MGR_ENDPOINT} auth=${auth}
- ${uuid}= Generate UUID
- ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
- ${resp}= Get Request e2mgr ${data_path} headers=${headers}
- Log Received response from E2Mgr ${resp.text}
- Should Be Equal As Strings ${resp.status_code} 200
- [Return] ${resp}
-
-Run E2Mgr Delete Request
+Run E2Mgr DELETE Request
[Documentation] Runs E2Mgr Delete Request
- [Arguments] ${data_path}
- ${auth}= Create List ${GLOBAL_INJECTED_E2MGR_USER} ${GLOBAL_INJECTED_E2MGR_PASSWORD}
- ${session}= Create Session e2mgr ${E2MGR_ENDPOINT} auth=${auth}
- ${uuid}= Generate UUID
- ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
- ${resp}= Delete Request e2mgr ${data_path} headers=${headers}
- Log Received response from E2Mgr ${resp.text}
- Should Be Equal As Strings ${resp.status_code} 200
- [Return] ${resp}
+ [Arguments] ${data_path}
+ ${auth} = Create List
+ ... ${GLOBAL_INJECTED_E2MGR_USER}
+ ... ${GLOBAL_INJECTED_E2MGR_PASSWORD}
+ ${session} = Create Session e2mgr ${E2MGR_ENDPOINT} auth=${auth}
+ ${uuid} = Generate UUID
+ ${headers} = Create Dictionary
+ ... Accept=application/json
+ ... Content-Type=application/json
+ ${resp} = Delete Request e2mgr ${data_path} headers=${headers}
+ Log Received response from E2Mgr ${resp.text}
+ Should Be True ${resp}
+ [Return] ${resp}
+
+Run E2Mgr POST Request
+ [Documentation] Send an HTTP POST to the E2 Manager
+ [Arguments] ${data_path} ${data}
+ ${auth} = Create List
+ ... ${GLOBAL_INJECTED_E2MGR_USER}
+ ... ${GLOBAL_INJECTED_E2MGR_PASSWORD}
+ ${session} = Create Session e2mgr ${E2MGR_ENDPOINT} auth=${auth}
+ ${headers} = Create Dictionary
+ ... Accept=application/json
+ ... Content-Type=application/json
+ ${resp} = Post Request e2mgr
+ ... ${data_path}
+ ... data=${data}
+ ... headers=${headers}
+ Log Received response from E2Mgr ${resp.text}
+ Should Be True ${resp}
+ [Return] ${resp}
*** Variables ***
${DBHOST} ${GLOBAL_INJECTED_DBAAS_IP_ADDR}
${DBPORT} ${GLOBAL_DBAAS_SERVER_PORT}
-${NAMESPACE} %{RICPLT_NAMESPACE}
-${PFX} %{RICPLT_RELEASE_NAME}
+${NAMESPACE} ${GLOBAL_RICPLT_NAMESPACE}
*** Keywords ***
Generate RAN Name
Restart E2 Simulator
[Documentation] Restart all E2Sim pods
- [Arguments] ${deployment}=${PFX}-e2sim
+ [Arguments] ${deployment}= ${GLOBAL_INJECTED_E2MGR_DEPLOYMENT}
${resp} = Redeploy ${deployment}
[Return] ${resp}
*** Settings ***
Documentation store all properties that can change or are used in multiple places here
-... format is all caps with underscores between words and prepended with GLOBAL
-... make sure you prepend them with GLOBAL so that other files can easily see it is from this file.
+... format is all caps with underscores between words and prepended with GLOBAL
+... make sure you prepend them with GLOBAL so that other files can easily see it
+... is from this file.
*** Variables ***
-${GLOBAL_APPLICATION_ID} ric-robot
-${GLOBAL_SELENIUM_BROWSER} chrome
-${GLOBAL_SELENIUM_BROWSER_CAPABILITIES} Create Dictionary
-${GLOBAL_SELENIUM_DELAY} 0
-${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} 5
-${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} 15
-${GLOBAL_BUILD_NUMBER} 0
-${GLOBAL_RIC_PRIVATE_KEY} ${EXECDIR}/robot/assets/keys/ric_dev.pvt
+${GLOBAL_RICPLT_NAMESPACE} ricplt
+&{GLOBAL_RICPLT_COMPONENTS} a1mediator=deployment-ricplt-a1mediator
+... appmgr=deployment-ricplt-appmgr
+... e2mgr=deployment-ricplt-e2mgr
+... e2term=deployment-ricplt-e2term
+... rtmgr=deployment-ricplt-rtmgr
+${GLOBAL_APPLICATION_ID} ric-robot
+${GLOBAL_BUILD_NUMBER} 0
+#
+${GLOBAL_RIC_PRIVATE_KEY} ${EXECDIR}/robot/assets/keys/ric_dev.pvt
+#
+${GLOBAL_SELENIUM_BROWSER} chrome
+${GLOBAL_SELENIUM_BROWSER_CAPABILITIES} Create Dictionary
+${GLOBAL_SELENIUM_DELAY} 0
+${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} 5
+${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} 15
+
*** Settings ***
Documentation Tests for the existence and functionality of RIC components
-Library KubernetesEntity ${NAMESPACE}
+Resource /robot/resources/global_properties.robot
+
+Library KubernetesEntity ${GLOBAL_RICPLT_NAMESPACE}
Library Collections
Library String
-# Resource ../resources/appmgr/appmgr_interface.robot
-# Resource ../resources/e2mgr/e2mgr_interface.robot
-
-*** Variables ***
-${NAMESPACE} %{RICPLT_NAMESPACE}
-${PFX} %{RICPLT_RELEASE_NAME}
-
*** Test Cases ***
Deployments
[Tags] etetests k8stests ci_tests
- @{Components} = Split String %{RICPLT_COMPONENTS}
- :FOR ${Component} IN @{Components}
- \ Log Retrieving Deployment for ${Component}
- #\ ${deploy} = Deployment ${PFX}-${Component}
- # new helm deployment naming 6/2019
- \ ${deploy} = Deployment deployment-${PFX}-${Component}
- \ ${status} = Most Recent Availability Condition @{deploy.status.conditions}
+ :FOR ${component} IN @{GLOBAL_RICPLT_COMPONENTS}
+ \ ${deploymentName} = Get From Dictionary ${GLOBAL_RICPLT_COMPONENTS} ${Component}
+ \ ${deploy} = Deployment ${deploymentName}
+ \ ${status} = Most Recent Availability Condition @{deploy.status.conditions}
\ Should Be Equal As Strings ${status} True ignore_case=True msg=${Component} is not available
*** Keywords ***