Giter VIP home page Giter VIP logo

community.sap_launchpad's People

Contributors

berndfinger avatar digglife avatar matthiaswinzeler avatar rainerleber avatar rhmk avatar sean-freeman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

community.sap_launchpad's Issues

Download with software_center_download fails

I'm trying to use the software_center_download module as part of my playbook. But it fails with the following message:

"An exception has occurred - You do not have proper authorization to download software, please check: https://launchpad.support.sap.com/#/user/authorizations"

First of all I've checked the permissions, my S-User has. They are correctly set and I'm able to download software from SAP using a browser. As suggested when using an Universal ID I also reset my Account Password without any difference. So I tried it again with an S-User of my colleague which has super admin rights and the module worked as expected. His S-User uses a Universal ID, too. The only difference are those super admin rights, which shouldn't prevent me from downloading.

Any ideas how to fix this?

SAP ID SSO: Gigya SDK build number is retrieved multiple times, not cached

Inside sap_id_sso.py is the following code:

def _get_sdk_build_number(api_key):
global GIGYA_SDK_BUILD_NUMBER
if GIGYA_SDK_BUILD_NUMBER is not None:
return GIGYA_SDK_BUILD_NUMBER

This seems to imply caching, however GIGYA_SDK_BUILD_NUMBER is never assigned to and always remains None.
Is there a reason for this? The only argument in that function is the API key, but as of now, for all three invocations it is the same.

Considering the gigya.js is over 500 KB in size and the regex takes fairly long, caching would make sense.
Perhaps that was the plan all along, but assigning to the global was forgotten?

Maintenance planner downloads: Deselected files are still downloaded

Hi folks

First of all, many thanks for providing this library! It is an incredibly valuable tool when it comes to automating our SAP Basis deployment pipeline.

I think we found a minor bug in community.sap_launchpad.maintenance_planner_files - it returns files for a download that were deselected in the maintenance planner.

How to reproduce

  1. Access the SAP maintenance planner
  2. Click on "Plan a new system"
  3. Click on "Plan"
  4. Choose a SID and "Install an SAP S/4HANA system"
  5. Select some release, i.e. "SAP S/4HANA 2022" with FPS 02, confirm selection
  6. Go to "Select Files", select Linux X64, confirm selection
  7. If you expand "Select Stack Independent Files" & "NON-ABAP", you will notice that all language stacks other than German (DE) and English (EN) are unselected:
image
  1. When going further to "Download Files", you will see that only German (DE) and English (EN) are selected for download:
image
  1. We finalize the MP part by pushing the downloads to the download basket (not sure this part is necessary)

Now, when listing the files to download with this module, it will not only tell us to download the language packs DE & EN, but all available language packs, even though they were not selected in the MP. I think this is a bug:

...
    - name: Execute Ansible Module 'maintenance_planner_files' to get files from MP
      community.sap_launchpad.maintenance_planner_files:
        suser_id: "{{ suser_id }}"
        suser_password: "{{ suser_password }}"
        transaction_name: "{{ transaction_name }}"
      register: sap_maintenance_planner_basket_register

    - name: Debug
      ansible.builtin.debug:
        var: sap_maintenance_planner_basket_register
        verbosity: 2
...

This will output all language files, even though deselected:

...
    "sap_maintenance_planner_basket_register": {
        "changed": true,
        "download_basket": [
...
            {
                "DirectLink": "https://softwaredownloads.sap.com/file/0030000001312922022",
                "Filename": "S4HANAOP107_ERP_LANG_SL.SAR"
            },
            {
                "DirectLink": "https://softwaredownloads.sap.com/file/0030000001312932022",
                "Filename": "S4HANAOP107_ERP_LANG_SV.SAR"
            },
            {
                "DirectLink": "https://softwaredownloads.sap.com/file/0030000001312942022",
                "Filename": "S4HANAOP107_ERP_LANG_TH.SAR"
            },
            {
                "DirectLink": "https://softwaredownloads.sap.com/file/0030000001312962022",
                "Filename": "S4HANAOP107_ERP_LANG_TR.SAR"
            },
            {
                "DirectLink": "https://softwaredownloads.sap.com/file/0030000001312972022",
                "Filename": "S4HANAOP107_ERP_LANG_UK.SAR"
            },
            {
                "DirectLink": "https://softwaredownloads.sap.com/file/0030000001312982022",
                "Filename": "S4HANAOP107_ERP_LANG_VI.SAR"
            },
            {
                "DirectLink": "https://softwaredownloads.sap.com/file/0030000001312992022",
                "Filename": "S4HANAOP107_ERP_LANG_ZF.SAR"
            },
            {
                "DirectLink": "https://softwaredownloads.sap.com/file/0030000001313002022",
                "Filename": "S4HANAOP107_ERP_LANG_ZH.SAR"
...

To summarize, it appears that the module returns all software packages from the stack, even deselected ones.

I dug a bit deeper into the code and saw that the API call that return the files above returns an XML which also contains the deselected files:

<?xml version="1.0" encoding="utf-16"?>
<mnp:response xmlns:mnp="http://xml.sap.com/2012/01/mnp">
...
 <mnp:entities>
        <mnp:entity id="selectFiles" step="downloadFiles" label="Download Files">
            <mnp:entity id="downloadStackFiles" label="Download Stack Files">
                <mnp:entity label="List of files selected for download" id="stack_files"
                            type="Download Stack Independent Files" enable="false">
                    <mnp:entity id="0010000000033172015" label="GBX01HR5605.SAR" type="REG" size="5"
                                selection_type="multiple" selected="true"
                                description="Attribute Change Package 28 for GBX01HR5 605" enable="false"/>
....
                    <mnp:entity id="0030000001312572022" label="S4HANAOP107_ERP_LANG_CS.SAR" type="STL" size="687978"
                                selection_type="multiple" selected="true" description="File on DVD" enable="false"/>
                    <mnp:entity id="0030000001312582022" label="S4HANAOP107_ERP_LANG_DA.SAR" type="STL" size="475621"
                                selection_type="multiple" selected="true" description="File on DVD" enable="false"/>
                    <mnp:entity id="0030000001312472022" label="S4HANAOP107_ERP_LANG_DE.SAR" type="STL" size="292015"
                                selection_type="multiple" selected="true" description="File on DVD" enable="false"/>
...

As you can see, both S4HANAOP107_ERP_LANG_DE (which was selected in the MP GUI) as well as S4HANAOP107_ERP_LANG_DA.SAR (which was unselected in the MP planner) have selected=true. If the clients are supposed to respect this field, then it might even be a bug in the SAP backend. I am not sure this can easily be fixed, but maybe you folks have a good internal contact working on this part that can take a look?

FWIW, I also checked out the SAP Download Manager (which I assume is the official client for the MP) and it correctly returns only the selected files, but I think it uses a slightly different API than the XML above.

PR for management of Systems/Keys API welcome?

Hi folks

As you probably know, whenever a new SAP system is set up or the underlying VM is recreated, one has to access the launchpad on https://me.sap.com/licensekey, register the new system (or update an existing one) and generate a new license file.

Since we are moving to the cloud, where VMs might be changing more often than traditionally, we'd like to automate the following tasks:

  • List/Create/Update/Delete of Systems in the Launchpad
  • List/Create/Update/Delete of License Keys in the Launchpad

Would you accept a PR that extends this module with the functionality above?

I quickly checked what API is used for managing Systems/License Keys and it appears to be a quite nice ODATA API on https://launchpad.support.sap.com/services/odata/i7p/odata/bkey, which should be rather easy to write a client for.

This API is also protected by the same authorization methods (cookies etc.) as the other APIs compatible in this Ansible Collection, so I thought the new API would fit nicely in your already existing Ansible Modules; I could reuse your foundation and just add a new module that talks to an additional API.

I am not sure how stable the i7p API above is and whether it would break in the future, but I think you have the similar issue with the currently compatible APIs (software download etc.) anyway.

What do you think?

feat: add SAP Notes notes download?

Hi, would it be possible to add the ability to download SNOTES from the Support Portal? I have an ansible playbook that needs to get the latest compatible OS-release for the respective HANA version (Note 2235581)

demo paybook fails sso login

failed: [localhost] (item=SAPCAR_1324-80000936.EXE) => {"ansible_loop_var": "item", "changed": false, "item": "SAPCAR_1324-80000936.EXE", "msg": "SAP SSO authentication failed - 401 Client Error: for url: https://core-api.account.sap.com/uid-core/authenticate?reqId=https%3A%2F%2Fhana.ondemand.com%2Fsupportportal"}

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.