本文整理汇总了Python中srv_control.host_reservation_in_subnet函数 的典型用法代码示例。如果您正苦于以下问题:Python host_reservation_in_subnet函数的具体用法?Python host_reservation_in_subnet怎么用?Python host_reservation_in_subnet使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了host_reservation_in_subnet函数 的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: 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')
开发者ID:isc-projects, 项目名称:forge, 代码行数:60, 代码来源:test_host_reservation_conflicts.py
示例2: test_v4_host_reservation_conflicts_mysql_reconfigure_server_with_reservation_of_used_address_2
def test_v4_host_reservation_conflicts_mysql_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.new_db_backend_reservation('MySQL', 'hw-address', 'ff:01:02:03:ff:11')
srv_control.update_db_backend_reservation('hostname', 'reserved-hostname', 'MySQL', '1')
srv_control.update_db_backend_reservation('ipv4_address', '192.168.50.2', '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: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.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')
开发者ID:isc-projects, 项目名称:forge, 代码行数:60, 代码来源:test_host_reservation_conflicts_mysql.py
示例3: 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
示例4: test_v4_host_reservation_pgsql_one_address_outside_pool_dual_backend_2
def test_v4_host_reservation_pgsql_one_address_outside_pool_dual_backend_2():
misc.test_setup()
# outside of the pool
srv_control.config_srv_subnet('192.168.50.0/24', '192.168.50.30-192.168.50.50')
srv_control.enable_db_backend_reservation('PostgreSQL')
srv_control.new_db_backend_reservation('PostgreSQL', 'hw-address', 'ff:01:02:03:ff:04')
srv_control.update_db_backend_reservation('hostname', 'reserved-hostname', 'PostgreSQL', '1')
srv_control.update_db_backend_reservation('next_server', '1.1.1.1', 'PostgreSQL', '1')
srv_control.update_db_backend_reservation('ipv4_address', '192.168.50.10', 'PostgreSQL', '1')
srv_control.update_db_backend_reservation('dhcp4_subnet_id', '1', 'PostgreSQL', '1')
srv_control.upload_db_reservation('PostgreSQL')
srv_control.host_reservation_in_subnet('address',
'192.168.50.11',
'0',
'hw-address',
'ff:01:02:03:ff:03')
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')
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: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')
misc.test_procedure()
srv_msg.client_sets_value('Client', 'chaddr', 'ff:01:02:03:ff:03')
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.11')
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.11')
srv_msg.client_sets_value('Client', 'chaddr', 'ff:01:02:03:ff:03')
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.11')
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, 代码行数:60, 代码来源:test_host_reservation_address_pgsql.py
示例5: test_v6_host_reservation_duid_hostname_without_ddns
def test_v6_host_reservation_duid_hostname_without_ddns():
misc.test_setup()
srv_control.config_srv_subnet('3000::/64', '3000::1-3000::ff')
srv_control.host_reservation_in_subnet('hostname',
'reserved-hostname',
'0',
'duid',
'00:03:00:01: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')
misc.test_procedure()
srv_msg.client_copy_option('server-id')
srv_msg.client_copy_option('IA_NA')
srv_msg.client_sets_value('Client', 'DUID', '00:03:00:01: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, '39')
srv_msg.response_check_option_content('Response', '39', None, 'fqdn', 'reserved-hostname.')
开发者ID:isc-projects, 项目名称:forge, 代码行数:35, 代码来源:test_host_reservation_hostname.py
示例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')
开发者ID:isc-projects, 项目名称:forge, 代码行数:27, 代码来源:test_host_reservation_address_conflicts.py
示例7: test_v4_hooks_flexid_replace_client_id_renew_2
def test_v4_hooks_flexid_replace_client_id_renew_2():
misc.test_setup()
srv_control.config_srv_subnet('192.168.50.0/24', '192.168.50.1-192.168.50.5')
srv_control.host_reservation_in_subnet('address',
'192.168.50.10',
'0',
'flex-id',
'\'docsis3.0\'')
srv_control.add_line('"host-reservation-identifiers": ["hw-address", "flex-id" ]')
srv_control.add_hooks('$(SOFTWARE_INSTALL_DIR)/lib/kea/hooks/libdhcp_flex_id.so')
srv_control.add_parameter_to_hook('1', 'identifier-expression', 'option[60].hex')
srv_control.add_parameter_to_hook('1', 'replace-client-id', 'true')
# enable matching client id
srv_control.set_conf_parameter_global('match-client-id', 'true')
srv_control.build_and_send_config_files('SSH', 'config-file')
srv_control.start_srv('DHCP', 'started')
# server should act normally, mac address should not be replaced
misc.test_procedure()
srv_msg.client_does_include_with_value('client_id', 'ff:01:02:03:ff:04:11:22')
srv_msg.client_does_include_with_value('vendor_class_id', 'docsis3.0')
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_does_include_with_value('client_id', 'ff:01:02:03:ff:04:11:22')
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_does_include_with_value('vendor_class_id', 'docsis3.0')
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')
misc.test_procedure()
srv_msg.client_does_include_with_value('client_id', 'ff:01:02:03:ff:04:11:22')
# Client adds to the message vendor_class_id with value docsis3.0.
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', 'NOT ', 'yiaddr', '192.168.50.10')
srv_msg.response_check_include_option('Response', None, '61')
srv_msg.response_check_include_option('Response', None, '54')
srv_msg.file_contains_line('$(SOFTWARE_INSTALL_DIR)/var/kea/kea-leases4.csv',
'NOT ',
'ff:01:02:03:ff:04:11:22:33')
srv_msg.file_contains_line('$(SOFTWARE_INSTALL_DIR)/var/kea/kea-leases4.csv',
None,
'192.168.50.10,ff:01:02:03:ff:04,00:64:6f:63:73:69:73:33:2e:30,4000')
开发者ID:isc-projects, 项目名称:forge, 代码行数:60, 代码来源:test_flex_id.py
示例8: test_v4_hooks_flexid_inside_pool_negative
def test_v4_hooks_flexid_inside_pool_negative():
misc.test_setup()
srv_control.config_srv_subnet('192.168.50.0/24', '192.168.50.1-192.168.50.50')
srv_control.host_reservation_in_subnet('hostname',
'reserved-hostname',
'0',
'flex-id',
'\'docsis3.0\'')
srv_control.host_reservation_in_subnet_add_value('0', '0', 'address', '192.168.50.10')
srv_control.add_line('"host-reservation-identifiers": [ "flex-id" ]')
srv_control.add_hooks('$(SOFTWARE_INSTALL_DIR)/lib/kea/hooks/libdhcp_flex_id.so')
srv_control.add_parameter_to_hook('1', 'identifier-expression', 'option[60].hex')
srv_control.build_and_send_config_files('SSH', 'config-file')
srv_control.start_srv('DHCP', 'started')
misc.test_procedure()
srv_msg.client_does_include_with_value('vendor_class_id', 'docsis3.0')
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()
# Client adds to the message vendor_class_id with value docsis3.0.
srv_msg.client_copy_option('server_id')
srv_msg.client_does_include_with_value('requested_addr', '192.168.50.10')
srv_msg.client_does_include_with_value('vendor_class_id', 'docsis3.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, 'NAK')
开发者ID:isc-projects, 项目名称:forge, 代码行数:34, 代码来源:test_flex_id.py
示例9: test_v4_host_reservation_one_address_outside_pool
def test_v4_host_reservation_one_address_outside_pool():
misc.test_setup()
# outside of the pool
srv_control.config_srv_subnet('192.168.50.0/24', '192.168.50.30-192.168.50.50')
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')
srv_msg.response_check_content('Response', None, '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: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, 代码行数:32, 代码来源:test_host_reservation_address.py
示例10: test_v6_host_reservation_mac_requesting_reserved_prefix_outside
def test_v6_host_reservation_mac_requesting_reserved_prefix_outside():
misc.test_setup()
srv_control.config_srv_subnet('3000::/64', '3000::1-3000::10')
srv_control.host_reservation_in_subnet('prefix',
'3011::/90',
'0',
'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:66:55:44:33:22:11')
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_does_include('Client', None, 'IA-PD')
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, '25')
srv_msg.response_check_option_content('Response', '25', None, 'sub-option', '13')
srv_msg.response_check_suboption_content('Response', '13', '25', None, 'statuscode', '6')
srv_msg.response_check_include_option('Response', 'NOT ', '3')
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_does_include('Client', None, 'IA-PD')
srv_msg.client_copy_option('server-id')
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_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')
srv_msg.response_check_suboption_content('Response', '26', '25', None, 'prefix', '3011::')
srv_msg.response_check_include_option('Response', 'NOT ', '3')
开发者ID:isc-projects, 项目名称:forge, 代码行数:57, 代码来源:test_host_reservation_mac.py
示例11: 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.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.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, 代码行数:53, 代码来源:test_host_reservation_conflicts_mysql.py
示例12: test_v4_host_reservation_conflicts_duplicate_reservations
def test_v4_host_reservation_conflicts_duplicate_reservations():
misc.test_setup()
srv_control.config_srv_subnet('192.168.50.0/24', '192.168.50.1-192.168.50.50')
srv_control.host_reservation_in_subnet('address',
'192.168.50.10',
'0',
'hw-address',
'ff:01:02:03:ff:04')
srv_control.host_reservation_in_subnet('address',
'192.168.50.12',
'0',
'hw-address',
'ff:01:02:03:ff:04')
srv_control.start_srv_during_process('DHCP', 'configuration')
开发者ID:isc-projects, 项目名称:forge, 代码行数:14, 代码来源:test_host_reservation_conflicts_mysql.py
示例13: test_control_channel_socket_config_test
def test_control_channel_socket_config_test():
misc.test_setup()
srv_control.config_srv_subnet('3000::/64', '3000::1-3000::f')
srv_control.open_control_channel('unix', '$(SOFTWARE_INSTALL_DIR)/var/kea/control_socket')
# To global section of the config add file line: "expired-leases-processing":{"flush-reclaimed-timer-wait-time": 0,"hold-reclaimed-time": 0,"max-reclaim-leases": 100,"max-reclaim-time": 0,"reclaim-timer-wait-time": 0,"unwarned-reclaim-cycles": 5}
# To global section of the config add file line: "expired-leases-processing":{"flush-reclaimed-timer-wait-time": 0,"hold-reclaimed-time": 0,"max-reclaim-leases": 100,"max-reclaim-time": 0,"reclaim-timer-wait-time": 0,"unwarned-reclaim-cycles": 5}
srv_control.build_and_send_config_files('SSH', 'config-file')
srv_control.start_srv('DHCP', 'started')
misc.test_setup()
srv_control.config_srv_subnet('3000::/64', '3000::1-3000::f')
srv_control.config_srv_prefix('2001:db8:1::', '0', '90', '96')
srv_control.open_control_channel('unix',
'$(SOFTWARE_INSTALL_DIR)/var/kea/control_socket_ANOTHER_ONE')
srv_control.config_srv_id('LLT', '00:01:00:02:52:7b:a8:f0:08:00:27:58:f1:e8')
srv_control.config_srv_opt('sip-server-addr', '2001:db8::1,2001:db8::2')
srv_control.config_srv_opt('new-posix-timezone', r'EST5EDT4\\,M3.2.0/02:00\\,M11.1.0/02:00')
srv_control.host_reservation_in_subnet('address',
'3000::1',
'0',
'duid',
'00:03:00:01:f6:f5:f4:f3:f2:01')
srv_control.generate_config_files()
# Sleep for 10 seconds.
srv_msg.send_through_socket_server_site('$(SOFTWARE_INSTALL_DIR)/var/kea/control_socket',
'{"command": "config-test","arguments": $(SERVER_CONFIG) }')
# should be ok
misc.test_setup()
srv_control.config_srv_subnet('3000::/64', '3000::1-3000::f')
srv_control.config_srv_prefix('2001:db8:1::', '0', '90', '96')
srv_control.open_control_channel('unix',
'$(SOFTWARE_INSTALL_DIR)/var/kea/control_socket_ANOTHER_ONE')
srv_control.config_srv_id('LLT', '00:01:00:02:52:7b:a8:f0:08:00:27:58:f1:e8')
srv_control.config_srv_opt('sip-server-addr', '2001:db8::1,2001:db8::2')
srv_control.config_srv_opt('new-posix-timezone', r'EST5EDT4\\,M3.2.0/02:00\\,M11.1.0/02:00')
# WRONG ADDRESS RESERVATION
srv_control.host_reservation_in_subnet('address',
'192.168.0.5',
'0',
'duid',
'00:03:00:01:f6:f5:f4:f3:f2:01')
srv_control.generate_config_files()
#
srv_msg.send_through_socket_server_site('$(SOFTWARE_INSTALL_DIR)/var/kea/control_socket',
'{"command": "config-test","arguments": $(SERVER_CONFIG) }')
开发者ID:isc-projects, 项目名称:forge, 代码行数:49, 代码来源:test_command_control_socket_2.py
示例14: test_v6_host_reservation_duplicate_reservation
def test_v6_host_reservation_duplicate_reservation():
misc.test_setup()
srv_control.config_srv_subnet('3000::/30', '3000::1-3000::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::2',
'0',
'duid',
'00:03:00:01:f6:f5:f4:f3:f2:01')
srv_control.build_and_send_config_files('SSH', 'config-file')
srv_control.start_srv_during_process('DHCP', 'configuration')
开发者ID:isc-projects, 项目名称:forge, 代码行数:15, 代码来源:test_host_reservation_address_conflicts.py
示例15: test_v4_host_reservation_conflicts_duplicate_reservations_different_subnets
def test_v4_host_reservation_conflicts_duplicate_reservations_different_subnets():
misc.test_setup()
srv_control.config_srv_subnet('192.168.50.0/24', '192.168.50.1-192.168.50.50')
srv_control.config_srv_another_subnet_no_interface('192.168.51.0/24',
'192.168.51.1-192.168.51.50')
srv_control.host_reservation_in_subnet('address',
'192.168.50.10',
'0',
'hw-address',
'ff:01:02:03:ff:04')
srv_control.host_reservation_in_subnet('address',
'192.168.50.12',
'1',
'hw-address',
'ff:01:02:03:ff:04')
srv_control.start_srv('DHCP', 'started')
开发者ID:isc-projects, 项目名称:forge, 代码行数:16, 代码来源:test_host_reservation_conflicts_mysql.py
示例16: test_v4_host_reservation_hostname_fqdn_option
def test_v4_host_reservation_hostname_fqdn_option():
misc.test_setup()
srv_control.config_srv_subnet('192.168.50.0/24', '192.168.50.30-192.168.50.30')
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.host_reservation_in_subnet('hostname',
'reserved-name',
'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_sets_value('Client', 'FQDN_domain_name', 'sth6.six.example.com.')
srv_msg.client_sets_value('Client', 'FQDN_flags', 'S')
srv_msg.client_does_include('Client', None, 'fqdn')
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, '81')
srv_msg.response_check_option_content('Response',
'81',
None,
'fqdn',
'reserved-name.my.domain.com.')
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', 'FQDN_domain_name', 'sth6.six.example.com.')
srv_msg.client_sets_value('Client', 'FQDN_flags', 'S')
srv_msg.client_does_include('Client', None, 'fqdn')
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_include_option('Response', None, '81')
srv_msg.response_check_option_content('Response',
'81',
None,
'fqdn',
'reserved-name.my.domain.com.')
开发者ID:isc-projects, 项目名称:forge, 代码行数:47, 代码来源:test_host_reservation_hostname.py
示例17: test_v4_host_reservation_one_address_empty_pool
def test_v4_host_reservation_one_address_empty_pool():
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.10-192.168.50.10')
srv_control.host_reservation_in_subnet('address',
'192.168.50.10',
'0',
'hw-address',
'ff:01:02:03:ff:04')
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_dont_wait_for_message()
开发者ID:isc-projects, 项目名称:forge, 代码行数:17, 代码来源:test_host_reservation_address_mysql.py
示例18: test_v4_host_reservation_hostname_duplicated_entries
def test_v4_host_reservation_hostname_duplicated_entries():
misc.test_setup()
# outside of the pool
srv_control.config_srv_subnet('192.168.50.0/24', '192.168.50.30-192.168.50.30')
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.host_reservation_in_subnet('hostname',
'reserved-name',
'0',
'hw-address',
'ff:01:02:03:ff:04')
srv_control.host_reservation_in_subnet('hostname',
'resderved-name',
'0',
'hw-address',
'ff:01:02:03:ff:04')
srv_control.build_and_send_config_files('SSH', 'config-file')
srv_control.start_srv_during_process('DHCP', 'configuration')
开发者ID:isc-projects, 项目名称:forge, 代码行数:19, 代码来源:test_host_reservation_hostname.py
示例19: test_v4_host_reservation_conflicts_reconfigure_server_switched_mac_in_reservations_out_of_pool
def test_v4_host_reservation_conflicts_reconfigure_server_switched_mac_in_reservations_out_of_pool():
misc.test_setup()
srv_control.config_srv_subnet('192.168.50.0/24', '192.168.50.5-192.168.50.30')
srv_control.host_reservation_in_subnet('address',
'192.168.50.50',
'0',
'hw-address',
'ff:01:02:03:ff:04')
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.50')
misc.test_setup()
srv_control.config_srv_subnet('192.168.50.0/24', '192.168.50.5-192.168.50.30')
srv_control.host_reservation_in_subnet('address',
'192.168.50.50',
'0',
'hw-address',
'ff:01:02:03:ff:01')
srv_control.start_srv('DHCP', 'reconfigured')
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.50')
开发者ID:isc-projects, 项目名称:forge, 代码行数:43, 代码来源:test_host_reservation_conflicts_mysql.py
示例20: test_v6_host_reservation_conflicts_two_entries_for_one_host_2
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
请发表评论