[Kimchi-devel] [PATCH] [Kimchi] VEPA network UI: fixing network creation
dhbarboza82 at gmail.com
dhbarboza82 at gmail.com
Wed May 4 01:46:04 UTC 2016
From: Daniel Henrique Barboza <dhbarboza82 at 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 at 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";
--
2.5.5
More information about the Kimchi-devel
mailing list