The existing code selects the first IPv4 subnet in the network without
any consideration of ip availability. If not enough IPs are available,
the loadbalancer creations fails. This patch uses neutron ip
availability API to check the quantity of free IPs when creating
loadbalancer with vip-network-id and skips subnets that do not have
enough IPs for a loadbalancer on multi subnet networks.
Change-Id: If3c3cf9be085bb95b4ebbaf71e24f92d42b8d6e0
Task: 36004
Story: 2006293
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.
We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.
We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.
This patch also updates pylint to 1.5.6 which is compatible with
python3.
In updating pylint we have some issues to correct, this patch addresses
those issues so the Octavia code passes pylint 1.5.6.
Change-Id: Iec21f4c803a427059d595612336d67a35ebf9585
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Floating IP model isn't used yet in-tree, but the conversion is tested,
and it could be used by various drivers (it is already used by the FLIP
driver).
Change-Id: I5f54c5ea5e70ea03f830548d61a2afee205f7f63
This patch extend Octavia v2 API to access qos_policy_id from neutron.
Users can pass it as 'vip_qos_policy_id' to Octavia request body to
create/update Loadbalancers, and the vrrp ports will have the qos
abilities.
This patch modifies the Loadbalancer Post/Put request body and response
body. It also extends the 'vip' table with the new column named
'qos_policy_id' to store the qos_id from neutron.
Co-Authored-By: Reedip <reedip.banerjee@nectechnologies.in>
Change-Id: I43aba9d2ae816b1498d16da077936d6bdb62e30a
Subnets will sometimes be defined to have static routes that all
fixed ips on that subnet should use, neutron calls them host routes
in the API. This makes Octavia aware of them.
Co-Authored-By: Michael Johnson <johnsomor@gmail.com>
Change-Id: I37b79da5e4cf532a31780537702d6effa656de5b
This was meant to be done in a prior review but the author of that review (me)
was not thinking clearly when he did not include them as part of that rename.
Change-Id: Ibae52777921adcfa3e6835274d61670b4091ca39
There are common methods that all neutron based network drivers will most
likely implement the same way. To prevent duplicate code, a common base driver
for all neutron drivers has been created. In the process of splitting this out,
cleaning up of some existing code was done as well.
The network driver's plug_network and unplug_network methods took an
amphora_id as a parameter, but it was always assumed to be the compute_id.
This parameter has been changed to compute_id.
The octavia interface network model originally had just a single ip_address,
but to more accurately reflect what neutron and probably other networking
as a services will return, this has been changed to fixed_ips because
interfaces and ports can have multiple ip addresses.
Other cleanup includes calling the network drivers own get_network, get_subnet,
and get_port methods instead of calling the neutron client's show_network,
show_subnet, and show_port methods. Also, all of these changes required some
test changes as well.
Change-Id: Ie6ebc5bc8babe8562c280ba12a1feab21b4ff3f9
The network driver needs the ability to retrieve specific information about
subnets and ports and pass that information to other components. Having info
about the subnet gives us cidr and gateway data that is valuable when setting
up the amphora's routes for the separation of tenant data and management data.
Because of this need, methods to retrieve network, subnet, and port details
has been added.
This also adds a another data model AmphoraNetworkConfig that contains subnet
and port information for the vip, vrrp, and ha networks on an amphora. A
network task has been added that builds this data structure by calling the new
methods added to the network driver.
Change-Id: Ica912337c7d52659a9733096878664f734f27b00
Member has subnet_id and we need to compare with network_id.
In order to do this CalculateDelta task now takes in a load balancer
loops through the amphora, collects the plugged networks
and gathers the network_ids from member subnet_ids and
builds the list accordingly.
Updates network_tasks CalculateDelta
Updates network_tasks adding method to handle deltas
Updates driver adding method to get network
Updates tests, spec and other required code
Change-Id: I698625e4e2e7352cb3000e22de808c33fa7636ed
This driver will allocate a neutron port and fixed_ip on the VIP's network.
Upon plugging the VIP, it will use neutron's allowed address pair to allow
traffic destined for the ha_ip to pass to raised on amphora interfaces.
Change-Id: I7bce4c2bbb9b35905c21caf79cb865e0ca146dac
Definition of network driver interface. Also removed
the floating_ip attributes of VIP because they are not
needed at this point. Also renamed net_port_id to just
port_id and subnet_id to network_id just to be a little
bit more generically clear.
Change-Id: Ic82cb2ab25fbba7dc8caa875552f4caeafb0e4af
Implements: bp/network-driver-interface