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

service.running unmask option #50709

Merged
merged 4 commits into from Dec 10, 2018

Conversation

Projects
None yet
3 participants
@mattLLVW
Copy link
Contributor

commented Nov 30, 2018

What does this PR do?

This PR implement unmask option in the service module.

What issues does this PR fix or reference?

Fixes #46014

Previous Behavior

Not implemented.

New Behavior

Adopt behavior of unmask, and extend service.running

Tests written?

Yes(Kinda)

Commits signed with GPG?

Yes

@cachedout

This comment has been minimized.

Copy link
Collaborator

commented Dec 3, 2018

@mattLLVW Could you please make the following change to follow Salt's style guideline:

************* Module salt.states.service
W:429, 0: Incompatible Python 3 code found. Proposed fix:
     # See if the service is already running
     if before_toggle_status:
         ret['comment'] = '\n'.join(
-            filter(None, ['The service {0} is already running'.format(name),
-                          unmask_ret['comment']])
+            [_f for _f in ['The service {0} is already running'.format(name),
+                          unmask_ret['comment']] if _f]
         )
         if enable is True and not before_toggle_enable_status:
             ret.update(_enable(name, None, **kwargs)) (incompatible-py3-code)
W:442, 0: Incompatible Python 3 code found. Proposed fix:
     if __opts__['test']:
         ret['result'] = None
         ret['comment'] = '\n'.join(
-            filter(None, ['Service {0} is set to start'.format(name),
-                          unmask_ret['comment']]
-                   ))
+            [_f for _f in ['Service {0} is set to start'.format(name),
+                          unmask_ret['comment']] if _f])
         return ret
@mattLLVW

This comment has been minimized.

Copy link
Contributor Author

commented Dec 3, 2018

Sure thing, done.

Mike Place

@cachedout cachedout requested a review from terminalmage Dec 10, 2018

@cachedout cachedout merged commit b1e5f3f into saltstack:2017.7 Dec 10, 2018

5 of 10 checks passed

continuous-integration/jenkins/pr-merge This commit cannot be built
Details
jenkins/pr/py2-centos-7 The py2-centos-7 job has failed
Details
jenkins/pr/py2-ubuntu-1604 The py2-ubuntu-1604 job has failed
Details
jenkins/pr/py3-centos-7 The py3-centos-7 job has failed
Details
jenkins/pr/py3-windows-2016 The py3-windows-2016 job has failed
Details
WIP Ready for review
Details
jenkins/pr/docs The docs job has passed
Details
jenkins/pr/lint Python lint test has passed
Details
jenkins/pr/py2-windows-2016 The py2-windows-2016 job has passed
Details
jenkins/pr/py3-ubuntu-1604 The py3-ubuntu-1604 job has passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.