The normal deploy flow uses a NetworkInfoAsyncWrapper for network
allocation, and because of that many places have to call that class's
wait method to make sure it has completed. During a reschedule where
the network was allocated by a previous build attempt, a NetworkInfo
instance is retrieved instead, which does not have a wait method. This
then results in an exception complaining the missing method when it is
called. This fix addresses that by adding a no-op wait method to the
NetworkInfo class. Alternatively could have used isinstance or hasattr
to avoid making wait calls on NetworkInfo, but that could be
problematic to maintain as more places need to make wait calls in the
future and may not know to make the isinstance/hasattr check.
This fixes a regression issue caused by
61fc1b9ee11e416aecbf3a29e1d150a53fc890e8 ,
which reverted the previous fix made under
24a04c405ab2c98e52ea1edf8775489907526c6d
Reviewed: https:/ /review. fuel-infra. org/36360
Submitter: Pkgs Jenkins <email address hidden>
Branch: mcp/1.0/mitaka
Commit: 03b2e9ca430493c a9a4bd8b7118b7a 25d3758cbe
Author: Esha Seth <email address hidden>
Date: Thu Aug 31 17:38:34 2017
Add a no-op wait method to NetworkInfo
The normal deploy flow uses a NetworkInfoAsyn cWrapper for network
allocation, and because of that many places have to call that class's
wait method to make sure it has completed. During a reschedule where
the network was allocated by a previous build attempt, a NetworkInfo
instance is retrieved instead, which does not have a wait method. This
then results in an exception complaining the missing method when it is
called. This fix addresses that by adding a no-op wait method to the
NetworkInfo class. Alternatively could have used isinstance or hasattr
to avoid making wait calls on NetworkInfo, but that could be
problematic to maintain as more places need to make wait calls in the
future and may not know to make the isinstance/hasattr check.
This fixes a regression issue caused by aecbf3a29e1d150 a53fc890e8 , e52ea1edf877548 9907526c6d
61fc1b9ee11e416
which reverted the previous fix made under
24a04c405ab2c98
Closes-Bug: #1675422
PROD ticket: https:/ /mirantis. jira.com/ browse/ PROD-14345
(cherry picked from commit 329cd1649703ac8 01b95fce28afa99 b67f9f45aa) df19e7da0afbc0e afa87cac965
Change-Id: Id7a71b2eb46ea7