[Kimchi-devel] [PATCH] [Kimchi] VEPA network UI: fixing network creation
Socorro Stoppler
socorro at linux.vnet.ibm.com
Wed May 4 18:54:54 UTC 2016
Reviewed-by: Socorro Stoppler <socorro at linux.vnet.ibm.com>
Tested-by: Socorro Stoppler <socorro at linux.vnet.ibm.com>
On 05/03/2016 06:46 PM, dhbarboza82 at gmail.com wrote:
> 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";
More information about the Kimchi-devel
mailing list