Fix the network subnets check in create instance form
If a project is only one available network, we need to verify
whether it contains subnets, otherwise nova api will return
"Network f1a03328-60d0-4b0e-a4a0-d25ec0d185c4 requires
a subnet in order to boot instances on. (HTTP 400)"
The default network may not contain subnets[1]. We should first
query the networks that contains the subnets, and then get the
default network from the networks.
Reviewed: https:/ /review. openstack. org/460221 /git.openstack. org/cgit/ openstack/ horizon/ commit/ ?id=a92d1658d8b 3d824fa38ed32db bee100b0ca77de
Committed: https:/
Submitter: Zuul
Branch: master
commit a92d1658d8b3d82 4fa38ed32dbbee1 00b0ca77de
Author: wei.ying <email address hidden>
Date: Thu Apr 27 00:39:35 2017 +0800
Fix the network subnets check in create instance form
If a project is only one available network, we need to verify 60d0-4b0e- a4a0-d25ec0d185 c4 requires
whether it contains subnets, otherwise nova api will return
"Network f1a03328-
a subnet in order to boot instances on. (HTTP 400)"
The default network may not contain subnets[1]. We should first
query the networks that contains the subnets, and then get the
default network from the networks.
[1] https:/ /github. com/openstack/ horizon/ blob/master/ openstack_ dashboard/ dashboards/ project/ static/ dashboard/ project/ workflow/ launch- instance/ launch- instance- model.service. js#L478-#L484
Change-Id: I16f7f8cddf0454 45ed026f6236695 7de9d289c03
Closes-Bug: #1686449