Merge "Consolidate IP address configuration"
This commit is contained in:
commit
c9328c2bc3
@ -18,8 +18,10 @@ api_service_opts = [
|
||||
default=9517,
|
||||
help='The port for the zun API server.'),
|
||||
cfg.IPOpt('host_ip',
|
||||
default='127.0.0.1',
|
||||
help='The listen IP for the zun API server.'),
|
||||
default='$my_ip',
|
||||
help="The listen IP for the zun API server. "
|
||||
"The default is ``$my_ip``, "
|
||||
"the IP address of this host."),
|
||||
cfg.BoolOpt('enable_ssl_api',
|
||||
default=False,
|
||||
help="Enable the integrated stand-alone API to service "
|
||||
|
@ -31,9 +31,10 @@ sql_opts = [
|
||||
|
||||
etcd_opts = [
|
||||
cfg.HostAddressOpt('etcd_host',
|
||||
default='127.0.0.1',
|
||||
default='$my_ip',
|
||||
help="Host IP address on which etcd service "
|
||||
"running."),
|
||||
"running. The default is ``$my_ip``, "
|
||||
"the IP address of this host."),
|
||||
cfg.PortOpt('etcd_port',
|
||||
default=2379,
|
||||
help="Port on which etcd listen client request.")
|
||||
|
@ -11,8 +11,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import socket
|
||||
|
||||
from oslo_config import cfg
|
||||
|
||||
docker_group = cfg.OptGroup(name='docker',
|
||||
@ -46,8 +44,7 @@ docker_opts = [
|
||||
help='Location of TLS private key file for '
|
||||
'securing docker api requests (tlskey).'),
|
||||
cfg.StrOpt('docker_remote_api_host',
|
||||
default=socket.gethostname(),
|
||||
sample_default='localhost',
|
||||
default='$my_ip',
|
||||
help='Defines the remote api host for the docker daemon.'),
|
||||
cfg.StrOpt('docker_remote_api_port',
|
||||
default='2375',
|
||||
|
@ -11,13 +11,16 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import socket
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_utils import netutils
|
||||
|
||||
|
||||
netconf_opts = [
|
||||
cfg.StrOpt("my_ip",
|
||||
cfg.StrOpt('my_ip',
|
||||
default=netutils.get_my_ipv4(),
|
||||
sample_default='<host_ipv4>',
|
||||
help="""
|
||||
The IP address which the host is using to connect to the management network.
|
||||
|
||||
@ -27,30 +30,40 @@ Possible values:
|
||||
|
||||
Related options:
|
||||
|
||||
* docker_remote_api_host
|
||||
* etcd_host
|
||||
* wsproxy_host
|
||||
* host_ip
|
||||
* my_block_storage_ip
|
||||
"""),
|
||||
cfg.StrOpt('host',
|
||||
default=socket.gethostname(),
|
||||
sample_default='<current_hostname>',
|
||||
help="""
|
||||
Hostname, FQDN or IP address of this host. This can be an opaque identifier.
|
||||
It is not necessarily a hostname, FQDN, or IP address. However, the node name
|
||||
must be valid within an AMQP key, and if using ZeroMQ, a valid hostname,
|
||||
FQDN, or IP address.
|
||||
|
||||
Possible values:
|
||||
|
||||
* String with hostname, FQDN or IP address. Default is hostname of this host.
|
||||
"""),
|
||||
cfg.StrOpt("my_block_storage_ip",
|
||||
default="$my_ip",
|
||||
help="""
|
||||
The IP address which is used to connect to the block storage network.
|
||||
|
||||
Possible values:
|
||||
|
||||
* String with valid IP address. Default is IP address of this host.
|
||||
|
||||
Related options:
|
||||
|
||||
* my_ip - if my_block_storage_ip is not set, then my_ip value is used.
|
||||
"""),
|
||||
]
|
||||
|
||||
|
||||
ALL_OPTS = (netconf_opts)
|
||||
|
||||
|
||||
def register_opts(conf):
|
||||
conf.register_opts(ALL_OPTS)
|
||||
conf.register_opts(netconf_opts)
|
||||
|
||||
|
||||
def list_opts():
|
||||
return {"DEFAULT": ALL_OPTS}
|
||||
return {'DEFAULT': netconf_opts}
|
||||
|
@ -14,23 +14,9 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import socket
|
||||
|
||||
from oslo_config import cfg
|
||||
|
||||
|
||||
service_opts = [
|
||||
cfg.HostAddressOpt('host',
|
||||
default=socket.gethostname(),
|
||||
sample_default='localhost',
|
||||
help='Name of this node. This can be an '
|
||||
'opaque identifier. It is not necessarily '
|
||||
'a hostname, FQDN, or IP address. '
|
||||
'However, the node name must be valid '
|
||||
'within an AMQP key, and if using ZeroMQ, '
|
||||
'a valid hostname, FQDN, or IP address.'),
|
||||
]
|
||||
|
||||
periodic_opts = [
|
||||
cfg.IntOpt('periodic_interval_max',
|
||||
default=60,
|
||||
@ -42,7 +28,7 @@ periodic_opts = [
|
||||
'seconds.'),
|
||||
]
|
||||
|
||||
ALL_OPTS = (service_opts + periodic_opts)
|
||||
ALL_OPTS = (periodic_opts)
|
||||
|
||||
|
||||
def register_opts(conf):
|
||||
|
@ -38,7 +38,7 @@ Related options:
|
||||
* The port must be the same as ``wsproxy_port``in this section.
|
||||
"""),
|
||||
cfg.StrOpt('wsproxy_host',
|
||||
default='127.0.0.1',
|
||||
default='$my_ip',
|
||||
help="""
|
||||
The IP address which is used by the ``zun-wsproxy`` service to listen
|
||||
for incoming requests.
|
||||
|
@ -20,7 +20,7 @@ from oslo_config import cfg
|
||||
from zun.common import config
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('host', 'zun.common.service')
|
||||
CONF.import_opt('host', 'zun.conf')
|
||||
CONF.import_opt('connection', 'oslo_db.options', group='database')
|
||||
CONF.import_opt('sqlite_synchronous', 'oslo_db.options', group='database')
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user