You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/units
Adrian Likins c38ff3b8f8 pylint fixes for vault related code (#27721)
* rm unneeded parens following assert
* rm unused parse_vaulttext_envelope from yaml.constructor
* No longer need index/enumerate over vault_ids
* rm unnecessary else
* rm unused VaultCli.secrets
* rm unused vault_id arg on VaultAES.decrypt()

pylint: Unused argument 'vault_id'
pylint: Unused parse_vaulttext_envelope imported from ansible.parsing.vault
pylint: Unused variable 'index'
pylint: Unnecessary parens after 'assert' keyword
pylint: Unnecessary "else" after "return" (no-else-return)
pylint: Attribute 'editor' defined outside __init__

* use 'dummy' for unused variables instead of _

Based on pylint unused variable warnings.

Existing code use '_' for this, but that is old
and busted. The hot new thing is 'dummy'. It
is so fetch.

Except for where we get warnings for reusing
the 'dummy' var name inside of a list comprehension.

* Add super().__init__ call to PromptVaultSecret.__init__
pylint: __init__ method from base class 'VaultSecret' is not called (super-init-not-called)

* Make FileVaultSecret.read_file reg method again

The base class read_file() doesnt need self but
the sub classes do.

Rm now unneeded loader arg to read_file()

* Fix err msg string literal that had no effect
pylint: String statement has no effect

The indent on the continuation of the msg_format was wrong
so the second half was dropped.

There was also no need to join() filename (copy/paste from
original with a command list I assume...)

* Use local cipher_name in VaultEditor.edit_file not instance
pylint: Unused variable 'cipher_name'
pylint: Unused variable 'b_ciphertext'

Use the local cipher_name returned from parse_vaulttext_envelope()
instead of the instance self.cipher_name var.

Since there is only one valid cipher_name either way, it was
equilivent, but it will not be with more valid cipher_names

* Rm unused b_salt arg on VaultAES256._encrypt*
pylint: Unused argument 'b_salt'

Previously the methods computed the keys and iv themselves
so needed to be passed in the salt, but now the key/iv
are built before and passed in so b_salt arg is not used
anymore.

* rm redundant import of call from subprocess
pylint: Imports from package subprocess are not grouped

use via subprocess module now instead of direct
import.

* self._bytes is set in super init now, rm dup

* Make FileVaultSecret.read_file() -> _read_file()

_read_file() is details of the implementation of
load(), so now 'private'.
7 years ago
..
cli Support multiple vault passwords (#22756) 7 years ago
contrib Update vmware_inventory (#26308) 7 years ago
errors test/: PEP8 compliancy (#24803) 8 years ago
executor Remove automatic use of system six 7 years ago
inventory INI inventory plugin: add documentation about variable types (#25798) 7 years ago
inventory_test_data/group_vars
mock Support multiple vault passwords (#22756) 7 years ago
module_utils [cloud] Add more configurable backoff implementations to CloudRetry/AWSRetry (#27251) 7 years ago
modules rhn_register: fix broken imports, add unit tests (#26878) 7 years ago
parsing pylint fixes for vault related code (#27721) 7 years ago
playbook Fix undefined variables, basestring usage, and some associated python3 issues 7 years ago
plugins Disable abstract-class-instantiated for smoketests 7 years ago
template test/: PEP8 compliancy (#24803) 8 years ago
utils test/: PEP8 compliancy (#24803) 8 years ago
vars Fix spelling mistakes (comments only) (#25564) 8 years ago
__init__.py
conftest.py Fix bugs in ansible-test units command. (#24044) 8 years ago
test_constants.py 1st part of ansible config, adds ansible-config to view/manage configs (#12797) 8 years ago