Commit Graph

15 Commits

Author SHA1 Message Date
Martin Kalcok 4000b6ea72 Add functionality to configure virtual service IPs
Closes-Bug: #1804057
func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/685
Change-Id: I29f2eeca508048fdf8464193368cce5720559b9e
2022-04-12 13:46:23 -07:00
Hervé Beraud 41d36e8b2e Use unittest.mock instead of mock
The mock third party library was needed for mock support in py2
runtimes. Since we now only support py36 and later, we can use the
standard lib unittest.mock module instead.

Note that https://github.com/openstack/charms.openstack is used during tests
and he need `mock`, unfortunatelly it doesn't declare `mock` in its
requirements so it retrieve mock from other charm project (cross dependency).
So we depend on charms.openstack first and when
Ib1ed5b598a52375e29e247db9ab4786df5b6d142 will be merged then CI
will pass without errors.

Depends-On: Ib1ed5b598a52375e29e247db9ab4786df5b6d142
Change-Id: Ie62d7878f7b952f35ca854cc36ee55b62af5f8c1
2021-12-15 10:26:53 +00:00
Alex Kavanagh ba7e3ac9e4 Fix charm so that on focal it uses named service
Pre-focal the service was called 'bind9'.  On focal+ it is called
'named'.  This patch introduces a number of changes to make this
possible:

 * Modify existing charm class "DesignateBindCharm" to include a check
   to see if the distro version is "focal" or higher; if so switch
   the service name to 'named'.

Change-Id: Ida65c620fa81715d37e468217aea28f160cf31ee
Closes-Bug: #1929770
2021-06-02 10:53:00 +01:00
Alex Kavanagh 8949ab2f4e Switch Helper to use c.openstack PatchHelper
This charms.openstack PatchHelper class is a better version of the
Helper class in test_lib_charm_openstack_designate_bind.py as it allows
patching by fully qualified class string.  This simplifies the patching
in the tests.

Change-Id: I9a997550d58bd06c8a8af9752c0d418b4acbbbdd
2021-06-02 10:50:38 +01:00
James Page 57d034b729 Allow access from remote designate units
If allowed_nets is set ensure that the CIDR's for the remote
units on the dns-backend relation are also included in the
allow-query configuration stanza.

This ensures that designate can validate that zone updates
have been correctly transferred to all BIND servers.

Closes-Bug: 1806485
Depends-On: Icdb525c9886937597e35ab8126237a2850604832
Change-Id: I02ebe63ad2775a00eb0f2d0a9ff2499319940833
2020-07-21 10:04:11 +01:00
Zuul 8b9d08620a Merge "Stop to use the __future__ module." 2020-07-13 05:45:18 +00:00
Liam Young 02f667ac16 Update files used to seed new bind units
It looks like the focal version of named is compiled with lmdb
support where as the bionic version is not. This means that on
Focal+ zone information is stored in a nzd file rather than
nzf. This change ensure that nzd files are also used to seed new
units.

Change-Id: Ib1954ec01d78518da064b0912b91643c153d543e
Closes-Bug: #1881532
2020-06-03 08:45:59 +00:00
Hervé Beraud 11c40a2903 Stop to use the __future__ module.
The __future__ module [1] was used in this context to ensure compatibility
between python 2 and python 3.

We previously dropped the support of python 2.7 [2] and now we only support
python 3 so we don't need to continue to use this module and the imports
listed below.

Imports commonly used and their related PEPs:
- `division` is related to PEP 238 [3]
- `print_function` is related to PEP 3105 [4]
- `unicode_literals` is related to PEP 3112 [5]
- `with_statement` is related to PEP 343 [6]
- `absolute_import` is related to PEP 328 [7]

[1] https://docs.python.org/3/library/__future__.html
[2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html
[3] https://www.python.org/dev/peps/pep-0238
[4] https://www.python.org/dev/peps/pep-3105
[5] https://www.python.org/dev/peps/pep-3112
[6] https://www.python.org/dev/peps/pep-0343
[7] https://www.python.org/dev/peps/pep-0328

Change-Id: I5a384e4d045632af5ab4c53b9eb50581e205fc5a
2020-06-02 20:08:41 +02:00
Drew Freiberger 04dc8c02ed Ignore proxy for charm peer communication
Designate-bind services use http communication to manage initial
zone transfers from the leader to other units.  This should be done
within the space designated for dns-backend in the charm bindings.
To ensure this, we must bypass proxy configurations when using wget
between units by adding --no-proxy flag to the wget command.

Change-Id: I3cebb1e01ffde9a9585f152451bf9bcebbdd3f58
Closes-Bug: #1796969
2018-10-23 13:55:15 -05:00
Frode Nordahl 96068a197b Fix unit tests after charms.openstack update
A recent commit to charms.openstack (78ce162e) added support for
using Endpoint based interfaces rather than RelationBase based
ones.  Update unit test to work with this change.

Add ``.stestr`` to ``.gitignore``

Change-Id: I5fc52738c1c7e918bd9213ef4714733d4e7dd934
2018-10-23 13:49:40 +02:00
Liam Young e95b02a465 Do not try and download zones for empty url
If the leader has updated the sync time but not yet published
a src url then the charm can attempt to download the zones from
an empty url

Change-Id: If50872887c9bf993f1524c6bb1e3cad03eda5809
Closes-Bug: #1753980
2018-03-07 12:15:32 +00:00
Tytus Kurek f514bb5a17 Implement "dns-backend" binding
This patchset implements "dns-backend" binding which is required to
properly handle DNS zone transfers between designate and
desigante-bind applications. If "dns-backend" binding is provided
when deploying designate and designate-bind applications, DNZ zone
transfers will now take place over the subnet which belongs to the
provided space.

Change-Id: Icbe0cc790c565f125f0fe8c903e9b755fe764d7c
Depends-On: I927e3958cf929ace9d43f8b3d9509b90b9eab60f
Partial-Bug: #1722794
2017-10-23 13:53:57 +02:00
Liam Young 9c1cf38831 Tidyup 2016-07-13 14:09:08 +00:00
Liam Young bbbd9e8d10 Cope with interface change where interface passes back all values for key from conversation not just the first 2016-07-08 14:46:27 +01:00
Liam Young 51b9f62307 Add unit tests 2016-07-08 12:35:52 +01:00