123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- class nova::cell_v2::map_instances (
- $cell_uuid = undef,
- $cell_name = undef,
- $extra_params = '',
- ) {
- include ::nova::deps
- if (!$cell_uuid and !$cell_name) {
- fail('Either cell_uuid or cell_name must be provided')
- }
- if ($cell_uuid) {
- $cell_uuid_real = $cell_uuid
- } else {
-
-
- $cell_uuid_real = "$(nova-manage cell_v2 list_cells | sed -e '1,3d' -e '\$d' | awk -F ' *| *' '\$2 == \"${cell_name}\" {print \$4}')"
- }
- exec { 'nova-cell_v2-map_instances':
- path => ['/bin', '/usr/bin'],
- command => "nova-manage ${extra_params} cell_v2 map_instances --cell_uuid=${cell_uuid_real}",
- refreshonly => true,
- }
- }
|