Skip to content

Commit c4d2736

Browse files
Release 1.4.0 (#23)
* fix None type bug (#20) * fix None type bug * add change log fragment * placeholder swpm1 fix * add new tests (#22) * test * add ignore, change py version * fix test * add changelog, fix before assignment * fix pyrfc before assignment * change ignore file 2.15 * Release 1.4.0 commit * changelog for 1.4.0 Co-authored-by: sean-freeman <sean.freeman@outlook.com>
1 parent bc0cff6 commit c4d2736

File tree

14 files changed

+86
-31
lines changed

14 files changed

+86
-31
lines changed

.github/workflows/ansible-test.yml

Lines changed: 15 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,13 @@ jobs:
2222
- stable-2.11
2323
- stable-2.12
2424
- stable-2.13
25-
runs-on: ubuntu-latest
25+
- stable-2.14
26+
- devel
27+
28+
runs-on: >-
29+
${{ contains(fromJson(
30+
'["stable-2.9", "stable-2.10", "stable-2.11", "stable-2.12", "stable-2.13", "stable-2.14"]'
31+
), matrix.ansible) && 'ubuntu-20.04' || 'ubuntu-latest' }}
2632
steps:
2733

2834
- name: Check out code
@@ -36,37 +42,23 @@ jobs:
3642

3743

3844
units:
39-
runs-on: ubuntu-latest
45+
runs-on: >-
46+
${{ contains(fromJson(
47+
'["stable-2.9", "stable-2.10", "stable-2.11", "stable-2.12", "stable-2.13", "stable-2.14"]'
48+
), matrix.ansible) && 'ubuntu-20.04' || 'ubuntu-latest' }}
4049
name: Units (Ⓐ${{ matrix.ansible }}+py${{ matrix.python }})
4150
strategy:
4251
# As soon as the first unit test fails, cancel the others to free up the CI queue
4352
fail-fast: true
4453
matrix:
4554
ansible:
46-
- stable-2.9 # Only if your collection supports Ansible 2.9
55+
- stable-2.9
4756
- stable-2.10
4857
- stable-2.11
4958
- stable-2.12
5059
- stable-2.13
51-
python:
52-
- 2.6
53-
- 2.7
54-
- 3.5
55-
- 3.6
56-
- 3.7
57-
- 3.8
58-
- 3.9
59-
exclude:
60-
# Because ansible-test doesn't support python3.9 for Ansible 2.9
61-
- ansible: stable-2.9
62-
python: 3.9
63-
- ansible: stable-2.13
64-
python: 2.6
65-
include:
66-
# Test Devel on Python 3.10 only
67-
- ansible: devel
68-
python: '3.10'
69-
60+
- stable-2.14
61+
- devel
7062

7163
steps:
7264
- name: Check out code
@@ -76,8 +68,6 @@ jobs:
7668
uses: ansible-community/ansible-test-gh-action@release/v1
7769
with:
7870
ansible-core-version: ${{ matrix.ansible }}
79-
target-python-version: ${{ matrix.python }}
80-
python-version: '3.10'
8171
testing-type: units
8272
test-deps: >-
8373
ansible.netcommon
@@ -129,4 +119,4 @@ jobs:
129119
# testing-type: integration
130120
# test-deps: >-
131121
# ansible.netcommon
132-
# ansible.utils
122+
# ansible.utils

CHANGELOG.rst

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Community SAP Release Notes
55
.. contents:: Topics
66

77

8-
v1.3.0
8+
v1.4.0
99
======
1010

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

18+
Bugfixes
19+
--------
20+
21+
- fix a bug where some commands produces no output which cause to crash the module.
22+
- modules - fix a "variable used before assignment" that cannot be reached but causes sanity test failures.
23+
24+
v1.3.0
25+
======
26+
27+
Release Summary
28+
---------------
29+
30+
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.
31+
1832
Minor Changes
1933
-------------
2034

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ Tested Ansible versions:
7070
- 2.11
7171
- 2.12
7272
- 2.13
73+
- 2.14
7374
- devel
7475

7576
Tested Python versions:
@@ -80,6 +81,8 @@ Tested Python versions:
8081
- 3.7
8182
- 3.8
8283
- 3.9
84+
- 3.10
85+
- 3.11
8386

8487
Due to SAP licensing and hardware requirements, integration tests are momentarily not feasible.
8588
The modules are tested manually against SAP systems until we found a solution or have some

changelogs/changelog.yaml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,34 @@ releases:
6464
release_date: '2022-07-18'
6565
1.3.0:
6666
changes:
67-
breaking_changes:
6867
minor_changes:
6968
- License requirements are updated.
7069
- The modules purposes are described clearer.
7170
- The namespaces of the modules are removed to provide a flatter design.
7271
- hana_query - module is moved to sap_hdbsql.
7372
- sapcontrol - module is moved to sap_control_exec to have a clearer separation
7473
to other roles and references.
74+
release_summary: This is the 1.3.0 minor release of the ``community.sap_libs``
75+
collection. This changelog contains all changes to the modules and plugins
76+
in this collection that have been made after the previous release.
77+
fragments:
78+
- 1.3.0.yml
79+
release_date: '2022-09-09'
80+
1.4.0:
81+
changes:
82+
bugfixes:
83+
- fix a bug where some commands produces no output which cause to crash the
84+
module.
85+
- modules - fix a "variable used before assignment" that cannot be reached but
86+
causes sanity test failures.
7587
release_summary: 'This is the 1.3.0 minor release of the ``community.sap_libs``
7688
collection.
89+
7790
This changelog contains all changes to the modules and plugins in this collection
91+
7892
that have been made after the previous release.'
7993
fragments:
80-
- 1.3.0.yml
81-
release_date: '2022-09-09'
94+
- 0020-fix_sap_control_exec.yml
95+
- 1.4.0.yml
96+
- 22-use-before-assignment.yml
97+
release_date: '2022-12-05'

galaxy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace: community
44
name: sap_libs
5-
version: 1.3.0
5+
version: 1.4.0
66
readme: README.md
77
authors:
88
- Rainer Leber (github.com/rainerleber)

plugins/module_utils/swpm2_parameters_inifile_generate.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ def control_xml_utf8(filepath, module):
6868
string = etree.tostring(root, xml_declaration=True, encoding="UTF-8",
6969
pretty_print=True).decode('utf8').encode('iso-8859-1')
7070

71+
# string1 = etree.tostring(root, xml_declaration=True, encoding="UTF-8",
72+
# pretty_print=True).decode('utf8').encode('utf-8').strip()
73+
7174
with open('control_utf8.xml', 'wb') as target:
7275
target.write(string)
7376

plugins/modules/sap_company.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@
199199
HAS_PYRFC_LIBRARY = False
200200
ANOTHER_LIBRARY_IMPORT_ERROR = traceback.format_exc()
201201
else:
202+
ANOTHER_LIBRARY_IMPORT_ERROR = None
202203
HAS_PYRFC_LIBRARY = True
203204

204205

plugins/modules/sap_control_exec.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@
267267
HAS_SUDS_LIBRARY = False
268268
SUDS_LIBRARY_IMPORT_ERROR = traceback.format_exc()
269269
else:
270+
SUDS_LIBRARY_IMPORT_ERROR = None
270271
HAS_SUDS_LIBRARY = True
271272

272273

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

387-
returned_data = recursive_dict(conn)
388+
if conn is not None:
389+
returned_data = recursive_dict(conn)
390+
else:
391+
returned_data = conn
388392

389393
result['changed'] = True
390394
result['msg'] = "Succesful execution of: " + function

plugins/modules/sap_pyrfc.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@
118118
HAS_PYRFC_LIBRARY = False
119119
PYRFC_LIBRARY_IMPORT_ERROR = traceback.format_exc()
120120
else:
121+
PYRFC_LIBRARY_IMPORT_ERROR = None
121122
HAS_PYRFC_LIBRARY = True
122123

123124

@@ -162,6 +163,7 @@ def main():
162163
try:
163164
conn = get_connection(module, conn_params)
164165
result = conn.call(function, **func_params)
166+
error_msg = None
165167
except CommunicationError as err:
166168
msg = "Could not connect to server"
167169
error_msg = err.message

plugins/modules/sap_snote.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@
147147
HAS_PYRFC_LIBRARY = False
148148
ANOTHER_LIBRARY_IMPORT_ERROR = traceback.format_exc()
149149
else:
150+
ANOTHER_LIBRARY_IMPORT_ERROR = None
150151
HAS_PYRFC_LIBRARY = True
151152

152153

0 commit comments

Comments
 (0)