Example #1
0
    def __init__(self, api_providers, user, password, request_timeout,
                 http_timeout, retries, redirects, failover_time,
                 concurrent_connections=3):
        '''Constructor.

        :param api_providers: a list of tuples in the form:
            (host, port, is_ssl=True). Passed on to NvpClientEventlet.
        :param user: the login username.
        :param password: the login password.
        :param concurrent_connections: the number of concurrent connections.
        :param request_timeout: all operations (including retries, redirects
            from unresponsive controllers, etc) should finish within this
            timeout.
        :param http_timeout: how long to wait before aborting an
            unresponsive controller
        :param retries: the number of concurrent connections.
        :param redirects: the number of concurrent connections.
        :param failover_time: minimum time between controller failover and new
            connections allowed.
        '''
        NvpApiClientEventlet.__init__(
            self, api_providers, user, password, concurrent_connections,
            failover_time=failover_time)

        self._request_timeout = request_timeout
        self._http_timeout = http_timeout
        self._retries = retries
        self._redirects = redirects
Example #2
0
    def __init__(self,
                 api_providers,
                 user,
                 password,
                 request_timeout,
                 http_timeout,
                 retries,
                 redirects,
                 failover_time,
                 concurrent_connections=3):
        '''Constructor.

        :param api_providers: a list of tuples in the form:
            (host, port, is_ssl=True). Passed on to NvpClientEventlet.
        :param user: the login username.
        :param password: the login password.
        :param concurrent_connections: the number of concurrent connections.
        :param request_timeout: all operations (including retries, redirects
            from unresponsive controllers, etc) should finish within this
            timeout.
        :param http_timeout: how long to wait before aborting an
            unresponsive controller
        :param retries: the number of concurrent connections.
        :param redirects: the number of concurrent connections.
        :param failover_time: minimum time between controller failover and new
            connections allowed.
        '''
        NvpApiClientEventlet.__init__(self,
                                      api_providers,
                                      user,
                                      password,
                                      concurrent_connections,
                                      failover_time=failover_time)

        self._request_timeout = request_timeout
        self._http_timeout = http_timeout
        self._retries = retries
        self._redirects = redirects
Example #3
0
    def login(self, user=None, password=None):
        '''Login to NVP controller.

        Assumes same password is used for all controllers.

        :param user: NVP controller user (usually admin). Provided for
                backwards compatability. In the  normal mode of operation
                this should be None.
        :param password: NVP controller password. Provided for backwards
                compatability. In the normal mode of operation this should
                be None.

        :returns: Does not return a value.
        '''
        if user:
            self._user = user
        if password:
            self._password = password

        return NvpApiClientEventlet.login(self)
Example #4
0
    def login(self, user=None, password=None):
        '''Login to NVP controller.

        Assumes same password is used for all controllers.

        :param user: NVP controller user (usually admin). Provided for
                backwards compatability. In the  normal mode of operation
                this should be None.
        :param password: NVP controller password. Provided for backwards
                compatability. In the normal mode of operation this should
                be None.

        :returns: Does not return a value.
        '''
        if user:
            self._user = user
        if password:
            self._password = password

        return NvpApiClientEventlet.login(self)