Jira: [VAL-83]
bluva.py is taking varibles.yaml and writing updated version to
varibles_updated.yaml
varibles_updated.yaml is passed to robot framework.
OperatingSystem.Get Environment is better than $HOME.
Each container automatically removed
Each test suite has a debug.log by default
Signed-off-by: Naga Sugguna <ns156u@att.com>
Change-Id: Iae95d1ee12c8c5e44949be3faf5b0fc9fc40266e
"""Start docker container for given layer
"""
volume_list = get_volumes('common') + get_volumes(layer)
"""Start docker container for given layer
"""
volume_list = get_volumes('common') + get_volumes(layer)
- cmd = ("docker run" + volume_list + _SUBNET +
+ cmd = ("docker run --rm" + volume_list + _SUBNET +
" akraino/validation:{0}-latest"
" /bin/sh -c"
" 'cd /opt/akraino/validation "
" akraino/validation:{0}-latest"
" /bin/sh -c"
" 'cd /opt/akraino/validation "
variables_file = mypath.parents[1].joinpath("tests/variables.yaml")
variables_dict = yaml.safe_load(variables_file.open())
variables_dict['log_path'] = str(results_path)
variables_file = mypath.parents[1].joinpath("tests/variables.yaml")
variables_dict = yaml.safe_load(variables_file.open())
variables_dict['log_path'] = str(results_path)
- variables_file.write_text(str(variables_dict))
+ variables_updated_file = mypath.parents[1].joinpath("tests/variables_updated.yaml")
+ variables_updated_file.write_text(str(variables_dict))
- args = ["robot", "-V", str(variables_file), "-d",
- str(results_path), str(test_path)]
+ args = ["robot", "-V", str(variables_updated_file), "-d", str(results_path),
+ "-b", "debug.log", str(test_path)]
print('Executing testcase {}'.format(name))
print('show_stopper {}'.format(show_stopper))
print('Executing testcase {}'.format(name))
print('show_stopper {}'.format(show_stopper))
volumes:
# location of the ssh key to access the cluster
volumes:
# location of the ssh key to access the cluster
local: ''
target: '/root/.ssh'
# location of the k8s access files (config file, certificates, keys)
local: ''
target: '/root/.ssh'
# location of the k8s access files (config file, certificates, keys)
- blueprint_dir
- results_dir
hardware:
- blueprint_dir
- results_dir
hardware:
+ - ssh_key_dir
+ docker:
+ - ssh_key_dir
- kube_config_dir
k8s_networking:
- kube_config_dir
k8s_networking:
- kube_config_dir
sds:
sdn:
- kube_config_dir
sds:
sdn:
*** Variables ***
${ETCD_VERSION} 3
*** Variables ***
${ETCD_VERSION} 3
-${SSH_KEYFILE} ${HOME}/.ssh/id_rsa
+${SSH_KEYFILE} /root/.ssh/id_rsa
*** Keywords ***
Open Connection And Log In
*** Keywords ***
Open Connection And Log In
*** Variables ***
${LOG} ${LOG_PATH}${/}${SUITE_NAME.replace(' ','_')}.log
*** Variables ***
${LOG} ${LOG_PATH}${/}${SUITE_NAME.replace(' ','_')}.log
-#${USERNAME} mm747b
-#${HOME} /home/${USERNAME}
-#${HOST} aknode109
+${SSH_KEYFILE} /root/.ssh/id_rsa
*** Keywords ***
Open Connection And Log In
Open Connection ${HOST}
*** Keywords ***
Open Connection And Log In
Open Connection ${HOST}
- Login With Public Key ${USERNAME} ${HOME}/.ssh/id_rsa
+ Login With Public Key ${USERNAME} ${SSH_KEYFILE}
# This file provides variables required by robot testcases
# This file can be passed to robot testcases as follows
# This file provides variables required by robot testcases
# This file can be passed to robot testcases as follows
-# $ robot -v varables.yaml <robot test case file>
+# $ robot -V variables.yaml <robot test case file>
#
# All keys are converted UPPERCASE before submitting to robot. YAML notation is
# smallcase and Robot variables notation is UPPERCASE so industry is following
# this.
#
# All keys are converted UPPERCASE before submitting to robot. YAML notation is
# smallcase and Robot variables notation is UPPERCASE so industry is following
# this.
+#
+# bluval.py takes this file and updates it to new file and passes to
+# robot framework
+#
+
### Input variables cluster's master host
### Input variables cluster's master host
-host: aknode109 # cluster's master host address
-username: mm747b # user credentials
-home: /home/mm747b # Public keys location
-ssh_keyfile: ~/.ssh/id_rsa # Identity file for authentication
+host: 172.28.17.206 # cluster's master host address
+username: cloudadmin # login name to connect to cluster
+ssh_keyfile: /root/.ssh/id_rsa # Identity file for authentication
+
+### bluval.py adds/modifies following, before passing to robot.
+### while debugging from CLI user has to modify these
+# log_path: /opt/akraino/results/<layer>/<what>
### Input variables for bios_version_dell.robot
sysinfo: PowerEdge R740xd
### Input variables for bios_version_dell.robot
sysinfo: PowerEdge R740xd