Reviewed-By: Lucio Correia <luciojhc(a)linux.vnet.ibm.com>
On 03-05-2016 22:46, dhbarboza82(a)gmail.com wrote:
From: Daniel Henrique Barboza <dhbarboza82(a)gmail.com>
VEPA has a multiple interface select. This wasn't being
considered when assigning the value of network.interface element
being used to call the network creation API.
Result was an error "Interface should be bare NIC or bonding"
because the backend was receiving an array of array.
Signed-off-by: Daniel Henrique Barboza <dhbarboza82(a)gmail.com>
---
ui/js/src/kimchi.network_add_main.js | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/ui/js/src/kimchi.network_add_main.js b/ui/js/src/kimchi.network_add_main.js
index 99e42c1..4eb5c5b 100644
--- a/ui/js/src/kimchi.network_add_main.js
+++ b/ui/js/src/kimchi.network_add_main.js
@@ -35,6 +35,10 @@ kimchi.startNetworkCreation = function() {
interfaces: [ network.interface ],
vlan_id: network.vlan_id
};
+ // in VEPA connection case, network.interface is already an array
+ if (data.connection === kimchi.NETWORK_TYPE_VEPA) {
+ data.interfaces = network.interface;
+ }
kimchi.createNetwork(data, function(result) {
network.state = result.state === "active" ? "up" :
"down";
--
Lucio Correia
Software Engineer
IBM LTC Brazil