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