Skip to content

Commit 578b3a2

Browse files
authored
Merge pull request #147 from CiscoTestAutomation/ise_rest
updated better logging for ise rest connector
2 parents d5d3ee8 + 7ae2a01 commit 578b3a2

File tree

4 files changed

+44
-2
lines changed

4 files changed

+44
-2
lines changed

.github/workflows/run_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414

1515
strategy:
1616
matrix:
17-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
17+
python-version: ['3.9', '3.10', '3.11', '3.12']
1818

1919
steps:
2020
- uses: actions/checkout@v2
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
--------------------------------------------------------------------------------
2+
New
3+
--------------------------------------------------------------------------------
4+
* ise
5+
* Modified connect
6+
* added better logging for ise.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
Only one changelog file per pull request. Combine these two templates where applicable.
2+
3+
Templates
4+
=========
5+
6+
--------------------------------------------------------------------------------
7+
New
8+
--------------------------------------------------------------------------------
9+
* <Module>
10+
* <Added|Modified> <Class>:
11+
* <Explanation>
12+
13+
--------------------------------------------------------------------------------
14+
Fix
15+
--------------------------------------------------------------------------------
16+
* <Module>
17+
* <Added|Modified|Removed> <Class>:
18+
* <Explanation>
19+
20+
Examples
21+
========
22+
23+
--------------------------------------------------------------------------------
24+
New
25+
--------------------------------------------------------------------------------
26+
* feature
27+
* Modified Connect:
28+
* Change var to variable
29+
* Updated regex pattern <p1> to accommodate various outputs.
30+
* Added keys <key3>, <key4> into the schema.

src/rest/connector/libs/ise/implementation.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,13 @@ def connect(self,
119119
version_info = version_request.response
120120
# {'OperationResult': {'resultValue': [
121121
# {'value': '3.3.0.430', 'name': 'version'}, {'value': '0', 'name': 'patch information'}]}}
122-
version_info_list = version_info.get('OperationResult', {}).get('resultValue', [])
122+
# Check if version_info is a dictionary
123+
if isinstance(version_info, dict):
124+
# Proceed with accessing the version information
125+
version_info_list = version_info.get('OperationResult', {}).get('resultValue', [])
126+
else:
127+
# Raise an appropriate error if version_info is not a dictionary
128+
raise TypeError(f"Expected version_info to be a dictionary, but received {version_info}")
123129
version_message_list = []
124130
for version_nv in version_info_list:
125131
name = version_nv.get('name')

0 commit comments

Comments
 (0)