gitlab: clean up modules and utils (#3694) (#3741)

* gitlab: remove dead code in module_utils

* gitlab: use snake_case consistently in methods and functions

* gitlab: use snake_case consistently in variables

* gitlab: fix pep8 indentation issues

* gitlab: add changelog fragment

* gitlab: apply suggestions from code review

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Chris Frage <git@sh0shin.org>

* gitlab: use consistent indentation

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Chris Frage <git@sh0shin.org>
(cherry picked from commit d29aecad26)

Co-authored-by: Nejc Habjan <hab.nejc@gmail.com>
This commit is contained in:
patchback[bot] 2021-11-16 19:45:45 +01:00 committed by GitHub
parent 1e82b5c580
commit 7db5c86dc8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 375 additions and 379 deletions

View file

@ -143,7 +143,7 @@ except Exception:
GITLAB_IMP_ERR = traceback.format_exc()
HAS_GITLAB_PACKAGE = False
from ansible_collections.community.general.plugins.module_utils.gitlab import gitlabAuthentication
from ansible_collections.community.general.plugins.module_utils.gitlab import gitlab_authentication
class GitlabProjectVariables(object):
@ -172,7 +172,7 @@ class GitlabProjectVariables(object):
var = {
"key": key, "value": value,
"masked": masked, "protected": protected,
"variable_type": variable_type
"variable_type": variable_type,
}
if environment_scope is not None:
var["environment_scope"] = environment_scope
@ -300,7 +300,7 @@ def main():
if not HAS_GITLAB_PACKAGE:
module.fail_json(msg=missing_required_lib("python-gitlab"), exception=GITLAB_IMP_ERR)
gitlab_instance = gitlabAuthentication(module)
gitlab_instance = gitlab_authentication(module)
this_gitlab = GitlabProjectVariables(module=module, gitlab_instance=gitlab_instance)