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
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
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
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
Remove upper bound on flake8 and tidy misc lint on codebase.
Note that one of the warning messages signalled that a parameter
was not used in a format call. This may or may not be correct
but this commit sticks with the existing behaviour.
Change-Id: Ifa178694a97997f992afa88f4a8f3bead09ced3b
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
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
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
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
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
Every reactive charm that uses charms.openstack and implements unit
testing needs to mock charmhelpers, as otherwise the tests blow up.
This patch uses the mocking of charmhelpers in charms.openstack so that
a charm layer can just import test_mocks and charmhelpers will be mocked
out along with setting up a default
charmhelpers.c.o.u.OPENSTACK_RELEASES so that when an OpenStackCharm()
derived charm class won't fail on definition.
Change-Id: Ia9744ea95f0766769daa8e8c31d422ee79c3afc5
Related-Bug: #1693017
Depends-On: I5ac40617ee30e5f421ec16fc7592177a5e6aa166
Add src/README.md placeholder to prevent inheritence of the
base layer's readme file in the built charm.
Use the official charms.openstack repo in test-requirements.txt.
Use official designate charm location in the Amulet tests.
Remove upload-and-publish so as not to encourage out-of-band
pushing and publishing. That is handled by CI.
Remove legacy Makefile.
Rename Amulet test files and drop Icehouse on the Trusty target.
Update tox.ini for Amulet environment variables.
Update metadata.yaml, removing EOL release and adding tags.
Fix apt_pkg mock
Disable py27 unit tests
Change-Id: I5220b73eb41e42cb03e6dac27525140fb21ca449