Open estebistec opened 10 years ago
Steven, thanks for the pull request for this feature, you made my evening!
I haven't really thought through it yet but my initial concerns are:
I'm also concerned about your problems with the REST command. It's a big improvement over the SOAP command in terms of features but especially in terms of speed (and it streams). If you could open another issue for your bug and give me version numbers of various things, and anything weird in the python.log, I'll work on reproducing it.
I'll find some time this weekend to pull this into a branch and play with it.
What I did so far was just to see it working, so I don't consider what's on this pull to be near done.
Hey, one other thing, is it possible to utilize 3rd-party pip packages in this style of spunk apps? I was thinking we could use a package like python-jira and lighten up the command code a bit.
for config, i'm thinking something similar to EXTRACT stanzas in props.conf would work with a .ini file and be splunky. you'd have something like:
[instance-main_jira]
hostname=...
...
[instance-dev_jira]
hostname=...
then you'd be able to say instance=dev_jira, and find the corresponding stanza in the ini...
For the issue with REST, you're saying that the raw looks like a string version of a python dict? Yes. It does. But all the fields should be extracted, and you can use "table" to make it more human readable.
For example,
{u'Labels': '', u'Story ID': None, u'Progress_progress': 0, u'Time in Status': None, u'\u03a3 Original Estimate': '14400', u'Sugar Case #': None, u'\u03a3 Progress_total': 14400, u'Story URL': None, u'Security Level': u'Users', u'Created': u'2014-08-01T11:28:55.000-0700', u'Original Estimate': '14400', u'Fix Version/s': u'Docs Now', 'sourcetype': 'jira_issues'...
re: python-jira - yeah, as long as it's compatible with the apache license we can use it. it was part of my original plan, but then @zjiaran went ahead and did all the work (and much better than i could have) without it.
yeah, my question was more around how splunk packages an embedded python, which doesn't appear to come with pip or setuptools. Further, splunk apps written in python don't actually appear to be installable packages that could have a setup.py, requirements.txt, nor does it seem to provide any other hooks for installing dependencies when the app is laid down. Hopefully I'm wrong about this.
ah, derp. not my area of expertise.
it sounds doable but annoying according to this possibly related answers post: http://answers.splunk.com/answers/138727/help-installing-numpy
Yeah, I'll have a look at that, and try to zero in on my jirarest issues today.
Ah, they're just suggesting OS-packages for pip :/ Not ideal. I'll look at other options for this too.
Okay, I went ahead and implemented the suggested scheme of a prefix to get multiple JIRAs from config.ini.
On the rest command, if I switched it to python-jira, I think I would want to do some code simplification along the way as well. If that was updated, would it be worth it to even keep jirasoap or jiraxml?
@firebus what's the current status of this suggestion? What else needs to be done to help move this along?
Thanks for the nudge, I missed that @estebistec had made more commits :( I see two issues:
I'm happy to do either/both of these if @estebistec is tired of waiting for me...
This is just a sketch of getting multiple JIRA instance support (#19). I used jirasoap because jirarest doesn't seem to work (it just dumps a python dict to the search page). I'd be willing to enhance that one too if we get past proposal here.
Quite simply, I replaced the config.ini with config.json so that you can define multiple servers, and a default. The syntax becomes
jirasoap mode [instance] options
The version bump would be major because the switch on config is non-passive.