Version in deprecate calls should be a string (#55395)
* Version in deprecate calls should be a string. Fixes #55312. Fixes #55313. Fixes #55314. Fixes #55315. Fixes #55316. Fixes #55317. * Add changelog fragment
This commit is contained in:
parent
07443a2bcd
commit
ca83a5c110
7 changed files with 19 additions and 16 deletions
3
changelogs/fragments/gitlab-deprecated-version.yaml
Normal file
3
changelogs/fragments/gitlab-deprecated-version.yaml
Normal file
|
@ -0,0 +1,3 @@
|
|||
bugfixes:
|
||||
- gitlab modules - Update version deprecations to use strings instead of integers
|
||||
so that ``2.10`` isn't converted to ``2.1``. (https://github.com/ansible/ansible/pull/55395)
|
|
@ -241,7 +241,7 @@ class GitLabDeployKey(object):
|
|||
def deprecation_warning(module):
|
||||
deprecated_aliases = ['private_token', 'access_token']
|
||||
|
||||
module.deprecate("Aliases \'{aliases}\' are deprecated".format(aliases='\', \''.join(deprecated_aliases)), 2.10)
|
||||
module.deprecate("Aliases \'{aliases}\' are deprecated".format(aliases='\', \''.join(deprecated_aliases)), "2.10")
|
||||
|
||||
|
||||
def main():
|
||||
|
|
|
@ -269,15 +269,15 @@ class GitLabGroup(object):
|
|||
def deprecation_warning(module):
|
||||
deprecated_aliases = ['login_token']
|
||||
|
||||
module.deprecate("Aliases \'{aliases}\' are deprecated".format(aliases='\', \''.join(deprecated_aliases)), 2.10)
|
||||
module.deprecate("Aliases \'{aliases}\' are deprecated".format(aliases='\', \''.join(deprecated_aliases)), "2.10")
|
||||
|
||||
|
||||
def main():
|
||||
argument_spec = basic_auth_argument_spec()
|
||||
argument_spec.update(dict(
|
||||
server_url=dict(type='str', required=True, removed_in_version=2.10),
|
||||
login_user=dict(type='str', no_log=True, removed_in_version=2.10),
|
||||
login_password=dict(type='str', no_log=True, removed_in_version=2.10),
|
||||
server_url=dict(type='str', required=True, removed_in_version="2.10"),
|
||||
login_user=dict(type='str', no_log=True, removed_in_version="2.10"),
|
||||
login_password=dict(type='str', no_log=True, removed_in_version="2.10"),
|
||||
api_token=dict(type='str', no_log=True, aliases=["login_token"]),
|
||||
name=dict(type='str', required=True),
|
||||
path=dict(type='str'),
|
||||
|
|
|
@ -298,7 +298,7 @@ class GitLabHook(object):
|
|||
def deprecation_warning(module):
|
||||
deprecated_aliases = ['private_token', 'access_token']
|
||||
|
||||
module.deprecate("Aliases \'{aliases}\' are deprecated".format(aliases='\', \''.join(deprecated_aliases)), 2.10)
|
||||
module.deprecate("Aliases \'{aliases}\' are deprecated".format(aliases='\', \''.join(deprecated_aliases)), "2.10")
|
||||
|
||||
|
||||
def main():
|
||||
|
|
|
@ -289,15 +289,15 @@ class GitLabProject(object):
|
|||
def deprecation_warning(module):
|
||||
deprecated_aliases = ['login_token']
|
||||
|
||||
module.deprecate("Aliases \'{aliases}\' are deprecated".format(aliases='\', \''.join(deprecated_aliases)), 2.10)
|
||||
module.deprecate("Aliases \'{aliases}\' are deprecated".format(aliases='\', \''.join(deprecated_aliases)), "2.10")
|
||||
|
||||
|
||||
def main():
|
||||
argument_spec = basic_auth_argument_spec()
|
||||
argument_spec.update(dict(
|
||||
server_url=dict(type='str', required=True, removed_in_version=2.10),
|
||||
login_user=dict(type='str', no_log=True, removed_in_version=2.10),
|
||||
login_password=dict(type='str', no_log=True, removed_in_version=2.10),
|
||||
server_url=dict(type='str', required=True, removed_in_version="2.10"),
|
||||
login_user=dict(type='str', no_log=True, removed_in_version="2.10"),
|
||||
login_password=dict(type='str', no_log=True, removed_in_version="2.10"),
|
||||
api_token=dict(type='str', no_log=True, aliases=["login_token"]),
|
||||
group=dict(type='str'),
|
||||
name=dict(type='str', required=True),
|
||||
|
|
|
@ -288,13 +288,13 @@ class GitLabRunner(object):
|
|||
def deprecation_warning(module):
|
||||
deprecated_aliases = ['login_token']
|
||||
|
||||
module.deprecate("Aliases \'{aliases}\' are deprecated".format(aliases='\', \''.join(deprecated_aliases)), 2.10)
|
||||
module.deprecate("Aliases \'{aliases}\' are deprecated".format(aliases='\', \''.join(deprecated_aliases)), "2.10")
|
||||
|
||||
|
||||
def main():
|
||||
argument_spec = basic_auth_argument_spec()
|
||||
argument_spec.update(dict(
|
||||
url=dict(type='str', required=True, removed_in_version=2.10),
|
||||
url=dict(type='str', required=True, removed_in_version="2.10"),
|
||||
api_token=dict(type='str', no_log=True, aliases=["private_token"]),
|
||||
description=dict(type='str', required=True, aliases=["name"]),
|
||||
active=dict(type='bool', default=True),
|
||||
|
|
|
@ -411,15 +411,15 @@ class GitLabUser(object):
|
|||
def deprecation_warning(module):
|
||||
deprecated_aliases = ['login_token']
|
||||
|
||||
module.deprecate("Aliases \'{aliases}\' are deprecated".format(aliases='\', \''.join(deprecated_aliases)), 2.10)
|
||||
module.deprecate("Aliases \'{aliases}\' are deprecated".format(aliases='\', \''.join(deprecated_aliases)), "2.10")
|
||||
|
||||
|
||||
def main():
|
||||
argument_spec = basic_auth_argument_spec()
|
||||
argument_spec.update(dict(
|
||||
server_url=dict(type='str', required=True, removed_in_version=2.10),
|
||||
login_user=dict(type='str', no_log=True, removed_in_version=2.10),
|
||||
login_password=dict(type='str', no_log=True, removed_in_version=2.10),
|
||||
server_url=dict(type='str', required=True, removed_in_version="2.10"),
|
||||
login_user=dict(type='str', no_log=True, removed_in_version="2.10"),
|
||||
login_password=dict(type='str', no_log=True, removed_in_version="2.10"),
|
||||
api_token=dict(type='str', no_log=True, aliases=["login_token"]),
|
||||
name=dict(type='str', required=True),
|
||||
state=dict(type='str', default="present", choices=["absent", "present"]),
|
||||
|
|
Loading…
Reference in a new issue