summaryrefslogtreecommitdiff
path: root/ironic/conf
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2022-02-24 13:31:50 +0000
committerGerrit Code Review <review@openstack.org>2022-02-24 13:31:50 +0000
commit1b3408e190bcff3b4048b3d5952e76320f90906e (patch)
tree495ec1d36ca926ce9f41bbacbf218d2ef32244ce /ironic/conf
parenta7373ddc32e92784f81e62d5a2d487e3ebe49e29 (diff)
parent358b6eac404d0bab09290fbb9334f1a93e992e01 (diff)
downloadironic-1b3408e190bcff3b4048b3d5952e76320f90906e.tar.gz
Merge "Support listening on a Unix socket"
Diffstat (limited to 'ironic/conf')
-rw-r--r--ironic/conf/api.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/ironic/conf/api.py b/ironic/conf/api.py
index dcf235edd..2b0e9a824 100644
--- a/ironic/conf/api.py
+++ b/ironic/conf/api.py
@@ -15,9 +15,20 @@
# under the License.
from oslo_config import cfg
+from oslo_config import types as cfg_types
from ironic.common.i18n import _
+
+class Octal(cfg_types.Integer):
+
+ def __call__(self, value):
+ if isinstance(value, int):
+ return value
+ else:
+ return int(str(value), 8)
+
+
opts = [
cfg.HostAddressOpt('host_ip',
default='0.0.0.0',
@@ -26,6 +37,11 @@ opts = [
cfg.PortOpt('port',
default=6385,
help=_('The TCP port on which ironic-api listens.')),
+ cfg.StrOpt('unix_socket',
+ help=_('Unix socket to listen on. Disables host_ip and port.')),
+ cfg.Opt('unix_socket_mode', type=Octal(),
+ help=_('File mode (an octal number) of the unix socket to '
+ 'listen on. Ignored if unix_socket is not set.')),
cfg.IntOpt('max_limit',
default=1000,
mutable=True,