Open ader1990 opened 4 years ago
After deleting an IP address using PyMI (example here: https://github.com/cloudbase/cloudbase-init/blob/5c3979e1ae2a7f0f73b6538d3d37fbc51d6cfda0/cloudbaseinit/osutils/windows.py#L981), verification and a retry/wait usage are needed to make sure the IP address has been removed.
Without the check, the IP address creation can fail with the error MSFT_NetIPAddress already exists at line https://github.com/cloudbase/cloudbase-init/blob/5c3979e1ae2a7f0f73b6538d3d37fbc51d6cfda0/cloudbaseinit/osutils/windows.py#L992
After deleting an IP address using PyMI (example here: https://github.com/cloudbase/cloudbase-init/blob/5c3979e1ae2a7f0f73b6538d3d37fbc51d6cfda0/cloudbaseinit/osutils/windows.py#L981), verification and a retry/wait usage are needed to make sure the IP address has been removed.
Without the check, the IP address creation can fail with the error MSFT_NetIPAddress already exists at line https://github.com/cloudbase/cloudbase-init/blob/5c3979e1ae2a7f0f73b6538d3d37fbc51d6cfda0/cloudbaseinit/osutils/windows.py#L992