diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..88a11a0 --- /dev/null +++ b/LICENSE @@ -0,0 +1,13 @@ +Copyright 2012 OpenStack Foundation + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/managed_modules.yml b/managed_modules.yml new file mode 100644 index 0000000..347341e --- /dev/null +++ b/managed_modules.yml @@ -0,0 +1,22 @@ +--- + - puppet-ceilometer + - puppet-cinder + - puppet-designate + - puppet-glance + - puppet-gnocchi + - puppet-heat + - puppet-horizon + - puppet-ironic + - puppet-keystone + - puppet-manila + - puppet-neutron + - puppet-nova + - puppet-openstacklib + - puppet-openstack_extras + - puppet-sahara + - puppet-swift + - puppet-tempest + - puppet-tripleo + - puppet-trove + - puppet-tuskar + - puppet-vswitch diff --git a/moduleroot/.gitignore b/moduleroot/.gitignore new file mode 100644 index 0000000..d9f2fb2 --- /dev/null +++ b/moduleroot/.gitignore @@ -0,0 +1,15 @@ +pkg/ +Gemfile.lock +vendor/ +spec/fixtures/ +.vagrant/ +.bundle/ +coverage/ +.idea/ +*.swp +*.iml +<% if ! @configs['paths'].nil? -%> +<% @configs['paths'].each do |path| -%> +<%= path %> +<% end -%> +<% end -%> diff --git a/moduleroot/Gemfile b/moduleroot/Gemfile new file mode 100644 index 0000000..4ef11a4 --- /dev/null +++ b/moduleroot/Gemfile @@ -0,0 +1,39 @@ +source ENV['GEM_SOURCE'] || "https://rubygems.org" + +<% groups = {} -%> +<% (@configs['required'].keys + ((@configs['optional'] || {}).keys)).uniq.each do |key| -%> +<% groups[key] = (@configs['required'][key] || []) + ((@configs['optional'] || {})[key] || []) -%> +<% end -%> +<% -%> +<% groups.each do |group, gems| -%> +group <%= group %> do +<% maxlen = gems.map! do |gem| -%> +<% { -%> +<% 'gem' => gem['gem'], -%> +<% 'version' => gem['version'], -%> +<% 'git' => gem['git'], -%> +<% 'branch' => gem['branch'], -%> +<% 'length' => gem['gem'].length + (("', '".length if gem['version']) || 0) + gem['version'].to_s.length -%> +<% } -%> +<% end.map do |gem| -%> +<% gem['length'] -%> +<% end.max -%> +<% gems.each do |gem| -%> + gem '<%= gem['gem'] %>'<%= ", '#{gem['version']}'" if gem['version'] %>, <%= ' ' * (maxlen - gem['length']) %> :require => false<%= ", :git => '#{gem['git']}'" if gem['git'] %><%= ", :branch => '#{gem['branch']}'" if gem['branch'] %> +<% end -%> +end + +<% end -%> +if facterversion = ENV['FACTER_GEM_VERSION'] + gem 'facter', facterversion, :require => false +else + gem 'facter', :require => false +end + +if puppetversion = ENV['PUPPET_GEM_VERSION'] + gem 'puppet', puppetversion, :require => false +else + gem 'puppet', :require => false +end + +# vim:ft=ruby diff --git a/moduleroot/Rakefile b/moduleroot/Rakefile new file mode 100644 index 0000000..b84773f --- /dev/null +++ b/moduleroot/Rakefile @@ -0,0 +1,16 @@ +require 'puppetlabs_spec_helper/rake_tasks' +require 'puppet-lint/tasks/puppet-lint' +require 'puppet-syntax/tasks/puppet-syntax' + +PuppetSyntax.exclude_paths ||= [] +PuppetSyntax.exclude_paths << "spec/fixtures/**/*" +PuppetSyntax.exclude_paths << "pkg/**/*" +PuppetSyntax.exclude_paths << "vendor/**/*" + +Rake::Task[:lint].clear +PuppetLint::RakeTask.new :lint do |config| + config.ignore_paths = ["spec/**/*.pp", "vendor/**/*.pp"] + config.fail_on_warnings = true + config.log_format = '%{path}:%{linenumber}:%{KIND}: %{message}' + config.disable_checks = <% @configs['default_disabled_lint_checks'] + ( @configs['extra_disabled_lint_checks'] || [] ) -%> +end diff --git a/moduleroot/spec/spec_helper.rb b/moduleroot/spec/spec_helper.rb new file mode 100644 index 0000000..53d4dd0 --- /dev/null +++ b/moduleroot/spec/spec_helper.rb @@ -0,0 +1,7 @@ +require 'puppetlabs_spec_helper/module_spec_helper' +require 'shared_examples' + +RSpec.configure do |c| + c.alias_it_should_behave_like_to :it_configures, 'configures' + c.alias_it_should_behave_like_to :it_raises, 'raises' +end