Expected wait_for_message return %d, returned %d."
# Wait for D2, CA and Netconf to configure.
- ### 2 or 3
- wait_for_message 20 "DCTL_CONFIG_COMPLETE" 2
+ if [ ${have_netconf} -eq 1 ]; then
+ expected=3
+ else
+ expected=2
+ fi
+ wait_for_message 20 "DCTL_CONFIG_COMPLETE" ${expected}
assert_eq 1 ${_WAIT_FOR_MESSAGE} \
"Timeout waiting for CPL daemons to start. \
Expected wait_for_message return %d, returned %d."
"Expected %d ${agent_name} process running, found %d processes running"
if [ ${have_netconf} -eq 1 ]; then
- get_pid ${netconf_name}
+ get_pid ${netconf_name} ${NETCONF_CFG_FILE_NAME}
assert_eq 1 ${_GET_PIDS_NUM} \
"Expected %d ${netconf_name} process running, found %d processes running"
fi
Expected wait_for_message return %d, returned %d."
# Wait up to 10s for the D2, CA and Netconf to stop.
- wait_for_message 10 "DCTL_SHUTDOWN" 2
+ if [ ${have_netconf} -eq 1 ]; then
+ expected=3
+ else
+ expected=2
+ fi
+ wait_for_message 10 "DCTL_SHUTDOWN" ${expected}
assert_eq 1 ${_WAIT_FOR_MESSAGE} \
"Timeout waiting for ${d2_name} to shutdown. \
Expected wait_for_message return %d, returned %d."
# Make sure that all servers are down.
- wait_for_server_down 5 ${wildcard_name}
+ if [ ${have_netconf} -eq 1 ]; then
+ expected=6
+ else
+ expected=5
+ fi
+ wait_for_server_down ${expected} ${wildcard_name}
assert_eq 1 ${_WAIT_FOR_SERVER_DOWN} \
"Expected wait_for_server_down return %d, returned %d"
# Create configuration file for keactrl. This configuration enables
# all servers.
keactrl_config="${CFG_FILES}\ndhcp4=yes\ndhcp6=yes\n\
-dhcp_ddns=yes\nctrl_agent=yes\netconf=yes\n\
+dhcp_ddns=yes\nctrl_agent=yes\nnetconf=yes\n\
kea_verbose=yes\n${keactrl_fixed_config}"
test_start "keactrl.start_all_servers_verbose_test"
assert_eq 1 ${_GET_LOG_MESSAGES} \
"Expected get_log_messages for DHCP4_START_INFO return %d, returned %d."
- get_log_messages "DCTL_STANDALONE" 2
- assert_eq 2 ${_GET_LOG_MESSAGES} \
+ if [ ${have_netconf} -eq 1 ]; then
+ expected=3
+ else
+ expected=2
+ fi
+ get_log_messages "DCTL_STANDALONE" ${expected}
+ assert_eq ${expected} ${_GET_LOG_MESSAGES} \
"Expected get_log_messages for DCT_STANDALONE return %d, returned %d."
# Server may shut down immediately after configuration has completed.
"Expected %d ${agent_name} process running, found %d processes running"
if [ ${have_netconf} -eq 1 ]; then
- get_pid ${netconf_name}
+ get_pid ${netconf_name} ${NETCONF_CFG_FILE_NAME}
assert_eq 1 ${_GET_PIDS_NUM} \
"Expected %d ${netconf_name} process running, found %d processes running"
fi
Expected wait_for_message return %d, returned %d."
# Wait up to 10s for the D2, CA and Netconf to stop.
- wait_for_message 10 "DCTL_SHUTDOWN" 2
+ if [ ${have_netconf} -eq 1 ]; then
+ expected=3
+ else
+ expected=2
+ fi
+ wait_for_message 10 "DCTL_SHUTDOWN" ${expected}
assert_eq 1 ${_WAIT_FOR_MESSAGE} \
"Timeout waiting for ${d2_name} and ${agent_name} to shutdown. \
Expected wait_for_message return %d, returned %d."
# Make sure that all servers are down.
- wait_for_server_down 5 ${wildcard_name}
+ if [ ${have_netconf} -eq 1 ]; then
+ expected=6
+ else
+ expected=5
+ fi
+ wait_for_server_down ${expected} ${wildcard_name}
assert_eq 1 ${_WAIT_FOR_SERVER_DOWN} \
"Expected wait_for_server_down return %d, returned %d"
# Make sure that Netconf agent is not running.
if [ ${have_netconf} -eq 1 ]; then
- get_pid ${netconf_name}
+ get_pid ${netconf_name} ${NETCONF_CFG_FILE_NAME}
assert_eq 0 ${_GET_PIDS_NUM} \
"Expected %d ${netconf_name} process running, found %d processes running"
fi
Expected wait_for_message return %d, returned %d."
# Make sure that all servers are down.
- wait_for_server_down 5 ${wildcard_name}
+ if [ ${have_netconf} -eq 1 ]; then
+ expected=6
+ else
+ expected=5
+ fi
+ wait_for_server_down ${expected} ${wildcard_name}
assert_eq 1 ${_WAIT_FOR_SERVER_DOWN} \
"Expected wait_for_server_down return %d, returned %d"
# Make sure that Netconf agent is not running.
if [ ${have_netconf} -eq 1 ]; then
- get_pid ${netconf_name}
+ get_pid ${netconf_name} ${NETCONF_CFG_FILE_NAME}
assert_eq 0 ${_GET_PIDS_NUM} \
"Expected %d ${netconf_name} process running, found %d processes running"
fi
Expected wait_for_message return %d, returned %d."
# Make sure that all servers are down.
- wait_for_server_down 5 ${wildcard_name}
+ if [ ${have_netconf} -eq 1 ]; then
+ expected=6
+ else
+ expected=5
+ fi
+ wait_for_server_down ${expected} ${wildcard_name}
assert_eq 1 ${_WAIT_FOR_SERVER_DOWN} \
"Expected wait_for_server_down return %d, returned %d"
# Make sure that Netconf agent is not running.
if [ ${have_netconf} -eq 1 ]; then
- get_pid ${netconf_name}
+ get_pid ${netconf_name} ${NETCONF_CFG_FILE_NAME}
assert_eq 0 ${_GET_PIDS_NUM} \
"Expected %d ${netconf_name} process running, found %d processes running"
fi
Expected wait_for_message return %d, returned %d."
# Wait up to 20s for the D2, CA and Netconf to configure.
- wait_for_message 20 "DCTL_CONFIG_COMPLETE" 2
+ if [ ${have_netconf} -eq 1 ]; then
+ expected=3
+ else
+ expected=2
+ fi
+ wait_for_message 20 "DCTL_CONFIG_COMPLETE" ${expected}
assert_eq 1 ${_WAIT_FOR_MESSAGE} \
"Timeout waiting for ${d2_name} to start. \
Expected wait_for_message return %d, returned %d."
# Make sure that Netconf agent is running.
if [ ${have_netconf} -eq 1 ]; then
- get_pid ${netconf_name}
+ get_pid ${netconf_name} ${NETCONF_CFG_FILE_NAME}
assert_eq 1 ${_GET_PIDS_NUM} \
"Expected %d ${netconf_name} process running, found %d processes running"
fi
Expected wait_for_message return %d, returned %d."
# Wait up to 10s for the D2, CA and Netconf to stop.
- wait_for_message 10 "DCTL_SHUTDOWN" 2
+ if [ ${have_netconf} -eq 1 ]; then
+ expected=3
+ else
+ expected=2
+ fi
+ wait_for_message 10 "DCTL_SHUTDOWN" ${expected}
assert_eq 1 ${_WAIT_FOR_MESSAGE} \
"Timeout waiting for ${d2_name} and ${ca_name} to shutdown. \
Expected wait_for_message return %d, returned %d."
# Make sure that all servers are down.
- wait_for_server_down 5 ${wildcard_name}
+ if [ ${have_netconf} -eq 1 ]; then
+ expected=6
+ else
+ expected=5
+ fi
+ wait_for_server_down ${expected} ${wildcard_name}
assert_eq 1 ${_WAIT_FOR_SERVER_DOWN} \
"Expected wait_for_server_down return %d, returned %d"
# Create configuration file for keactrl. This configuration enables
# DHCPv4 server but disables DHCPv6 server.
keactrl_config="${CFG_FILES}\ndhcp4=yes\ndhcp6=no\n\
-dhcp_ddns=no\nctrl_agent=yes\nnetconf=yes\n\
+dhcp_ddns=no\nctrl_agent=no\nnetconf=no\n\
kea_verbose=yes\n${keactrl_fixed_config}"
test_start "keactrl.late_start_v6_server_test"
# Make sure that Netconf agent is not running.
if [ ${have_netconf} -eq 1 ]; then
- get_pid ${netconf_name}
+ get_pid ${netconf_name} ${NETCONF_CFG_FILE_NAME}
assert_eq 0 ${_GET_PIDS_NUM} \
"Expected %d ${netconf_name} process running, found %d processes running"
fi
"Timeout waiting for ${kea4_name} to start. \
Expected wait_for_message return %d, returned %d."
- # Wait up to 20s for the D2 and CA to configure.
- wait_for_message 20 "DCTL_CONFIG_COMPLETE" 2
+ # Wait up to 20s for the D2, CA and Netconf to configure.
+ if [ ${have_netconf} -eq 1 ]; then
+ expected=3
+ else
+ expected=2
+ fi
+ wait_for_message 20 "DCTL_CONFIG_COMPLETE" ${expected}
assert_eq 1 ${_WAIT_FOR_MESSAGE} \
"Timeout waiting for ${d2_name} to start. \
Expected wait_for_message return %d, returned %d."
# Make sure that Netconf agent is running.
if [ ${have_netconf} -eq 1 ]; then
- get_pid ${netconf_name}
+ get_pid ${netconf_name} ${NETCONF_CFG_FILE_NAME}
assert_eq 1 ${_GET_PIDS_NUM} \
"Expected %d ${netconf_name} process running, found %d processes running"
fi
Expected wait_for_message to return %d, returned %d."
# There should be two completed configurations of D2 and two
- # configurations of the CA.
+ # configurations of CA.
wait_for_message 10 "DCTL_CONFIG_COMPLETE" 4
assert_eq 1 ${_WAIT_FOR_MESSAGE} "Timeout waiting for ${d2_name} to reconfigure. \
Expected wait_for_message to return %d, returned %d."
Expected wait_for_message return %d, returned %d."
# Make sure that all servers are down.
- wait_for_server_down 5 ${wildcard_name}
+ if [ ${have_netconf} -eq 1 ]; then
+ expected=6
+ else
+ expected=5
+ fi
+ wait_for_server_down ${expected} ${wildcard_name}
assert_eq 1 ${_WAIT_FOR_SERVER_DOWN} \
"Expected wait_for_server_down return %d, returned %d"
Expected wait_for_message return %d, returned %d."
# Wait up to 20s for the D2, CA and Netconf to configure.
- wait_for_message 20 "DCTL_CONFIG_COMPLETE" 2
+ if [ ${have_netconf} -eq 1 ]; then
+ expected=3
+ else
+ expected=2
+ fi
+ wait_for_message 20 "DCTL_CONFIG_COMPLETE" ${expected}
assert_eq 1 ${_WAIT_FOR_MESSAGE} \
"Timeout waiting for ${d2_name} to start. \
Expected wait_for_message return %d, returned %d."
"Expected %d ${agent_name} process running, found %d processes running"
if [ ${have_netconf} -eq 1 ]; then
- get_pid ${netconf_name}
+ get_pid ${netconf_name} ${NETCONF_CFG_FILE_NAME}
assert_eq 1 ${_GET_PIDS_NUM} \
"Expected %d ${netconf_name} process running, found %d processes running"
fi
Expected wait_for_message return %d, returned %d."
# Make sure that the DHCPv4 server is down.
- wait_for_server_down 5 ${kea4_name}
+ if [ ${have_netconf} -eq 1 ]; then
+ expected=6
+ else
+ expected=5
+ fi
+ wait_for_server_down ${expected} ${kea4_name}
assert_eq 1 ${_WAIT_FOR_SERVER_DOWN} \
"Expected wait_for_server_down return %d, returned %d"
# Make sure Netconf agent is still running
if [ ${have_netconf} -eq 1 ]; then
- get_pid ${netconf_name}
+ get_pid ${netconf_name} ${NETCONF_CFG_FILE_NAME}
assert_eq 1 ${_GET_PIDS_NUM} \
"Expected %d ${netconf_name} process running, found %d processes running"
fi
Expected wait_for_message return %d, returned %d."
# Make sure that the DHCPv6 server is down.
- wait_for_server_down 5 ${kea6_name}
+ if [ ${have_netconf} -eq 1 ]; then
+ expected=6
+ else
+ expected=5
+ fi
+ wait_for_server_down ${expected} ${kea6_name}
assert_eq 1 ${_WAIT_FOR_SERVER_DOWN} \
"Expected wait_for_server_down return %d, returned %d"
Expected wait_for_message return %d, returned %d."
# Make sure that the D2 server is down.
- wait_for_server_down 5 ${d2_name}
+ if [ ${have_netconf} -eq 1 ]; then
+ expected=6
+ else
+ expected=5
+ fi
+ wait_for_server_down ${expected} ${d2_name}
assert_eq 1 ${_WAIT_FOR_SERVER_DOWN} \
"Expected wait_for_server_down return %d, returned %d"
# Make sure Netconf agent is still running
if [ ${have_netconf} -eq 1 ]; then
- get_pid ${netconf_name}
+ get_pid ${netconf_name} ${NETCONF_CFG_FILE_NAME}
assert_eq 1 ${_GET_PIDS_NUM} \
"Expected %d ${netconf_name} process running, found %d processes running"
fi
Expected wait_for_message return %d, returned %d."
# Make sure that the CA is down.
- wait_for_server_down 5 ${agent_name}
+ if [ ${have_netconf} -eq 1 ]; then
+ expected=6
+ else
+ expected=5
+ fi
+ wait_for_server_down ${expected} ${agent_name}
assert_eq 1 ${_WAIT_FOR_SERVER_DOWN} \
"Expected wait_for_server_down return %d, returned %d"
# Make sure Netconf agent is still running
if [ ${have_netconf} -eq 1 ]; then
- get_pid ${netconf_name}
+ get_pid ${netconf_name} ${NETCONF_CFG_FILE_NAME}
assert_eq 1 ${_GET_PIDS_NUM} \
"Expected %d ${netconf_name} process running, found %d processes running"
fi
Expected wait_for_message return %d, returned %d."
# Make sure that the Netconf agent is down.
- wait_for_server_down 5 ${netconf_name}
+ wait_for_server_down 6 ${netconf_name}
assert_eq 1 ${_WAIT_FOR_SERVER_DOWN} \
"Expected wait_for_server_down return %d, returned %d"
fi