Guest User

Untitled

a guest
Sep 23rd, 2013
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @classmethod
  2. def tearDownClass(cls):
  3. has_exception = False
  4. for vpnservice in cls.vpnservices:
  5. try:
  6. cls.client.delete_vpn_service(vpnservice['id'])
  7. except Exception as exc:
  8. LOG.exception(exc)
  9. has_exception = True
  10.  
  11. for router in cls.routers:
  12. try:
  13. (cls.client.remove_router_interface_with_subnet_id(
  14. router['id'], cls.subnets[0]['id']))
  15. cls.client.delete_router(router['id'])
  16. except Exception as exc:
  17. LOG.exception(exc)
  18. has_exception = True
  19. .........................
  20. .........................
  21. .........................
  22. for network in cls.networks:
  23. try:
  24. cls.client.delete_network(network['id'])
  25. except Exception as exc:
  26. LOG.exception(exc)
  27. has_exception = True
  28. super(BaseNetworkTest, cls).tearDownClass()
  29. if has_exception:
  30. raise TearDownException()
Advertisement
Add Comment
Please, Sign In to add comment