fix typo error
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
545c9d61aa
commit
1b2668d6bf
2 changed files with 7 additions and 8 deletions
|
|
@ -75,5 +75,4 @@ function stop_vm {
|
||||||
eval set -- "${FLAGS_ARGV}"
|
eval set -- "${FLAGS_ARGV}"
|
||||||
|
|
||||||
qemu_stop_vm "${FLAGS_vm_name}"
|
qemu_stop_vm "${FLAGS_vm_name}"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,8 @@ function check_subnet_exist {
|
||||||
print_in_color "${COLOR_GREY}" "Check in linux if ${subnet_name} exist"
|
print_in_color "${COLOR_GREY}" "Check in linux if ${subnet_name} exist"
|
||||||
ip link show | grep -E '^[0-9]*:'|sed -e 's/ //g' | cut -d: -f 2 | grep "br-${subnet_id}" > /dev/null || return 1
|
ip link show | grep -E '^[0-9]*:'|sed -e 's/ //g' | cut -d: -f 2 | grep "br-${subnet_id}" > /dev/null || return 1
|
||||||
ip -n "${vpc_name}" link show | grep -E '^[0-9]*:'|sed -e 's/ //g' | cut -d: -f 2 | grep "br-${subnet_id}" > /dev/null || return 1
|
ip -n "${vpc_name}" link show | grep -E '^[0-9]*:'|sed -e 's/ //g' | cut -d: -f 2 | grep "br-${subnet_id}" > /dev/null || return 1
|
||||||
ip link show | grep -E '^[0-9]*:'|sed -e 's/ //g' | cut -d: -f 2 | grep "vs-${subnet_id}-e" > /dev/null || return 1
|
ip link show | grep -E '^[0-9]*:'|sed -e 's/ //g' | cut -d: -f 2 | grep "v-${subnet_id}-e" > /dev/null || return 1
|
||||||
ip -n "${vpc_name}" link show | grep -E '^[0-9]*:'|sed -e 's/ //g' | cut -d: -f 2 | grep "vs-${subnet_id}-i" > /dev/null || return 1
|
ip -n "${vpc_name}" link show | grep -E '^[0-9]*:'|sed -e 's/ //g' | cut -d: -f 2 | grep "v-${subnet_id}-i" > /dev/null || return 1
|
||||||
ip link show | grep -E '^[0-9]*:'|sed -e 's/ //g' | cut -d: -f 2 | grep "vxlan-${vxlan_id}" > /dev/null || return 1
|
ip link show | grep -E '^[0-9]*:'|sed -e 's/ //g' | cut -d: -f 2 | grep "vxlan-${vxlan_id}" > /dev/null || return 1
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
@ -45,7 +45,7 @@ function create_subnet {
|
||||||
add_in_db "subnet" "${subnet_name}" "${vpc_name}" "${vxlan_id}" "${local_ip}" "${gateway_ip}" "${subnet}"
|
add_in_db "subnet" "${subnet_name}" "${vpc_name}" "${vxlan_id}" "${local_ip}" "${gateway_ip}" "${subnet}"
|
||||||
|
|
||||||
print_in_color "${COLOR_GREEN}" " - create veth"
|
print_in_color "${COLOR_GREEN}" " - create veth"
|
||||||
ip link add "vs-${subnet_id}-e" type veth peer name "vs-${subnet_id}-i" netns "${vpc_name}"
|
ip link add "v-${subnet_id}-e" type veth peer name "v-${subnet_id}-i" netns "${vpc_name}"
|
||||||
|
|
||||||
print_in_color "${COLOR_GREEN}" " - add bridges"
|
print_in_color "${COLOR_GREEN}" " - add bridges"
|
||||||
brctl addbr "br-${subnet_id}"
|
brctl addbr "br-${subnet_id}"
|
||||||
|
|
@ -61,16 +61,16 @@ function create_subnet {
|
||||||
nolearning
|
nolearning
|
||||||
|
|
||||||
print_in_color "${COLOR_GREEN}" " - add interface in bridge"
|
print_in_color "${COLOR_GREEN}" " - add interface in bridge"
|
||||||
brctl addif "br-${subnet_id}" "vs-${subnet_id}-e"
|
brctl addif "br-${subnet_id}" "v-${subnet_id}-e"
|
||||||
ip netns exec "${vpc_name}" brctl addif "br-${subnet_id}" "vs-${subnet_id}-i"
|
ip netns exec "${vpc_name}" brctl addif "br-${subnet_id}" "v-${subnet_id}-i"
|
||||||
brctl addif "br-${subnet_id}" "vxlan-${vxlan_id}"
|
brctl addif "br-${subnet_id}" "vxlan-${vxlan_id}"
|
||||||
|
|
||||||
|
|
||||||
print_in_color "${COLOR_GREEN}" " - up interface"
|
print_in_color "${COLOR_GREEN}" " - up interface"
|
||||||
ip link set up dev "vs-${subnet_id}-e"
|
ip link set up dev "v-${subnet_id}-e"
|
||||||
ip link set up dev "vxlan-${vxlan_id}"
|
ip link set up dev "vxlan-${vxlan_id}"
|
||||||
ip link set up dev "br-${subnet_id}"
|
ip link set up dev "br-${subnet_id}"
|
||||||
ip -n "${vpc_name}" link set up dev "vs-${subnet_id}-i"
|
ip -n "${vpc_name}" link set up dev "v-${subnet_id}-i"
|
||||||
ip -n "${vpc_name}" link set up dev "br-${subnet_id}"
|
ip -n "${vpc_name}" link set up dev "br-${subnet_id}"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue