Container Infrastructure Management Service for OpenStack
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.

api.py 2.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. # Licensed under the Apache License, Version 2.0 (the "License"); you may not
  2. # use this file except in compliance with the License. You may obtain a copy
  3. # of the License at
  4. #
  5. # http://www.apache.org/licenses/LICENSE-2.0
  6. #
  7. # Unless required by applicable law or agreed to in writing, software
  8. # distributed under the License is distributed on an "AS IS" BASIS,
  9. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. # See the License for the specific language governing permissions and
  11. # limitations under the License.
  12. from oslo_config import cfg
  13. api_group = cfg.OptGroup(name='api',
  14. title='Options for the magnum-api service')
  15. api_service_opts = [
  16. cfg.PortOpt('port',
  17. default=9511,
  18. help='The port for the Magnum API server.'),
  19. cfg.IPOpt('host',
  20. default='127.0.0.1',
  21. help='The listen IP for the Magnum API server.'),
  22. cfg.IntOpt('max_limit',
  23. default=1000,
  24. help='The maximum number of items returned in a single '
  25. 'response from a collection resource.'),
  26. cfg.StrOpt('api_paste_config',
  27. default="api-paste.ini",
  28. help="Configuration file for WSGI definition of API."
  29. ),
  30. cfg.StrOpt('ssl_cert_file',
  31. help="This option allows setting path to the SSL certificate "
  32. "of API server. "),
  33. cfg.StrOpt('ssl_key_file',
  34. help="This option specifies the path to the file where SSL "
  35. "private key of API server is stored when SSL is in "
  36. "effect. "),
  37. cfg.BoolOpt('enabled_ssl',
  38. default=False,
  39. help='Enable SSL Magnum API service'),
  40. cfg.IntOpt('workers',
  41. help='The maximum number of magnum-api processes to '
  42. 'fork and run. Default to number of CPUs on the host.')
  43. ]
  44. def register_opts(conf):
  45. conf.register_group(api_group)
  46. conf.register_opts(api_service_opts, group=api_group)
  47. def list_opts():
  48. return {
  49. api_group: api_service_opts
  50. }