Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*** Settings ***
Documentation Test 13-1 - vMotion VCH Appliance
Resource ../../resources/Util.robot
Suite Setup Wait Until Keyword Succeeds 10x 10m Create a VSAN Cluster vic-vmotion-13-1
Suite Setup Nimbus Suite Setup Create a VSAN Cluster vic-vmotion-13-1
Suite Teardown Run Keyword And Ignore Error Nimbus Cleanup ${list}
Test Teardown Run Keyword If Test Failed Gather All vSphere Logs

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*** Settings ***
Documentation Test 13-2 - vMotion Container
Resource ../../resources/Util.robot
Suite Setup Wait Until Keyword Succeeds 10x 10m Create a VSAN Cluster vic-vmotion-13-2
Suite Setup Nimbus Suite Setup Create a VSAN Cluster vic-vmotion-13-2
Suite Teardown Run Keyword And Ignore Error Nimbus Cleanup ${list}
Test Teardown Run Keyword If Test Failed Gather All vSphere Logs

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
Documentation Test 21-01 - Whitelist
Resource ../../resources/Util.robot
Resource ../../resources/Harbor-Util.robot
Suite Setup Wait Until Keyword Succeeds 10x 10m Setup Harbor
Suite Setup Nimbus Suite Setup Setup Harbor
Suite Teardown Nimbus Cleanup ${list} ${false}
Test Teardown Run Keyword If Test Failed Cleanup VIC Appliance On Test Server

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*** Settings ***
Documentation Test 21-2 - Artifactory
Resource ../../resources/Util.robot
Suite Setup Wait Until Keyword Succeeds 10x 10m Artifactory Setup
Suite Setup Nimbus Suite Setup Artifactory Setup
Suite Teardown Run Keyword And Ignore Error Nimbus Cleanup ${list}

*** Keywords ***
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*** Settings ***
Documentation Test 5-1 - Distributed Switch
Resource ../../resources/Util.robot
Suite Setup Wait Until Keyword Succeeds 10x 10m Distributed Switch Setup
Suite Setup Nimbus Suite Setup Distributed Switch Setup
Suite Teardown Run Keyword And Ignore Error Nimbus Cleanup ${list}

*** Variables ***
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*** Settings ***
Documentation Test 5-10 - Multiple Datacenters
Resource ../../resources/Util.robot
Suite Setup Wait Until Keyword Succeeds 10x 10m Multiple Datacenter Setup
Suite Setup Nimbus Suite Setup Multiple Datacenter Setup
Suite Teardown Run Keyword And Ignore Error Nimbus Cleanup ${list}

*** Keywords ***
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*** Settings ***
Documentation Test 5-11 - Multiple Clusters
Resource ../../resources/Util.robot
Suite Setup Wait Until Keyword Succeeds 10x 10m Multiple Cluster Setup
Suite Setup Nimbus Suite Setup Multiple Cluster Setup
Suite Teardown Run Keyword And Ignore Error Nimbus Cleanup Single VM '*5-11-multiple-cluster*' ${false}
Test Teardown Cleanup VIC Appliance On Test Server

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*** Settings ***
Documentation Test 5-12 - Multiple VLAN
Resource ../../resources/Util.robot
Suite Setup Wait Until Keyword Succeeds 10x 10m Multiple VLAN Setup
Suite Setup Nimbus Suite Setup Multiple VLAN Setup
Suite Teardown Run Keyword And Ignore Error Nimbus Cleanup ${list}
Test Teardown Cleanup VIC Appliance On Test Server

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*** Settings ***
Documentation Test 5-13 - Invalid ESXi Install
Resource ../../resources/Util.robot
Suite Setup Wait Until Keyword Succeeds 10x 10m Invalid ESXi Install Setup
Suite Setup Nimbus Suite Setup Invalid ESXi Install Setup
Suite Teardown Run Keyword And Ignore Error Nimbus Cleanup ${list}

*** Keywords ***
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*** Settings ***
Documentation Test 5-14 - Remove Container OOB
Resource ../../resources/Util.robot
Suite Setup Wait Until Keyword Succeeds 10x 10m Remove Container OOB Setup
Suite Setup Nimbus Suite Setup Remove Container OOB Setup
Suite Teardown Run Keyword And Ignore Error Nimbus Cleanup ${list}

*** Keywords ***
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*** Settings ***
Documentation Test 5-15 - NFS Datastore
Resource ../../resources/Util.robot
Suite Setup Wait Until Keyword Succeeds 10x 10m NFS Datastore Setup
Suite Setup Nimbus Suite Setup NFS Datastore Setup
Suite Teardown Run Keyword And Ignore Error Nimbus Cleanup Single VM '*5-15-nfs-datastore*'

*** Keywords ***
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*** Settings ***
Documentation Test 5-17 - FC Datastore
Resource ../../resources/Util.robot
Suite Setup Wait Until Keyword Succeeds 10x 10m FC Datastore Setup
Suite Setup Nimbus Suite Setup FC Datastore Setup
Suite Teardown Run Keyword And Ignore Error Nimbus Cleanup ${list}

*** Keywords ***
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*** Settings ***
Documentation Test 5-18 - Datastore Cluster SDRS
Resource ../../resources/Util.robot
#Suite Setup Wait Until Keyword Succeeds 10x 10m SDRS Datastore Setup
#Suite Setup Nimbus Suite Setup SDRS Datastore Setup
#Test Teardown Run Keyword And Ignore Error Nimbus Cleanup ${list}

*** Keywords ***
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*** Settings ***
Documentation Test 5-2 - Cluster
Resource ../../resources/Util.robot
Suite Setup Wait Until Keyword Succeeds 10x 10m Cluster Setup
Suite Setup Nimbus Suite Setup Cluster Setup
Suite Teardown Run Keyword And Ignore Error Nimbus Cleanup ${list}

*** Keywords ***
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*** Settings ***
Documentation Test 5-21 - Datastore-Path
Resource ../../resources/Util.robot
Suite Setup Wait Until Keyword Succeeds 10x 10m Setup Suite ESX
Suite Setup Nimbus Suite Setup Setup Suite ESX
Suite Teardown Run Keyword And Ignore Error Nimbus Cleanup ${list}

*** Variables ***
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*** Settings ***
Documentation Test 5-22 - NFS Volume
Resource ../../resources/Util.robot
Suite Setup Wait Until Keyword Succeeds 10x 10m Setup ESX And NFS Suite
Suite Setup Nimbus Suite Setup Setup ESX And NFS Suite
Suite Teardown Run Keyword And Ignore Error NFS Volume Cleanup
Test Teardown Gather NFS Logs

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*** Settings ***
Documentation Test 5-24 - Non vSphere Local Cluster
Resource ../../resources/Util.robot
Suite Setup Wait Until Keyword Succeeds 10x 10m Non vSphere Local Cluster Install Setup
Suite Setup Nimbus Suite Setup Non vSphere Local Cluster Install Setup
Suite Teardown Run Keyword And Ignore Error Nimbus Cleanup ${list}
Test Teardown Cleanup VIC Appliance On Test Server

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*** Settings ***
Documentation Test 5-25 - OPS-User-Grant
Resource ../../resources/Util.robot
Suite Setup Wait Until Keyword Succeeds 10x 10m Ops User Create
Suite Setup Nimbus Suite Setup Ops User Create
Suite Teardown Run Keyword And Ignore Error Nimbus Cleanup ${list}

*** Keywords ***
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Suite Teardown Run Keyword And Ignore Error Nimbus Cleanup ${list}
*** Keywords ***
Setup VC With Static IP
${name}= Evaluate 'vic-5-26-' + str(random.randint(1000,9999)) modules=random
Wait Until Keyword Succeeds 10x 10m Create Simple VC Cluster With Static IP ${name}
Nimbus Suite Setup Create Simple VC Cluster With Static IP ${name}

*** Test Cases ***
Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*** Settings ***
Documentation Test 5-27 - Selenium Grid
Resource ../../resources/Util.robot
Suite Setup Wait Until Keyword Succeeds 10x 10m Selenium Grid Test Setup
Suite Setup Nimbus Suite Setup Selenium Grid Test Setup
Suite Teardown Run Keyword And Ignore Error Nimbus Cleanup ${list}

*** Keywords ***
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Deploy Testbed With Static IP

Setup VC With No WAN
${name}= Evaluate 'vic-5-28-' + str(random.randint(1000,9999)) modules=random
Wait Until Keyword Succeeds 10x 10m Create Simple VC Cluster With Static IP ${name}
Nimbus Suite Setup Create Simple VC Cluster With Static IP ${name}
Set Test Environment Variables

Log To Console Create a vch with a public network on a no-wan portgroup.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*** Settings ***
Documentation Test 5-3 - Enhanced Linked Mode
Resource ../../resources/Util.robot
Suite Setup Wait Until Keyword Succeeds 10x 10m Enhanced Link Mode Setup
Suite Setup Nimbus Suite Setup Enhanced Link Mode Setup
Suite Teardown Run Keyword And Ignore Error Nimbus Cleanup ${list}

*** Keywords ***
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*** Settings ***
Documentation Test 5-4 - High Availability
Resource ../../resources/Util.robot
Suite Setup Wait Until Keyword Succeeds 10x 10m High Availability Setup
Suite Setup Nimbus Suite Setup High Availability Setup
Suite Teardown Nimbus Cleanup ${list}
Test Teardown Run Keyword If Test Failed Gather vSphere Logs

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*** Settings ***
Documentation Test 5-5 - Heterogeneous ESXi
Resource ../../resources/Util.robot
Suite Setup Wait Until Keyword Succeeds 10x 10m Heterogenous ESXi Setup
Suite Setup Nimbus Suite Setup Heterogenous ESXi Setup
Suite Teardown Run Keyword And Ignore Error Nimbus Cleanup ${list}
Force Tags hetero

Expand All @@ -27,15 +27,15 @@ Heterogenous ESXi Setup
${pid-vc}= Deploy Nimbus vCenter Server Async ${vc}
Set Suite Variable @{list} %{NIMBUS_USER}-${vc}

Run Keyword And Ignore Error Cleanup Nimbus PXE folder %{NIMBUS_USER} %{NIMBUS_PASSWORD}
Run Keyword And Ignore Error Cleanup Nimbus Folders ${deletePXE}=%{true}
${esx1} ${esx1-ip}= Deploy Nimbus ESXi Server %{NIMBUS_USER} %{NIMBUS_PASSWORD} 3029944
Append To List ${list} ${esx1}

Run Keyword And Ignore Error Cleanup Nimbus PXE folder %{NIMBUS_USER} %{NIMBUS_PASSWORD}
Run Keyword And Ignore Error Cleanup Nimbus Folders ${deletePXE}=%{true}
${esx2} ${esx2-ip}= Deploy Nimbus ESXi Server %{NIMBUS_USER} %{NIMBUS_PASSWORD} 5572656
Append To List ${list} ${esx2}

Run Keyword And Ignore Error Cleanup Nimbus PXE folder %{NIMBUS_USER} %{NIMBUS_PASSWORD}
Run Keyword And Ignore Error Cleanup Nimbus Folders ${deletePXE}=%{true}
${esx3} ${esx3-ip}= Deploy Nimbus ESXi Server %{NIMBUS_USER} %{NIMBUS_PASSWORD}
Append To List ${list} ${esx3}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*** Settings ***
Documentation Test 5-6-1 - VSAN-Simple
Resource ../../resources/Util.robot
Suite Setup Wait Until Keyword Succeeds 10x 10m Simple VSAN Setup
Suite Setup Nimbus Suite Setup Simple VSAN Setup
Suite Teardown Run Keyword And Ignore Error Nimbus Cleanup ${list}

*** Keywords ***
Expand All @@ -24,28 +24,25 @@ Simple VSAN Setup
Run Keyword And Ignore Error Nimbus Cleanup ${list} ${false}
${name}= Evaluate 'vic-vsan-' + str(random.randint(1000,9999)) modules=random
Set Suite Variable ${user} %{NIMBUS_USER}
${out}= Deploy Nimbus Testbed %{NIMBUS_USER} %{NIMBUS_PASSWORD} --plugin testng --vcfvtBuildPath /dbc/pa-dbc1111/mhagen/ --noSupportBundles --vcvaBuild ${VC_VERSION} --esxPxeDir ${ESX_VERSION} --esxBuild ${ESX_VERSION} --testbedName vic-vsan-simple-pxeBoot-vcva --runName ${name}
${out}= Deploy Nimbus Testbed %{NIMBUS_USER} %{NIMBUS_PASSWORD} spec=vic-vsan.rb args=--plugin testng --noSupportBundles --vcvaBuild ${VC_VERSION} --esxPxeDir ${ESX_VERSION} --esxBuild ${ESX_VERSION} --testbedName vic-vsan-simple-pxeBoot-vcva --runName ${name}

Log ${out}
Should Contain ${out} "deployment_result"=>"PASS"

${out}= Split To Lines ${out}
:FOR ${line} IN @{out}
\ ${status}= Run Keyword And Return Status Should Contain ${line} .vcva-${VC_VERSION}' is up. IP:
\ ${status}= Run Keyword And Return Status Should Contain ${line} .vc.0' is up. IP:
\ ${ip}= Run Keyword If ${status} Fetch From Right ${line} ${SPACE}
\ Run Keyword If ${status} Set Suite Variable ${vc-ip} ${ip}
\ Exit For Loop If ${status}

Set Suite Variable @{list} ${user}-${name}.vcva-${VC_VERSION} ${user}-${name}.esx.0 ${user}-${name}.esx.1 ${user}-${name}.esx.2 ${user}-${name}.esx.3 ${user}-${name}.nfs.0 ${user}-${name}.iscsi.0
Set Suite Variable @{list} ${user}-${name}.vcva-${VC_VERSION} ${user}-${name}.esx.0 ${user}-${name}.esx.1 ${user}-${name}.esx.2 ${user}-${name}.esx.3 ${user}-${name}.nfs.0

Log To Console Set environment variables up for GOVC
Set Environment Variable GOVC_URL ${vc-ip}
Set Environment Variable GOVC_USERNAME Administrator@vsphere.local
Set Environment Variable GOVC_PASSWORD Admin\!23

Add Host To Distributed Switch /vcqaDC/host/cls

Log To Console Enable DRS and VSAN on the cluster
${out}= Run govc cluster.change -drs-enabled /vcqaDC/host/cls
Should Be Empty ${out}

Log To Console Deploy VIC to the VC cluster
Set Environment Variable TEST_URL_ARRAY ${vc-ip}
Set Environment Variable TEST_USERNAME Administrator@vsphere.local
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2017 VMware, Inc. All Rights Reserved.
# Copyright 2016-2018 VMware, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -15,7 +15,7 @@
*** Settings ***
Documentation Test 5-6-2 - VSAN-Complex
Resource ../../resources/Util.robot
Suite Setup Wait Until Keyword Succeeds 10x 10m VSAN Complex Setup
Suite Setup Nimbus Suite Setup VSAN Complex Setup
Suite Teardown Run Keyword And Ignore Error Nimbus Cleanup ${list}
Force Tags vsan-complex

Expand All @@ -25,9 +25,11 @@ VSAN Complex Setup
Run Keyword And Ignore Error Nimbus Cleanup ${list} ${false}
${name}= Evaluate 'vic-vsan-complex-' + str(random.randint(1000,9999)) modules=random
Set Suite Variable ${user} %{NIMBUS_USER}
${out}= Deploy Nimbus Testbed %{NIMBUS_USER} %{NIMBUS_PASSWORD} --plugin testng --vcfvtBuildPath /dbc/pa-dbc1111/mhagen/ --noSupportBundles --vcvaBuild ${VC_VERSION} --esxPxeDir ${ESX_VERSION} --esxBuild ${ESX_VERSION} --testbedName vic-vsan-complex-pxeBoot-vcva --runName ${name}
${out}= Deploy Nimbus Testbed %{NIMBUS_USER} %{NIMBUS_PASSWORD} spec=vic-vsan.rb args=--plugin testng --noSupportBundles --vcvaBuild ${VC_VERSION} --esxPxeDir ${ESX_VERSION} --esxBuild ${ESX_VERSION} --testbedName vic-vsan-complex-pxeBoot-vcva --runName ${name}

Log ${out}
Should Contain ${out} "deployment_result"=>"PASS"

${out}= Split To Lines ${out}
:FOR ${line} IN @{out}
\ ${status}= Run Keyword And Return Status Should Contain ${line} .vcva-${VC_VERSION}' is up. IP:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*** Settings ***
Documentation Test 5-8 - DRS
Resource ../../resources/Util.robot
Suite Setup Wait Until Keyword Succeeds 10x 10m DRS Setup
Suite Setup Nimbus Suite Setup DRS Setup
Suite Teardown Nimbus Cleanup ${list}

*** Keywords ***
Expand Down
31 changes: 23 additions & 8 deletions tests/resources/Nimbus-Util.robot
Original file line number Diff line number Diff line change
Expand Up @@ -198,17 +198,17 @@ Deploy Nimbus Testbed
Wait Until Keyword Succeeds 2 min 30 sec Login ${user} ${password}

${specarg}= Set Variable If '${spec}' == '${EMPTY}' ${EMPTY} --testbedSpecRubyFile ./%{BUILD_TAG}/testbeds/${spec}
Run Keyword Unless '${spec}' == '${EMPTY}' Put File tests/resources/nimbus-testbeds/${spec} destination=./%{BUILD_TAG}/testbeds/

:FOR ${IDX} IN RANGE 1 5
\ Run Keyword Unless '${spec}' == '${EMPTY}' Put File tests/resources/nimbus-testbeds/${spec} destination=./%{BUILD_TAG}/testbeds/
\ ${out}= Execute Command ${NIMBUS_LOCATION} nimbus-testbeddeploy --lease 0.25 ${specarg} ${args}
\ Log ${out}
\ # Make sure the deploy actually worked
\ ${status}= Run Keyword And Return Status Should Contain ${out} "deployment_result"=>"PASS"
\ Return From Keyword If ${status} ${out}
\ Log To Console Nimbus deployment ${IDX} failed, trying again in 5 minutes
\ Sleep 5 minutes
Fail Deploy Nimbus Testbed Failed 5 times over the course of more than 25 minutes
\ Log To Console Nimbus deployment ${IDX} failed, trying again in 1 minute
\ Sleep 1 minutes
Fail Deploy Nimbus Testbed Failed 5 times over the course of more than 5 minutes

Kill Nimbus Server
[Arguments] ${user} ${password} ${name}
Expand Down Expand Up @@ -416,13 +416,14 @@ Deploy Simple NFS Testbed
[Arguments] ${user} ${password} ${spec}= ${args}=
${name}= Evaluate 'NFS-' + str(random.randint(1000,9999)) + str(time.clock()) modules=random,time
Log To Console \nDeploying Nimbus NFS testbed: ${name}
Open Connection %{NIMBUS_GW}
Wait Until Keyword Succeeds 2 min 30 sec Login ${user} ${password}

${out}= Execute Command ${NIMBUS_LOCATION} nimbus-testbeddeploy spec=${spec} args=--testbedName nfs --runName ${name} ${args}
${out}= Deploy Nimbus Testbed user=${user} password=${password} spec=${spec} args=--testbedName nfs --runName ${name} ${args}
Log ${out}
# Make sure the deploy actually worked

# Make sure the deploy actually worked and all components are up
Should Contain ${out} ${name}.nfs.0' is up. IP:
Should Contain ${out} ${name}.nfs.1' is up. IP:
Should Contain ${out} ${name}.esx.0' is up. IP:

Open Connection %{NIMBUS_GW}
Wait Until Keyword Succeeds 10 min 30 sec Login %{NIMBUS_USER} %{NIMBUS_PASSWORD}
Expand Down Expand Up @@ -571,3 +572,17 @@ Get Name of First Local Storage For Host
${datastores}= Run govc host.info -host ${host} -json | jq -r '.HostSystems[].Config.FileSystemVolume.MountInfo[].Volume | select (.Type\=\="VMFS") | select (.Local\=\=true) | .Name'
@{datastores}= Split To Lines ${datastores}
[Return] @{datastores}[0]

# Simple wrapper to Wait Until Keyword Succeeds that allows callers to:
# * use default retry count and delay
# * specify specific retry counts and delays
# * executor can globally override the above via the environment variables:
# NIMBUS_RETRY_ATTEMPTS
# NIMBUS_RETRY_DELAY
Nimbus Suite Setup
[Arguments] ${keyword} ${attempts}=1x ${delay}=1m @{varargs}

${useAttempts}= Get Environment Variable NIMBUS_RETRY_ATTEMPTS ${attempts}x
${useDelay}= Get Environment Variable NIMBUS_RETRY_DELAY ${delay}

Wait Until Keyword Succeeds ${useAttempts} ${useDelay} ${keyword} @{varargs}
Loading