本文整理汇总了Python中srv_msg.client_does_include函数的典型用法代码示例。如果您正苦于以下问题:Python client_does_include函数的具体用法?Python client_does_include怎么用?Python client_does_include使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了client_does_include函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_v6_mac_in_dhcp6_docsis_modem
def test_v6_mac_in_dhcp6_docsis_modem():
misc.test_setup()
srv_control.config_srv_subnet('3000::/64', '3000::1-3000::ff')
srv_control.run_command('"mac-sources": [ "docsis-modem" ]')
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', 'DUID', '00:03:00:01:f6:f5:f4:f3:f2:01')
srv_msg.client_does_include('Client', None, 'client-id')
srv_msg.client_does_include('Client', None, 'IA-NA')
srv_msg.client_send_msg('SOLICIT')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE')
misc.test_procedure()
srv_msg.client_copy_option('IA_NA')
srv_msg.client_copy_option('server-id')
srv_msg.client_sets_value('Client', 'enterprisenum', '4491')
srv_msg.client_does_include('Client', None, 'vendor-class')
srv_msg.add_vendor_suboption('Client', '36', 'f6:f5:f4:f3:f2:01')
srv_msg.client_does_include('Client', None, 'vendor-specific-info')
srv_msg.client_does_include('Client', None, 'client-id')
srv_msg.client_send_msg('REQUEST')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'REPLY')
srv_msg.file_contains_line('$(SOFTWARE_INSTALL_DIR)/var/kea/kea-leases6.csv',
None,
',f6:f5:f4:f3:f2:01')
srv_msg.file_contains_line('$(SOFTWARE_INSTALL_DIR)/var/kea/kea.log',
None,
'Hardware addr: f6:f5:f4:f3:f2:01')
示例2: test_v6_client_classification_onesubnet_docsis3_request_success
def test_v6_client_classification_onesubnet_docsis3_request_success():
misc.test_setup()
srv_control.config_srv_subnet('3000::/64', '3000::1-3000::1')
srv_control.config_client_classification('0', 'VENDOR_CLASS_docsis3.0')
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', 'vendor_class_data', 'docsis3.0')
srv_msg.client_does_include('Client', None, 'vendor-class')
srv_msg.client_does_include('Client', None, 'client-id')
srv_msg.client_does_include('Client', None, 'IA-NA')
srv_msg.client_send_msg('SOLICIT')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE')
srv_msg.response_check_include_option('Response', None, '3')
srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '5')
srv_msg.response_check_suboption_content('Response', '5', '3', None, 'addr', '3000::1')
misc.test_procedure()
srv_msg.client_sets_value('Client', 'vendor_class_data', 'docsis3.0')
srv_msg.client_does_include('Client', None, 'vendor-class')
srv_msg.client_copy_option('IA_NA')
srv_msg.client_copy_option('server-id')
srv_msg.client_does_include('Client', None, 'client-id')
srv_msg.client_send_msg('REQUEST')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'REPLY')
srv_msg.response_check_include_option('Response', None, '3')
srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '5')
srv_msg.response_check_suboption_content('Response', '5', '3', None, 'addr', '3000::1')
示例3: test_v6_host_reservation_mysql_duid_llt_matching
def test_v6_host_reservation_mysql_duid_llt_matching():
misc.test_setup()
srv_control.config_srv_subnet('3000::/64', '3000::1-3000::ff')
srv_control.enable_db_backend_reservation('MySQL')
srv_control.new_db_backend_reservation('MySQL',
'duid',
'00:01:00:01:52:7b:a8:f0:f6:f5:f4:f3:f2:01')
# Create new MySQL reservation identified by hw-address f6:f5:f4:f3:f2:01.
srv_control.update_db_backend_reservation('dhcp6_subnet_id', '1', 'MySQL', '1')
srv_control.ipv6_address_db_backend_reservation('3000::100', '$(EMPTY)', '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', 'DUID', '00:01:00:01:52:7b:a8:f0:f6:f5:f4:f3:f2:01')
srv_msg.client_does_include('Client', None, 'client-id')
srv_msg.client_does_include('Client', None, 'IA-NA')
srv_msg.client_send_msg('SOLICIT')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE')
srv_msg.response_check_include_option('Response', None, '3')
srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '5')
srv_msg.response_check_suboption_content('Response', '5', '3', None, 'addr', '3000::100')
示例4: test_v6_server_id_ll
def test_v6_server_id_ll():
misc.test_setup()
srv_control.config_srv_subnet('3000::/64', '3000::1-3000::ff')
srv_control.config_srv_id('LL', '00:03:00:01:ff:ff:ff:ff:ff:01')
srv_control.build_and_send_config_files('SSH', 'config-file')
srv_control.start_srv('DHCP', 'started')
misc.test_procedure()
srv_msg.client_does_include('Client', None, 'client-id')
srv_msg.client_does_include('Client', None, 'IA-NA')
srv_msg.client_send_msg('SOLICIT')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE')
srv_msg.response_check_include_option('Response', None, '2')
srv_msg.response_check_option_content('Response',
'2',
None,
'duid',
'00:03:00:01:ff:ff:ff:ff:ff:01')
srv_msg.response_check_include_option('Response', None, '1')
srv_msg.response_check_option_content('Response',
'1',
'NOT ',
'duid',
'00:03:00:01:ff:ff:ff:ff:ff:01')
示例5: test_v6_stateless_with_subnet_empty_pool_inforequest
def test_v6_stateless_with_subnet_empty_pool_inforequest():
misc.test_setup()
srv_control.config_srv_subnet('3000::/64', '$(EMPTY)')
srv_control.config_srv_opt('preference', '123')
srv_control.config_srv_opt('domain-search', 'domain1.example.com,domain2.isc.org')
srv_control.config_srv_opt('nis-servers', '2001:db8::abc,3000::1,2000::1234')
srv_control.build_and_send_config_files('SSH', 'config-file')
srv_control.start_srv('DHCP', 'started')
misc.test_procedure()
srv_msg.client_requests_option('27')
srv_msg.client_requests_option('24')
srv_msg.client_requests_option('7')
srv_msg.client_does_include('Client', None, 'client-id')
srv_msg.client_send_msg('INFOREQUEST')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'REPLY')
srv_msg.response_check_include_option('Response', None, '27')
srv_msg.response_check_option_content('Response',
'27',
None,
'addresses',
'2001:db8::abc,3000::1,2000::1234')
srv_msg.response_check_include_option('Response', None, '24')
srv_msg.response_check_option_content('Response',
'24',
None,
'domains',
'domain1.example.com.,domain2.isc.org.')
srv_msg.response_check_include_option('Response', None, '7')
srv_msg.response_check_option_content('Response', '7', None, 'prefval', '123')
示例6: test_v6_host_reservation_conflicts_two_entries_for_one_host_different_subnets
def test_v6_host_reservation_conflicts_two_entries_for_one_host_different_subnets():
misc.test_setup()
srv_control.config_srv_subnet('3000::/30', '3000::1-3000::10')
srv_control.config_srv_another_subnet_no_interface('3001::/30', '3001::1-3001::10')
srv_control.host_reservation_in_subnet('address',
'3000::1',
'0',
'duid',
'00:03:00:01:f6:f5:f4:f3:f2:01')
srv_control.host_reservation_in_subnet('address',
'3000::3',
'1',
'hw-address',
'f6:f5:f4:f3:f2:01')
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', 'DUID', '00:03:00:01:f6:f5:f4:f3:f2:01')
srv_msg.client_does_include('Client', None, 'client-id')
srv_msg.client_does_include('Client', None, 'IA-NA')
srv_msg.client_send_msg('SOLICIT')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE')
srv_msg.response_check_include_option('Response', None, '3')
srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '5')
示例7: test_user_check_hook_IA_NA_with_registry_known_user
def test_user_check_hook_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/dhcpv6/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('3000::/64', '3000::5-3000::5')
srv_control.config_srv_another_subnet_no_interface('1000::/64', '1000::5-1000::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()
# Send a query from a registered user
srv_msg.client_sets_value('Client', 'DUID', '00:03:00:01:11:02:03:04:05:06')
srv_msg.client_does_include('Client', None, 'client-id')
srv_msg.client_does_include('Client', None, 'IA-NA')
srv_msg.client_send_msg('SOLICIT')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE')
srv_msg.response_check_include_option('Response', None, '3')
srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '5')
srv_msg.response_check_suboption_content('Response', '5', '3', None, 'addr', '3000::5')
# Check the outcome file for correct content
srv_msg.copy_remote('/tmp/user_chk_outcome.txt')
srv_msg.compare_file('tests/dhcpv6/kea_only/user_chk/outcome_2.txt')
示例8: send_decline6
def send_decline6():
misc.test_procedure()
srv_msg.client_copy_option('IA_NA')
srv_msg.client_copy_option('server-id')
srv_msg.client_does_include('Client', None, 'client-id')
srv_msg.client_send_msg('DECLINE')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'REPLY')
示例9: test_hook_v6_lease_cmds_get_using_address
def test_hook_v6_lease_cmds_get_using_address():
misc.test_setup()
srv_control.config_srv_subnet('2001:db8:1::/64', '2001:db8:1::1-2001:db8:1::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_does_include('Client', None, 'client-id')
srv_msg.client_does_include('Client', None, 'IA-NA')
srv_msg.client_sets_value('Client', 'DUID', '00:03:00:01:66:55:44:33:22:11')
srv_msg.client_send_msg('SOLICIT')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE')
srv_msg.response_check_include_option('Response', None, '3')
srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '5')
misc.test_procedure()
srv_msg.client_copy_option('IA_NA')
srv_msg.client_copy_option('server-id')
srv_msg.client_sets_value('Client', 'DUID', '00:03:00:01:66:55:44:33:22:11')
srv_msg.client_does_include('Client', None, 'client-id')
srv_msg.client_send_msg('REQUEST')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'REPLY')
srv_msg.response_check_include_option('Response', None, '1')
srv_msg.response_check_include_option('Response', None, '2')
srv_msg.response_check_include_option('Response', None, '3')
srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '5')
srv_msg.response_check_suboption_content('Response',
'5',
'3',
None,
'addr',
'2001:db8:1::1')
misc.test_procedure()
srv_msg.client_sets_value('Client', 'DUID', '00:03:00:01:11:22:33:44:55:66')
srv_msg.client_does_include('Client', None, 'client-id')
srv_msg.client_does_include('Client', None, 'IA-NA')
srv_msg.client_send_msg('SOLICIT')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE')
srv_msg.response_check_include_option('Response', None, '1')
srv_msg.response_check_include_option('Response', None, '2')
srv_msg.response_check_include_option('Response', None, '3')
srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '13')
srv_msg.response_check_suboption_content('Response', '13', '3', None, 'statuscode', '2')
srv_msg.send_through_socket_server_site('$(SOFTWARE_INSTALL_DIR)/var/kea/control_socket',
'{"command":"lease6-get","arguments":{"ip-address": "2001:db8:1::1"}}')
示例10: test_v6_host_reservation_mysql_all_values_duid_2
def test_v6_host_reservation_mysql_all_values_duid_2():
misc.test_setup()
srv_control.config_srv_subnet('3000::/64', '3000::1-3000::ff')
srv_control.config_srv_prefix('3001::', '0', '32', '33')
srv_control.enable_db_backend_reservation('MySQL')
srv_control.new_db_backend_reservation('MySQL',
'duid',
'00:01:00:01:52:7b:a8:f0:f6:f5:f4:f3:f2:01')
srv_control.update_db_backend_reservation('hostname', 'reserved-hostname', 'MySQL', '1')
srv_control.update_db_backend_reservation('dhcp6_subnet_id', '1', 'MySQL', '1')
srv_control.ipv6_prefix_db_backend_reservation('3001::', '40', '$(EMPTY)', 'MySQL', '1')
srv_control.ipv6_address_db_backend_reservation('3000::100', '$(EMPTY)', 'MySQL', '1')
srv_control.upload_db_reservation('MySQL')
srv_control.add_ddns_server('127.0.0.1', '53001')
srv_control.add_ddns_server_options('enable-updates', 'true')
srv_control.add_ddns_server_options('qualifying-suffix', 'my.domain.com')
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', 'DUID', '00:01:00:01:52:7b:a8:f0:f6:f5:f4:f3:f2:01')
srv_msg.client_does_include('Client', None, 'IA-PD')
srv_msg.client_does_include('Client', None, 'client-id')
srv_msg.client_does_include('Client', None, 'IA-NA')
srv_msg.client_send_msg('SOLICIT')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE')
misc.test_procedure()
srv_msg.client_copy_option('server-id')
srv_msg.client_copy_option('IA_NA')
srv_msg.client_copy_option('IA_PD')
srv_msg.client_sets_value('Client', 'DUID', '00:01:00:01:52:7b:a8:f0:f6:f5:f4:f3:f2:01')
srv_msg.client_sets_value('Client', 'FQDN_domain_name', 'some-different-name')
srv_msg.client_sets_value('Client', 'FQDN_flags', 'S')
srv_msg.client_does_include('Client', None, 'fqdn')
srv_msg.client_does_include('Client', None, 'client-id')
srv_msg.client_send_msg('REQUEST')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'REPLY')
srv_msg.response_check_include_option('Response', None, '3')
srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '5')
srv_msg.response_check_suboption_content('Response', '5', '3', None, 'addr', '3000::100')
srv_msg.response_check_include_option('Response', None, '25')
srv_msg.response_check_option_content('Response', '25', None, 'sub-option', '26')
srv_msg.response_check_suboption_content('Response', '26', '25', None, 'prefix', '3001::')
srv_msg.response_check_include_option('Response', None, '39')
srv_msg.response_check_option_content('Response',
'39',
None,
'fqdn',
'reserved-hostname.my.domain.com.')
示例11: test_v6_relay_interface_two_subnets_direct_client
def test_v6_relay_interface_two_subnets_direct_client():
misc.test_setup()
srv_control.config_srv_subnet('2001:db8:1::/64', '2001:db8:1::1-2001:db8:1::1')
srv_control.set_conf_parameter_subnet('interface-id', '"abc"', '0')
srv_control.config_srv_another_subnet_no_interface('2001:db8:2::/64',
'2001:db8:2::1-2001:db8:2::10')
srv_control.build_and_send_config_files('SSH', 'config-file')
srv_control.start_srv('DHCP', 'started')
misc.test_procedure()
srv_msg.client_does_include('Client', None, 'client-id')
srv_msg.client_does_include('Client', None, 'IA-NA')
srv_msg.client_send_msg('SOLICIT')
srv_msg.client_sets_value('RelayAgent', 'ifaceid', 'xyz')
srv_msg.client_does_include('RelayAgent', None, 'interface-id')
srv_msg.create_relay_forward()
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'RELAYREPLY')
srv_msg.response_check_include_option('Response', None, '18')
srv_msg.response_check_include_option('Response', None, '9')
srv_msg.response_check_option_content('Response', '9', None, 'Relayed', 'Message')
srv_msg.response_check_include_option('Relayed Message', None, '1')
srv_msg.response_check_include_option('Relayed Message', None, '2')
srv_msg.response_check_include_option('Relayed Message', None, '3')
srv_msg.response_check_option_content('Relayed Message', '3', None, 'sub-option', '13')
srv_msg.response_check_suboption_content('Relayed Message',
'13',
'3',
None,
'statuscode',
'2')
misc.test_procedure()
srv_msg.client_does_include('Client', None, 'client-id')
srv_msg.client_does_include('Client', None, 'IA-NA')
srv_msg.client_send_msg('SOLICIT')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE')
srv_msg.response_check_include_option('Response', None, '1')
srv_msg.response_check_include_option('Response', None, '2')
srv_msg.response_check_include_option('Response', None, '3')
srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '5')
srv_msg.response_check_suboption_content('Response',
'5',
'3',
'NOT ',
'addr',
'2001:db8:1::1')
references.references_check('Kea')
示例12: test_prefix_delegation_release_nobinding2
def test_prefix_delegation_release_nobinding2():
misc.test_setup()
srv_control.config_srv_subnet('3000::/32', '3000::1-3000::2')
srv_control.config_srv_prefix('2001:db8:1::', '0', '32', '33')
srv_control.build_and_send_config_files('SSH', 'config-file')
srv_control.start_srv('DHCP', 'started')
misc.test_procedure()
srv_msg.client_does_include('Client', None, 'IA-PD')
srv_msg.client_does_include('Client', None, 'client-id')
srv_msg.client_send_msg('SOLICIT')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE')
srv_msg.response_check_include_option('Response', None, '25')
misc.test_procedure()
srv_msg.client_copy_option('server-id')
srv_msg.client_copy_option('IA_PD')
srv_msg.client_does_include('Client', None, 'client-id')
srv_msg.client_send_msg('REQUEST')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'REPLY')
srv_msg.response_check_include_option('Response', None, '25')
srv_msg.response_check_option_content('Response', '25', None, 'sub-option', '26')
misc.test_procedure()
srv_msg.client_copy_option('server-id')
srv_msg.client_save_option('IA_PD')
srv_msg.client_add_saved_option('DONT ')
srv_msg.client_does_include('Client', None, 'client-id')
srv_msg.client_send_msg('RELEASE')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'REPLY')
srv_msg.response_check_include_option('Response', None, '25')
# must not contain status code == 3.
misc.test_procedure()
srv_msg.client_copy_option('server-id')
srv_msg.client_add_saved_option('DONT ')
srv_msg.client_does_include('Client', None, 'client-id')
srv_msg.client_send_msg('RELEASE')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'REPLY')
srv_msg.response_check_include_option('Response', None, '25')
srv_msg.response_check_option_content('Response', '25', None, 'sub-option', '13')
srv_msg.response_check_suboption_content('Response', '13', '25', None, 'statuscode', '3')
references.references_check('RFC')
示例13: test_hook_v6_network_cmds_add_on_relay_addr
def test_hook_v6_network_cmds_add_on_relay_addr():
misc.test_setup()
srv_control.config_srv_subnet('$(EMPTY)', '$(EMPTY)')
srv_control.config_srv_opt('preference', '123')
srv_control.config_srv_opt('domain-search', 'domain1.example.com,domain2.isc.org')
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_sets_value('Client', 'DUID', '00:03:00:01:66:55:44:33:22:11')
srv_msg.client_does_include('Client', None, 'client-id')
srv_msg.client_does_include('Client', None, 'IA-NA')
srv_msg.client_send_msg('SOLICIT')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE')
srv_msg.response_check_include_option('Response', None, '1')
srv_msg.response_check_include_option('Response', None, '2')
srv_msg.response_check_include_option('Response', None, '3')
srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '13')
srv_msg.response_check_suboption_content('Response', '13', '3', None, 'statuscode', '2')
srv_msg.send_through_socket_server_site('$(SOFTWARE_INSTALL_DIR)/var/kea/control_socket',
'{"command":"network6-add","arguments":{"shared-networks":[{"name": "name-abc","relay":{"ip-address":"2001:db8::abcd"},"preferred-lifetime": 3000,"rebind-timer": 2000,"renew-timer": 1000,"valid-lifetime": 4000,"subnet6":[{"id":1,"pools": [{"pool": "2001:db8:1::1-2001:db8:1::10"}],"preferred-lifetime": 3000,"rebind-timer": 2000,"renew-timer": 1000,"reservation-mode": "all","subnet": "2001:db8:1::/64","valid-lifetime": 4000}]}]}}')
srv_msg.send_through_socket_server_site('$(SOFTWARE_INSTALL_DIR)/var/kea/control_socket',
'{"command":"network6-get","arguments":{"name": "name-abc"}}')
srv_msg.forge_sleep('5', 'seconds')
misc.test_procedure()
srv_msg.client_sets_value('Client', 'DUID', '00:03:00:01:f6:f5:f4:f3:f2:01')
srv_msg.client_does_include('Client', None, 'client-id')
srv_msg.client_does_include('Client', None, 'IA-NA')
srv_msg.client_send_msg('SOLICIT')
srv_msg.client_sets_value('RelayAgent', 'ifaceid', 'interface-abc')
srv_msg.client_does_include('RelayAgent', None, 'interface-id')
srv_msg.client_sets_value('RelayAgent', 'linkaddr', '2001:db8::abcd')
srv_msg.create_relay_forward()
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'RELAYREPLY')
srv_msg.response_check_include_option('Response', None, '18')
srv_msg.response_check_include_option('Response', None, '9')
srv_msg.response_check_option_content('Response', '9', None, 'Relayed', 'Message')
srv_msg.response_check_include_option('Relayed Message', None, '1')
srv_msg.response_check_include_option('Relayed Message', None, '2')
srv_msg.response_check_include_option('Relayed Message', None, '3')
srv_msg.response_check_option_content('Relayed Message', '3', None, 'sub-option', '5')
示例14: test_v6_relay_message_decline_reply
def test_v6_relay_message_decline_reply():
misc.test_setup()
srv_control.config_srv_subnet('3000::/64', '3000::1-3000::ff')
srv_control.build_and_send_config_files('SSH', 'config-file')
srv_control.start_srv('DHCP', 'started')
misc.test_procedure()
srv_msg.client_requests_option('7')
srv_msg.client_does_include('Client', None, 'client-id')
srv_msg.client_does_include('Client', None, 'IA-NA')
srv_msg.client_send_msg('SOLICIT')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE')
misc.test_procedure()
srv_msg.client_copy_option('IA_NA')
srv_msg.client_copy_option('server-id')
srv_msg.client_does_include('Client', None, 'client-id')
srv_msg.client_send_msg('DECLINE')
srv_msg.client_does_include('RelayAgent', None, 'interface-id')
srv_msg.create_relay_forward()
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'RELAYREPLY')
srv_msg.response_check_include_option('Response', None, '18')
srv_msg.response_check_include_option('Response', None, '9')
# Response MUST include REPLY message.
references.references_check('RFC3315')
示例15: test_v6_IPXE_1
def test_v6_IPXE_1():
misc.test_setup()
srv_control.config_srv_subnet('2001:db8::/64', '$(EMPTY)')
srv_control.create_new_class('a-ipxe')
srv_control.add_test_to_class('1', 'test', 'substring(option[15].hex,2,4) == \'iPXE\'')
srv_control.add_option_to_defined_class('1',
'bootfile-url',
'http://[2001:db8::1]/ubuntu.cfg')
# Server is configured with client-classification option in subnet 0 with name a-ipxe.
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', 'archtypes', '7')
srv_msg.client_does_include('Client', None, 'client-arch-type')
srv_msg.client_does_include('Client', None, 'client-id')
srv_msg.client_does_include('Client', None, 'IA-NA')
srv_msg.client_sets_value('Client', 'user_class_data', 'iPXE')
srv_msg.client_does_include('Client', None, 'user-class')
srv_msg.client_requests_option('59')
srv_msg.client_send_msg('SOLICIT')
misc.pass_criteria()
srv_msg.send_wait_for_message('MUST', None, 'ADVERTISE')
srv_msg.response_check_include_option('Response', None, '59')
srv_msg.response_check_option_content('Response',
'59',
None,
'optdata',
'http://[2001:db8::1]/ubuntu.cfg')
srv_msg.response_check_include_option('Response', None, '3')
srv_msg.response_check_option_content('Response', '3', None, 'sub-option', '13')
srv_msg.response_check_suboption_content('Response', '13', '3', None, 'statuscode', '2')