Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

correct and clarify deprecation #45234

Merged
merged 5 commits into from Sep 6, 2018
Merged

correct and clarify deprecation #45234

merged 5 commits into from Sep 6, 2018

Conversation

bcoca
Copy link
Member

@bcoca bcoca commented Sep 5, 2018

SUMMARY

fixes #45036

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

systemd

ANSIBLE VERSION
2.7+

@ansibot ansibot added affects_2.8 This issue/PR affects Ansible v2.8 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Sep 5, 2018
@bcoca bcoca removed the needs_triage Needs a first human triage before being processed. label Sep 5, 2018
if module.params['scope'] == 'user':

''' Set CLI options depending on params '''
if module.params['user'] is not None:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have to handle user == False

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose the way to handle it is:

if module.params['user'] is not None:
    module.deprecate("The 'user' option is being replaced by 'scope'", version='2.11')
    if module.params['user']:
        module.params['scope'] = 'user'
    else:
        module.params['scope'] = 'system'

@ansibot
Copy link
Contributor

ansibot commented Sep 6, 2018

The test ansible-test sanity --test validate-modules [explain] failed with 1 error:

lib/ansible/modules/system/systemd.py:0:0: E324 Value for "default" from the argument_spec (None) for "scope" does not match the documentation ('system')

click here for bot help

@ansibot ansibot added ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. labels Sep 6, 2018
@abadger
Copy link
Contributor

abadger commented Sep 6, 2018

Looks good now

Merge when CI passes and then please open up a backport for me to merge it to stable-2.7 ASAP.

@ansibot ansibot removed the ci_verified Changes made in this PR are causing tests to fail. label Sep 6, 2018
@ansibot
Copy link
Contributor

ansibot commented Sep 6, 2018

The test ansible-test sanity --test validate-modules [explain] failed with 1 error:

lib/ansible/modules/system/systemd.py:0:0: E324 Value for "default" from the argument_spec (None) for "scope" does not match the documentation ('system')

click here for bot help

@ansibot ansibot added the ci_verified Changes made in this PR are causing tests to fail. label Sep 6, 2018
@bcoca bcoca merged commit 64c594d into ansible:devel Sep 6, 2018
@bcoca bcoca deleted the dep_user_systemd branch September 6, 2018 17:24
bcoca added a commit to bcoca/ansible that referenced this pull request Sep 6, 2018
* correct and clarify deprecation

(cherry picked from commit 64c594d)
abadger pushed a commit that referenced this pull request Sep 6, 2018
* correct and clarify deprecation

(cherry picked from commit 64c594d)
ndswartz pushed a commit to ndswartz/ansible that referenced this pull request Nov 28, 2018
* correct and clarify deprecation

(cherry picked from commit 64c594d)
@ansible ansible locked and limited conversation to collaborators Jul 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.8 This issue/PR affects Ansible v2.8 bug This issue/PR relates to a bug. ci_verified Changes made in this PR are causing tests to fail. module This issue/PR relates to a module. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

systemd contains deprecated call to be removed in 2.8
3 participants