A service for managing and provisioning Bare Metal servers.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

74 lines
3.4 KiB

  1. # Copyright 2016 Intel Corporation
  2. # Copyright 2013 Hewlett-Packard Development Company, L.P.
  3. # All Rights Reserved.
  4. #
  5. # Licensed under the Apache License, Version 2.0 (the "License"); you may
  6. # not use this file except in compliance with the License. You may obtain
  7. # a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  13. # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  14. # License for the specific language governing permissions and limitations
  15. # under the License.
  16. from oslo_config import cfg
  17. from ironic.common.i18n import _
  18. opts = [
  19. cfg.HostAddressOpt('host_ip',
  20. default='0.0.0.0',
  21. help=_('The IP address or hostname on which ironic-api '
  22. 'listens.')),
  23. cfg.PortOpt('port',
  24. default=6385,
  25. help=_('The TCP port on which ironic-api listens.')),
  26. cfg.IntOpt('max_limit',
  27. default=1000,
  28. help=_('The maximum number of items returned in a single '
  29. 'response from a collection resource.')),
  30. cfg.StrOpt('public_endpoint',
  31. help=_("Public URL to use when building the links to the API "
  32. "resources (for example, \"https://ironic.rocks:6384\")."
  33. " If None the links will be built using the request's "
  34. "host URL. If the API is operating behind a proxy, you "
  35. "will want to change this to represent the proxy's URL. "
  36. "Defaults to None. "
  37. "Ignored when proxy headers parsing is enabled via "
  38. "[oslo_middleware]enable_proxy_headers_parsing option.")
  39. ),
  40. cfg.IntOpt('api_workers',
  41. help=_('Number of workers for OpenStack Ironic API service. '
  42. 'The default is equal to the number of CPUs available '
  43. 'if that can be determined, else a default worker '
  44. 'count of 1 is returned.')),
  45. cfg.BoolOpt('enable_ssl_api',
  46. default=False,
  47. help=_("Enable the integrated stand-alone API to service "
  48. "requests via HTTPS instead of HTTP. If there is a "
  49. "front-end service performing HTTPS offloading from "
  50. "the service, this option should be False; note, you "
  51. "will want to enable proxy headers parsing with "
  52. "[oslo_middleware]enable_proxy_headers_parsing "
  53. "option or configure [api]public_endpoint option "
  54. "to set URLs in responses to the SSL terminated one.")),
  55. cfg.BoolOpt('restrict_lookup',
  56. default=True,
  57. help=_('Whether to restrict the lookup API to only nodes '
  58. 'in certain states.')),
  59. cfg.IntOpt('ramdisk_heartbeat_timeout',
  60. default=300,
  61. help=_('Maximum interval (in seconds) for agent heartbeats.')),
  62. ]
  63. opt_group = cfg.OptGroup(name='api',
  64. title='Options for the ironic-api service')
  65. def register_opts(conf):
  66. conf.register_group(opt_group)
  67. conf.register_opts(opts, group=opt_group)