2 # Copyright (C) 2013 eNovance SAS <licensing@enovance.com>
4 # Author: Emilien Macchi <emilien.macchi@enovance.com>
5 # François Charlier <francois.charlier@enovance.com>
7 # Licensed under the Apache License, Version 2.0 (the "License"); you may
8 # not use this file except in compliance with the License. You may obtain
9 # a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16 # License for the specific language governing permissions and limitations
24 # Name for the new cell
28 # Whether the cell is a 'parent' or 'child'
32 # Username for the message broker in this cell
36 # Password for the message broker in this cell
40 # Address of the message broker in this cell
44 # Port number of the message broker in this cell
47 # [*rabbit_virtual_host*]
48 # The virtual host of the message broker in this cell
52 # It might be used by some cell scheduling code in the future
56 # It might be used by some cell scheduling code in the future
60 Puppet::Type.newtype(:nova_cells) do
62 @doc = "Manage creation/deletion of nova cells."
67 desc "Name for the new cell"
71 newparam(:cell_type) do
72 desc 'Whether the cell is a parent or child'
75 newparam(:rabbit_username) do
76 desc 'Username for the message broker in this cell'
80 newparam(:rabbit_password) do
81 desc 'Password for the message broker in this cell'
85 newparam(:rabbit_port) do
86 desc 'Port number for the message broker in this cell'
90 newparam(:rabbit_hosts) do
91 desc 'Address of the message broker in this cell'
95 newparam(:rabbit_virtual_host) do
96 desc 'The virtual host of the message broker in this cell'
100 newparam(:weight_offset) do
101 desc 'It might be used by some cell scheduling code in the future'
105 newparam(:weight_scale) do
106 desc 'It might be used by some cell scheduling code in the future'
112 raise(Puppet::Error, 'Cell type must be set') unless self[:cell_type]