[Kimchi-devel] [PATCH] [Kimchi] VEPA network UI: fixing network creation

Lucio Correia luciojhc at linux.vnet.ibm.com
Wed May 4 12:04:48 UTC 2016


Reviewed-By: Lucio Correia <luciojhc at linux.vnet.ibm.com>

On 03-05-2016 22:46, 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";
>


-- 
Lucio Correia
Software Engineer
IBM LTC Brazil




More information about the Kimchi-devel mailing list