Giter VIP home page Giter VIP logo

Comments (10)

mjducharme avatar mjducharme commented on July 28, 2024

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.

mjducharme avatar mjducharme commented on July 28, 2024

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.

mjducharme avatar mjducharme commented on July 28, 2024

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.

mjducharme avatar mjducharme commented on July 28, 2024

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.

ewsterrenburg avatar ewsterrenburg commented on July 28, 2024

Thanks for the hard work and the updates. I'll look into it soon (probably later this week).

Erwin

from python-otrs.

ewsterrenburg avatar ewsterrenburg commented on July 28, 2024

@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.

mjducharme avatar mjducharme commented on July 28, 2024

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.

ewsterrenburg avatar ewsterrenburg commented on July 28, 2024

Updated the comments with your remarks and added the ssl_context in the same way as the loginname and password.

from python-otrs.

mjducharme avatar mjducharme commented on July 28, 2024

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.

ewsterrenburg avatar ewsterrenburg commented on July 28, 2024

To do in near future:

  • create a new release before these changes
  • merge this into the master branch
  • create a new release including these changes

To do beforehand:

  • Manually test the FAQ connector
  • Clear up Issue 22
  • Try to remember how to publish to pypi ;)

from python-otrs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.