diff options
author | DR695H <dr695h@att.com> | 2019-07-15 13:32:20 -0400 |
---|---|---|
committer | DR695H <dr695h@att.com> | 2019-07-15 15:32:44 -0400 |
commit | 97fec22483d9410037714505b954ff80a0d15a0c (patch) | |
tree | 9b7b2662b5997be787a55597b5f14092a298bec6 /robot/resources | |
parent | 3148028e8f2e1a9cbd85d11002d3a78bfc620ba8 (diff) |
use the public key directly
using it from the property file rather than a file allows it to be set
by someon with no code change in robot
Issue-ID: TEST-167
Change-Id: If081282af993d5c55bf5d2a4eff9878cb0bb463f
Signed-off-by: DR695H <dr695h@att.com>
Diffstat (limited to 'robot/resources')
-rw-r--r-- | robot/resources/global_properties.robot | 2 | ||||
-rw-r--r-- | robot/resources/openstack/nova_interface.robot | 4 | ||||
-rw-r--r-- | robot/resources/policy_interface.robot | 31 | ||||
-rw-r--r-- | robot/resources/portal-sdk/portalDef.robot | 4 | ||||
-rw-r--r-- | robot/resources/sdngc_interface.robot | 10 | ||||
-rw-r--r-- | robot/resources/so/direct_instantiate.robot | 3 | ||||
-rw-r--r-- | robot/resources/stack_validation/validate_common.robot | 5 |
7 files changed, 5 insertions, 54 deletions
diff --git a/robot/resources/global_properties.robot b/robot/resources/global_properties.robot index fa07cd25..cdb73f4f 100644 --- a/robot/resources/global_properties.robot +++ b/robot/resources/global_properties.robot @@ -28,8 +28,6 @@ ${GLOBAL_BUILD_NUMBER} 0 ${GLOBAL_VID_UI_TIMEOUT_SHORT} 20s ${GLOBAL_VID_UI_TIMEOUT_MEDIUM} 60s ${GLOBAL_VID_UI_TIMEOUT_LONG} 120s -${GLOBAL_VM_PRIVATE_KEY} ${EXECDIR}/robot/assets/keys/robot_ssh_private_key.pvt -${GLOBAL_ONAP_PRIVATE_KEY} ${EXECDIR}/robot/assets/keys/onap_dev.pvt ${GLOBAL_AAI_INDEX_PATH} /aai/v14 ${GLOBAL_AAI_ZONE_ID} nova1 ${GLOBAL_AAI_ZONE_NAME} nova diff --git a/robot/resources/openstack/nova_interface.robot b/robot/resources/openstack/nova_interface.robot index b1f07f86..52bd174c 100644 --- a/robot/resources/openstack/nova_interface.robot +++ b/robot/resources/openstack/nova_interface.robot @@ -13,7 +13,6 @@ Resource openstack_common.robot ${OPENSTACK_NOVA_API_VERSION} /v2 ${OPENSTACK_NOVA_KEYPAIR_PATH} /os-keypairs ${OPENSTACK_NOVA_KEYPAIR_ADD_BODY_FILE} openstack/nova_add_keypair.jinja -${OPENSTACK_NOVA_KEYPAIR_SSH_KEY} robot/assets/keys/robot_ssh_public_key.txt ${OPENSTACK_NOVA_FLAVORS_PATH} /flavors ${OPENSTACK_NOVA_SERVERS_PATH} /servers ${OPENSTACK_NOVA_IMAGES_PATH} /images @@ -30,8 +29,7 @@ Get Openstack Keypair Add Openstack Keypair [Documentation] Runs an Openstack Request to add a keypair and returns the keypair name - [Arguments] ${alias} ${name} - ${ssh_key}= OperatingSystem.Get File ${OPENSTACK_NOVA_KEYPAIR_SSH_KEY} + [Arguments] ${alias} ${name} ${ssh_key} ${arguments}= Create Dictionary name=${name} publickey=${ssh_key} Create Environment openstack ${GLOBAL_TEMPLATE_FOLDER} ${data}= Apply Template openstack ${OPENSTACK_NOVA_KEYPAIR_ADD_BODY_FILE} ${arguments} diff --git a/robot/resources/policy_interface.robot b/robot/resources/policy_interface.robot index 06d9e0f8..65698a1a 100644 --- a/robot/resources/policy_interface.robot +++ b/robot/resources/policy_interface.robot @@ -138,22 +138,6 @@ Run Policy Get Configs Request Log Received response from policy ${resp.text} [Return] ${resp} -Update vVFWCL Policy Old - [Arguments] ${resource_id} - Run Keyword and Ignore Error Delete vFWCL Policy - Sleep 20s - Log Create vFWCL Policy - Create vFWCL Policy ${resource_id} - Sleep 5s - Log Push vFWCL Policy - Push vFWCL Policy - Sleep 20s - Log Reboot Drools - Reboot Drools - Sleep 20s - Log Validate vFWCL Policy - Validate the vFWCL Policy Old - Update vVFWCL Policy [Arguments] ${resource_id} Log Create vFWCL Monitoring Policy @@ -191,21 +175,6 @@ Push vFWCL Policy ${resp}= Run Policy Put Request /pdp/api/pushPolicy ${data} Should Be Equal As Strings ${resp.status_code} 200 -Reboot Drools - ${stop}= Catenate docker exec -t -u policy drools bash -c "source /opt/app/policy/etc/profile.d/env.sh; policy stop" - ${start}= Catenate docker exec -t -u policy drools bash -c "source /opt/app/policy/etc/profile.d/env.sh; policy start" - Wait Until Keyword Succeeds 120 5 sec Open Connection And Log In ${GLOBAL_INJECTED_POLICY_IP_ADDR} root ${GLOBAL_VM_PRIVATE_KEY} - Write ${stop} - ${status} ${stdout}= Run Keyword And Ignore Error SSHLibrary.Read Until Regexp has stopped - Log ${status}: stdout=${stdout} - ${ctrlc}= Evaluate '\x03' - Run Keyword If '${status}' == 'FAIL' Write ${ctrlc} - Sleep 5s - Write ${start} - ${stdout}= SSHLibrary.Read Until Regexp is running - Log stdout=${stdout} - Should Contain ${stdout} is running - Validate the vFWCL Policy Old ${resp}= Run Drools Get Request /policy/pdp/engine/controllers/amsterdam/drools Should Be Equal As Strings ${resp.status_code} 200 diff --git a/robot/resources/portal-sdk/portalDef.robot b/robot/resources/portal-sdk/portalDef.robot index b6f8e577..66928fa4 100644 --- a/robot/resources/portal-sdk/portalDef.robot +++ b/robot/resources/portal-sdk/portalDef.robot @@ -21,12 +21,8 @@ ${PORTAL_HOME_URL} ${PORTAL_URL}${PORTAL_ENV}/applicationsHome ${PORTAL_HEALTH_CHECK_PATH} ${PORTAL_ENV}/portalApi/healthCheck ${PORTAL_XDEMPAPP_REST_URL} ${PORTAL_URL}/ONAPPORTALSDK/api/v2 ${PORTAL_ASSETS_DIRECTORY} ../../assets/widgets/ -${GLOBAL_APPLICATION_ID} robot-functional ${GLOBAL_PORTAL_ADMIN_USER} demo ${GLOBAL_PORTAL_ADMIN_PWD} demo123456! -${GLOBAL_MSO_STATUS_PATH} /ecomp/mso/infra/orchestrationRequests/v2/ -${GLOBAL_BUILD_NUMBER} 0 -${GLOBAL_VM_PRIVATE_KEY} ${EXECDIR}/robot/assets/keys/robot_ssh_private_key.pvt ${jira} jira ${RESOURCE_PATH} ${PORTAL_URL}/auxapi/ticketevent ${portal_Template} portal/portal.jinja diff --git a/robot/resources/sdngc_interface.robot b/robot/resources/sdngc_interface.robot index 1311f6e5..48342c3f 100644 --- a/robot/resources/sdngc_interface.robot +++ b/robot/resources/sdngc_interface.robot @@ -27,7 +27,6 @@ ${SDNGC_ADMIN_ENDPOINT} ${GLOBAL_SDNGC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_S ${SDNGC_ADMIN_SIGNUP_URL} ${SDNGC_ADMIN_ENDPOINT}/signup ${SDNGC_ADMIN_LOGIN_URL} ${SDNGC_ADMIN_ENDPOINT}/login ${SDNGC_ADMIN_VNF_PROFILE_URL} ${SDNGC_ADMIN_ENDPOINT}/mobility/getVnfProfile -${VNF_KEYPAIR_SSH_KEY} robot/assets/keys/onap_dev_public.txt *** Keywords *** Run SDNGC Health Check @@ -59,8 +58,7 @@ Preload Network Preload Vcpe vGW [Arguments] ${brg_mac} ${cpe_network_name} ${cpe_subnet_name} ${mux_gw_net} ${mux_gw_subnet} ${name_suffix}= Generate Timestamp - ${ssh_key}= OperatingSystem.Get File ${VNF_KEYPAIR_SSH_KEY} - ${parameters}= Create Dictionary pub_key=${ssh_key} brg_mac=${brg_mac} cpe_public_net=${cpe_network_name} cpe_public_subnet=${cpe_subnet_name} mux_gw_net=${mux_gw_net} mux_gw_subnet=${mux_gw_subnet} suffix=${name_suffix} oam_onap_net=oam_network_2No2 oam_onap_subnet=oam_network_2No2 public_net_id=${GLOBAL_INJECTED_PUBLIC_NET_ID} + ${parameters}= Create Dictionary pub_key=${GLOBAL_INJECTED_PUBLIC_KEY} brg_mac=${brg_mac} cpe_public_net=${cpe_network_name} cpe_public_subnet=${cpe_subnet_name} mux_gw_net=${mux_gw_net} mux_gw_subnet=${mux_gw_subnet} suffix=${name_suffix} oam_onap_net=oam_network_2No2 oam_onap_subnet=oam_network_2No2 public_net_id=${GLOBAL_INJECTED_PUBLIC_NET_ID} Create Environment sdnc ${GLOBAL_TEMPLATE_FOLDER} ${data}= Apply Template sdnc ${PRELOAD_TOPOLOGY_OPERATION_BODY}/template.vcpe_vgw_vfmodule.jinja ${parameters} ${auth}= Create List ${GLOBAL_SDNGC_USERNAME} ${GLOBAL_SDNGC_PASSWORD} @@ -69,8 +67,7 @@ Preload Vcpe vGW Preload Vcpe vGW Gra [Arguments] ${brg_mac} ${cpe_public_network_name} ${cpe_public_subnet_name} ${mux_gw_net} ${mux_gw_subnet} ${name_suffix}= Generate Timestamp - ${ssh_key}= OperatingSystem.Get File ${VNF_KEYPAIR_SSH_KEY} - ${parameters}= Create Dictionary pub_key=${ssh_key} brg_mac=${brg_mac} cpe_public_net=${cpe_public_network_name} cpe_public_subnet=${cpe_public_subnet_name} mux_gw_net=${mux_gw_net} mux_gw_subnet=${mux_gw_subnet} suffix=${name_suffix} oam_onap_net=oam_network_2No2 oam_onap_subnet=oam_network_2No2 public_net_id=${GLOBAL_INJECTED_PUBLIC_NET_ID} + ${parameters}= Create Dictionary pub_key=${GLOBAL_INJECTED_PUBLIC_KEY} brg_mac=${brg_mac} cpe_public_net=${cpe_public_network_name} cpe_public_subnet=${cpe_public_subnet_name} mux_gw_net=${mux_gw_net} mux_gw_subnet=${mux_gw_subnet} suffix=${name_suffix} oam_onap_net=oam_network_2No2 oam_onap_subnet=oam_network_2No2 public_net_id=${GLOBAL_INJECTED_PUBLIC_NET_ID} Create Environment sdnc ${GLOBAL_TEMPLATE_FOLDER} ${data}= Apply Template sdnc ${PRELOAD_TOPOLOGY_OPERATION_BODY}/template.vcpe_gwgra_vfmodule.jinja ${parameters} ${auth}= Create List ${GLOBAL_SDNGC_USERNAME} ${GLOBAL_SDNGC_PASSWORD} @@ -79,10 +76,9 @@ Preload Vcpe vGW Gra Preload Generic VfModule [Arguments] ${service_instance_id} ${vnf_model} ${model_customization_name} ${short_model_customization_name} ${cpe_public_network_name}=None ${cpe_public_subnet_name}=None ${cpe_signal_network_name}=None ${cpe_signal_subnet_name}=None ${name_suffix}= Generate Timestamp - ${ssh_key}= OperatingSystem.Get File ${VNF_KEYPAIR_SSH_KEY} ${vfmodule_name}= Catenate SEPARATOR=_ vf ${short_model_customization_name} ${name_suffix} #TODO this became a mess, need to fix - ${parameters}= Create Dictionary pub_key=${ssh_key} suffix=${name_suffix} mr_ip_addr=${GLOBAL_INJECTED_MR_IP_ADDR} mr_ip_port=${GLOBAL_MR_SERVER_PORT} + ${parameters}= Create Dictionary pub_key=${GLOBAL_INJECTED_PUBLIC_KEY} suffix=${name_suffix} mr_ip_addr=${GLOBAL_INJECTED_MR_IP_ADDR} mr_ip_port=${GLOBAL_MR_SERVER_PORT} Set To Dictionary ${parameters} oam_onap_net=oam_network_2No2 oam_onap_subnet=oam_network_2No2 cpe_public_net=${cpe_public_network_name} cpe_public_subnet=${cpe_public_subnet_name} Set To Dictionary ${parameters} cpe_signal_subnet=${cpe_signal_subnet_name} cpe_signal_net=${cpe_signal_network_name} public_net_id=${GLOBAL_INJECTED_PUBLIC_NET_ID} # vnf_type and generic_vnf_type are identical diff --git a/robot/resources/so/direct_instantiate.robot b/robot/resources/so/direct_instantiate.robot index d08ec800..033f886b 100644 --- a/robot/resources/so/direct_instantiate.robot +++ b/robot/resources/so/direct_instantiate.robot @@ -9,9 +9,6 @@ Library SoUtils Library ONAPLibrary.PreloadData Resource ../global_properties.robot -*** Variables *** -${VNF_KEYPAIR_SSH_KEY} robot/assets/keys/onap_dev_public.txt - *** Keywords *** Instantiate Service Direct To SO [Documentation] Creates an entire service from a CSAR diff --git a/robot/resources/stack_validation/validate_common.robot b/robot/resources/stack_validation/validate_common.robot index 9c5be62c..c19d7a5c 100644 --- a/robot/resources/stack_validation/validate_common.robot +++ b/robot/resources/stack_validation/validate_common.robot @@ -19,10 +19,7 @@ Resource packet_generator_interface.robot Wait For Server [Documentation] Attempts to login to the passed server info and verify (??). Uses server info to get public ip and locate corresponding provate key file [Arguments] ${server_ip} ${timeout}=300s - #${file}= Catenate ${GLOBAL_VM_PRIVATE_KEY} - # Preload is using onap public key - ${file}= Catenate ${GLOBAL_ONAP_PRIVATE_KEY} - Wait Until Keyword Succeeds ${timeout} 5 sec Open Connection And Log In ${server_ip} root ${file} + Wait Until Keyword Succeeds ${timeout} 5 sec Open Connection And Log In ${server_ip} root ${GLOBAL_INJECTED_PRIVATE_KEY} ${lines}= Grep Local File "Accepted publickey" /var/log/auth.log Log ${lines} Should Not Be Empty ${lines} |