本文整理汇总了Python中srv_msg.client_does_include_with_value函数 的典型用法代码示例。如果您正苦于以下问题:Python client_does_include_with_value函数的具体用法?Python client_does_include_with_value怎么用?Python client_does_include_with_value使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了client_does_include_with_value函数 的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: 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')
开发者ID:isc-projects, 项目名称:forge, 代码行数:26, 代码来源:test_v4_classification_request.py
示例2: 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')
开发者ID:isc-projects, 项目名称:forge, 代码行数:25, 代码来源:test_v4_vendor_options.py
示例3: test_v4_message_fields_ciaddr_incorrect_nak
def test_v4_message_fields_ciaddr_incorrect_nak():
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_requests_option('1')
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_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')
misc.test_procedure()
srv_msg.client_copy_option('server_id')
srv_msg.client_does_include_with_value('requested_addr', '192.168.50.1')
srv_msg.client_sets_value('Client', 'chaddr', '00:00:00:00:00:00')
srv_msg.client_sets_value('Client', 'ciaddr', '255.255.255.255')
srv_msg.client_requests_option('1')
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, 'ciaddr', '0.0.0.0')
srv_msg.response_check_content('Response', 'NOT ', 'ciaddr', '255.255.255.255')
开发者ID:isc-projects, 项目名称:forge, 代码行数:35, 代码来源:test_v4_fields.py
示例4: test_v4_loggers_bad_packets_info
def test_v4_loggers_bad_packets_info():
misc.test_setup()
srv_control.config_srv_subnet('192.168.50.0/24', '192.168.50.1-192.168.50.1')
srv_control.configure_loggers('kea-dhcp4.bad-packets', 'INFO', 'None', 'kea.log')
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('7')
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')
misc.test_procedure()
srv_msg.client_copy_option('server_id')
srv_msg.client_does_include_with_value('requested_addr', '192.168.50.100')
srv_msg.client_requests_option('1')
srv_msg.client_send_msg('REQUEST')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'NAK')
srv_msg.file_contains_line('$(SOFTWARE_INSTALL_DIR)/var/kea/kea.log',
'NOT ',
r'DEBUG \[kea-dhcp4.bad-packets')
开发者ID:isc-projects, 项目名称:forge, 代码行数:30, 代码来源:test_kea_logging.py
示例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()
开发者ID:isc-projects, 项目名称:forge, 代码行数:60, 代码来源:test_v4_release.py
示例6: test_v4_client_classification_one_class_eRouter1_global_next_server
def test_v4_client_classification_one_class_eRouter1_global_next_server():
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.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.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')
开发者ID:isc-projects, 项目名称:forge, 代码行数:32, 代码来源:test_v4_classification_default_classes.py
示例7: 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')
开发者ID:isc-projects, 项目名称:forge, 代码行数:29, 代码来源:test_host_reservation_relay.py
示例8: 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')
开发者ID:isc-projects, 项目名称:forge, 代码行数:33, 代码来源:test_host_reservation_address_mysql.py
示例9: test_v4_request_relay_selecting_success_chaddr
def test_v4_request_relay_selecting_success_chaddr():
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.network_variable('source_port', '67')
srv_msg.network_variable('source_address', '$(GIADDR4)')
srv_msg.network_variable('destination_address', '$(SRV4_ADDR)')
srv_msg.client_sets_value('Client', 'giaddr', '$(GIADDR4)')
srv_msg.client_sets_value('Client', 'hops', '1')
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')
misc.test_procedure()
srv_msg.client_sets_value('Client', 'giaddr', '$(GIADDR4)')
srv_msg.client_sets_value('Client', 'hops', '1')
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_option_content('Response', '1', None, 'value', '255.255.255.0')
开发者ID:isc-projects, 项目名称:forge, 代码行数:35, 代码来源:test_v4_request_relay_part1.py
示例10: 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')
开发者ID:isc-projects, 项目名称:forge, 代码行数:29, 代码来源:test_host_reservation_address_mysql.py
示例11: test_v4_request_relay_rebinding_success
def test_v4_request_relay_rebinding_success():
misc.test_setup()
srv_control.set_time('renew-timer', '2')
srv_control.set_time('rebind-timer', '3')
srv_control.set_time('valid-lifetime', '500')
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.network_variable('source_port', '67')
srv_msg.network_variable('source_address', '$(GIADDR4)')
srv_msg.network_variable('destination_address', '$(SRV4_ADDR)')
srv_msg.client_sets_value('Client', 'giaddr', '$(GIADDR4)')
srv_msg.client_sets_value('Client', 'hops', '1')
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_option_content('Response', '1', None, 'value', '255.255.255.0')
srv_msg.response_check_option_content('Response', '54', None, 'value', '$(SRV4_ADDR)')
misc.test_procedure()
srv_msg.client_sets_value('Client', 'giaddr', '$(GIADDR4)')
srv_msg.client_sets_value('Client', 'hops', '1')
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_option_content('Response', '1', None, 'value', '255.255.255.0')
srv_msg.response_check_option_content('Response', '54', None, 'value', '$(SRV4_ADDR)')
# make sure that T1 time expires and client will be in RENEWING state.
srv_msg.forge_sleep('4', 'seconds')
misc.test_procedure()
srv_msg.client_sets_value('Client', 'giaddr', '$(GIADDR4)')
srv_msg.client_sets_value('Client', 'hops', '1')
srv_msg.client_sets_value('Client', 'ciaddr', '192.168.50.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, '54')
srv_msg.response_check_option_content('Response', '54', None, 'value', '$(SRV4_ADDR)')
开发者ID:isc-projects, 项目名称:forge, 代码行数:57, 代码来源:test_v4_request_relay_part3.py
示例12: test_v4_request_selecting_success_client_id_chaddr_empty_pool
def test_v4_request_selecting_success_client_id_chaddr_empty_pool():
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:00:00:00:00:00')
srv_msg.client_does_include_with_value('client_id', '00010203040506')
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', '61', None, 'value', '00010203040506')
misc.test_procedure()
srv_msg.client_does_include_with_value('client_id', '00010203040506')
srv_msg.client_sets_value('Client', 'chaddr', '00:00:00:00:00:00')
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', '61', None, 'value', '00010203040506')
misc.test_procedure()
srv_msg.client_sets_value('Client', 'chaddr', '00:00:00:00:00:11')
srv_msg.client_does_include_with_value('client_id', '11020304050607')
srv_msg.client_requests_option('1')
srv_msg.client_send_msg('DISCOVER')
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', '11020304050607')
srv_msg.client_requests_option('1')
srv_msg.client_send_msg('DISCOVER')
misc.pass_criteria()
srv_msg.send_dont_wait_for_message()
开发者ID:isc-projects, 项目名称:forge, 代码行数:56, 代码来源:test_v4_request_part1.py
示例13: test_v4_host_reservation_reserved_classes_2
def test_v4_host_reservation_reserved_classes_2():
misc.test_setup()
srv_control.config_srv_subnet('192.168.50.0/24', '192.168.50.1-192.168.50.1')
srv_control.create_new_class('ipxe_efi_x64')
srv_control.add_test_to_class('1', 'server-hostname', 'hal9000')
srv_control.add_test_to_class('1', 'boot-file-name', '/dev/null')
srv_control.create_new_class('class-abc')
srv_control.add_test_to_class('2', 'next-server', '192.0.2.254')
srv_control.add_option_to_defined_class('2', 'interface-mtu', '321')
srv_control.add_line_to_subnet('0',
',"reservations": [{"hw-address": "aa:bb:cc:dd:ee:ff","ip-address": "192.168.50.10","client-classes": [ "ipxe_efi_x64", "class-abc" ]}]')
srv_control.add_line('"host-reservation-identifiers": [ "hw-address" ]')
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:55')
srv_msg.client_requests_option('26')
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', 'NOT ', '26')
srv_msg.response_check_content('Response', None, 'yiaddr', '192.168.50.1')
misc.test_procedure()
srv_msg.client_sets_value('Client', 'chaddr', 'aa:bb:cc:dd:ee:ff')
srv_msg.client_requests_option('26')
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')
srv_msg.response_check_include_option('Response', None, '26')
srv_msg.response_check_option_content('Response', '26', None, 'value', '321')
misc.test_procedure()
srv_msg.client_requests_option('26')
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', 'aa:bb:cc:dd:ee:ff')
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')
srv_msg.response_check_include_option('Response', None, '26')
srv_msg.response_check_option_content('Response', '26', None, 'value', '321')
srv_msg.response_check_content('Response', None, 'siaddr', '192.0.2.254')
srv_msg.response_check_content('Response', None, 'file', '/dev/null')
srv_msg.response_check_content('Response', None, 'sname', 'hal9000')
开发者ID:isc-projects, 项目名称:forge, 代码行数:56, 代码来源:test_host_reservation_relay.py
示例14: test_v4_host_reservation_conflicts_reconfigure_server_with_reservation_of_used_address_3
def test_v4_host_reservation_conflicts_reconfigure_server_with_reservation_of_used_address_3():
misc.test_setup()
# reconfigure different address for same MAC from outside of the pool
srv_control.config_srv_subnet('192.168.50.0/24', '192.168.50.5-192.168.50.9')
srv_control.host_reservation_in_subnet('address',
'192.168.50.10',
'0',
'hw-address',
'ff:01:02:03:ff:04')
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')
misc.test_procedure()
srv_msg.client_copy_option('server_id')
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')
misc.test_setup()
srv_control.config_srv_subnet('192.168.50.0/24', '192.168.50.5-192.168.50.9')
srv_control.host_reservation_in_subnet('address',
'192.168.50.30',
'0',
'hw-address',
'ff:01:02:03:ff:04')
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:04')
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_does_include_with_value('requested_addr', '192.168.50.30')
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.30')
开发者ID:isc-projects, 项目名称:forge, 代码行数:55, 代码来源:test_host_reservation_conflicts.py
示例15: test_hook_v4_lease_cmds_del_using_hw_address
def test_hook_v4_lease_cmds_del_using_hw_address():
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.add_hooks('$(SOFTWARE_INSTALL_DIR)/lib/kea/hooks/libdhcp_lease_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_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')
misc.test_procedure()
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_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.1')
srv_msg.response_check_include_option('Response', None, '1')
srv_msg.response_check_option_content('Response', '1', None, 'value', '255.255.255.0')
misc.test_procedure()
srv_msg.client_requests_option('1')
srv_msg.client_sets_value('Client', 'chaddr', 'aa:bb:cc:dd:ee:11')
srv_msg.client_send_msg('DISCOVER')
misc.pass_criteria()
srv_msg.send_dont_wait_for_message()
srv_msg.send_through_socket_server_site('$(SOFTWARE_INSTALL_DIR)/var/kea/control_socket',
'{"command": "lease4-del","arguments": {"identifier": "ff:01:02:03:ff:04","identifier-type":"hw-address","subnet-id":1}}')
misc.test_procedure()
srv_msg.client_requests_option('1')
srv_msg.client_sets_value('Client', 'chaddr', 'aa:bb:cc:dd:ee:11')
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')
开发者ID:isc-projects, 项目名称:forge, 代码行数:54, 代码来源:test_leases_cmds.py
示例16: test_v4_hosts_cmds_libreload
def test_v4_hosts_cmds_libreload():
misc.test_setup()
srv_control.add_hooks('$(SOFTWARE_INSTALL_DIR)/lib/kea/hooks/libdhcp_host_cmds.so')
srv_control.config_srv_subnet('192.168.50.0/24', '192.168.50.50-192.168.50.50')
srv_control.open_control_channel('unix', '$(SOFTWARE_INSTALL_DIR)/var/kea/control_socket')
srv_control.enable_db_backend_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.50')
srv_msg.send_through_socket_server_site('$(SOFTWARE_INSTALL_DIR)/var/kea/control_socket',
'{"command":"reservation-add","arguments":{"reservation":{"subnet-id":1,"hw-address":"ff:01:02:03:ff:04","ip-address":"192.168.50.100"}}}')
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.100')
misc.test_procedure()
srv_msg.client_copy_option('server_id')
srv_msg.client_does_include_with_value('requested_addr', '192.168.50.100')
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.100')
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.send_through_socket_server_site('$(SOFTWARE_INSTALL_DIR)/var/kea/control_socket',
'{"command": "libreload","arguments": {}}')
srv_msg.send_through_socket_server_site('$(SOFTWARE_INSTALL_DIR)/var/kea/control_socket',
'{"command":"reservation-del","arguments":{"subnet-id":1,"ip-address":"192.168.50.100"}}')
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.50')
开发者ID:isc-projects, 项目名称:forge, 代码行数:54, 代码来源:test_hosts_cmds.py
示例17: send_decline4
def send_decline4(requested_addr):
misc.test_procedure()
# srv_msg.client_sets_value('Client', 'chaddr', '00:00:00:00:00:22')
# srv_msg.client_does_include_with_value('client_id', '00010203040122')
srv_msg.client_copy_option('server_id')
srv_msg.client_sets_value('Client', 'ciaddr', '0.0.0.0')
srv_msg.client_does_include_with_value('requested_addr', requested_addr)
srv_msg.client_send_msg('DECLINE')
misc.pass_criteria()
srv_msg.send_dont_wait_for_message()
开发者ID:isc-projects, 项目名称:forge, 代码行数:11, 代码来源:dhcp4_scen.py
示例18: _send_discover
def _send_discover(chaddr=None, client_id=None, giaddr=None):
srv_msg.client_requests_option('1')
if chaddr is not None:
srv_msg.client_sets_value('Client', 'chaddr', chaddr)
if client_id is not None:
srv_msg.client_does_include_with_value('client_id', client_id)
if giaddr is not None:
srv_msg.network_variable('source_port', '67')
srv_msg.network_variable('source_address', giaddr)
srv_msg.network_variable('destination_address', '$(SRV4_ADDR)')
srv_msg.client_sets_value('Client', 'giaddr', giaddr)
srv_msg.client_send_msg('DISCOVER')
开发者ID:isc-projects, 项目名称:forge, 代码行数:12, 代码来源:dhcp4_scen.py
示例19: test_v4_loggers_dhcpsrv_debug
def test_v4_loggers_dhcpsrv_debug():
misc.test_setup()
srv_control.config_srv_subnet('192.168.50.0/24', '192.168.50.1-192.168.50.1')
srv_control.configure_loggers('kea-dhcp4.dhcpsrv', 'DEBUG', '99', 'kea.log')
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('7')
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')
misc.test_procedure()
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_option_content('Response', '1', None, 'value', '255.255.255.0')
misc.test_procedure()
srv_msg.client_copy_option('server_id')
srv_msg.client_sets_value('Client', 'ciaddr', '192.168.50.1')
srv_msg.client_send_msg('RELEASE')
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:11')
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_wait_for_message('MUST', None, 'OFFER')
srv_msg.file_contains_line('$(SOFTWARE_INSTALL_DIR)/var/kea/kea.log',
None,
r'DEBUG \[kea-dhcp4.dhcpsrv')
srv_msg.file_contains_line('$(SOFTWARE_INSTALL_DIR)/var/kea/kea.log',
None,
r'INFO \[kea-dhcp4.dhcpsrv')
开发者ID:isc-projects, 项目名称:forge, 代码行数:53, 代码来源:test_kea_logging.py
示例20: test_v4_legal_log_assigned_address_without_client_id_mysql
Python入门教程 Python 是一种解释型、面向对象、动态数据类型的高级程序设计语言。 P
阅读:13806| 2022-01-22
Python wikiutil.getFrontPage函数代码示例
阅读:10192| 2022-05-24
Python 简介 Python 是一个高层次的结合了解释性、编译性、互动性和面向对象的脚本
阅读:4089| 2022-01-22
Python tests.group函数代码示例
阅读:4043| 2022-05-27
Python util.check_if_user_has_permission函数代码示例
阅读:3844| 2022-05-27
Python 练习实例98 Python 100例题目:从键盘输入一个字符串,将小写字母全部转换成大
阅读:3510| 2022-01-22
Python 环境搭建 本章节我们将向大家介绍如何在本地搭建 Python 开发环境。 Py
阅读:3030| 2022-01-22
Python output.darkgreen函数代码示例
阅读:2653| 2022-05-25
Python 基础语法 Python 语言与 Perl,C 和 Java 等语言有许多相似之处。但是,也
阅读:2648| 2022-01-22
Python 中文编码前面章节中我们已经学会了如何用 Python 输出 Hello, World!,英文没
阅读:2302| 2022-01-22
请发表评论