Correct two bugs with neutron router gateway id parsing
1. The regex ended with `\}` but in the case of external gateways such as `{"network_id": "8b43562d-f168-4317-8c9f-4d639ba126ea", "enable_snat": true}` this was not finding the network_id. 2. The `.*` was greedy and in the prior case, matching more than just the id. Change-Id: I224c0bcf387434bdd029b4c80934a66b60cc77e0
This commit is contained in:
@@ -119,7 +119,7 @@ EOT
|
||||
end
|
||||
|
||||
def parse_gateway_network_id(external_gateway_info_)
|
||||
match_data = /\{"network_id": "(.*)"\}/.match(external_gateway_info_)
|
||||
match_data = /\{"network_id": "(.*?)"/.match(external_gateway_info_)
|
||||
if match_data
|
||||
match_data[1]
|
||||
else
|
||||
|
Reference in New Issue
Block a user