Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added option to run ADT calls over RFC #64

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions bin/sapcli
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,11 @@ def parse_command_line(argv):
arg_parser.add_argument("--msserv", default=os.getenv("SAP_MSSERV"), help="Message server port")
arg_parser.add_argument("--sysid", default=os.getenv("SAP_SYSID"), help="System ID (use if connecting via a "
"message server")
arg_parser.add_argument("--group", default=os.getenv("SAP_GROUP"), help="Group (use if connecting via a message "
"server")
arg_parser.add_argument(
"--rfc_group", # name "group" is already in use
default=os.getenv("SAP_GROUP"),
help="Group (use if connecting via a message "
"server")
akreuzer marked this conversation as resolved.
Show resolved Hide resolved
arg_parser.add_argument("--snc_qop", default=os.getenv("SNC_QOP"), help="SAP Secure Login Client QOP")
arg_parser.add_argument("--snc_myname", default=os.getenv("SNC_MYNAME"), help="SAP Secure Login Client MyName")
arg_parser.add_argument("--snc_partnername",
Expand All @@ -86,6 +89,16 @@ def parse_command_line(argv):
help="SAP Secure Login Client library (e.g. "
"/Applications/Secure Login Client.app/Contents/MacOS/lib/libsapcrypto.dylib")

arg_parser.add_argument(
"--rest-over-rfc",
action='store_true',
dest="rest_over_rfc",
default=os.getenv("SAP_REST_OVER_RFC")
not in [None, 'n', 'no', 'false', 'off'],
help=
"Prefer doing rest call over SAP RFC client (to use SNC or if HTTP port is firewalled)"
)
akreuzer marked this conversation as resolved.
Show resolved Hide resolved

subparsers = arg_parser.add_subparsers()
# pylint: disable=not-an-iterable
for connection, cmd in sap.cli.get_commands():
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
requests>=2.20.0
pyodata==1.7.0
PyYAML==5.4.1

urllib3~=1.26.7
akreuzer marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion sap/adt/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Base classes for ADT functionality modules"""

from sap.adt.core import Connection # noqa: F401
from sap.adt.core import ConnectionViaHTTP, ConnectionViaRFC, Connection # noqa: F401
from sap.adt.function import FunctionGroup, FunctionModule # noqa: F401
from sap.adt.objects import ADTObject, ADTObjectType, ADTCoreData, OrderedClassMembers # noqa: F401
from sap.adt.objects import Class, Interface, DataDefinition # noqa: F401
Expand Down
Loading