Hi Ramon,
From the API documentation:
**URI:** /plugins/kimchi/networks
* **POST**: Create a new Network
* name: The name of the Network
* connection: Specifies how this network should be connected to the
other
networks visible to this host.
* isolated: Create a private, isolated virtual network.
* nat: Outgoing traffic will be routed through the host.
* bridge: All traffic on this network will be bridged through
the indicated interface.
So to create a new network, the user needs to specify the network name
and connection.
The current 'bridge' connection is related to macvtap.
I suggest to change it to create a Linux bridge and add a new connection
type "macvtap" to handle the macvtap bridge.
That way we don't need to add any new parameter in the API.
So the API would be:
# API to create a macvtap bridge
POST /plugins/kimchi/networks {name: macvtap-bridge, connection: macvtap}
# API to create a Linux bridge
POST /plugins/kimchi/networks {name: linux-bridge, connection: bridge}
What do you think about it?
Regards,
Aline Manera
On 15/10/2015 10:15, Ramon Medeiros wrote:
Kimchi today creates network pool using macvtap. Now, we want the
user
to choose if it want Linux Bridge or macvtap.
If you want to understand the pros and cons of this features, we can
see here:
https://github.com/kimchi-project/kimchi/wiki/Create-guest-network
Proposal:
Add "mode" option when creating a network pool.
If macvtap is choosed, keep the actual procedure.
If bridge is choosed, create linux bridge using net commands(brctl)
and create network pool pointing to the new bridge.
Create tests for this.