splunk-sdk-python icon indicating copy to clipboard operation
splunk-sdk-python copied to clipboard

Jobs#list should return a list of Job objects

Open ansman opened this issue 15 years ago • 6 comments

The Jobs#list method currently returns a list of SIDs, I think it should return a list of Job objects instead.

Currently I have to wrap the Jobs object and override the method to do this:

[Job(self._jobs.service, sid) for sid in self._jobs.list()]

Would there be any down side to created a Job object instead?

ansman avatar Oct 27 '11 22:10 ansman

Hey Nick - that's a great point, and something we're planning on changing.

Overall, we're not super happy with the way we did the object model in Python, especially around things like this. In the Java and JavaScript SDKs (currently under development, get in touch if you want access) we've done it differently, like you suggested.

I hope we'll have this fixed in the next couple of weeks.

Itay

itay avatar Oct 27 '11 22:10 itay

Cool.

We're currently designing our framework to wrap everything SDK related so we can always change the behavior so it isn't too hard to fix :)

ansman avatar Oct 27 '11 22:10 ansman

Please do let us know if you have any requests for the SDK, or places where you think we can improve on.

itay avatar Oct 27 '11 22:10 itay

While I'm working I'll make sure to note any oddities and stuff I want to change :)

ansman avatar Oct 27 '11 22:10 ansman

This change has now been checked into the feature/collections branch – Collection.list (and the corresponding callable, Collection.call) now returns a list of member entities instead of a list of member entity names, for all collections.

Once this has been code reviewed I will merge with develop.

blovering avatar Mar 19 '12 19:03 blovering

This work has been merged into develop (some time ago).

blovering avatar Apr 19 '12 23:04 blovering