acaeb62a4d
* Stop retrying if LB provisioning status reached ERROR The method `wait_for_lb_resource()` retries for 15m while the load balancer could have reached to ERROR during the provisioning in the first few minutes, this approach makes the testing take longer for no reason. This change makes the ERROR state in provisioning_status final and abort raising a ValueError() exception. More details of the provisioning_status possible states can be found at: https://docs.openstack.org/api-ref/load-balancer/v2/#provisioning-status-codes * Use LoadBalancerUnexpectedState and LoadBalancerUnrecoverableError. Drop the (re-)use of AssertionError and ValueError to identify when a load balancer status is in a state where the test needs to retry or break and fail respectively. This change introduces 2 new exceptions to be explicit of what the code is trying to do. - LoadBalancerUnexpectedState is raised when the status of the load balancer is in a state different from the one requested by the caller, but said state can be considered as transitory. - LoadBalancerUnrecoverableError is raised when the status of the load balancer is in ERROR state and said state is final for the proviniong_status property, hence retrying only delays the failure.