'tests the router creation and deletion functionalities:
* creates a new router for public network
* verifies the router appears in the routers table as active
* edits router name
* checks router name was updated properly
* deletes the newly created router
* verifies the router does not appear in the table after deletion'

@decorators.services_required('neutron')
def test_router_create_admin(self):

    routers_page = self.home_pg.go_to_network_routerspage()
    routers_page.create_router(self.ROUTER_NAME)
    self.assertTrue(routers_page.find_message_and_dismiss(messages.SUCCESS))
    self.assertFalse(routers_page.find_message_and_dismiss(messages.ERROR))
    self.assertTrue(routers_page.is_router_present(self.ROUTER_NAME))
    self.assertTrue(routers_page.is_router_active(self.ROUTER_NAME))
    admin_routers_page = self.home_pg.go_to_system_routerspage()
    self.assertTrue(routers_page.is_router_present(self.ROUTER_NAME))
    self.assertTrue(routers_page.is_router_active(self.ROUTER_NAME))
    new_name = ('edited_' + self.ROUTER_NAME)
    admin_routers_page.edit_router(self.ROUTER_NAME, new_name=new_name)
    self.assertTrue(admin_routers_page.find_message_and_dismiss(messages.SUCCESS))
    self.assertFalse(admin_routers_page.find_message_and_dismiss(messages.ERROR))
    self.assertTrue(admin_routers_page.is_router_present(new_name))
    self.assertTrue(admin_routers_page.is_router_active(new_name))
    admin_routers_page.delete_router(new_name)
    self.assertTrue(admin_routers_page.find_message_and_dismiss(messages.SUCCESS))
    self.assertFalse(admin_routers_page.find_message_and_dismiss(messages.ERROR))
    self.assertFalse(admin_routers_page.is_router_present(new_name))
