Remove trivial path constants from modules

https://fedorahosted.org/freeipa/ticket/4399

Reviewed-By: Petr Viktorin <pviktori@redhat.com>
Fix CI tests: install_adtrust

IPA uses both named and named-pkcs11 service.
If named is masked use named-pkcs11, instead of raising exception

Reviewed-By: Petr Viktorin <pviktori@redhat.com>
Fixed KRA backend.

The KRA backend has been simplified since most of the tasks have
been moved somewhere else. The transport certificate will be
installed on the client, and it is not needed by KRA backend. The
KRA agent's PEM certificate is now generated during installation
due to permission issue. The kra_host() for now is removed since
the current ldap_enable() cannot register the KRA service, so it
is using the kra_host environment variable.

The KRA installer has been modified to use Dogtag's CLI to create
KRA agent and setup the client authentication.

The proxy settings have been updated to include KRA's URLs.

Some constants have been renamed for clarity. The DOGTAG_AGENT_P12
has been renamed to DOGTAG_ADMIN_P12 since file actually contains
the Dogtag admin's certificate and private key and it can be used
to access both CA and KRA. The DOGTAG_AGENT_PEM has been renamed
to KRA_AGENT_PEM since it can only be used for KRA.

The Dogtag dependency has been updated to 10.2.1-0.1.

https://fedorahosted.org/freeipa/ticket/4503

Reviewed-By: Petr Viktorin <pviktori@redhat.com>
tests: Use PEP8-compliant setup/teardown method names

The setUp/dearDown names are used in the unittest module, but there is no reason
to use them in non-`unittest` test cases.
Nose supports both styles (but mixing them can cause trouble when
calling super()'s methods).
Pytest only supports the new ones.

https://fedorahosted.org/freeipa/ticket/4610
tests: Add configuration for pytest

By default, pytest considers test classes only if they're named
'Test*'; Nose also allows 'test_*'.
Configure pytest to allow the non-pep8 names as well.

https://fedorahosted.org/freeipa/ticket/4610
ipatests.util.ClassChecker: Raise AttributeError in get_subcls

Pytest considers NotImplementedError on attribute access an error.

https://fedorahosted.org/freeipa/ticket/4610
test_automount_plugin: Fix test ordering

Nose ran the `test_a_*` and `test_a2_*` tests in opposite order
than the source suggested. Fix this.

https://fedorahosted.org/freeipa/ticket/4610
Use setup_class/teardown_class in Declarative tests

Pytest will consider each Declarative test individually, running
setup/teardown for each one.
Move the setup and teardown to the class level.

https://fedorahosted.org/freeipa/ticket/4610
dogtag plugin: Don't use doctest syntax for non-doctest examples

https://fedorahosted.org/freeipa/ticket/4610
test_webui: Don't use __init__ for test classes

https://fedorahosted.org/freeipa/ticket/4610
test_ipapython: Use functions instead of classes in test generators

pytest's support for Nose-style test generators is not bulletproof;
use a real function to please it.

https://fedorahosted.org/freeipa/ticket/4610
Configure pytest to run doctests

The pytest.ini file needs to be in or above the directory py.test is called in.
When in IPA project root, this invocation will find ./ipatests/pytest.ini:
    py.test ipatests/
but these will not (they're equivalent):
    py.test .
    py.test
So pytest.ini must be in the project root.

However, setupttols can't include files outside package directories,
so we also need this file to be under ipatests/

Solve the problem by symlinking ./pytest.ini to ipatests/pytest.ini.

https://fedorahosted.org/freeipa/ticket/4610
Declarative tests: Move cleanup to setup_class/teardown_class

https://fedorahosted.org/freeipa/ticket/4610
Declarative tests: Switch to pytest

Provide a local pytest plugin to generate tests.

The Declarative tests can now only be run with pytest

https://fedorahosted.org/freeipa/ticket/4610
Integration tests: Port the ordering plugin to pytest

Ordered integration tests may now be run with pytest.

https://fedorahosted.org/freeipa/ticket/4610
Switch make-test to pytest

The unused capability to run on multiple Python versions is removed,
and needed arguments are now listed in pytest.ini,
leaving just a simple call to the actual test runner.

https://fedorahosted.org/freeipa/ticket/4610
Add local pytest plugin for --with-xunit and --logging-level

The --with-xunit option ihas the same behavior as in nosetests:
it's an alias for pytest's --junitxml=nosetests.py

The --logging-level option enables direct IPA logging to stdout.

https://fedorahosted.org/freeipa/ticket/4610
Switch ipa-run-tests to pytest

https://fedorahosted.org/freeipa/ticket/4610
Switch integration testing config to a fixture

The hack of storing the config on the class is left in;
it would be too much work for too little gain at this time.

https://fedorahosted.org/freeipa/ticket/4610
Integration tests: Port the BeakerLib plugin and log collection to pytest

Move the IPA-specific log collection out of the Beakerlib plugin.
Add the --logfile-dir option to tests and ipa-test-task, so that logs
can be collected even if BeakerLib is not used.

https://fedorahosted.org/freeipa/ticket/4610