Commit Graph

54 Commits

Author SHA1 Message Date
Frode Nordahl ec63732974 Support configuring networknig charms on MAAS
When on MAAS support doing charm based configuration of OVS by
retrieving MAC address of ports attached to external network
from MAAS.

Note that we should extend the MAAS support to also work with
deployments where MAAS does the OVS configuration for us.
2021-01-13 18:47:08 +01:00
Alex Kavanagh 17bad029a5 Fix network setup for mojo
A recent change introduced a configuration option in the
./tests/test.yaml file (default location) which allows juju wait to be
used rather than waiting on various workload messages.  This,
unfortunately, breaks mojo tests as they don't use a tests.yaml.  This
change refactors that code, and enables a 'use_juju_wait' to be passed
into the relevant functions, and a new command line option (default
true) to disable using juju wait.
2020-09-15 09:55:09 +01:00
Frode Nordahl 4ae1b39ed2 neutron: Check for non-frag connectivity at MTU size 2020-09-07 10:35:18 +02:00
Frode Nordahl f33d166c5e neutron: Allow to run networking test multiple times
Adjust NeutronNetworkingTest to optionally run tearDown and
re-use existing instances on subsequent runs.

tearDown is controlled through a key under the `tests_options`
dictionary in tests.yaml.

Useful for morphing a deployment and then validating connectivity
for existing instances afterwards.
2020-09-07 10:35:18 +02:00
Aurelien Lourot fe82bc76f5 Fix setUpClass' signature 2020-08-26 16:34:28 +02:00
Aurelien Lourot 52dc1354ff Fix setUpClass' signature 2020-08-26 14:19:00 +02:00
Aurelien Lourot cac63150d9 Moved test to its own new class 2020-08-26 12:59:40 +02:00
Aurelien Lourot 754e0e081b Merge branch 'master' into ovs-mark-managed-ports 2020-08-26 10:24:12 +02:00
Aurelien Lourot e530533345 Make NeutronCreateNetworkTest more robust 2020-07-30 12:27:21 +02:00
Liam Young ce6cfe68b3 Add defaut app name for vrrp tests
Set a default application_name for vrrp tests so they can be
called by charms other than the neutron-api gate tests.
2020-07-15 20:07:17 +00:00
Aurelien Lourot 16cee0193f Make linter happy 2020-07-03 15:43:00 +02:00
Aurelien Lourot b66fd1a546 Merge branch 'master' into ovs-mark-managed-ports 2020-07-03 15:22:49 +02:00
Frode Nordahl 29356f6419 Move cleanup of launched instances to common class
Use the nomenclature for resource cleanup as defined in the
`BaseCharmTest`.
2020-07-03 08:56:01 +02:00
Frode Nordahl 0f3d9bf7c4 Move useful helpers from Neutron tests to OpenStackBaseTest
The dual-instance launch and retrieve is a common pattern in tests.

Let's share them.
2020-07-02 17:59:31 +02:00
Aurelien Lourot 13b590ea12 Refactor overriding mechanism 2020-06-23 13:03:04 +02:00
Aurelien Lourot f0ceb33f3a Add functional tests for neutron-arista 2020-06-22 16:15:03 +02:00
Liam Young 9d9b47a275 Add test for networking when gateways are stopped
Add test for networking when gateways are stopped. This includes
refactoring the existing network test so I can reuse some of the
code.
2020-06-09 15:06:01 +00:00
Aurelien Lourot 9ae0d464b3 Fix "'NeutronGatewayTest' object has no attribute 'neutron_client'"
in test_401_enable_qos
2020-05-11 16:52:39 +02:00
Aurelien Lourot 59ec82f542 Make ssh_test() more robust 2020-05-07 14:25:47 +02:00
Aurelien Lourot c35b4e0fcf Disable test_101_neutron_sriov_config on Trusty
https://bugs.launchpad.net/charm-neutron-openvswitch/+bug/1876888
2020-05-05 16:22:52 +02:00
Aurelien Lourot 135e2dd806 Re-enable neutron/test_800_ovs_bridges_are_managed_by_us 2020-05-04 16:43:00 +02:00
Dmitrii Shcherbakov 731de58b6a Merge pull request #237 from openstack-charmers/fix-neutron-openvswitch-tests
Fix neutron openvswitch tests
2020-04-24 11:44:51 +03:00
Frode Nordahl 9203865408 n-ovs: Do not use model.set_application_config directly
There are two problems with doing so as part of individual
functional tests:

1) If the application already have the value set the test will
   time out waiting for a change that will never be made.

2) python-libjuju ``set_config`` call requires values to be
   ``str`` regardless of their actual type.  Pairing this fact
   with the requirement to use the actual type when comparing
   values before attempting to set them makes this very confusing
   and error prone.

   juju/python-libjuju#388
   openstack-charmers/zaza#348

Use the ``config_change`` helper instead.
2020-04-20 10:11:31 +02:00
Frode Nordahl 169dff2d8e n-ovs: Do not treat `bool config as str`
When applying configuration to a model the helpers will compare
settings already set to what is being attempted set to be able to
accurately predict model behaviour.

When passing ``bool`` values as ``str`` this does not work and it
may lead to unwanted behaviour depending on the model state at the
time the test runs.
2020-04-20 08:31:58 +02:00
Frode Nordahl e3fb0fde92 n-ovs: Await start of execution before awaiting idle
At present we may start interrogating the model for a result of
a change made by the functional test before all units of the
application have started executing.
2020-04-19 17:34:23 +02:00
Frode Nordahl 845f728b4d n-ovs: Remove redundant unit references 2020-04-19 16:10:41 +02:00
Frode Nordahl 82928825fd Move NGW QoS test back to the NGW test class
Commit 55fc718f98 moved a QoS data
plane test from Neutron Gateway tests to the Neutron API tests.
This was probably done because the Neutron API charm gate was
doing end to end tests for all deployment topologies.

On the back of splitting out the data plane tests from Neutron API
gate to the respective data plane charms we need to move this
test back where it belongs.

Apparantly the Neutron Open vSwitch test class have its own
variant of this test already that will be executed by the
neutron-openvswitch charm gate.
2020-04-17 15:02:19 +02:00
Aurelien Lourot 49730180f6 Temporarily disable test_800_ovs_bridges_are_managed_by_us 2020-04-17 07:02:29 +02:00
Alex Kavanagh 52a4afcabd Merge pull request #217 from AurelienLourot/neutron-gateway-managed-bridges
Neutron gateway managed bridges
2020-04-16 20:07:52 +01:00
Aurelien Lourot 8e9ecc53e8 Openstack -> OpenStack 2020-04-16 18:59:07 +02:00
Aurelien Lourot ac227eab08 Fix copy-paste mistakes and typos and remove dead code 2020-04-16 15:10:03 +02:00
Aurelien Lourot 06b9083f3c Validate that charm-neutron-gateway marks bridges as managed by us
https://bugs.launchpad.net/charm-neutron-gateway/+bug/1809190
2020-04-06 18:16:53 +02:00
Frode Nordahl 72fb1cf7e7 Break out Neutron create network through the API test
This is broken out into a separate class as it can be useful as
standalone tests for Neutron plugin subordinate charms.
2020-03-06 11:15:41 +01:00
David Ames 9f67c8e032 Do not test Trusty 2020-02-05 12:10:34 -08:00
David Ames 6672fe934d Test ovs-use-veth setting
Validate settings for existing and configured ovs-use-veth settings.
Verify the charm goes into a blocked state if they conflict.

Partial-Bug: #1831935
2020-02-05 12:10:34 -08:00
Liam Young 7e2febbde9 Skip QoS Tests in OVN deploys
The QoS tests do not work with OVN deploys, so skip them for the
time being.
2020-01-27 09:11:43 +00:00
arif 0d47a4028a Add Neutron OpenvSwitch Functional Tests 2020-01-14 21:29:24 +00:00
Jose Guedez 55fc718f98 Move tests (400/401) from neutron-gateway to neutron-api 2019-12-11 15:05:12 +11:00
Jose Guedez f79f2fb54c NeutronGatewayTest: refactor test 401 to use tenacity 2019-12-11 14:05:37 +11:00
Jose Guedez 79bb61243f Use a single security test class for neutron-api and neutron-gateway 2019-12-11 12:52:13 +11:00
Jose Guedez 99eed41697 Ported neutron-gateway tests to zaza (920) 2019-12-10 16:19:40 +11:00
Jose Guedez a3cf1bf7e7 Ported neutron-gateway tests to zaza (400/401) 2019-12-10 16:19:20 +11:00
Jose Guedez 2704fe654c Ported neutron-gateway tests to zaza (500) 2019-12-09 17:33:25 +11:00
Jose Guedez 7d23285ce0 Ported neutron-gateway tests to zaza (900/910) 2019-12-05 16:22:29 +11:00
Frode Nordahl b871907e84 neutron: Do not run tear down on test failure
Fixes #120
2019-11-27 08:58:03 +01:00
Frode Nordahl e51b3c481d neutron: Add tenacity to retry ping
It would be awesome if the first iteration of a ARP lookup, ICMP
echo and ICMP reply on a newly created instance was always
successful.  Sadly this is not the reality.
2019-11-13 12:03:17 +01:00
Frode Nordahl 43322b0152 neutron: Deduce expected security check results on TLS presence
If 'neutron-api' has a certificates relation to vault we have
different expectations of the security checklist result.
2019-11-12 17:40:16 +01:00
Frode Nordahl 675b109d54 Optionally limit number of units to get port attached
This is useful for validating deployments with OVN where it is not
required to have external networking attached to every chassis.

Any chassis that does not have external networking directly
attached will forward traffic destined for the external network
through a tunnel to a chassis that does.
2019-11-02 17:16:39 +01:00
Frode Nordahl 7d1d04a742 Deduce whether DVR is enabled from neutron-api config
Add helper to detect presence of OVN in deployment
2019-11-01 06:39:17 +01:00
Chris MacNaughton 83e4ca7247 Ensure we use pgrep >= bionic-stein 2019-06-26 10:24:07 +02:00