http_timeout is a constant defined in the code. This
change makes it configurable by providing it as an
option in the config file.
DocImpact
Closes-Bug: #
1332290
Change-Id: I429dd9efa43f6a596933359f4627a7761411e621
# (IntOpt) Number of threads to use to make HTTP requests to the VSM.
#
# http_pool_size = 4
+
+# (IntOpt) Timeout duration in seconds for the http request
+#
+# http_timeout =
+# Example: http_timeout = 15
# Prefix for VM Network name
VM_NETWORK_NAME_PREFIX = 'vmn_'
-DEFAULT_HTTP_TIMEOUT = 15
SET = 'set'
INSTANCE = 'instance'
PROPERTIES = 'properties'
help=_("N1K Policy profile polling duration in seconds")),
cfg.IntOpt('http_pool_size', default=4,
help=_("Number of threads to use to make HTTP requests")),
+ cfg.IntOpt('http_timeout', default=15,
+ help=_("N1K http timeout duration in seconds")),
]
cfg.CONF.register_opts(cisco_opts, "CISCO")
self.format = 'json'
self.hosts = self._get_vsm_hosts()
self.action_prefix = 'http://%s/api/n1k' % self.hosts[0]
- self.timeout = c_const.DEFAULT_HTTP_TIMEOUT
+ self.timeout = c_conf.CISCO_N1K.http_timeout
def list_port_profiles(self):
"""