Skip to content

Commit

Permalink
TODO
Browse files Browse the repository at this point in the history
Signed-off-by: Dumitru Ceara <[email protected]>
  • Loading branch information
dceara committed Oct 11, 2023
1 parent 0c22ac3 commit 2d2569e
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions tests/ovn-macros.at
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,25 @@ net_attach () {
|| return 1
}

ovn_wait_for_encaps() {
local systemid=$1

local encap=$(ovs-vsctl get Open_vSwitch . external_ids:ovn-encap-type-$systemid)
if [[ -n "$encap" ]]; then
encap=$(ovs-vsctl get Open_vSwitch .external_ids:ovn-encap-type)
fi

local ip=$(ovs-vsctl get Open_vSwitch . external_ids:ovn-encap-ip-$systemid)
if [[ -n "$ip" ]]; then
ip=$(ovs-vsctl get Open_vSwitch .external_ids:ovn-encap-ip)
fi

IFS="," read -r -a encap_types <<< "$encap"
for e in "${encap_types[[@]]}"; do
wait_column "$ip" sb:Encap ip chassis_name="$systemid" type="$e"
done
}

# ovn_az_attach AZ NETWORK BRIDGE IP [MASKLEN] [ENCAP]
ovn_az_attach() {
local az=$1 net=$2 bridge=$3 ip=$4 masklen=${5-24} encap=${6-geneve,vxlan} systemid=${7-$sandbox} cli_args=${@:8}
Expand Down Expand Up @@ -332,6 +351,11 @@ ovn_az_attach() {
fi

start_daemon ovn-controller --enable-dummy-vif-plug ${cli_args} || return 1
if test X"$az" = XNONE; then
ovn_wait_for_encaps $systemid
else
ovn_as $az ovn_wait_for_encaps $systemid
fi
}

# ovn_attach NETWORK BRIDGE IP [MASKLEN] [ENCAP]
Expand Down Expand Up @@ -372,6 +396,7 @@ start_virtual_controller() {
|| return 1

ovn-controller --enable-dummy-vif-plug ${cli_args} -vconsole:off --detach --no-chdir
ovn_wait_for_encaps $systemid
}

# ovn_setenv AZ
Expand Down

0 comments on commit 2d2569e

Please sign in to comment.