本文整理汇总了Python中srv_msg.response_check_content函数的典型用法代码示例。如果您正苦于以下问题:Python response_check_content函数的具体用法?Python response_check_content怎么用?Python response_check_content使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了response_check_content函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_v4_echo_client_id_enabled
def test_v4_echo_client_id_enabled():
misc.test_setup()
srv_control.config_srv_subnet('192.168.50.0/24', '192.168.50.1-192.168.50.1')
srv_control.set_conf_parameter_global('echo-client-id', 'true')
srv_control.build_and_send_config_files('SSH', 'config-file')
srv_control.start_srv('DHCP', 'started')
misc.test_procedure()
srv_msg.client_requests_option('1')
srv_msg.client_does_include_with_value('client_id', '00010203040506')
srv_msg.client_send_msg('DISCOVER')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'OFFER')
srv_msg.response_check_include_option('Response', None, '1')
srv_msg.response_check_include_option('Response', None, '61')
srv_msg.response_check_option_content('Response', '61', None, 'value', '00010203040506')
misc.test_procedure()
srv_msg.client_does_include_with_value('client_id', '00010203040506')
srv_msg.client_copy_option('server_id')
srv_msg.client_does_include_with_value('requested_addr', '192.168.50.1')
srv_msg.client_requests_option('1')
srv_msg.client_send_msg('REQUEST')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'ACK')
srv_msg.response_check_content('Response', None, 'yiaddr', '192.168.50.1')
srv_msg.response_check_include_option('Response', None, '1')
srv_msg.response_check_include_option('Response', None, '61')
srv_msg.response_check_option_content('Response', '61', None, 'value', '00010203040506')
示例2: test_v4_stateless_with_subnet_empty_pool
def test_v4_stateless_with_subnet_empty_pool():
misc.test_setup()
srv_control.config_srv_subnet('192.168.50.0/24', '$(EMPTY)')
srv_control.config_srv_opt('subnet-mask', '255.255.255.0')
srv_control.config_srv_opt('time-offset', '50')
srv_control.config_srv_opt('routers', '100.100.100.10,50.50.50.5')
srv_control.build_and_send_config_files('SSH', 'config-file')
srv_control.start_srv('DHCP', 'started')
misc.test_procedure()
srv_msg.client_requests_option('1')
srv_msg.client_requests_option('2')
srv_msg.client_requests_option('3')
srv_msg.client_sets_value('Client', 'ciaddr', '$(CIADDR)')
srv_msg.client_send_msg('INFORM')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'ACK')
srv_msg.response_check_content('Response', None, 'yiaddr', '0.0.0.0')
srv_msg.response_check_include_option('Response', None, '1')
srv_msg.response_check_option_content('Response', '1', None, 'value', '255.255.255.0')
srv_msg.response_check_include_option('Response', None, '2')
srv_msg.response_check_option_content('Response', '2', None, 'value', '50')
srv_msg.response_check_include_option('Response', None, '3')
srv_msg.response_check_option_content('Response', '3', None, 'value', '100.100.100.10')
srv_msg.response_check_option_content('Response', '3', None, 'value', '50.50.50.5')
示例3: test_v4_client_classification_one_class_eRouter1_two_next_servers
def test_v4_client_classification_one_class_eRouter1_two_next_servers():
misc.test_setup()
srv_control.config_srv_subnet('192.168.50.0/24', '192.168.50.1-192.168.50.1')
srv_control.config_client_classification('0', 'VENDOR_CLASS_eRouter1.0')
srv_control.config_srv_another_subnet_no_interface('192.168.50.0/24',
'192.168.50.100-192.168.50.100')
srv_control.config_srv('boot-file-name', '0', 'somefilename')
srv_control.global_add_siaddr('192.0.2.2')
srv_control.subnet_add_siaddr('0', '192.0.2.234')
srv_control.build_and_send_config_files('SSH', 'config-file')
srv_control.start_srv('DHCP', 'started')
misc.test_procedure()
srv_msg.client_sets_value('Client', 'chaddr', '00:00:00:00:00:00')
srv_msg.client_does_include_with_value('client_id', '00010203040506')
srv_msg.client_does_include_with_value('vendor_class_id', 'eRouter1.0')
srv_msg.client_requests_option('1')
srv_msg.client_send_msg('DISCOVER')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'OFFER')
srv_msg.response_check_content('Response', 'NOT ', 'file', 'somefilename')
srv_msg.response_check_content('Response', None, 'yiaddr', '192.168.50.1')
srv_msg.response_check_content('Response', None, 'siaddr', '0.0.0.0')
srv_msg.response_check_content('Response', 'NOT ', 'siaddr', '192.0.2.234')
srv_msg.response_check_content('Response', 'NOT ', 'siaddr', '192.0.2.2')
srv_msg.response_check_include_option('Response', None, '1')
srv_msg.response_check_include_option('Response', None, '54')
srv_msg.response_check_include_option('Response', None, '61')
srv_msg.response_check_option_content('Response', '1', None, 'value', '255.255.255.0')
srv_msg.response_check_option_content('Response', '54', None, 'value', '$(SRV4_ADDR)')
srv_msg.response_check_option_content('Response', '61', None, 'value', '00010203040506')
示例4: test_control_channel_keashell_dhcp_disable
def test_control_channel_keashell_dhcp_disable():
misc.test_setup()
srv_control.config_srv_subnet('192.168.50.0/24', '192.168.50.1-192.168.50.1')
srv_control.open_control_channel('unix', '$(SOFTWARE_INSTALL_DIR)/var/kea/control_socket')
srv_control.agent_control_channel('127.0.0.1',
'8000',
'unix',
'$(SOFTWARE_INSTALL_DIR)/var/kea/control_socket')
srv_control.build_and_send_config_files('SSH', 'config-file')
srv_control.start_srv('DHCP', 'started')
misc.test_procedure()
srv_msg.client_requests_option('1')
srv_msg.client_send_msg('DISCOVER')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'OFFER')
srv_msg.response_check_include_option('Response', None, '1')
srv_msg.response_check_content('Response', None, 'yiaddr', '192.168.50.1')
srv_msg.response_check_option_content('Response', '1', None, 'value', '255.255.255.0')
srv_msg.execute_shell_with_args('python',
'$(SOFTWARE_INSTALL_DIR)/sbin/kea-shell',
'--host 127.0.0.1 --port 8000 --service dhcp4 dhcp-disable <<<\'\'')
misc.test_procedure()
srv_msg.client_requests_option('1')
srv_msg.client_send_msg('DISCOVER')
misc.pass_criteria()
srv_msg.send_dont_wait_for_message()
示例5: test_v4_release_fail_with_different_chaddr_client_id
def test_v4_release_fail_with_different_chaddr_client_id():
misc.test_setup()
srv_control.config_srv_subnet('192.168.50.0/24', '192.168.50.1-192.168.50.1')
srv_control.build_and_send_config_files('SSH', 'config-file')
srv_control.start_srv('DHCP', 'started')
misc.test_procedure()
srv_msg.client_sets_value('Client', 'chaddr', '00:1F:D0:00:00:11')
srv_msg.client_does_include_with_value('client_id', '00001FD0040111')
srv_msg.client_requests_option('1')
srv_msg.client_send_msg('DISCOVER')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'OFFER')
srv_msg.response_check_content('Response', None, 'yiaddr', '192.168.50.1')
srv_msg.response_check_include_option('Response', None, '1')
srv_msg.response_check_include_option('Response', None, '54')
srv_msg.response_check_include_option('Response', None, '61')
srv_msg.response_check_option_content('Response', '1', None, 'value', '255.255.255.0')
srv_msg.response_check_option_content('Response', '54', None, 'value', '$(SRV4_ADDR)')
srv_msg.response_check_option_content('Response', '61', None, 'value', '00001FD0040111')
misc.test_procedure()
srv_msg.client_sets_value('Client', 'chaddr', '00:1f:d0:00:00:11')
srv_msg.client_does_include_with_value('client_id', '00001FD0040111')
srv_msg.client_copy_option('server_id')
srv_msg.client_does_include_with_value('requested_addr', '192.168.50.1')
srv_msg.client_requests_option('1')
srv_msg.client_send_msg('REQUEST')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'ACK')
srv_msg.response_check_content('Response', None, 'yiaddr', '192.168.50.1')
srv_msg.response_check_include_option('Response', None, '1')
srv_msg.response_check_include_option('Response', None, '54')
srv_msg.response_check_include_option('Response', None, '61')
srv_msg.response_check_option_content('Response', '1', None, 'value', '255.255.255.0')
srv_msg.response_check_option_content('Response', '54', None, 'value', '$(SRV4_ADDR)')
srv_msg.response_check_option_content('Response', '61', None, 'value', '00001FD0040111')
misc.test_procedure()
srv_msg.client_sets_value('Client', 'chaddr', '00:1f:d0:11:22:33')
srv_msg.client_does_include_with_value('client_id', '00001FD0112233')
srv_msg.client_copy_option('server_id')
srv_msg.client_sets_value('Client', 'ciaddr', '192.168.50.1')
srv_msg.client_send_msg('RELEASE')
# address not released
misc.pass_criteria()
srv_msg.send_dont_wait_for_message()
misc.test_procedure()
srv_msg.client_sets_value('Client', 'chaddr', '00:00:00:00:00:00')
srv_msg.client_does_include_with_value('client_id', '00010203040111')
srv_msg.client_requests_option('1')
srv_msg.client_send_msg('DISCOVER')
misc.pass_criteria()
srv_msg.send_dont_wait_for_message()
示例6: test_v4_host_reservation_circuit_id_negative
def test_v4_host_reservation_circuit_id_negative():
misc.test_setup()
srv_control.config_srv_subnet('192.168.50.0/24', '192.168.50.1-192.168.50.1')
srv_control.host_reservation_in_subnet('address',
'192.168.50.10',
'0',
'circuit-id',
'060106020603')
# "host-reservation-identifiers": [ "hw-address", "duid", "circuit-id", "client-id" ]
srv_control.add_line('"host-reservation-identifiers": [ "hw-address", "duid", "client-id" ]')
srv_control.build_and_send_config_files('SSH', 'config-file')
srv_control.start_srv('DHCP', 'started')
misc.test_procedure()
srv_msg.client_sets_value('Client', 'chaddr', 'ff:01:02:03:ff:04')
srv_msg.client_send_msg('DISCOVER')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'OFFER')
srv_msg.response_check_content('Response', None, 'yiaddr', '192.168.50.1')
misc.test_procedure()
srv_msg.client_sets_value('Client', 'chaddr', 'ff:01:02:03:ff:04')
srv_msg.client_does_include_with_value('relay_agent_Information', '16616263')
srv_msg.client_send_msg('DISCOVER')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'OFFER')
srv_msg.response_check_content('Response', 'NOT ', 'yiaddr', '192.168.50.10')
示例7: test_v4_client_classification_one_class_two_subnets_different_class_id_included
def test_v4_client_classification_one_class_two_subnets_different_class_id_included():
misc.test_setup()
srv_control.config_srv_subnet('192.168.50.0/24', '192.168.50.1-192.168.50.1')
srv_control.config_client_classification('0', 'VENDOR_CLASS_my-own-class')
srv_control.config_srv_another_subnet_no_interface('192.168.51.0/24',
'192.168.51.100-192.168.51.100')
srv_control.build_and_send_config_files('SSH', 'config-file')
srv_control.start_srv('DHCP', 'started')
misc.test_procedure()
srv_msg.client_sets_value('Client', 'chaddr', '00:00:00:00:00:00')
srv_msg.client_does_include_with_value('client_id', '00010203040506')
srv_msg.client_does_include_with_value('vendor_class_id', 'my-other-class')
srv_msg.client_requests_option('1')
srv_msg.client_send_msg('DISCOVER')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'OFFER')
srv_msg.response_check_content('Response', None, 'yiaddr', '192.168.51.100')
srv_msg.response_check_include_option('Response', None, '1')
srv_msg.response_check_include_option('Response', None, '54')
srv_msg.response_check_include_option('Response', None, '61')
srv_msg.response_check_option_content('Response', '1', None, 'value', '255.255.255.0')
srv_msg.response_check_option_content('Response', '54', None, 'value', '$(SRV4_ADDR)')
srv_msg.response_check_option_content('Response', '61', None, 'value', '00010203040506')
示例8: test_v4_host_reservation_one_address_inside_pool_different_mac
def test_v4_host_reservation_one_address_inside_pool_different_mac():
misc.test_setup()
# request address from different mac that has been reserved
srv_control.config_srv_subnet('192.168.50.0/24', '192.168.50.1-192.168.50.50')
srv_control.new_db_backend_reservation('MySQL', 'hw-address', 'ff:01:02:03:ff:04')
srv_control.update_db_backend_reservation('hostname', 'reserved-hostname', 'MySQL', '1')
srv_control.update_db_backend_reservation('ipv4_address', '192.168.50.10', 'MySQL', '1')
srv_control.update_db_backend_reservation('dhcp4_subnet_id', '1', 'MySQL', '1')
srv_control.upload_db_reservation('MySQL')
srv_control.start_srv('DHCP', 'started')
misc.test_procedure()
srv_msg.client_sets_value('Client', 'chaddr', 'ff:01:02:03:ff:01')
srv_msg.client_send_msg('DISCOVER')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'OFFER')
srv_msg.response_check_content('Response', 'NOT ', 'yiaddr', '192.168.50.10')
srv_msg.response_check_option_content('Response', '1', None, 'value', '255.255.255.0')
misc.test_procedure()
srv_msg.client_copy_option('server_id')
srv_msg.client_does_include_with_value('requested_addr', '192.168.50.10')
srv_msg.client_sets_value('Client', 'chaddr', 'ff:01:02:03:ff:01')
srv_msg.client_send_msg('REQUEST')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'NAK')
srv_msg.response_check_content('Response', None, 'yiaddr', '0.0.0.0')
示例9: test_v4_host_reservation_conflicts_reconfigure_server_with_reservation_of_used_address_2
def test_v4_host_reservation_conflicts_reconfigure_server_with_reservation_of_used_address_2():
misc.test_setup()
srv_control.config_srv_subnet('192.168.50.0/24', '192.168.50.1-192.168.50.2')
srv_control.host_reservation_in_subnet('address',
'192.168.50.2',
'0',
'hw-address',
'ff:01:02:03:ff:11')
srv_control.build_and_send_config_files('SSH', 'config-file')
srv_control.start_srv('DHCP', 'started')
misc.test_procedure()
srv_msg.client_sets_value('Client', 'chaddr', 'ff:01:02:03:ff:11')
srv_msg.client_send_msg('DISCOVER')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'OFFER')
misc.test_procedure()
srv_msg.client_copy_option('server_id')
srv_msg.client_sets_value('Client', 'chaddr', 'ff:01:02:03:ff:11')
srv_msg.client_send_msg('REQUEST')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'ACK')
srv_msg.response_check_content('Response', None, 'yiaddr', '192.168.50.2')
misc.test_procedure()
srv_msg.client_sets_value('Client', 'chaddr', 'ff:01:02:03:ff:55')
srv_msg.client_send_msg('DISCOVER')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'OFFER')
misc.test_procedure()
srv_msg.client_copy_option('server_id')
srv_msg.client_sets_value('Client', 'chaddr', 'ff:01:02:03:ff:55')
srv_msg.client_send_msg('REQUEST')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'ACK')
misc.test_setup()
srv_control.config_srv_subnet('192.168.50.0/24', '192.168.50.1-192.168.50.3')
srv_control.host_reservation_in_subnet('address',
'192.168.50.2',
'0',
'hw-address',
'ff:01:02:03:ff:77')
srv_control.build_and_send_config_files('SSH', 'config-file')
srv_control.start_srv('DHCP', 'reconfigured')
misc.test_procedure()
srv_msg.client_sets_value('Client', 'chaddr', 'ff:01:02:03:ff:77')
srv_msg.client_send_msg('DISCOVER')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'OFFER')
srv_msg.response_check_content('Response', 'NOT ', 'yiaddr', '192.168.50.2')
示例10: test_control_channel_socket_dhcp_disable
def test_control_channel_socket_dhcp_disable():
misc.test_setup()
srv_control.config_srv_subnet('192.168.50.0/24', '192.168.50.5-192.168.50.5')
srv_control.open_control_channel('unix', '$(SOFTWARE_INSTALL_DIR)/var/kea/control_socket')
srv_control.build_and_send_config_files('SSH', 'config-file')
srv_control.start_srv('DHCP', 'started')
misc.test_procedure()
srv_msg.client_requests_option('1')
srv_msg.client_send_msg('DISCOVER')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'OFFER')
srv_msg.response_check_include_option('Response', None, '1')
srv_msg.response_check_content('Response', None, 'yiaddr', '192.168.50.5')
srv_msg.response_check_option_content('Response', '1', None, 'value', '255.255.255.0')
srv_msg.send_through_socket_server_site('$(SOFTWARE_INSTALL_DIR)/var/kea/control_socket',
'{"command": "dhcp-disable" }')
misc.test_procedure()
srv_msg.client_requests_option('1')
srv_msg.client_send_msg('DISCOVER')
misc.pass_criteria()
srv_msg.send_dont_wait_for_message()
示例11: test_hook_v4_subnet_cmds_del_global_options
def test_hook_v4_subnet_cmds_del_global_options():
misc.test_setup()
srv_control.config_srv_subnet('192.168.51.0/24', '192.168.51.1-192.168.51.1')
srv_control.config_srv_opt('domain-name-servers', '199.199.199.1,100.100.100.1')
srv_control.open_control_channel('unix', '$(SOFTWARE_INSTALL_DIR)/var/kea/control_socket')
srv_control.add_hooks('$(SOFTWARE_INSTALL_DIR)/lib/kea/hooks/libdhcp_subnet_cmds.so')
srv_control.build_and_send_config_files('SSH', 'config-file')
srv_control.start_srv('DHCP', 'started')
misc.test_procedure()
srv_msg.client_requests_option('1')
srv_msg.client_requests_option('6')
srv_msg.client_sets_value('Client', 'chaddr', 'ff:01:02:03:ff:04')
srv_msg.client_send_msg('DISCOVER')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'OFFER')
srv_msg.response_check_include_option('Response', None, '1')
srv_msg.response_check_content('Response', None, 'yiaddr', '192.168.51.1')
srv_msg.response_check_option_content('Response', '1', None, 'value', '255.255.255.0')
srv_msg.send_through_socket_server_site('$(SOFTWARE_INSTALL_DIR)/var/kea/control_socket',
'{"command": "subnet4-del","arguments":{"id":1}}')
misc.test_procedure()
srv_msg.client_requests_option('1')
srv_msg.client_sets_value('Client', 'chaddr', 'ff:01:02:03:ff:04')
srv_msg.client_send_msg('DISCOVER')
misc.pass_criteria()
srv_msg.send_dont_wait_for_message()
示例12: test_hook_v4_subnet_cmds_add
def test_hook_v4_subnet_cmds_add():
misc.test_setup()
srv_control.config_srv_subnet('$(EMPTY)', '$(EMPTY)')
srv_control.config_srv_opt('domain-name-servers', '199.199.199.1,100.100.100.1')
srv_control.open_control_channel('unix', '$(SOFTWARE_INSTALL_DIR)/var/kea/control_socket')
srv_control.add_hooks('$(SOFTWARE_INSTALL_DIR)/lib/kea/hooks/libdhcp_subnet_cmds.so')
srv_control.build_and_send_config_files('SSH', 'config-file')
srv_control.start_srv('DHCP', 'started')
misc.test_procedure()
srv_msg.client_requests_option('1')
srv_msg.client_sets_value('Client', 'chaddr', 'ff:01:02:03:ff:04')
srv_msg.client_send_msg('DISCOVER')
misc.pass_criteria()
srv_msg.send_dont_wait_for_message()
# Using UNIX socket on server in path $(SOFTWARE_INSTALL_DIR)/var/kea/control_socket send {"command":"subnet4-list","arguments":{}}
srv_msg.send_through_socket_server_site('$(SOFTWARE_INSTALL_DIR)/var/kea/control_socket',
'{"command":"subnet4-add","arguments":{"subnet4":[{"subnet":"192.168.50.0/24","interface":"$(SERVER_IFACE)","id":234,"pools":[{"pool":"192.168.50.1-192.168.50.1"}]}]}}')
srv_msg.send_through_socket_server_site('$(SOFTWARE_INSTALL_DIR)/var/kea/control_socket',
'{"command":"subnet4-get","arguments":{"id": 234}}')
misc.test_procedure()
srv_msg.client_requests_option('1')
srv_msg.client_send_msg('DISCOVER')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'OFFER')
srv_msg.response_check_include_option('Response', None, '1')
srv_msg.response_check_content('Response', None, 'yiaddr', '192.168.50.1')
srv_msg.response_check_option_content('Response', '1', None, 'value', '255.255.255.0')
示例13: test_user_check_IA_NA_with_registry_known_user
def test_user_check_IA_NA_with_registry_known_user():
# With a user registry and multiple subnets
# an known user should get first subnet
misc.test_setup()
srv_msg.send_file_to_server('tests/dhcpv4/kea_only/user_chk/registry_1.txt',
'/tmp/user_chk_registry.txt')
srv_msg.remove_file_from_server('/tmp/user_chk_outcome.txt')
srv_control.config_srv_subnet('192.168.50.0/24', '192.168.50.5-192.168.50.5')
srv_control.config_srv_another_subnet_no_interface('10.0.0.0/24', '10.0.0.5-10.0.0.5')
srv_control.add_hooks('$(SOFTWARE_INSTALL_DIR)/lib/kea/hooks/libdhcp_user_chk.so')
srv_control.build_and_send_config_files('SSH', 'config-file')
srv_control.start_srv('DHCP', 'started')
misc.test_procedure()
srv_msg.client_requests_option('1')
srv_msg.client_sets_value('Client', 'chaddr', '0c:0e:0a:01:ff:04')
srv_msg.client_send_msg('DISCOVER')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'OFFER')
srv_msg.response_check_include_option('Response', None, '1')
srv_msg.response_check_content('Response', None, 'yiaddr', '192.168.50.5')
srv_msg.response_check_option_content('Response', '1', None, 'value', '255.255.255.0')
# Check the outcome file for correct content
srv_msg.copy_remote('/tmp/user_chk_outcome.txt')
srv_msg.compare_file('tests/dhcpv4/kea_only/user_chk/outcome_2.txt')
示例14: test_v4_host_reservation_mysql_one_address_inside_pool
def test_v4_host_reservation_mysql_one_address_inside_pool():
misc.test_setup()
# outside of the pool
srv_control.config_srv_subnet('192.168.50.0/24', '192.168.50.1-192.168.50.50')
srv_control.enable_db_backend_reservation('MySQL')
srv_control.new_db_backend_reservation('MySQL', 'hw-address', 'ff:01:02:03:ff:04')
srv_control.update_db_backend_reservation('hostname', 'reserved-hostname', 'MySQL', '1')
srv_control.update_db_backend_reservation('ipv4_address', '192.168.50.10', 'MySQL', '1')
srv_control.update_db_backend_reservation('dhcp4_subnet_id', '1', 'MySQL', '1')
srv_control.upload_db_reservation('MySQL')
srv_control.build_and_send_config_files('SSH', 'config-file')
srv_control.start_srv('DHCP', 'started')
misc.test_procedure()
srv_msg.client_sets_value('Client', 'chaddr', 'ff:01:02:03:ff:04')
srv_msg.client_send_msg('DISCOVER')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'OFFER')
srv_msg.response_check_content('Response', None, 'yiaddr', '192.168.50.10')
misc.test_procedure()
srv_msg.client_copy_option('server_id')
srv_msg.client_does_include_with_value('requested_addr', '192.168.50.10')
srv_msg.client_sets_value('Client', 'chaddr', 'ff:01:02:03:ff:04')
srv_msg.client_send_msg('REQUEST')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'ACK')
srv_msg.response_check_content('Response', None, 'yiaddr', '192.168.50.10')
srv_msg.response_check_include_option('Response', None, '1')
srv_msg.response_check_option_content('Response', '1', None, 'value', '255.255.255.0')
示例15: test_v4_options_vendor_encapsulated_space
def test_v4_options_vendor_encapsulated_space():
misc.test_setup()
srv_control.config_srv_subnet('192.168.50.0/24', '192.168.50.50-192.168.50.50')
srv_control.config_srv_custom_opt_space('vendor-encapsulated-options-space',
'foo',
'1',
'uint16',
'66')
srv_control.config_srv_opt('vendor-encapsulated-options', '$(EMPTY)')
srv_control.build_and_send_config_files('SSH', 'config-file')
srv_control.start_srv('DHCP', 'started')
misc.test_procedure()
srv_msg.client_sets_value('Client', 'chaddr', 'ff:01:02:03:ff:04')
srv_msg.client_requests_option('43')
srv_msg.client_does_include_with_value('client_id', 'ff:01:02:03:ff:04:11:22')
srv_msg.client_send_msg('DISCOVER')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'OFFER')
srv_msg.response_check_content('Response', None, 'yiaddr', '192.168.50.50')
srv_msg.response_check_include_option('Response', None, '43')
# option 43 should have suboption code: 1 length: 2 with value 66 (hex:42)
srv_msg.response_check_option_content('Response', '43', None, 'value', 'HEX:01020042')