Age | Commit message (Collapse) | Author |
|
Changes:
tox: bump the pylint version to 2.6.0 in the default run
Fix pylint 2.6.0 W0707 warnings (raise-missing-from)
|
|
* tools: use python3
Switch tools/ to use python3 instead of python. At minimum this
fixes building deb on python3 only releases like Focal. Applied
via shell commands:
$ grep 'usr/bin/.*python' tools/* 2>/dev/null | \
grep -v python3 | awk -F':' '{print $1}' | \
xargs -i sed -i -e '0,/python/s/python/python3/' {}
* Use /usr/bin/env python3 to be virtualenv friendly
|
|
The motivation for this is that
a.) 1.7.1 runs with python 3.6 (bionic)
b.) we want to run pylint on tests/ and tools for the same reasons
that we want to run it on cloudinit/
The changes are described below.
- Update tox.ini to invoke pylint v1.7.1.
- Modify .pylintrc generated-members ignore mocked object members (m_.*)
- Replace "dangerous" params defaulting to {}
- Fix up cloud_tests use of platforms
- Cast some instance objects to with dict()
- Handle python2.7 vs 3+ ConfigParser use of readfp (deprecated)
- Update use of assertEqual(<boolean>, value) to assert<Boolean>(value)
- replace depricated assertRegexp -> assertRegex
- Remove useless test-class calls to super class
- Assign class property accessors a result and use it
- Fix missing class member in CepkoResultTests
- Fix Cheetah test import
|
|
We should be expecting IndexError instead of KeyError because we are
using a list (key_ids) and not a dictionary. Also, thanks to Emmanuel
Kasper for pointing out the wrong response code.
LP: #1701527
|
|
This just moves flake8 and related tools up to newer versions and fixes
the complaints associated with that.
We added to the list of flake8 ignores:
H102: do not put vim info in source files
H304: no relative imports
Also updates and pins the following in the flake8 environment:
pep8: 1.7.0 => drop (although hacking still pulls it in).
pyflakes 1.1.0 => 1.5.0
hacking 0.10.2 => 0.13.0
flake8 2.5.4 => 3.3.0
pycodestyle none => 2.3.1
|
|
This will change all instances of LOG.warn to LOG.warning as warn
is now a deprecated method. It will also make sure any logging
uses lazy logging by passing string format arguments as function
parameters.
|
|
$ pycodestyle cloudinit/ tests/ tools/
tools/make-mime.py:25:5: E722 do not use bare except'
tools/mock-meta.py:252:17: E722 do not use bare except'
For tools/make-mime.py:25:5: E722 do not use bare except' the use case is
when someone runs
./make-mime.py --attach commis
instead of
./make-mime.py --attach commissaire.txt:x-commissaire-host
The split can cause a ValueError potentially if there is no:
For tools/mock-meta.py:262:17: E722 do not use bare except' the use case is
a dictionary look up occurs potentially when an unknown key is given:
key_name = key_ids[key_id]
Do note that version 2.3.0 falsely reported a dozen or so E302 and E306
errors.
|
|
Fix mock-meta to work with python2 or python3.
Additionally, it will now listen to ipv6 connections, where
previously it would only work with ipv4.
|
|
This has been a recurring ask and we had initially just made the change to
the cloud-init 2.0 codebase. As the current thinking is we'll just
continue to enhance the current codebase, its desirable to relicense to
match what we'd intended as part of the 2.0 plan here.
- put a brief description of license in LICENSE file
- put full license versions in LICENSE-GPLv3 and LICENSE-Apache2.0
- simplify the per-file header to reference LICENSE
- tox: ignore H102 (Apache License Header check)
Add license header to files that ship.
Reformat headers, make sure everything has vi: at end of file.
Non-shipping files do not need the copyright header,
but at the moment tests/ have it.
|
|
|
|
This just removes comments '# pylint:' things and other code
remnents of pylint.
|
|
make pep8 now is silent on precise's pep8 ( 0.6.1-2ubuntu2).
|
|
|
|
|
|
|
|
2. Adding in returning the 'public-keys' to the metadata 'list' response
3. Adding in sending back the running users keys (useful for testing) along with 'brickies'
4. Add in a traverse function that can walk down a dictionary (if possible)
|
|
metadata server.
2. Allow the setting of the ip addr (not just to 0.0.0.0)
3. Add comment as to how to use this for the 169 'magic' addr
|
|
|
|
content) for the userdata blob.
|
|
|
|
|
|
|