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

How to replace pyrfc requirement ?? #46

Open
1 task done
joanba68 opened this issue Aug 26, 2024 · 6 comments
Open
1 task done

How to replace pyrfc requirement ?? #46

joanba68 opened this issue Aug 26, 2024 · 6 comments

Comments

@joanba68
Copy link

Summary

Just got information ( SAP-archive/PyRFC#372 ) that pyrfc requirement won't have new releases as current people is focusing on another priorities. We have some developments based on this collection and we need to understand what will be the roadmap. Any replacement of pyrfc ? Is there any other alternative from ansible to run SAP related tasks ?

Issue Type

Feature Idea

Component Name

pyrfc

Additional Information

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@sean-freeman
Copy link
Member

sean-freeman commented Sep 30, 2024

The SAP LinuxLab Open-Source Initiative governance board will discuss this at our next meeting.


Speaking personally...

There are no roadmaps created within this initiative for dependencies from SAP, and no planned contingencies for dependencies that have suddenly been discontinued by SAP (in this case, @bsrdjan was the sole developer). There are no other alternatives to PyRFC, it was the only Python binding for NWRFC SDK C.

This sudden discontinuation has also impacted the bindings for Node.js node-rfc and Go gorfc. Other legacy bindings for Ruby and Perl etc are long dead.

This sudden discontinuation will also impact other upper-level projects such as sapcli.

The PyRFC project would be near impossible for any non-SAP employee to takeover, as the changes to each Patch of the NWRFC SDK C code are documented at a high-level only (e.g. SAP Note 3481057 - SAP NetWeaver RFC SDK 7.50 -- Patch Level 14) and the documentation itself was always non-standard by not being on help.sap.com, see SAP Support Portal - Products - Connectors - SAP NetWeaver Remote Function Call (RFC) Software Development Kit (SDK).

A developer who is familiar with ABAP, C and Python would be required.

The last version of PyRFC is version 3.3.1 released in Jan-2024, compatible with NWRFC SDK Patch 12 released in Aug-2023.

Alternatives with limited functionality would be:

  • use HTTP Connection, called from builtin Ansible Module uri
  • use startrfc binary from the NWRFC SDK, called from builtin Ansible Module shell. See below

Hard decisions lie ahead. @rainerleber FYI

startrfc binary example

sap_system_hostname=""
sap_system_id=""
sap_system_instance_number=""
sap_system_client_number=""
sap_user=""
sap_password=""

# Transaction SU01
# ABAP Program SAPLSUID_MAINTENANCE, using SAP Fields as BNAME and USERALIAS
# Function Module for ABAP Program SUID_IDENTITY_MAINT, using path with Parameter Name as I_USERNAME

# Login using RFC (-3 arg)
# NOTE -i for RFC Connection input file is deprecated
startrfc \
-3 \
-h $sap_system_hostname \
-d $sap_system_id \
-s $sap_system_instance_number \
-u $sap_user \
-p $sap_password \
-c $sap_system_client_number \
-l EN \
-t \
\
-F SUID_IDENTITY_MAINT \
-E I_USERNAME=testuser1

Edit: Reference links

Patch 12 has been removed from SAP Software Download Center. See:

Maintenance Software Component - SAP NW RFC SDK

https://me.sap.com/softwarecenter/template/products/_APP=00200682500000001943&_EVENT=DISPHIER&HEADER=Y&FUNCTIONBAR=N&EVENT=TREE&NE=NAVIGATE&ENR=01200314690100002214&V=MAINT&TA=ACTUAL&PAGE=SEARCH&sap-language=en-GB

Maintenance Software Component (Archive View) - SAP NW RFC SDK

https://me.sap.com/softwarecenter/template/products/_APP=00200682500000001943&_EVENT=DISPHIER&HEADER=Y&FUNCTIONBAR=N&EVENT=TREE&NE=NAVIGATE&ENR=01200314690100002214&V=MAINT&TA=ARCHIVE&PAGE=SEARCH&sap-language=en-GB

@amarvin
Copy link

amarvin commented Dec 2, 2024

As the former pyrfc talented maintainer @bsrdjan mentioned (SAP-archive/PyRFC#372 (comment)), yanked PyPI releases can still be installed by specifying the exact release version. For example, pip install pyrfc fails, but you could pip install pyrfc==3.3.1. I don't see a way for you to still support a range of versions of pyrfc though when they're all yanked.

@joanba68
Copy link
Author

joanba68 commented Dec 2, 2024

In my modest opinion, if SAP cannot provide support, best option is to simply code the NW RFC SDK in c, like years ago. In fact in our servers gcc compilers are available. We can always call binaries from shell in ansible.

@sean-freeman
Copy link
Member

sean-freeman commented Dec 9, 2024

@joanba68 Within our context in the automation community, specifically Ansible, where your thought process leads.... is some Ansible Module that:

  • dynamically compiles pre-written C code to create an approximate of the sample startrfc / rfcexec but with more capabilities
  • inject inputs to this compiled C binary, from the Python level, which itself receives inputs from the Ansible level

I do not see that happening, least of all because we don't have someone who actively codes in C. The above logic isn't the best either, when compared to PyRFC that was a binding from Python > C directly, and supported by SAP.

If you want to create a project under SLL-OSI with C for creating an expansion of startrfc / rfcexec sample (provided within the NWRFC SDK) - it would be welcomed.

If you want to fork PyRFC under SLL-OSI GH Org, that could also be discussed. But not sure why we'd do that as there is a call for maintainers in the SAP GH Org.

@joanba68
Copy link
Author

I think is really easy to simply code the RFC call to STC01 trans. in C, I've done it many times in the past and it's directly supported by SAP. Also easy to simply call a shell in ansible and run the program. Keep it simple...

@sean-freeman
Copy link
Member

PyRFC is dead, reference to latest comment SAP-archive/PyRFC#372 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@sean-freeman @amarvin @joanba68 and others