Comment 3 for bug 1570486

Revision history for this message
Akihiro Motoki (amotoki) wrote :

The case reported here happens when a user tries to connect a subnet to multiple routers. The first router interface consumes gateway_ip of the subnet. When connecting to the second router, the user needs to specify IP address of the interface.

I guess what the bug author requests is to allow users to add router interface without knowing an unused IP address.

There are several solutions. The way written in the bug description is a possible option.

Another way in my mind is to have a fallback mechanism which first tries to add a router interface with a specified subnet and if 409 (Conflict) is returned it creates a port on the requested subnet and then add a router interface using the created port. Creating a port allocates an unused IP address, so it behaves like auto-allocation of IP address for the router interface.
(Note that "Add Interface" form now lists subnets which are not connected to a requested router, so the above solution would work.)