Use min attribute from oslo_config
"min=0" is now introduced in oslo_config, so no need to check for negative integer in code for "glance_num_retries". TrivialFix Change-Id: Ib62ad460f8ec8de1cada6ff70d026f72487691af
This commit is contained in:
parent
a5580869a0
commit
d7f793d7cb
@ -61,6 +61,7 @@ global_opts = [
|
||||
default=1,
|
||||
help='Version of the glance API to use'),
|
||||
cfg.IntOpt('glance_num_retries',
|
||||
min=0,
|
||||
default=0,
|
||||
help='Number retries when downloading an image from glance'),
|
||||
cfg.BoolOpt('glance_api_insecure',
|
||||
|
@ -36,7 +36,7 @@ from six.moves import range
|
||||
from six.moves import urllib
|
||||
|
||||
from cinder import exception
|
||||
from cinder.i18n import _, _LE, _LW
|
||||
from cinder.i18n import _, _LE
|
||||
|
||||
|
||||
glance_opts = [
|
||||
@ -157,13 +157,6 @@ class GlanceClientWrapper(object):
|
||||
self.api_servers = None
|
||||
self.version = version
|
||||
|
||||
if CONF.glance_num_retries < 0:
|
||||
LOG.warning(_LW(
|
||||
"glance_num_retries shouldn't be a negative value. "
|
||||
"The number of retries will be set to 0 until this is"
|
||||
"corrected in the cinder.conf."))
|
||||
CONF.set_override('glance_num_retries', 0)
|
||||
|
||||
def _create_static_client(self, context, netloc, use_ssl, version):
|
||||
"""Create a client that we'll use for every call."""
|
||||
self.netloc = netloc
|
||||
|
Loading…
Reference in New Issue
Block a user