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

Add additional grains calls #258

Merged
merged 3 commits into from
Mar 17, 2019
Merged

Add additional grains calls #258

merged 3 commits into from
Mar 17, 2019

Conversation

amannch
Copy link
Contributor

@amannch amannch commented Mar 4, 2019

This pullrequest provides the functionality to manipulate grains data for the minions.
The following calls were added:

Salt:					net-api-client:

salt.modules.grains.set			Grains.set
salt.modules.grains.setval		Grains.setValue
salt.modules.grains.setvals		Grains.setValues
salt.modules.grains.append		Grains.append
salt.modules.grains.delkey		Grains.deleteKey
salt.modules.grains.delval		Grains.deleteValue
salt.modules.grains.remove		Grains.remove

The method signatures try to mimic the corresponding salt call. Optional parameters are represented with the Optional datatype.

Additionally, this PR adds basic unit tests for each new method.

Christian Amann added 3 commits March 4, 2019 07:44
set
setval
setvals
append
delkey
delval
remove
This commit adds basic tests for
the grains API calls
@renner renner added this to the Version 0.16.0 milestone Mar 5, 2019
@renner renner self-requested a review March 15, 2019 09:09
Copy link
Member

@renner renner left a comment

Choose a reason for hiding this comment

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

Thanks @amannch, your patch looks good to me! From my perspective it is okay to rename the module calls to create a nicer API (e.g. delkey -> deleteKey), do you agree @lucidd?

@renner renner merged commit 38a846d into SUSE:master Mar 17, 2019
@amannch amannch deleted the master-enhance-grain-support branch March 18, 2019 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants