openstack-ansible/releasenotes/notes/static_route_error_check-5e7ed6ddf9eb1d1f.yaml
Nolan Brubaker 894e0c4dc9 Test static route settings
Provider networks can be given static route information that is
populated on all containers. This commit only tests the common cases
around that code - adding a static route as expected, and attempting to
add one with missing information.

Currently, the code fails silently if the cidr or gateway for a static
route are missing. This change adds an exception informing the user that
there is missing static route information. The information is
purposefully general (no specific cases for missing cidr/gateway) in
order to keep the conditionals simple in the code.

Also, the change now checks to make sure that a value is present in
addition to the key, and the variable names are clarified. The values
provided are not check to be valid CIDRs or IP addresses at this time.

A release note and documentation were added given the new errors.

The test cases were split into their own class so as to reduce the
sprawl in the TestConfigChecks class.

Change-Id: I7e36736c1dbd86b7131365b6c27ff2c221814059
2016-05-24 17:32:34 -04:00

12 lines
531 B
YAML

---
fixes:
- Static route information for provider networks now *must* include the
`cidr` and `gateway` information. If either key is missing, an error will
be raised and the dynamic_inventory.py script will halt before any Ansible
action is taken. Previously, if either key was missing, the inventory
script would continue silently without adding the static route
information to the networks.
Note that this check does not validate the CIDR or gateway values, just
just that the values are present.