Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add virtual clouds for test script #720

Merged
merged 1 commit into from
Sep 8, 2021
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
35 changes: 0 additions & 35 deletions src/testclient/scripts/common-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,38 +121,3 @@ function printElapsed() {
echo "${NowHist} ${ElapsedHist} ${CommandHist}" >>./executionStatus.history
}

# function getCloudIndex()
# {
# local CSP=$1

# if [ "${CSP}" == "all" ]; then
# echo "[For all CSP regions (AWS, Azure, GCP, Alibaba, ...)]"
# CSP="aws"
# INDEX=0
# elif [ "${CSP}" == "aws" ]; then
# echo "[For AWS]"
# INDEX=1
# elif [ "${CSP}" == "alibaba" ]; then
# echo "[For Alibaba]"
# INDEX=2
# elif [ "${CSP}" == "gcp" ]; then
# echo "[For GCP]"
# INDEX=3
# elif [ "${CSP}" == "azure" ]; then
# echo "[For Azure]"
# INDEX=4
# elif [ "${CSP}" == "mock" ]; then
# echo "[For Mock driver]"
# INDEX=5
# elif [ "${CSP}" == "openstack" ]; then
# echo "[For OpenStack driver]"
# INDEX=6
# elif [ "${CSP}" == "ncp" ]; then
# echo "[For NCP driver]"
# INDEX=7
# else
# echo "[No acceptable argument was provided (all, aws, azure, gcp, alibaba, mock, openstack, ...).]"
# exit
# fi

# }
239 changes: 154 additions & 85 deletions src/testclient/scripts/conf.env
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#!/bin/bash

## Cloud-Barista API Server Address
# CB-Spider API Server
SpiderServer=localhost:1024

# CB-Tumblebug API Server
TumblebugServer=localhost:1323
# API BasicAuth Header

# CB-Tumblebug API BasicAuth Header
ApiUsername=default
ApiPassword=default
AUTH="Authorization: Basic $(echo -n $ApiUsername:$ApiPassword | base64)"
Expand All @@ -23,13 +24,9 @@ declare -A CONN_CONFIG
declare -A IMAGE_NAME
declare -A SPEC_NAME

#source ./testSet.env
#source $TestSetFile





###########################################
## AWS (21 Regions)
IX=$IndexAWS
IY=0
Expand Down Expand Up @@ -292,7 +289,7 @@ SPEC_NAME[$IX,$IY]=t3.micro




###########################################
## Alibaba (21 Regions)
IX=$IndexAlibaba
IY=0
Expand Down Expand Up @@ -583,7 +580,7 @@ SPEC_NAME[$IX,$IY]=ecs.g6.large




###########################################
## GCP (25 Regions. Recommend 22 Regions.)
IX=$IndexGCP
IY=0
Expand Down Expand Up @@ -902,7 +899,7 @@ SPEC_NAME[$IX,$IY]=${CommonSpec[$IX]}




###########################################
## Azure (40 Regions. Recommend 34 Regions.)
IX=$IndexAzure
IY=0
Expand Down Expand Up @@ -1401,53 +1398,8 @@ SPEC_NAME[$IX,$IY]=${CommonSpec[$IX]}



## Mock (1 Regions)
IX=$IndexMock
ProviderName[$IX]=MOCK
DriverLibFileName[$IX]=mock-driver-v1.0.so
DriverName[$IX]=mock-driver01


# region01
IY=$MockSeoul
# Location: Korea Seoul (Virtual)
RegionName[$IX,$IY]=mock-seoul
RegionKey01[$IX,$IY]=Region
RegionVal01[$IX,$IY]=default
RegionKey02[$IX,$IY]=Zone
RegionVal02[$IX,$IY]=default
CONN_CONFIG[$IX,$IY]=mock-seoul
IMAGE_NAME[$IX,$IY]=mock-vmimage-01
SPEC_NAME[$IX,$IY]=mock-vmspec-01





## Openstack (1 Regions)
IX=$IndexOpenstack
ProviderName[$IX]=OPENSTACK
DriverLibFileName[$IX]=openstack-driver-v1.0.so
DriverName[$IX]=openstack-driver01


# region01
IY=$OpenstackRegion01
# Location: Korea Daejeon (Internal)
RegionName[$IX,$IY]=openstack-region01
RegionKey01[$IX,$IY]=Region
RegionVal01[$IX,$IY]=RegionOne
RegionKey02[$IX,$IY]=Zone
RegionVal02[$IX,$IY]=default
CONN_CONFIG[$IX,$IY]=os-region01
IMAGE_NAME[$IX,$IY]=ubuntu-18.04
SPEC_NAME[$IX,$IY]=m1.medium






###########################################
## NCP (5 Regions)
IX=$IndexNCP
ProviderName[$IX]=NCP
Expand Down Expand Up @@ -1517,29 +1469,7 @@ SPEC_NAME[$IX,$IY]=SPSVRSTAND000025





## Cloud-Twin (1 Regions)
IX=$IndexCloudTwin
ProviderName[$IX]=CLOUDTWIN
DriverLibFileName[$IX]=cloudtwin-driver-v1.0.so
DriverName[$IX]=cloudtwin-driver01


# region01
IY=$CloudTwinRegion01
# Location: Korea Daejeon (Internal)
RegionName[$IX,$IY]=cloudtwin-region01
RegionKey01[$IX,$IY]=Region
RegionVal01[$IX,$IY]=default
CONN_CONFIG[$IX,$IY]=ct-region01
IMAGE_NAME[$IX,$IY]=ubuntu18.04-sshd-systemd
SPEC_NAME[$IX,$IY]=spec-1





###########################################
## Cloudit (1 Regions)
IX=$IndexCloudit
ProviderName[$IX]=CLOUDIT
Expand All @@ -1559,7 +1489,7 @@ SPEC_NAME[$IX,$IY]=small-2




###########################################
## Tencent (17 Regions)
IX=$IndexTencent
ProviderName[$IX]=TENCENT
Expand All @@ -1580,6 +1510,127 @@ SPEC_NAME[$IX,$IY]=



###########################################
## Openstack (1 Regions)
IX=$IndexOpenstack
ProviderName[$IX]=OPENSTACK
DriverLibFileName[$IX]=openstack-driver-v1.0.so
DriverName[$IX]=openstack-driver01


# region01
IY=$OpenstackRegion01
# Location: Korea Daejeon (Internal)
RegionName[$IX,$IY]=openstack-region01
RegionKey01[$IX,$IY]=Region
RegionVal01[$IX,$IY]=RegionOne
RegionKey02[$IX,$IY]=Zone
RegionVal02[$IX,$IY]=default
CONN_CONFIG[$IX,$IY]=os-region01
IMAGE_NAME[$IX,$IY]=ubuntu-18.04
SPEC_NAME[$IX,$IY]=m1.medium


###########################################
## Cloud-Twin (1 Regions)
IX=$IndexCloudTwin
ProviderName[$IX]=CLOUDTWIN
DriverLibFileName[$IX]=cloudtwin-driver-v1.0.so
DriverName[$IX]=cloudtwin-driver01


# region01
IY=$CloudTwinRegion01
# Location: Korea Daejeon (Internal)
RegionName[$IX,$IY]=cloudtwin-region01
RegionKey01[$IX,$IY]=Region
RegionVal01[$IX,$IY]=default
CONN_CONFIG[$IX,$IY]=ct-region01
IMAGE_NAME[$IX,$IY]=ubuntu18.04-sshd-systemd
SPEC_NAME[$IX,$IY]=spec-1




###########################################
## Mock (1 Regions)
IX=$IndexMock
ProviderName[$IX]=MOCK
DriverLibFileName[$IX]=mock-driver-v1.0.so
DriverName[$IX]=mock-driver01


# region01
IY=$MockSeoul
# Location: Korea Seoul (Virtual)
RegionName[$IX,$IY]=mock-seoul
RegionKey01[$IX,$IY]=Region
RegionVal01[$IX,$IY]=default
RegionKey02[$IX,$IY]=Zone
RegionVal02[$IX,$IY]=default
CONN_CONFIG[$IX,$IY]=mock-seoul
IMAGE_NAME[$IX,$IY]=mock-vmimage-01
SPEC_NAME[$IX,$IY]=mock-vmspec-01


###########################################
## TestCloud01 to emulate cloud using Mock driver (1 Regions)
IX=$IndexTestCloud01
ProviderName[$IX]=MOCK
DriverLibFileName[$IX]=mock-driver-v1.0.so
DriverName[$IX]=mock-driver01

# region01
IY=$TestCloud01Seoul
# Location: Korea (Seoul)
RegionName[$IX,$IY]=testcloud01-seoul
RegionKey01[$IX,$IY]=Region
RegionVal01[$IX,$IY]=default
RegionKey02[$IX,$IY]=Zone
RegionVal02[$IX,$IY]=default
CONN_CONFIG[$IX,$IY]=testcloud01-seoul
IMAGE_NAME[$IX,$IY]=mock-vmimage-01
SPEC_NAME[$IX,$IY]=mock-vmspec-01

###########################################
## TestCloud02 to emulate cloud using Mock driver (1 Regions)
IX=$IndexTestCloud02
ProviderName[$IX]=MOCK
DriverLibFileName[$IX]=mock-driver-v1.0.so
DriverName[$IX]=mock-driver01

# region01
IY=$TestCloud02Canada
# Location: Canada (Central)
RegionName[$IX,$IY]=testcloud02-canada
RegionKey01[$IX,$IY]=Region
RegionVal01[$IX,$IY]=default
RegionKey02[$IX,$IY]=Zone
RegionVal02[$IX,$IY]=default
CONN_CONFIG[$IX,$IY]=testcloud02-canada
IMAGE_NAME[$IX,$IY]=mock-vmimage-01
SPEC_NAME[$IX,$IY]=mock-vmspec-01

###########################################
## TestCloud03 to emulate cloud using Mock driver (1 Regions)
IX=$IndexTestCloud03
ProviderName[$IX]=MOCK
DriverLibFileName[$IX]=mock-driver-v1.0.so
DriverName[$IX]=mock-driver01

# region01
IY=$TestCloud03Frankfurt
# Location: Europe (Frankfurt)
RegionName[$IX,$IY]=testcloud03-frankfurt
RegionKey01[$IX,$IY]=Region
RegionVal01[$IX,$IY]=default
RegionKey02[$IX,$IY]=Zone
RegionVal02[$IX,$IY]=default
CONN_CONFIG[$IX,$IY]=testcloud03-frankfurt
IMAGE_NAME[$IX,$IY]=mock-vmimage-01
SPEC_NAME[$IX,$IY]=mock-vmspec-01


function getCloudIndex()
{
local CSP=$1
Expand All @@ -1603,6 +1654,15 @@ function getCloudIndex()
elif [ "${CSP}" == "mock" ]; then
# echo "[Mock driver]"
CSPIndex=$IndexMock
elif [ "${CSP}" == "testcloud01" ]; then
# echo "[TestCloud01 with mock driver]"
CSPIndex=$IndexTestCloud01
elif [ "${CSP}" == "testcloud02" ]; then
# echo "[TestCloud02 with mock driver]"
CSPIndex=$IndexTestCloud02
elif [ "${CSP}" == "testcloud03" ]; then
# echo "[TestCloud03 with mock driver]"
CSPIndex=$IndexTestCloud03
elif [ "${CSP}" == "openstack" ]; then
# echo "[OpenStack driver]"
CSPIndex=$IndexOpenstack
Expand Down Expand Up @@ -1650,21 +1710,30 @@ function getCloudIndexGeneral()
elif [ "${CSP}" == "mock" ]; then
# echo "[Mock driver]"
CSPIndex=f
elif [ "${CSP}" == "testcloud01" ]; then
# echo "[TestCloud01 with mock driver]"
CSPIndex=g
elif [ "${CSP}" == "testcloud02" ]; then
# echo "[TestCloud02 with mock driver]"
CSPIndex=h
elif [ "${CSP}" == "testcloud03" ]; then
# echo "[TestCloud03 with mock driver]"
CSPIndex=i
elif [ "${CSP}" == "openstack" ]; then
# echo "[OpenStack driver]"
CSPIndex=g
CSPIndex=j
elif [ "${CSP}" == "ncp" ]; then
# echo "[NCP driver]"
CSPIndex=h
CSPIndex=k
elif [ "${CSP}" == "cloudtwin" ]; then
# echo "[Cloud-Twin driver]"
CSPIndex=i
CSPIndex=l
elif [ "${CSP}" == "cloudit" ]; then
# echo "[Cloudit driver]"
CSPIndex=j
CSPIndex=n
elif [ "${CSP}" == "tencent" ]; then
# echo "[Tencent driver]"
CSPIndex=k
CSPIndex=m
else
echo "[No acceptable argument was provided (all, aws, azure, gcp, alibaba, mock, openstack, ...).]"
exit
Expand Down
Loading