[RFC] [Kimchi] Add support to edit virtual networks

Edit virtual network feature Pre-requisite: - Virtual network is stopped - Virtual network "default" is not editable *** BACKEND *** ### Resource: Network **URI:** /plugins/kimchi/networks/*:name* **Methods:** * **UPDATE**: Update a Network * name: The name of the Network * subnet: Network segment in slash-separated format with ip address and prefix * dhcp: DHCP services on the virtual network is enabled. * start: start boundary of a pool of addresses to be provided to DHCP clients. * end: end boundary of a pool of addresses to be provided to DHCP clients. * interfaces: An array of bridge network interfaces that belongs to this network All traffic on this network will be bridged through the first interface. The interface is a bridge or ethernet/bonding device. * vlan ID Not all attributes are required for all networks types. *** FRONTEND *** * Add new option Edit to Actions menu under Virtualization/Network tab, enabled only for stopped networks * When clicked, this option will open a new window for editing that virtual network, with the following fields. Based on network type, some of below fields may be disabled: Type: just a label describing the network type, not changeable. Name: all types of virtual network can be renamed Interfaces: attach/detach interfaces (enabled for VEPA) or change interface (for macvtap, bridged) Subnet/DHCP range: two IP fields: start, end (enabled for NAT, isolated) VLAN id: integer field (enabled for bridged networks) -- Lucio Correia Software Engineer IBM LTC Brazil

+1 Reviewed-by: Paulo Vital <pvital@linux.vnet.ibm.com> On Apr 05 06:02PM, Lucio Correia wrote:
Edit virtual network feature
Pre-requisite: - Virtual network is stopped - Virtual network "default" is not editable
*** BACKEND ***
### Resource: Network
**URI:** /plugins/kimchi/networks/*:name*
**Methods:**
* **UPDATE**: Update a Network * name: The name of the Network * subnet: Network segment in slash-separated format with ip address and prefix * dhcp: DHCP services on the virtual network is enabled. * start: start boundary of a pool of addresses to be provided to DHCP clients. * end: end boundary of a pool of addresses to be provided to DHCP clients. * interfaces: An array of bridge network interfaces that belongs to this network All traffic on this network will be bridged through the first interface. The interface is a bridge or ethernet/bonding device. * vlan ID
Not all attributes are required for all networks types.
*** FRONTEND ***
* Add new option Edit to Actions menu under Virtualization/Network tab, enabled only for stopped networks * When clicked, this option will open a new window for editing that virtual network, with the following fields. Based on network type, some of below fields may be disabled:
Type: just a label describing the network type, not changeable. Name: all types of virtual network can be renamed Interfaces: attach/detach interfaces (enabled for VEPA) or change interface (for macvtap, bridged) Subnet/DHCP range: two IP fields: start, end (enabled for NAT, isolated) VLAN id: integer field (enabled for bridged networks)
-- Lucio Correia Software Engineer IBM LTC Brazil
_______________________________________________ Kimchi-devel mailing list Kimchi-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/kimchi-devel
-- Paulo Ricardo Paz Vital Linux Technology Center, IBM Systems http://www.ibm.com/linux/ltc/

On 04/05/2016 06:02 PM, Lucio Correia wrote:
Edit virtual network feature
Pre-requisite: - Virtual network is stopped
- Virtual network "default" is not editable
Why? Maybe only block renaming for the default network. But the other fields could be changed IMO.
*** BACKEND ***
### Resource: Network
**URI:** /plugins/kimchi/networks/*:name*
**Methods:**
* **UPDATE**: Update a Network
The method it PUT.
* name: The name of the Network
* subnet: Network segment in slash-separated format with ip address and prefix * dhcp: DHCP services on the virtual network is enabled. * start: start boundary of a pool of addresses to be provided to DHCP clients. * end: end boundary of a pool of addresses to be provided to DHCP clients. * interfaces: An array of bridge network interfaces that belongs to this network All traffic on this network will be bridged through the first interface. The interface is a bridge or ethernet/bonding device. * vlan ID
Please, specify which parameters can be updated according to network type. I don't think all them apply to any network type.
Not all attributes are required for all networks types.
Specify that as it is a documentation file.
*** FRONTEND ***
* Add new option Edit to Actions menu under Virtualization/Network tab, enabled only for stopped networks * When clicked, this option will open a new window for editing that virtual network, with the following fields. Based on network type, some of below fields may be disabled:
Type: just a label describing the network type, not changeable. Name: all types of virtual network can be renamed Interfaces: attach/detach interfaces (enabled for VEPA) or change interface (for macvtap, bridged) Subnet/DHCP range: two IP fields: start, end (enabled for NAT, isolated)
VLAN id: integer field (enabled for bridged networks)
Can I add a VLAN ID for a bridged network previous created without VLAN ID? Or can I only change the VLAN ID from an VLAN bridged network?

Hi Aline, I've already sent implementation V1 to review. Anyway, my answers below. On 12-04-2016 15:06, Aline Manera wrote:
On 04/05/2016 06:02 PM, Lucio Correia wrote:
Edit virtual network feature
Pre-requisite: - Virtual network is stopped
- Virtual network "default" is not editable
Why? Maybe only block renaming for the default network. But the other fields could be changed IMO.
OK, will check what can be done here.
*** BACKEND ***
### Resource: Network
**URI:** /plugins/kimchi/networks/*:name*
**Methods:**
* **UPDATE**: Update a Network
The method it PUT.
Yes, it's correct in the patch.
* name: The name of the Network
* subnet: Network segment in slash-separated format with ip address and prefix * dhcp: DHCP services on the virtual network is enabled. * start: start boundary of a pool of addresses to be provided to DHCP clients. * end: end boundary of a pool of addresses to be provided to DHCP clients. * interfaces: An array of bridge network interfaces that belongs to this network All traffic on this network will be bridged through the first interface. The interface is a bridge or ethernet/bonding device. * vlan ID
Please, specify which parameters can be updated according to network type. I don't think all them apply to any network type.
It's done in the patch.
Not all attributes are required for all networks types.
Specify that as it is a documentation file.
Done in the patch.
*** FRONTEND ***
* Add new option Edit to Actions menu under Virtualization/Network tab, enabled only for stopped networks * When clicked, this option will open a new window for editing that virtual network, with the following fields. Based on network type, some of below fields may be disabled:
Type: just a label describing the network type, not changeable. Name: all types of virtual network can be renamed Interfaces: attach/detach interfaces (enabled for VEPA) or change interface (for macvtap, bridged) Subnet/DHCP range: two IP fields: start, end (enabled for NAT, isolated)
VLAN id: integer field (enabled for bridged networks)
Can I add a VLAN ID for a bridged network previous created without VLAN ID? Or can I only change the VLAN ID from an VLAN bridged network?
Yes, vlan id can be added/updated/removed. The only thing that cannot change is the virtual network type. -- Lucio Correia Software Engineer IBM LTC Brazil

Thanks for the answers, Lucio! I will review the patch then. On 04/12/2016 04:00 PM, Lucio Correia wrote:
Hi Aline,
I've already sent implementation V1 to review. Anyway, my answers below.
On 12-04-2016 15:06, Aline Manera wrote:
On 04/05/2016 06:02 PM, Lucio Correia wrote:
Edit virtual network feature
Pre-requisite: - Virtual network is stopped
- Virtual network "default" is not editable
Why? Maybe only block renaming for the default network. But the other fields could be changed IMO.
OK, will check what can be done here.
*** BACKEND ***
### Resource: Network
**URI:** /plugins/kimchi/networks/*:name*
**Methods:**
* **UPDATE**: Update a Network
The method it PUT.
Yes, it's correct in the patch.
* name: The name of the Network
* subnet: Network segment in slash-separated format with ip address and prefix * dhcp: DHCP services on the virtual network is enabled. * start: start boundary of a pool of addresses to be provided to DHCP clients. * end: end boundary of a pool of addresses to be provided to DHCP clients. * interfaces: An array of bridge network interfaces that belongs to this network All traffic on this network will be bridged through the first interface. The interface is a bridge or ethernet/bonding device. * vlan ID
Please, specify which parameters can be updated according to network type. I don't think all them apply to any network type.
It's done in the patch.
Not all attributes are required for all networks types.
Specify that as it is a documentation file.
Done in the patch.
*** FRONTEND ***
* Add new option Edit to Actions menu under Virtualization/Network tab, enabled only for stopped networks * When clicked, this option will open a new window for editing that virtual network, with the following fields. Based on network type, some of below fields may be disabled:
Type: just a label describing the network type, not changeable. Name: all types of virtual network can be renamed Interfaces: attach/detach interfaces (enabled for VEPA) or change interface (for macvtap, bridged) Subnet/DHCP range: two IP fields: start, end (enabled for NAT, isolated)
VLAN id: integer field (enabled for bridged networks)
Can I add a VLAN ID for a bridged network previous created without VLAN ID? Or can I only change the VLAN ID from an VLAN bridged network?
Yes, vlan id can be added/updated/removed. The only thing that cannot change is the virtual network type.

2016-04-05 18:02 GMT-03:00 Lucio Correia <luciojhc@linux.vnet.ibm.com>:
Edit virtual network feature
Pre-requisite: - Virtual network is stopped - Virtual network "default" is not editable
*** BACKEND ***
### Resource: Network
**URI:** /plugins/kimchi/networks/*:name*
**Methods:**
* **UPDATE**: Update a Network * name: The name of the Network * subnet: Network segment in slash-separated format with ip address and prefix * dhcp: DHCP services on the virtual network is enabled. * start: start boundary of a pool of addresses to be provided to DHCP clients. * end: end boundary of a pool of addresses to be provided to DHCP clients. * interfaces: An array of bridge network interfaces that belongs to this network All traffic on this network will be bridged through the first interface. The interface is a bridge or ethernet/bonding device. * vlan ID
Not all attributes are required for all networks types.
*** FRONTEND ***
* Add new option Edit to Actions menu under Virtualization/Network tab, enabled only for stopped networks * When clicked, this option will open a new window for editing that virtual network, with the following fields. Based on network type, some of below fields may be disabled:
Type: just a label describing the network type, not changeable. Name: all types of virtual network can be renamed Interfaces: attach/detach interfaces (enabled for VEPA) or change interface (for macvtap, bridged) Subnet/DHCP range: two IP fields: start, end (enabled for NAT, isolated) VLAN id: integer field (enabled for bridged networks)
I'm ok with this. The modal window should look almost the same as the "Add Network" window, except for the Network type that will be a "readonly" input.
-- Lucio Correia Software Engineer IBM LTC Brazil
_______________________________________________ Kimchi-devel mailing list Kimchi-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/kimchi-devel

2016-04-15 15:20 GMT-03:00 Samuel Guimarães <sguimaraes943@gmail.com>:
2016-04-05 18:02 GMT-03:00 Lucio Correia <luciojhc@linux.vnet.ibm.com>:
Edit virtual network feature
Pre-requisite: - Virtual network is stopped - Virtual network "default" is not editable
*** BACKEND ***
### Resource: Network
**URI:** /plugins/kimchi/networks/*:name*
**Methods:**
* **UPDATE**: Update a Network * name: The name of the Network * subnet: Network segment in slash-separated format with ip address and prefix * dhcp: DHCP services on the virtual network is enabled. * start: start boundary of a pool of addresses to be provided to DHCP clients. * end: end boundary of a pool of addresses to be provided to DHCP clients. * interfaces: An array of bridge network interfaces that belongs to this network All traffic on this network will be bridged through the first interface. The interface is a bridge or ethernet/bonding device. * vlan ID
Not all attributes are required for all networks types.
*** FRONTEND ***
* Add new option Edit to Actions menu under Virtualization/Network tab, enabled only for stopped networks * When clicked, this option will open a new window for editing that virtual network, with the following fields. Based on network type, some of below fields may be disabled:
Type: just a label describing the network type, not changeable. Name: all types of virtual network can be renamed Interfaces: attach/detach interfaces (enabled for VEPA) or change interface (for macvtap, bridged) Subnet/DHCP range: two IP fields: start, end (enabled for NAT, isolated) VLAN id: integer field (enabled for bridged networks)
I'm ok with this. The modal window should look almost the same as the "Add Network" window, except for the Network type that will be a "readonly" input.
BTW, should we add a mask for the Subnet and DHCP IP fields? I think I saw somewhere someone asking for a mask for IP addresses but I wasn't able to find anything that supports both ipv4 and ipv6 strings at the same time.
-- Lucio Correia Software Engineer IBM LTC Brazil
_______________________________________________ Kimchi-devel mailing list Kimchi-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/kimchi-devel

On 15-04-2016 15:37, Samuel Guimarães wrote:
2016-04-15 15:20 GMT-03:00 Samuel Guimarães <sguimaraes943@gmail.com <mailto:sguimaraes943@gmail.com>>:
2016-04-05 18:02 GMT-03:00 Lucio Correia <luciojhc@linux.vnet.ibm.com <mailto:luciojhc@linux.vnet.ibm.com>>:
Edit virtual network feature
Pre-requisite: - Virtual network is stopped - Virtual network "default" is not editable
*** BACKEND ***
### Resource: Network
**URI:** /plugins/kimchi/networks/*:name*
**Methods:**
* **UPDATE**: Update a Network * name: The name of the Network * subnet: Network segment in slash-separated format with ip address and prefix * dhcp: DHCP services on the virtual network is enabled. * start: start boundary of a pool of addresses to be provided to DHCP clients. * end: end boundary of a pool of addresses to be provided to DHCP clients. * interfaces: An array of bridge network interfaces that belongs to this network All traffic on this network will be bridged through the first interface. The interface is a bridge or ethernet/bonding device. * vlan ID
Not all attributes are required for all networks types.
*** FRONTEND ***
* Add new option Edit to Actions menu under Virtualization/Network tab, enabled only for stopped networks * When clicked, this option will open a new window for editing that virtual network, with the following fields. Based on network type, some of below fields may be disabled:
Type: just a label describing the network type, not changeable. Name: all types of virtual network can be renamed Interfaces: attach/detach interfaces (enabled for VEPA) or change interface (for macvtap, bridged) Subnet/DHCP range: two IP fields: start, end (enabled for NAT, isolated) VLAN id: integer field (enabled for bridged networks)
I'm ok with this. The modal window should look almost the same as the "Add Network" window, except for the Network type that will be a "readonly" input.
BTW, should we add a mask for the Subnet and DHCP IP fields? I think I saw somewhere someone asking for a mask for IP addresses but I wasn't able to find anything that supports both ipv4 and ipv6 strings at the same time.
Hi Samuel, this is not correct, sorry for the confusion. It should be only one field. Call it "Address space", same term used when listing the networks. That field will accept something like 127.0.0.0/24 I'm not sure about IPV6 support in Kimchi. Aline? Regards,
-- Lucio Correia Software Engineer IBM LTC Brazil
_______________________________________________ Kimchi-devel mailing list Kimchi-devel@ovirt.org <mailto:Kimchi-devel@ovirt.org> http://lists.ovirt.org/mailman/listinfo/kimchi-devel
-- Lucio Correia Software Engineer IBM LTC Brazil

On 04/15/2016 03:55 PM, Lucio Correia wrote:
On 15-04-2016 15:37, Samuel Guimarães wrote:
2016-04-15 15:20 GMT-03:00 Samuel Guimarães <sguimaraes943@gmail.com <mailto:sguimaraes943@gmail.com>>:
2016-04-05 18:02 GMT-03:00 Lucio Correia <luciojhc@linux.vnet.ibm.com <mailto:luciojhc@linux.vnet.ibm.com>>:
Edit virtual network feature
Pre-requisite: - Virtual network is stopped - Virtual network "default" is not editable
*** BACKEND ***
### Resource: Network
**URI:** /plugins/kimchi/networks/*:name*
**Methods:**
* **UPDATE**: Update a Network * name: The name of the Network * subnet: Network segment in slash-separated format with ip address and prefix * dhcp: DHCP services on the virtual network is enabled. * start: start boundary of a pool of addresses to be provided to DHCP clients. * end: end boundary of a pool of addresses to be provided to DHCP clients. * interfaces: An array of bridge network interfaces that belongs to this network All traffic on this network will be bridged through the first interface. The interface is a bridge or ethernet/bonding device. * vlan ID
Not all attributes are required for all networks types.
*** FRONTEND ***
* Add new option Edit to Actions menu under Virtualization/Network tab, enabled only for stopped networks * When clicked, this option will open a new window for editing that virtual network, with the following fields. Based on network type, some of below fields may be disabled:
Type: just a label describing the network type, not changeable. Name: all types of virtual network can be renamed Interfaces: attach/detach interfaces (enabled for VEPA) or change interface (for macvtap, bridged) Subnet/DHCP range: two IP fields: start, end (enabled for NAT, isolated) VLAN id: integer field (enabled for bridged networks)
I'm ok with this. The modal window should look almost the same as the "Add Network" window, except for the Network type that will be a "readonly" input.
BTW, should we add a mask for the Subnet and DHCP IP fields? I think I saw somewhere someone asking for a mask for IP addresses but I wasn't able to find anything that supports both ipv4 and ipv6 strings at the same time.
Hi Samuel, this is not correct, sorry for the confusion.
It should be only one field. Call it "Address space", same term used when listing the networks.
That field will accept something like 127.0.0.0/24
I'm not sure about IPV6 support in Kimchi. Aline?
It would be good to have a mask for the fields to restrict user inputs. Only IPv4 is supported in the current implementation.
Regards,
-- Lucio Correia Software Engineer IBM LTC Brazil
_______________________________________________ Kimchi-devel mailing list Kimchi-devel@ovirt.org <mailto:Kimchi-devel@ovirt.org> http://lists.ovirt.org/mailman/listinfo/kimchi-devel

On 04/18/2016 09:06 AM, Aline Manera wrote:
On 04/15/2016 03:55 PM, Lucio Correia wrote:
On 15-04-2016 15:37, Samuel Guimarães wrote:
2016-04-15 15:20 GMT-03:00 Samuel Guimarães <sguimaraes943@gmail.com <mailto:sguimaraes943@gmail.com>>:
2016-04-05 18:02 GMT-03:00 Lucio Correia <luciojhc@linux.vnet.ibm.com <mailto:luciojhc@linux.vnet.ibm.com>>:
Edit virtual network feature
Pre-requisite: - Virtual network is stopped - Virtual network "default" is not editable
*** BACKEND ***
### Resource: Network
**URI:** /plugins/kimchi/networks/*:name*
**Methods:**
* **UPDATE**: Update a Network * name: The name of the Network * subnet: Network segment in slash-separated format with ip address and prefix * dhcp: DHCP services on the virtual network is enabled. * start: start boundary of a pool of addresses to be provided to DHCP clients. * end: end boundary of a pool of addresses to be provided to DHCP clients. * interfaces: An array of bridge network interfaces that belongs to this network All traffic on this network will be bridged through the first interface. The interface is a bridge or ethernet/bonding device. * vlan ID
Not all attributes are required for all networks types.
*** FRONTEND ***
* Add new option Edit to Actions menu under Virtualization/Network tab, enabled only for stopped networks * When clicked, this option will open a new window for editing that virtual network, with the following fields. Based on network type, some of below fields may be disabled:
Type: just a label describing the network type, not changeable. Name: all types of virtual network can be renamed Interfaces: attach/detach interfaces (enabled for VEPA) or change interface (for macvtap, bridged) Subnet/DHCP range: two IP fields: start, end (enabled for NAT, isolated) VLAN id: integer field (enabled for bridged networks)
I'm ok with this. The modal window should look almost the same as the "Add Network" window, except for the Network type that will be a "readonly" input.
BTW, should we add a mask for the Subnet and DHCP IP fields? I think I saw somewhere someone asking for a mask for IP addresses but I wasn't able to find anything that supports both ipv4 and ipv6 strings at the same time.
Hi Samuel, this is not correct, sorry for the confusion.
It should be only one field. Call it "Address space", same term used when listing the networks.
That field will accept something like 127.0.0.0/24
Which of the IP address do you want to be displayed? Doesn't the backend provide both subnet and dhcp in some cases?
I'm not sure about IPV6 support in Kimchi. Aline?
It would be good to have a mask for the fields to restrict user inputs. Only IPv4 is supported in the current implementation.
Regards,
-- Lucio Correia Software Engineer IBM LTC Brazil
_______________________________________________ Kimchi-devel mailing list Kimchi-devel@ovirt.org <mailto:Kimchi-devel@ovirt.org> http://lists.ovirt.org/mailman/listinfo/kimchi-devel
_______________________________________________ Kimchi-devel mailing list Kimchi-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/kimchi-devel

On 20-04-2016 16:54, Socorro Stoppler wrote:
*** FRONTEND ***
* Add new option Edit to Actions menu under Virtualization/Network tab, enabled only for stopped networks * When clicked, this option will open a new window for editing that virtual network, with the following fields. Based on network type, some of below fields may be disabled:
Type: just a label describing the network type, not changeable. Name: all types of virtual network can be renamed Interfaces: attach/detach interfaces (enabled for VEPA) or change interface (for macvtap, bridged) Subnet/DHCP range: two IP fields: start, end (enabled for NAT, isolated) VLAN id: integer field (enabled for bridged networks)
I'm ok with this. The modal window should look almost the same as the "Add Network" window, except for the Network type that will be a "readonly" input.
BTW, should we add a mask for the Subnet and DHCP IP fields? I think I saw somewhere someone asking for a mask for IP addresses but I wasn't able to find anything that supports both ipv4 and ipv6 strings at the same time.
Hi Samuel, this is not correct, sorry for the confusion.
It should be only one field. Call it "Address space", same term used when listing the networks.
That field will accept something like 127.0.0.0/24 Which of the IP address do you want to be displayed? Doesn't the backend provide both subnet and dhcp in some cases?
In my opinion only subnet should be displayed. The dhcp will be automatically changed by backend if subnet is changed by the user. We could display dhcp range (start,end) as well, but if the user changes subnet, there will be no reflection on the dhcp range values.
I'm not sure about IPV6 support in Kimchi. Aline?
It would be good to have a mask for the fields to restrict user inputs. Only IPv4 is supported in the current implementation.
-- Lucio Correia Software Engineer IBM LTC Brazil

On 04/20/2016 05:25 PM, Lucio Correia wrote:
On 20-04-2016 16:54, Socorro Stoppler wrote:
*** FRONTEND ***
* Add new option Edit to Actions menu under Virtualization/Network tab, enabled only for stopped networks * When clicked, this option will open a new window for editing that virtual network, with the following fields. Based on network type, some of below fields may be disabled:
Type: just a label describing the network type, not changeable. Name: all types of virtual network can be renamed Interfaces: attach/detach interfaces (enabled for VEPA) or change interface (for macvtap, bridged) Subnet/DHCP range: two IP fields: start, end (enabled for NAT, isolated) VLAN id: integer field (enabled for bridged networks)
I'm ok with this. The modal window should look almost the same as the "Add Network" window, except for the Network type that will be a "readonly" input.
BTW, should we add a mask for the Subnet and DHCP IP fields? I think I saw somewhere someone asking for a mask for IP addresses but I wasn't able to find anything that supports both ipv4 and ipv6 strings at the same time.
Hi Samuel, this is not correct, sorry for the confusion.
It should be only one field. Call it "Address space", same term used when listing the networks.
That field will accept something like 127.0.0.0/24 Which of the IP address do you want to be displayed? Doesn't the backend provide both subnet and dhcp in some cases?
In my opinion only subnet should be displayed. The dhcp will be automatically changed by backend if subnet is changed by the user.
We could display dhcp range (start,end) as well, but if the user changes subnet, there will be no reflection on the dhcp range values.
Make it simple! Let's allow changing only the subnet value and backend determines the DHCP range.
I'm not sure about IPV6 support in Kimchi. Aline?
It would be good to have a mask for the fields to restrict user inputs. Only IPv4 is supported in the current implementation.
participants (5)
-
Aline Manera
-
Lucio Correia
-
Paulo Ricardo Paz Vital
-
Samuel Guimarães
-
Socorro Stoppler