From 12d0e9826ac648076119cf3e6df64d9d02c101c9 Mon Sep 17 00:00:00 2001 From: Mark Vanderwiel Date: Tue, 29 Jul 2014 14:05:56 -0500 Subject: [PATCH] Setting up repo for master Juno Branch * Update metadata version * Removing Strainer file * Adding Gemfile.lock to .gitignore * Updating Gems * chef (11.12.0) * chefspec (4.0.0) * rspec (3.0.0) Change-Id: I8b6858e811cc42ea53ec81ee4e3e70c65d4d444e Partial-Bug: 1349865 --- .gitignore | 3 ++- CHANGELOG.md | 4 ++++ Gemfile | 1 - Strainerfile | 5 ----- metadata.rb | 8 ++++---- spec/api_spec.rb | 10 +++++----- spec/cinder_common_spec.rb | 10 +++++----- spec/scheduler_spec.rb | 4 ++-- spec/spec_helper.rb | 28 ++++++++++++++-------------- spec/volume_spec.rb | 2 +- 10 files changed, 37 insertions(+), 38 deletions(-) delete mode 100644 Strainerfile diff --git a/.gitignore b/.gitignore index be9fe71..8fd93b5 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ .coverage/ *.swp Berksfile.lock -Vagrantfile +Genmfile.lock +Vagrantfile \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 6060834..ef79a79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ openstack-block-storage Cookbook CHANGELOG ============================== This file is used to list changes made in each version of the openstack-block-storage cookbook. + +## 10.0.0 +* Upgrading to Juno + ## 9.4.1 * Add support for LVMISCSIDriver driver using block devices with LVM diff --git a/Gemfile b/Gemfile index 8698392..555b8ed 100644 --- a/Gemfile +++ b/Gemfile @@ -8,6 +8,5 @@ gem 'hashie', '~> 2.0' gem 'chefspec', '~> 4.0.0' gem 'rspec', '~> 3.0.0' gem 'foodcritic', '~> 3.0.3' -gem 'strainer' gem 'rubocop', '~> 0.18.1' gem 'fauxhai', '>= 2.1.0' diff --git a/Strainerfile b/Strainerfile deleted file mode 100644 index 1c9a3e0..0000000 --- a/Strainerfile +++ /dev/null @@ -1,5 +0,0 @@ -# Strainerfile -rubocop: rubocop $SANDBOX/$COOKBOOK -knife test: knife cookbook test $COOKBOOK -foodcritic: foodcritic -f any -t ~FC003 -t ~FC023 $SANDBOX/$COOKBOOK -chefspec: rspec --format documentation $SANDBOX/$COOKBOOK/spec diff --git a/metadata.rb b/metadata.rb index e8ade75..1e7b6bb 100644 --- a/metadata.rb +++ b/metadata.rb @@ -5,7 +5,7 @@ maintainer_email 'cookbooks@lists.tfoundry.com' license 'Apache 2.0' description 'The OpenStack Advanced Volume Management service Cinder.' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version '9.4.1' +version '10.0.0' recipe 'openstack-block-storage::api', 'Installs the cinder-api, sets up the cinder database, and cinder service/user/endpoints in keystone' recipe 'openstack-block-storage::client', 'Install packages required for cinder client' @@ -19,8 +19,8 @@ recipe 'openstack-block-storage::volume', 'Installs the cinder-volume end depends 'apt', '>= 2.3.8' -depends 'openstack-common', '~> 9.5' -depends 'openstack-identity', '~> 9.0' -depends 'openstack-image', '~> 9.0' +depends 'openstack-common', '~> 10.0' +depends 'openstack-identity', '~> 10.0' +depends 'openstack-image', '~> 10.0' depends 'selinux', '>= 0.7.2' depends 'python', '>= 1.4.6' diff --git a/spec/api_spec.rb b/spec/api_spec.rb index d7707f5..60de2d7 100644 --- a/spec/api_spec.rb +++ b/spec/api_spec.rb @@ -86,19 +86,19 @@ describe 'openstack-block-storage::api' do context 'endpoint related' do before do endpoint = double(port: 'port', host: 'host', scheme: 'scheme') - Chef::Recipe.any_instance.stub(:endpoint) + allow_any_instance_of(Chef::Recipe).to receive(:endpoint) .with('image-api') .and_return(endpoint) - Chef::Recipe.any_instance.stub(:endpoint) + allow_any_instance_of(Chef::Recipe).to receive(:endpoint) .with('identity-admin') .and_return(endpoint) - Chef::Recipe.any_instance.stub(:endpoint) + allow_any_instance_of(Chef::Recipe).to receive(:endpoint) .with('identity-api') .and_return(endpoint) - Chef::Recipe.any_instance.stub(:endpoint) + allow_any_instance_of(Chef::Recipe).to receive(:endpoint) .with('block-storage-api-bind') .and_return(endpoint) - Chef::Recipe.any_instance.stub(:auth_uri_transform) + allow_any_instance_of(Chef::Recipe).to receive(:auth_uri_transform) .and_return('auth_uri_transform') end diff --git a/spec/cinder_common_spec.rb b/spec/cinder_common_spec.rb index 5a500c9..efe7d8b 100644 --- a/spec/cinder_common_spec.rb +++ b/spec/cinder_common_spec.rb @@ -57,13 +57,13 @@ describe 'openstack-block-storage::cinder-common' do context 'template contents' do let(:test_pass) { 'test_pass' } before do - Chef::Recipe.any_instance.stub(:endpoint) + allow_any_instance_of(Chef::Recipe).to receive(:endpoint) .with('image-api') .and_return(double(host: 'glance_host_value', port: 'glance_port_value')) - Chef::Recipe.any_instance.stub(:endpoint) + allow_any_instance_of(Chef::Recipe).to receive(:endpoint) .with('block-storage-api-bind') .and_return(double(host: 'cinder_host_value', port: 'cinder_port_value')) - Chef::Recipe.any_instance.stub(:get_password) + allow_any_instance_of(Chef::Recipe).to receive(:get_password) .with('user', anything) .and_return(test_pass) end @@ -122,7 +122,7 @@ describe 'openstack-block-storage::cinder-common' do end it 'has a sql_connection attribute' do - Chef::Recipe.any_instance.stub(:db_uri) + allow_any_instance_of(Chef::Recipe).to receive(:db_uri) .with('block-storage', anything, '').and_return('sql_connection_value') expect(chef_run).to render_file(file.name) @@ -189,7 +189,7 @@ describe 'openstack-block-storage::cinder-common' do end it 'has a rabbit_hosts attribute' do - Chef::Recipe.any_instance.stub(:rabbit_servers) + allow_any_instance_of(Chef::Recipe).to receive(:rabbit_servers) .and_return('rabbit_servers_value') expect(chef_run).to render_file(file.name).with_content(/^rabbit_hosts=rabbit_servers_value$/) diff --git a/spec/scheduler_spec.rb b/spec/scheduler_spec.rb index 2de22d0..037d8c5 100644 --- a/spec/scheduler_spec.rb +++ b/spec/scheduler_spec.rb @@ -43,7 +43,7 @@ describe 'openstack-block-storage::scheduler' do end it 'creates cron metering default' do - ::Chef::Recipe.any_instance.stub(:search) + allow_any_instance_of(Chef::Recipe).to receive(:search) .with(:node, 'roles:os-block-storage-scheduler') .and_return([OpenStruct.new(name: 'fauxhai.local')]) node.set['openstack']['telemetry'] = true @@ -63,7 +63,7 @@ describe 'openstack-block-storage::scheduler' do it 'creates cron metering custom' do crontests = [[:minute, '50'], [:hour, '23'], [:day, '6'], [:weekday, '5'], [:month, '11'], [:user, 'foobar']] - ::Chef::Recipe.any_instance.stub(:search) + allow_any_instance_of(Chef::Recipe).to receive(:search) .with(:node, 'roles:os-block-storage-scheduler') .and_return([OpenStruct.new(name: 'foobar')]) node.set['openstack']['telemetry'] = true diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index a637f66..8f3c301 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -28,45 +28,45 @@ UBUNTU_OPTS = { shared_context 'block-storage-stubs' do before do - Chef::Recipe.any_instance.stub(:rabbit_servers) + allow_any_instance_of(Chef::Recipe).to receive(:rabbit_servers) .and_return('1.1.1.1:5672,2.2.2.2:5672') - Chef::Recipe.any_instance.stub(:get_password) + allow_any_instance_of(Chef::Recipe).to receive(:get_password) .with('service', anything) .and_return('') - Chef::Recipe.any_instance.stub(:get_password) + allow_any_instance_of(Chef::Recipe).to receive(:get_password) .with('db', anything) .and_return('') - Chef::Recipe.any_instance.stub(:get_secret) + allow_any_instance_of(Chef::Recipe).to receive(:get_secret) .with('openstack_identity_bootstrap_token') .and_return('bootstrap-token') - Chef::Recipe.any_instance.stub(:get_secret) + allow_any_instance_of(Chef::Recipe).to receive(:get_secret) .with('rbd_secret_uuid') .and_return('b0ff3bba-e07b-49b1-beed-09a45552b1ad') - Chef::Recipe.any_instance.stub(:get_secret) + allow_any_instance_of(Chef::Recipe).to receive(:get_secret) .with('openstack_vmware_secret_name') .and_return 'vmware_secret_name' - Chef::Recipe.any_instance.stub(:get_password) + allow_any_instance_of(Chef::Recipe).to receive(:get_password) .with('user', 'guest') .and_return('mq-pass') - Chef::Recipe.any_instance.stub(:get_password) + allow_any_instance_of(Chef::Recipe).to receive(:get_password) .with('user', 'solidfire_admin') .and_return('solidfire_testpass') - Chef::Recipe.any_instance.stub(:get_password) + allow_any_instance_of(Chef::Recipe).to receive(:get_password) .with('service', 'netapp') .and_return 'netapp-pass' - Chef::Recipe.any_instance.stub(:get_password) + allow_any_instance_of(Chef::Recipe).to receive(:get_password) .with('service', 'openstack-block-storage') .and_return('cinder-pass') - Chef::Recipe.any_instance.stub(:get_password) + allow_any_instance_of(Chef::Recipe).to receive(:get_password) .with('service', 'openstack_image_cephx_key') .and_return('cephx-key') - Chef::Recipe.any_instance.stub(:get_password) + allow_any_instance_of(Chef::Recipe).to receive(:get_password) .with('user', 'admin') .and_return('emc_test_pass') - Chef::Recipe.any_instance.stub(:get_password) + allow_any_instance_of(Chef::Recipe).to receive(:get_password) .with('user', 'ibmnas_admin') .and_return('test_pass') - Chef::Application.stub(:fatal!) + allow(Chef::Application).to receive(:fatal!) end end diff --git a/spec/volume_spec.rb b/spec/volume_spec.rb index 410b052..da31db1 100644 --- a/spec/volume_spec.rb +++ b/spec/volume_spec.rb @@ -342,7 +342,7 @@ describe 'openstack-block-storage::volume' do describe 'template contents' do before do - Chef::Recipe.any_instance.stub(:get_password) + allow_any_instance_of(Chef::Recipe).to receive(:get_password) .with('user', anything) .and_return('emc_test_pass') end