Comments (10)
To clarify, there are three levels of objects
the client (an instance of GenericInterfaceClient), which contains one or more instances of the WebService object (normally just one, the ticketconnector, tc). The WebService object contains one or more Operation objects (TicketGet, TicketCreate, etc.). It is therefore structured just like OTRS itself (you have a webservice, and have operations inside that webservice).
After writing a configitem interface, one could use the same client to access both interfaces, example:
server_uri = r'https://otrs.example.net'
ticket_webservice_name = 'GenericTicketConnectorSOAP'
configitem_webservice_name = 'GenericConfigItemConnectorSOAP'
client = GenericInterfaceClient(server_uri, tc=GenericTicketConnectorSOAP(ticket_webservice_name), cic=GenericConfigItemConnectorSOAP(configitem_webservice_name))
After this can call both
client.tc.TicketGet(13)
to get a ticket 13 or
client.cic.ConfigItemGet(1000022)
to get otrs itsm config item # 1000022
It is also structured so that the user can make their own custom web service object and add whatever operations they want to it, rather than the generic ones, so the same customization options available in OTRS to make this more in line with the OTRS web service design.
from python-otrs.
here are the new yml files from otrs:
https://github.com/OTRS/otrs/blob/master/development/webservices/GenericTicketConnectorSOAP.yml
(older versions were called GenericTicketConnector.yml)
http://blog.otrs.org/wp-content/uploads/2014/11/GenericConfigItemConnectorSOAP.yml_.txt
from python-otrs.
I've started work on the ConfigItemConnector interface; I would have ConfigItemGet working already, unfortunately there seems to be a bug in OTRS where it is pulling the correct ConfigItem but fails to properly format it as SOAP output, so I've opened a bug report.
from python-otrs.
I've added support for GenericFAQConnectorSOAP and submitted a pull request as a result. Still need to add support for GenericConfigItemConnectorSOAP, after OTRS fixes their bug.
from python-otrs.
Thanks for the hard work and the updates. I'll look into it soon (probably later this week).
Erwin
from python-otrs.
@mjducharme
Thanks again :).
I merged your pull-request into a separate branch and made some additional changes (mostly linting, removed some unused imports and added some imports that were missing).
I will do some more testing/refinement in the near future before merging this into the master branch and create a new release. If you also do some changes meanwhile, you can make a pull request to this branch.
Backward compatibility is not that big of an issue for me, yet you seem to have handled it nicely so I'll keep it like this, maybe will add an extra section to the README.
Kind regards,
Erwin
from python-otrs.
Excellent, this is great, lots of useful comments. There were a few comments that you added that are slightly inaccurate:
- In otrs/client.py, lines 131 and 136 comments should be "of the clientobject of the WebService object", not just "of WebService object".
- The soap_envelope comment is wrong on line 141, I think you copied and pasted and forgot to change. It should say """Return soap envelope for WebService object"""
I might look into the OTRS bug myself regarding the ConfigItem connector, because they don't seem to be in a hurry to fix it.
from python-otrs.
Updated the comments with your remarks and added the ssl_context in the same way as the loginname and password.
from python-otrs.
Good catch on the ssl_context, my server doesn't have SSL so I couldn't test that bit when I was coding.
from python-otrs.
To do in near future:
create a new release before these changesmerge this into the master branchcreate a new release including these changes
To do beforehand:
Manually test the FAQ connectorClear up Issue 22Try to remember how to publish to pypi ;)
from python-otrs.
Related Issues (20)
- Little Question HOT 9
- Not able to re-use stored session_id properly HOT 3
- TicketSearch with mutiples States HOT 2
- ticket PendingTime State HOT 2
- "out of memory" Exception while retrieving ticket with ~1G attachements HOT 3
- Search tickets between dates HOT 1
- Invalid Webservice Name but returning SessionID HOT 1
- TicketGet problem(delete, plz) HOT 1
- Ticket search with multiple StateIDs results in Traceback HOT 1
- Missing ticket.merge HOT 2
- Completion SessionGet operations question HOT 3
- Ticket Pending time HOT 1
- Error with ScriptAlias HOT 1
- TicketCreate() assumes falsely that a ticket number looks like a number (an int) HOT 3
- base64 encoding for attachments with Python 3 HOT 1
- In otrs/objects.py, assumptions made by "autocast" are error-prone (for values with a leading zero) HOT 1
- getchildren deprecation is resolved by PR HOT 1
- Rewrite tests to work with https://hub.docker.com/r/juanluisbaptiste/otrs
- Make Python 3 only.
- GenericInterfaceClient: timeout parameter seems not to work
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-otrs.