Move docker specific options into a group.
There is only one example, but we're moving all hypervisor specific options into groups. DocImpact: rename docker_registry_default_port to registry_default_port in the docker group. Implements blueprint: docker-opts-group Change-Id: Ic653e8a610876c40a715bff1ec48173d3bdb212e
This commit is contained in:
parent
93efad46aa
commit
c262de4417
@ -1889,15 +1889,6 @@
|
||||
#timeout_nbd=10
|
||||
|
||||
|
||||
#
|
||||
# Options defined in nova.virt.docker.driver
|
||||
#
|
||||
|
||||
# Default TCP port to find the docker-registry container
|
||||
# (integer value)
|
||||
#docker_registry_default_port=5042
|
||||
|
||||
|
||||
#
|
||||
# Options defined in nova.virt.driver
|
||||
#
|
||||
@ -2522,6 +2513,17 @@
|
||||
#cinder_cross_az_attach=true
|
||||
|
||||
|
||||
[docker]
|
||||
|
||||
#
|
||||
# Options defined in nova.virt.docker.driver
|
||||
#
|
||||
|
||||
# Default TCP port to find the docker-registry container
|
||||
# (integer value)
|
||||
#registry_default_port=5042
|
||||
|
||||
|
||||
[hyperv]
|
||||
|
||||
#
|
||||
|
@ -41,14 +41,16 @@ from nova.virt import driver
|
||||
|
||||
|
||||
docker_opts = [
|
||||
cfg.IntOpt('docker_registry_default_port',
|
||||
cfg.IntOpt('registry_default_port',
|
||||
default=5042,
|
||||
help=_('Default TCP port to find the '
|
||||
'docker-registry container')),
|
||||
'docker-registry container'),
|
||||
deprecated_group='DEFAULT',
|
||||
deprecated_name='docker_registry_default_port'),
|
||||
]
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.register_opts(docker_opts)
|
||||
CONF.register_opts(docker_opts, 'docker')
|
||||
CONF.import_opt('my_ip', 'nova.netconf')
|
||||
|
||||
LOG = log.getLogger(__name__)
|
||||
@ -355,7 +357,7 @@ class DockerDriver(driver.ComputeDriver):
|
||||
return self.docker.get_container_logs(container_id)
|
||||
|
||||
def _get_registry_port(self):
|
||||
default_port = CONF.docker_registry_default_port
|
||||
default_port = CONF.docker.registry_default_port
|
||||
registry = None
|
||||
for container in self.docker.list_containers(_all=False):
|
||||
container = self.docker.inspect_container(container['id'])
|
||||
|
Loading…
Reference in New Issue
Block a user