test: adjust the pytest entry point for pre-Kinetic compatibility
In Ubuntu <=Jammy python3-pytest does not install the /usr/bin/pytest
entry point for pytest. Use `python3 -m pytest` instead.
Also: drop the old `test2` target (intended for Python 2 testing), and
make the `test` target run the tests. This also allows us to drop the
override_dh_auto_test from d/rules.
When creating Openstack VMs the user has to specify the image it wants
to use. sstream-mirror-glance adds a date to the image name, so they
always have to recheck which is the current latest image.
This commit ensures the `latest=true` property is available for the
latest synced image.
Add --set-latest-property CLI argument
When --set-latest-property is given sstream-mirror-glance will set the
recently synced image with the `latest=true` property and then remove
the `latest` property from all the os_version/architecture matching
images.
Restores support for older versions of python-requests
If simplestreams is being used with a version of
python-requests < 2.4.1 then any calls to request.get
will result in
```
ValueError: Timeout value connect was (TIMEOUT, None), but it must
be an int or float.
```
The option to use a tuple of (content timeout,read timeout) was
in troduced in requests 2.4.1. Making this chance restores support
for systems with python-requests < 2.4.1 while still retaining the
support for the timeout feature which now will continue to behave
like the non requests Urllib2UrlReader class.