simple_setup.pp 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # == Class: nova::cell_v2::simple_setup
  2. #
  3. # Class to execute minimal nova cell_v2 setup. This is a manual implementation
  4. # of the cell_v2 simple_cell_setup in puppet.
  5. #
  6. # === Parameters
  7. #
  8. # [*extra_params*]
  9. # (optional) String of extra command line parameters to pass
  10. # to the nova-manage command. These will be inserted in
  11. # the command line between 'nova-manage' and 'cell_v2'.
  12. # Defaults to ''
  13. #
  14. # [*transport_url*]
  15. # (optional) This is the transport url to use for the cell_v2 commands.
  16. # By default the command should look for the DEFAULT/transport_url from
  17. # the nova configuration. If not available, you need to provide the
  18. # transport url via the parameters. Prior to Ocata, the transport-url
  19. # was a required parameter.
  20. # Defaults to undef.
  21. #
  22. # [*database_connection*]
  23. # (optional) This is the database url to use for the cell_v2 create command
  24. # for the initial cell1 cell.
  25. # By default the command should look for the DEFAULT/database_connection from
  26. # the nova configuration. If not available, you need to provide the database
  27. # url via the parameters.
  28. # Defaults to undef.
  29. #
  30. class nova::cell_v2::simple_setup (
  31. $extra_params = '',
  32. $transport_url = undef,
  33. $database_connection = undef,
  34. ) {
  35. include ::nova::deps
  36. include ::nova::cell_v2::map_cell0
  37. nova::cell_v2::cell { 'default':
  38. extra_params => $extra_params,
  39. transport_url => $transport_url,
  40. database_connection => $database_connection
  41. }
  42. include ::nova::cell_v2::discover_hosts
  43. Class['nova::cell_v2::map_cell0'] ->
  44. Nova::Cell_v2::Cell <| |> ~>
  45. Class['nova::cell_v2::discover_hosts']
  46. }