sapcli icon indicating copy to clipboard operation
sapcli copied to clipboard

Added option to run ADT calls over RFC

Open akreuzer opened this issue 2 years ago • 7 comments

Main effort is to split Connection in sap/adt/core.py into ConnectionViaRFC and ConnectionViaHTTP.

I don't have many test for this as this would require a Netweaver Server.

akreuzer avatar Apr 12 '22 20:04 akreuzer

Good job! I was always wondering how that RFC HTTP tunneling works :) I am happy to merge once we get rid of those unnecessary style fixes and all tests and linters are satisfied.

jfilak avatar Apr 13 '22 12:04 jfilak

Thank you. I must have accidentally run yapf on the changes. I should have reverted all of the cosmetic changes and also the stuff with urllib3.

akreuzer avatar Apr 15 '22 03:04 akreuzer

Please update doc/configuration.md with all the recent congiration options you have added.

jfilak avatar Apr 15 '22 15:04 jfilak

  • Added new options to doc/configuration.md
  • Fixed on typo in bin/sapcli.
  • Fixed some issue with liniting.
  • Added NotImplementedException to the case where --rest-over-rfc is used with odata/gtcs. (This is just to illustrated - if you don't like it I can revert this commit.)

akreuzer avatar Apr 18 '22 23:04 akreuzer

If you do not mind, I would like to test it. However, pulling your forked version raised a syntax error: image

Besides, I added these two entries to my cfg file:

export SAPCLI_HTTP_TIMEOUT=2000
export SAP_REST_OVER_RFC=yes

Any clue?

Git stauts:

image

lucasborin avatar Apr 27 '22 19:04 lucasborin

I think I know what this is: list[str] as a type definition is only allowed in Python 3.9+

For older version on has to use something like this

from typing import List
a: List[str]

@lucasborin I updated the code. Let me know if it works now.

akreuzer avatar Apr 27 '22 21:04 akreuzer

Unsure if I did something wrong, but my python is not able to find PyRFC anymore before pulling it. I'll try to redo my setup.

lucasborin avatar Apr 28 '22 19:04 lucasborin