favoretti/nsnitro — pull request #13 by Ralnoc (2012-10-11 18:13:52+00:00)
Title: SSL recognition added. ServiceGroup function added

Added get_servers() to nsservicegroup.py for getting a list of all servers within the service group

Modified the def __init__ in nsnitro.py to do the following:

Original:
def __init__(self, ip, user, password):
Updated:
def __init__(self, ip, user, password, useSSL):

This allows the selection of the SSL https for accessing the URL or not.

Within the __init__:

Original:
self.__baseurl = "http://%s/nitro/v1/config/" % ip
Updated:
self.__baseurl = "%s://%s/nitro/v1/config/" % ('https' if useSSL else 'http',ip)

This chooses between the http versus https depending on the True/False value of useSSL set in the __init__ function for the NSNitro class.