jenkinsci / saltstack-plugin

A quick and dirty jenkins plugin to speak to a saltstack server via the salt api
https://plugins.jenkins.io/saltstack/
MIT License
33 stars 27 forks source link

Use Java bindings from salt-netapi-client #115

Open amendlik opened 6 years ago

amendlik commented 6 years ago

I'd like to suggest that this plugin be modified to use the Java bindings provided by the salt-netapi-client project.

A few years ago, SUSE decided to base a good portion of their SUSE Manager product on SaltStack. One obstacle was that SUSE Manager was written in Java, so they produced this Java binding for the Salt API. My assessment is that it is very high quality and has a solid company behind it.

I'm opening this issue primarily to solicit opinions from the maintainers of the Jenkins SaltStack plugin. I would be happy to help with the changes if they decide this is a good direction.

mchugh19 commented 6 years ago

Howdy!

I would love to be able to defer saltapi processing to an external library. I investigated this years ago, but ran into some limitations including SUSE/salt-netapi-client#103. Actually, there used to be 4 blocking issues, but looks like it's now down to just this one.

If you have any willingness to take a look at using salt-netapi-client, I'd be all for it!

amendlik commented 6 years ago

I remember running into that issue myself about a year ago. I'll try to get those other target types implemented.

amendlik commented 6 years ago

SUSE/salt-netapi-client#226 has been opened to add support for additional target types.

amendlik commented 6 years ago

SUSE/salt-netapi-client/pull/226 has been merged and closed.

mchugh19 commented 6 years ago

Greetings @amendlik

Just wondering if you had taken a crack at using the salt-netapi-client library? If so, how's it going?

amendlik commented 6 years ago

Not yet - the SUSE folks haven't released a new version with those targeting updates.

mchugh19 commented 6 years ago

Looks like your updates made the .14 release: https://github.com/SUSE/salt-netapi-client/releases/tag/v0.14.0

amendlik commented 6 years ago

Yes, unfortunately they also included this "fix": https://github.com/SUSE/salt-netapi-client/pull/232

That means that salt-netapi-client v0.14 only works with Salt v2017.7 or newer. Given that, do you still want to move towards using salt-netapi-client at this time?

mchugh19 commented 6 years ago

Yeah, noticed that too. While it may be a tiny bit early to release only supporting 2017.7, I suspect it may take some time to perform the conversion. So if there were a branch started to work on librar'ification, it would allow investigation on any missing features/functionality in salt-netapi-client. It might take another 6 months for things to get into shape, at which point, it may make sense to set a minimum saltapi version.

amendlik commented 6 years ago

That sounds reasonable to me. I'll get started on the conversion.