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

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
2 changes: 1 addition & 1 deletion orionsdk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
from .solarwinds import SolarWinds


__version__ = "0.3.0"
__version__ = "0.4.0"
7 changes: 4 additions & 3 deletions orionsdk/solarwinds.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
The following class is used to create an object representing a SolarWinds Orion instance. The object provides simple
getter and setter methods for common SolarWinds actions. These methods abstract out the underlying details and SWQL
calls making SolarWinds automation more accessible to a broader audience.
Pass in port 17778 for pre-2023.1 Orion Platform.

"""

Expand All @@ -13,12 +14,12 @@

class SolarWinds:

def __init__(self, npm_server, username, password, logger=None):

def __init__(self, npm_server, username, password, logger=None, port=17774):
self.logger = logger or logging.getLogger('__name__')

# Create the SWIS client for use throughout the instance.
self.swis = SwisClient(npm_server, username, password)
self.swis = SwisClient(npm_server, username, password, port)

def does_node_exist(self, node_name):
""" Checks to see if a SolarWinds node exists with the given name. Calls the get_node_id method of the class
Expand Down
2 changes: 1 addition & 1 deletion orionsdk/swisclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def _json_serial(obj):


class SwisClient:
def __init__(self, hostname, username, password, port=17778, verify=False, session=None):
def __init__(self, hostname, username, password, port=17774, verify=False, session=None):
self.url = "https://{}:{}/SolarWinds/InformationService/v3/Json/".\
format(hostname, port)
self._session = session or requests.Session()
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

setup(
name="orionsdk",
version="0.3.0", # Update also in __init__ ;
version="0.4.0", # Update also in __init__ ;
description="Python API for the SolarWinds Orion SDK",
long_description="Python client for interacting with the SolarWinds Orion API",
author="SolarWinds",
Expand Down