Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
40 changes: 15 additions & 25 deletions .github/workflows/ansible-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ jobs:
- stable-2.11
- stable-2.12
- stable-2.13
runs-on: ubuntu-latest
- stable-2.14
- devel

runs-on: >-
${{ contains(fromJson(
'["stable-2.9", "stable-2.10", "stable-2.11", "stable-2.12", "stable-2.13", "stable-2.14"]'
), matrix.ansible) && 'ubuntu-20.04' || 'ubuntu-latest' }}
steps:

- name: Check out code
Expand All @@ -36,37 +42,23 @@ jobs:


units:
runs-on: ubuntu-latest
runs-on: >-
${{ contains(fromJson(
'["stable-2.9", "stable-2.10", "stable-2.11", "stable-2.12", "stable-2.13", "stable-2.14"]'
), matrix.ansible) && 'ubuntu-20.04' || 'ubuntu-latest' }}
name: Units (Ⓐ${{ matrix.ansible }}+py${{ matrix.python }})
strategy:
# As soon as the first unit test fails, cancel the others to free up the CI queue
fail-fast: true
matrix:
ansible:
- stable-2.9 # Only if your collection supports Ansible 2.9
- stable-2.9
- stable-2.10
- stable-2.11
- stable-2.12
- stable-2.13
python:
- 2.6
- 2.7
- 3.5
- 3.6
- 3.7
- 3.8
- 3.9
exclude:
# Because ansible-test doesn't support python3.9 for Ansible 2.9
- ansible: stable-2.9
python: 3.9
- ansible: stable-2.13
python: 2.6
include:
# Test Devel on Python 3.10 only
- ansible: devel
python: '3.10'

- stable-2.14
- devel

steps:
- name: Check out code
Expand All @@ -76,8 +68,6 @@ jobs:
uses: ansible-community/ansible-test-gh-action@release/v1
with:
ansible-core-version: ${{ matrix.ansible }}
target-python-version: ${{ matrix.python }}
python-version: '3.10'
testing-type: units
test-deps: >-
ansible.netcommon
Expand Down Expand Up @@ -129,4 +119,4 @@ jobs:
# testing-type: integration
# test-deps: >-
# ansible.netcommon
# ansible.utils
# ansible.utils
16 changes: 15 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Community SAP Release Notes
.. contents:: Topics


v1.3.0
v1.4.0
======

Release Summary
Expand All @@ -15,6 +15,20 @@ This is the 1.3.0 minor release of the ``community.sap_libs`` collection.
This changelog contains all changes to the modules and plugins in this collection
that have been made after the previous release.

Bugfixes
--------

- fix a bug where some commands produces no output which cause to crash the module.
- modules - fix a "variable used before assignment" that cannot be reached but causes sanity test failures.

v1.3.0
======

Release Summary
---------------

This is the 1.3.0 minor release of the ``community.sap_libs`` collection. This changelog contains all changes to the modules and plugins in this collection that have been made after the previous release.

Minor Changes
-------------

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ Tested Ansible versions:
- 2.11
- 2.12
- 2.13
- 2.14
- devel

Tested Python versions:
Expand All @@ -80,6 +81,8 @@ Tested Python versions:
- 3.7
- 3.8
- 3.9
- 3.10
- 3.11

Due to SAP licensing and hardware requirements, integration tests are momentarily not feasible.
The modules are tested manually against SAP systems until we found a solution or have some
Expand Down
22 changes: 19 additions & 3 deletions changelogs/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,34 @@ releases:
release_date: '2022-07-18'
1.3.0:
changes:
breaking_changes:
minor_changes:
- License requirements are updated.
- The modules purposes are described clearer.
- The namespaces of the modules are removed to provide a flatter design.
- hana_query - module is moved to sap_hdbsql.
- sapcontrol - module is moved to sap_control_exec to have a clearer separation
to other roles and references.
release_summary: This is the 1.3.0 minor release of the ``community.sap_libs``
collection. This changelog contains all changes to the modules and plugins
in this collection that have been made after the previous release.
fragments:
- 1.3.0.yml
release_date: '2022-09-09'
1.4.0:
changes:
bugfixes:
- fix a bug where some commands produces no output which cause to crash the
module.
- modules - fix a "variable used before assignment" that cannot be reached but
causes sanity test failures.
release_summary: 'This is the 1.3.0 minor release of the ``community.sap_libs``
collection.

This changelog contains all changes to the modules and plugins in this collection

that have been made after the previous release.'
fragments:
- 1.3.0.yml
release_date: '2022-09-09'
- 0020-fix_sap_control_exec.yml
- 1.4.0.yml
- 22-use-before-assignment.yml
release_date: '2022-12-05'
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace: community
name: sap_libs
version: 1.3.0
version: 1.4.0
readme: README.md
authors:
- Rainer Leber (github.com/rainerleber)
Expand Down
3 changes: 3 additions & 0 deletions plugins/module_utils/swpm2_parameters_inifile_generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ def control_xml_utf8(filepath, module):
string = etree.tostring(root, xml_declaration=True, encoding="UTF-8",
pretty_print=True).decode('utf8').encode('iso-8859-1')

# string1 = etree.tostring(root, xml_declaration=True, encoding="UTF-8",
# pretty_print=True).decode('utf8').encode('utf-8').strip()

with open('control_utf8.xml', 'wb') as target:
target.write(string)

Expand Down
1 change: 1 addition & 0 deletions plugins/modules/sap_company.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@
HAS_PYRFC_LIBRARY = False
ANOTHER_LIBRARY_IMPORT_ERROR = traceback.format_exc()
else:
ANOTHER_LIBRARY_IMPORT_ERROR = None
HAS_PYRFC_LIBRARY = True


Expand Down
6 changes: 5 additions & 1 deletion plugins/modules/sap_control_exec.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@
HAS_SUDS_LIBRARY = False
SUDS_LIBRARY_IMPORT_ERROR = traceback.format_exc()
else:
SUDS_LIBRARY_IMPORT_ERROR = None
HAS_SUDS_LIBRARY = True


Expand Down Expand Up @@ -384,7 +385,10 @@ def main():
result['msg'] = 'Something went wrong connecting to the SAPCONTROL SOAP API.'
module.fail_json(**result)

returned_data = recursive_dict(conn)
if conn is not None:
returned_data = recursive_dict(conn)
else:
returned_data = conn

result['changed'] = True
result['msg'] = "Succesful execution of: " + function
Expand Down
2 changes: 2 additions & 0 deletions plugins/modules/sap_pyrfc.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
HAS_PYRFC_LIBRARY = False
PYRFC_LIBRARY_IMPORT_ERROR = traceback.format_exc()
else:
PYRFC_LIBRARY_IMPORT_ERROR = None
HAS_PYRFC_LIBRARY = True


Expand Down Expand Up @@ -162,6 +163,7 @@ def main():
try:
conn = get_connection(module, conn_params)
result = conn.call(function, **func_params)
error_msg = None
except CommunicationError as err:
msg = "Could not connect to server"
error_msg = err.message
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/sap_snote.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@
HAS_PYRFC_LIBRARY = False
ANOTHER_LIBRARY_IMPORT_ERROR = traceback.format_exc()
else:
ANOTHER_LIBRARY_IMPORT_ERROR = None
HAS_PYRFC_LIBRARY = True


Expand Down
2 changes: 2 additions & 0 deletions plugins/modules/sap_task_list_execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,15 @@
HAS_PYRFC_LIBRARY = False
PYRFC_LIBRARY_IMPORT_ERROR = traceback.format_exc()
else:
PYRFC_LIBRARY_IMPORT_ERROR = None
HAS_PYRFC_LIBRARY = True
try:
import xmltodict
except ImportError:
HAS_XMLTODICT_LIBRARY = False
XMLTODICT_LIBRARY_IMPORT_ERROR = traceback.format_exc()
else:
XMLTODICT_LIBRARY_IMPORT_ERROR = None
HAS_XMLTODICT_LIBRARY = True


Expand Down
1 change: 1 addition & 0 deletions plugins/modules/sap_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@
HAS_PYRFC_LIBRARY = False
PYRFC_LIBRARY_IMPORT_ERROR = traceback.format_exc()
else:
PYRFC_LIBRARY_IMPORT_ERROR = None
HAS_PYRFC_LIBRARY = True


Expand Down
9 changes: 9 additions & 0 deletions tests/sanity/ignore-2.14.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
plugins/modules/sap_pyrfc.py validate-modules:missing-gplv3-license # Licensed under Apache 2.0
plugins/modules/sap_company.py validate-modules:missing-gplv3-license # Licensed under Apache 2.0
plugins/modules/sap_control_exec.py validate-modules:missing-gplv3-license # Licensed under Apache 2.0
plugins/modules/sap_hdbsql.py validate-modules:missing-gplv3-license # Licensed under Apache 2.0
plugins/modules/sap_snote.py validate-modules:missing-gplv3-license # Licensed under Apache 2.0
plugins/modules/sap_system_facts.py validate-modules:missing-gplv3-license # Licensed under Apache 2.0
plugins/modules/sap_task_list_execute.py validate-modules:missing-gplv3-license # Licensed under Apache 2.0
plugins/modules/sap_user.py validate-modules:missing-gplv3-license # Licensed under Apache 2.0
plugins/modules/sapcar_extract.py validate-modules:missing-gplv3-license # Licensed under Apache 2.0
9 changes: 9 additions & 0 deletions tests/sanity/ignore-2.15.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
plugins/modules/sap_pyrfc.py validate-modules:missing-gplv3-license # Licensed under Apache 2.0
plugins/modules/sap_company.py validate-modules:missing-gplv3-license # Licensed under Apache 2.0
plugins/modules/sap_control_exec.py validate-modules:missing-gplv3-license # Licensed under Apache 2.0
plugins/modules/sap_hdbsql.py validate-modules:missing-gplv3-license # Licensed under Apache 2.0
plugins/modules/sap_snote.py validate-modules:missing-gplv3-license # Licensed under Apache 2.0
plugins/modules/sap_system_facts.py validate-modules:missing-gplv3-license # Licensed under Apache 2.0
plugins/modules/sap_task_list_execute.py validate-modules:missing-gplv3-license # Licensed under Apache 2.0
plugins/modules/sap_user.py validate-modules:missing-gplv3-license # Licensed under Apache 2.0
plugins/modules/sapcar_extract.py validate-modules:missing-gplv3-license # Licensed under Apache 2.0