fix variable function
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
78d57c1b09
commit
bff5fc82c3
2 changed files with 12 additions and 12 deletions
|
|
@ -4,9 +4,9 @@
|
|||
. ./lib/colors.sh
|
||||
|
||||
function check_subnet_exist {
|
||||
vpc_name="${1}"
|
||||
subnet_name="${2}"
|
||||
vxlan_id="${3}"
|
||||
local vpc_name="${1}"
|
||||
local subnet_name="${2}"
|
||||
local vxlan_id="${3}"
|
||||
|
||||
print_in_color "${COLOR_GREY}" "Check in db if ${subnet_name} exist"
|
||||
check_in_db subnet "${subnet_name};${vpc_name}"
|
||||
|
|
@ -22,12 +22,12 @@ function check_subnet_exist {
|
|||
}
|
||||
|
||||
function create_subnet {
|
||||
vpc_name="${1}"
|
||||
subnet_name="${2}"
|
||||
vxlan_id="${3}"
|
||||
local_ip="${4}"
|
||||
gateway_ip="${5}"
|
||||
subnet="${6}"
|
||||
local vpc_name="${1}"
|
||||
local subnet_name="${2}"
|
||||
local vxlan_id="${3}"
|
||||
local local_ip="${4}"
|
||||
local gateway_ip="${5}"
|
||||
local subnet="${6}"
|
||||
|
||||
check_subnet_exist "${vpc_name}" "${subnet_name}"
|
||||
[ "$?" -eq "0" ] && \
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
. ./lib/colors.sh
|
||||
|
||||
function check_vpc_exist {
|
||||
vpc_name=${1}
|
||||
local vpc_name=${1}
|
||||
|
||||
print_in_color "${COLOR_GREY}" "Check in db if ${vpc_name} exist"
|
||||
check_in_db vpc "${vpc_name}"
|
||||
|
|
@ -17,7 +17,7 @@ function check_vpc_exist {
|
|||
}
|
||||
|
||||
function create_vpc {
|
||||
vpc_name="${1}"
|
||||
local vpc_name="${1}"
|
||||
|
||||
check_vpc_exist "${vpc_name}"
|
||||
[ "$?" -eq "0" ] && \
|
||||
|
|
@ -33,7 +33,7 @@ function create_vpc {
|
|||
}
|
||||
|
||||
function delete_vpc {
|
||||
vpc_name="${1}"
|
||||
local vpc_name="${1}"
|
||||
|
||||
|
||||
print_in_color "${COLOR_RED}" "Delete ${vpc_name}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue