def delete_dns_record():
while True:
menu_item = ['Delete forward resolution record','Delete reverse parsing record','Exit']
menu_printer("Delete DNS Record", menu_item)
select_menu_num = check_menu_select(menu_item)
if select_menu_num == "1":
deleted_record_num_exist(forward_resolution_conf, 'IN A')
update_single_sn(forward_resolution_conf)
elif select_menu_num == "2":
deleted_record_num_exist(reverse_parsing_conf, 'IN PTR')
update_single_sn(reverse_parsing_conf)
else:
break
show_main_menu()
def show_main_menu():
menu_item = ['Append DNS records','Delete DNS records','Print DNS records','Exit']
menu_printer("DNS Modfiy Program",menu_item)
select_menu_num = check_menu_select(menu_item)
if select_menu_num == "1":
append_DNS_record()
elif select_menu_num == "2":
delete_dns_record()
elif select_menu_num == "3":
show_all_dns_record()
else:
sys.exit(0)
if __name__ == '__main__':
show_main_menu()