Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f3fab36

Browse files
authored
Allow SwisClient port override
1 parent 9716845 commit f3fab36

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

orionsdk/swisclient.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ def _json_serial(obj):
1111

1212

1313
class SwisClient:
14-
def __init__(self, hostname, username, password, verify=False, session=None):
15-
self.url = "https://{}:17778/SolarWinds/InformationService/v3/Json/".\
16-
format(hostname)
14+
def __init__(self, hostname, username, password, port=17778, verify=False, session=None):
15+
self.url = "https://{}:{}/SolarWinds/InformationService/v3/Json/".\
16+
format(hostname, port)
1717
self._session = session or requests.Session()
1818
self._session.auth = (username, password)
1919
self._session.headers.update({'Content-Type': 'application/json'})

0 commit comments

Comments
 (0)