Updating to Havana
* updating ChefSpec -> 3.0.2 * updating Foodcritic -> 3.0.3 * updating Berkshelf -> 2.0.10 Change-Id: If02a149ed353227d49ffc9860b0b2fad7fb77955
This commit is contained in:
@@ -2,6 +2,13 @@
|
|||||||
|
|
||||||
This file is used to list changes made in each version of cookbook-openstack-common.
|
This file is used to list changes made in each version of cookbook-openstack-common.
|
||||||
|
|
||||||
|
## 8.0.0:
|
||||||
|
* Upgrading to Havana
|
||||||
|
* Upgrading gems
|
||||||
|
* ChefSpec -> 3.0.2
|
||||||
|
* Foodcritic -> 3.0.3
|
||||||
|
* Berkshelf -> 2.0.10
|
||||||
|
|
||||||
## 0.4.7:
|
## 0.4.7:
|
||||||
### Bug
|
### Bug
|
||||||
* Change `#db_uri` to hand out UTF8 MySQL URIs; i.e. append '?charset=utf8' to mysql URIs
|
* Change `#db_uri` to hand out UTF8 MySQL URIs; i.e. append '?charset=utf8' to mysql URIs
|
||||||
|
|||||||
6
Gemfile
6
Gemfile
@@ -2,8 +2,8 @@ source "https://rubygems.org"
|
|||||||
|
|
||||||
gem "chef", "~> 11.4.4"
|
gem "chef", "~> 11.4.4"
|
||||||
gem "json", "<= 1.7.7" # chef 11 dependency
|
gem "json", "<= 1.7.7" # chef 11 dependency
|
||||||
gem "berkshelf", "~> 1.4.5"
|
gem "berkshelf", "~> 2.0.10"
|
||||||
gem "chefspec", "~> 1.2.0"
|
gem "chefspec", "~> 3.0.2"
|
||||||
gem "foodcritic"
|
gem "foodcritic", "~> 3.0.3"
|
||||||
gem "strainer"
|
gem "strainer"
|
||||||
gem "tailor"
|
gem "tailor"
|
||||||
|
|||||||
168
Gemfile.lock
168
Gemfile.lock
@@ -1,33 +1,41 @@
|
|||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
activesupport (3.2.13)
|
activesupport (3.2.16)
|
||||||
i18n (= 0.6.1)
|
i18n (~> 0.6, >= 0.6.4)
|
||||||
multi_json (~> 1.0)
|
multi_json (~> 1.0)
|
||||||
addressable (2.3.4)
|
addressable (2.3.5)
|
||||||
akami (1.2.0)
|
akami (1.2.0)
|
||||||
gyoku (>= 0.4.0)
|
gyoku (>= 0.4.0)
|
||||||
nokogiri (>= 1.4.0)
|
nokogiri (>= 1.4.0)
|
||||||
berkshelf (1.4.5)
|
berkshelf (2.0.10)
|
||||||
activesupport (>= 3.2.0)
|
activesupport (~> 3.2.0)
|
||||||
addressable
|
addressable (~> 2.3.4)
|
||||||
celluloid (>= 0.14.0)
|
buff-shell_out (~> 0.1)
|
||||||
chozo (>= 0.6.1)
|
chozo (>= 0.6.1)
|
||||||
faraday (>= 0.8.5)
|
faraday (>= 0.8.5)
|
||||||
hashie (>= 2.0.2)
|
hashie (>= 2.0.2)
|
||||||
json (>= 1.5.0)
|
minitar (~> 0.5.4)
|
||||||
minitar
|
rbzip2 (~> 0.2.0)
|
||||||
mixlib-config (~> 1.1)
|
retryable (~> 1.3.3)
|
||||||
mixlib-shellout (~> 1.1)
|
ridley (~> 1.5.0)
|
||||||
multi_json (~> 1.5)
|
solve (>= 0.5.0)
|
||||||
retryable
|
|
||||||
ridley (~> 0.12.4)
|
|
||||||
solve (>= 0.4.2)
|
|
||||||
thor (~> 0.18.0)
|
thor (~> 0.18.0)
|
||||||
yajl-ruby
|
buff-config (0.4.0)
|
||||||
|
buff-extensions (~> 0.3)
|
||||||
|
varia_model (~> 0.1)
|
||||||
|
buff-extensions (0.5.0)
|
||||||
|
buff-ignore (1.1.1)
|
||||||
|
buff-platform (0.1.0)
|
||||||
|
buff-ruby_engine (0.1.0)
|
||||||
|
buff-shell_out (0.1.1)
|
||||||
|
buff-ruby_engine (~> 0.1.0)
|
||||||
builder (3.2.2)
|
builder (3.2.2)
|
||||||
celluloid (0.14.1)
|
celluloid (0.14.1)
|
||||||
timers (>= 1.0.0)
|
timers (>= 1.0.0)
|
||||||
|
celluloid-io (0.14.1)
|
||||||
|
celluloid (>= 0.14.1)
|
||||||
|
nio4r (>= 0.4.5)
|
||||||
chef (11.4.4)
|
chef (11.4.4)
|
||||||
erubis
|
erubis
|
||||||
highline (>= 1.6.9)
|
highline (>= 1.6.9)
|
||||||
@@ -42,118 +50,111 @@ GEM
|
|||||||
ohai (>= 0.6.0)
|
ohai (>= 0.6.0)
|
||||||
rest-client (>= 1.0.4, < 1.7.0)
|
rest-client (>= 1.0.4, < 1.7.0)
|
||||||
yajl-ruby (~> 1.1)
|
yajl-ruby (~> 1.1)
|
||||||
chefspec (1.2.0)
|
chefspec (3.0.2)
|
||||||
chef (>= 10.0)
|
chef (~> 11.0)
|
||||||
erubis
|
fauxhai (~> 2.0)
|
||||||
fauxhai (>= 0.1.1, < 2.0)
|
rspec (~> 2.14)
|
||||||
minitest-chef-handler (>= 0.6.0)
|
|
||||||
rspec (~> 2.0)
|
|
||||||
chozo (0.6.1)
|
chozo (0.6.1)
|
||||||
activesupport (>= 3.2.0)
|
activesupport (>= 3.2.0)
|
||||||
hashie (>= 2.0.2)
|
hashie (>= 2.0.2)
|
||||||
multi_json (>= 1.3.0)
|
multi_json (>= 1.3.0)
|
||||||
ci_reporter (1.8.4)
|
diff-lcs (1.2.5)
|
||||||
builder (>= 2.1.2)
|
|
||||||
diff-lcs (1.2.4)
|
|
||||||
erubis (2.7.0)
|
erubis (2.7.0)
|
||||||
faraday (0.8.7)
|
faraday (0.8.8)
|
||||||
multipart-post (~> 1.1)
|
multipart-post (~> 1.2.0)
|
||||||
fauxhai (1.1.1)
|
fauxhai (2.0.0)
|
||||||
httparty
|
|
||||||
net-ssh
|
net-ssh
|
||||||
ohai
|
ohai
|
||||||
ffi (1.8.1)
|
ffi (1.9.3)
|
||||||
foodcritic (2.1.0)
|
foodcritic (3.0.3)
|
||||||
erubis
|
erubis
|
||||||
gherkin (~> 2.11.7)
|
gherkin (~> 2.11.7)
|
||||||
nokogiri (~> 1.5.4)
|
nokogiri (~> 1.5.4)
|
||||||
rak (~> 1.4)
|
rake
|
||||||
treetop (~> 1.4.10)
|
treetop (~> 1.4.10)
|
||||||
yajl-ruby (~> 1.1.0)
|
yajl-ruby (~> 1.1.0)
|
||||||
gherkin (2.11.8)
|
gherkin (2.11.8)
|
||||||
multi_json (~> 1.3)
|
multi_json (~> 1.3)
|
||||||
gssapi (1.0.3)
|
gssapi (1.0.3)
|
||||||
ffi (>= 1.0.1)
|
ffi (>= 1.0.1)
|
||||||
gyoku (1.0.0)
|
gyoku (1.1.0)
|
||||||
builder (>= 2.1.2)
|
builder (>= 2.1.2)
|
||||||
hashie (2.0.5)
|
hashie (2.0.5)
|
||||||
highline (1.6.19)
|
highline (1.6.20)
|
||||||
httparty (0.11.0)
|
httpclient (2.3.4.1)
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_xml (>= 0.5.2)
|
|
||||||
httpclient (2.2.0.2)
|
|
||||||
httpi (0.9.7)
|
httpi (0.9.7)
|
||||||
rack
|
rack
|
||||||
i18n (0.6.1)
|
i18n (0.6.9)
|
||||||
ipaddress (0.8.0)
|
ipaddress (0.8.0)
|
||||||
json (1.7.7)
|
json (1.7.7)
|
||||||
little-plugger (1.1.3)
|
little-plugger (1.1.3)
|
||||||
log_switch (0.4.0)
|
log_switch (0.4.0)
|
||||||
logging (1.6.2)
|
logging (1.8.1)
|
||||||
little-plugger (>= 1.1.3)
|
little-plugger (>= 1.1.3)
|
||||||
mime-types (1.23)
|
multi_json (>= 1.3.6)
|
||||||
|
mime-types (2.0)
|
||||||
minitar (0.5.4)
|
minitar (0.5.4)
|
||||||
minitest (4.7.4)
|
|
||||||
minitest-chef-handler (1.0.1)
|
|
||||||
chef
|
|
||||||
ci_reporter
|
|
||||||
minitest (~> 4.7.3)
|
|
||||||
mixlib-authentication (1.3.0)
|
mixlib-authentication (1.3.0)
|
||||||
mixlib-log
|
mixlib-log
|
||||||
mixlib-cli (1.3.0)
|
mixlib-cli (1.3.0)
|
||||||
mixlib-config (1.1.2)
|
mixlib-config (2.1.0)
|
||||||
mixlib-log (1.6.0)
|
mixlib-log (1.6.0)
|
||||||
mixlib-shellout (1.1.0)
|
mixlib-shellout (1.3.0)
|
||||||
multi_json (1.7.6)
|
multi_json (1.8.2)
|
||||||
multi_xml (0.5.4)
|
|
||||||
multipart-post (1.2.0)
|
multipart-post (1.2.0)
|
||||||
net-http-persistent (2.8)
|
net-http-persistent (2.9)
|
||||||
net-ssh (2.6.7)
|
net-ssh (2.7.0)
|
||||||
net-ssh-gateway (1.2.0)
|
net-ssh-gateway (1.2.0)
|
||||||
net-ssh (>= 2.6.5)
|
net-ssh (>= 2.6.5)
|
||||||
net-ssh-multi (1.1)
|
net-ssh-multi (1.1)
|
||||||
net-ssh (>= 2.1.4)
|
net-ssh (>= 2.1.4)
|
||||||
net-ssh-gateway (>= 0.99.0)
|
net-ssh-gateway (>= 0.99.0)
|
||||||
nokogiri (1.5.9)
|
nio4r (0.5.0)
|
||||||
|
nokogiri (1.5.10)
|
||||||
nori (1.1.5)
|
nori (1.1.5)
|
||||||
ohai (6.16.0)
|
ohai (6.20.0)
|
||||||
ipaddress
|
ipaddress
|
||||||
mixlib-cli
|
mixlib-cli
|
||||||
mixlib-config
|
mixlib-config
|
||||||
mixlib-log
|
mixlib-log
|
||||||
mixlib-shellout
|
mixlib-shellout
|
||||||
systemu
|
systemu (~> 2.5.2)
|
||||||
yajl-ruby
|
yajl-ruby
|
||||||
polyglot (0.3.3)
|
polyglot (0.3.3)
|
||||||
rack (1.5.2)
|
rack (1.5.2)
|
||||||
rak (1.4)
|
rake (10.1.0)
|
||||||
|
rbzip2 (0.2.0)
|
||||||
rest-client (1.6.7)
|
rest-client (1.6.7)
|
||||||
mime-types (>= 1.16)
|
mime-types (>= 1.16)
|
||||||
retryable (1.3.3)
|
retryable (1.3.3)
|
||||||
ridley (0.12.4)
|
ridley (1.5.3)
|
||||||
addressable
|
addressable
|
||||||
|
buff-config (~> 0.2)
|
||||||
|
buff-extensions (~> 0.3)
|
||||||
|
buff-ignore (~> 1.1)
|
||||||
|
buff-shell_out (~> 0.1)
|
||||||
celluloid (~> 0.14.0)
|
celluloid (~> 0.14.0)
|
||||||
chozo (>= 0.6.0)
|
celluloid-io (~> 0.14.0)
|
||||||
erubis
|
erubis
|
||||||
faraday (>= 0.8.4)
|
faraday (>= 0.8.4)
|
||||||
hashie (>= 2.0.2)
|
hashie (>= 2.0.2)
|
||||||
|
json (>= 1.7.7)
|
||||||
mixlib-authentication (>= 1.3.0)
|
mixlib-authentication (>= 1.3.0)
|
||||||
mixlib-config (>= 1.1.0)
|
|
||||||
mixlib-log (>= 1.3.0)
|
|
||||||
mixlib-shellout (>= 1.1.0)
|
|
||||||
net-http-persistent (>= 2.8)
|
net-http-persistent (>= 2.8)
|
||||||
net-ssh
|
net-ssh
|
||||||
|
nio4r (>= 0.5.0)
|
||||||
retryable
|
retryable
|
||||||
solve (>= 0.4.4)
|
solve (>= 0.4.4)
|
||||||
|
varia_model (~> 0.1)
|
||||||
winrm (~> 1.1.0)
|
winrm (~> 1.1.0)
|
||||||
rspec (2.13.0)
|
rspec (2.14.1)
|
||||||
rspec-core (~> 2.13.0)
|
rspec-core (~> 2.14.0)
|
||||||
rspec-expectations (~> 2.13.0)
|
rspec-expectations (~> 2.14.0)
|
||||||
rspec-mocks (~> 2.13.0)
|
rspec-mocks (~> 2.14.0)
|
||||||
rspec-core (2.13.1)
|
rspec-core (2.14.7)
|
||||||
rspec-expectations (2.13.0)
|
rspec-expectations (2.14.4)
|
||||||
diff-lcs (>= 1.1.3, < 2.0)
|
diff-lcs (>= 1.1.3, < 2.0)
|
||||||
rspec-mocks (2.13.1)
|
rspec-mocks (2.14.4)
|
||||||
rubyntlm (0.1.1)
|
rubyntlm (0.1.1)
|
||||||
savon (0.9.5)
|
savon (0.9.5)
|
||||||
akami (~> 1.0)
|
akami (~> 1.0)
|
||||||
@@ -163,12 +164,12 @@ GEM
|
|||||||
nokogiri (>= 1.4.0)
|
nokogiri (>= 1.4.0)
|
||||||
nori (~> 1.0)
|
nori (~> 1.0)
|
||||||
wasabi (~> 1.0)
|
wasabi (~> 1.0)
|
||||||
solve (0.4.4)
|
solve (0.8.2)
|
||||||
json
|
strainer (3.3.0)
|
||||||
strainer (2.1.0)
|
berkshelf (~> 2.0)
|
||||||
berkshelf (~> 1.3)
|
buff-platform (~> 0.1)
|
||||||
systemu (2.5.2)
|
systemu (2.5.2)
|
||||||
tailor (1.2.1)
|
tailor (1.3.1)
|
||||||
log_switch (>= 0.3.0)
|
log_switch (>= 0.3.0)
|
||||||
term-ansicolor (>= 1.0.5)
|
term-ansicolor (>= 1.0.5)
|
||||||
text-table (>= 1.2.2)
|
text-table (>= 1.2.2)
|
||||||
@@ -177,18 +178,21 @@ GEM
|
|||||||
text-table (1.2.3)
|
text-table (1.2.3)
|
||||||
thor (0.18.1)
|
thor (0.18.1)
|
||||||
timers (1.1.0)
|
timers (1.1.0)
|
||||||
tins (0.8.0)
|
tins (0.13.1)
|
||||||
treetop (1.4.14)
|
treetop (1.4.15)
|
||||||
polyglot
|
polyglot
|
||||||
polyglot (>= 0.3.1)
|
polyglot (>= 0.3.1)
|
||||||
uuidtools (2.1.4)
|
uuidtools (2.1.4)
|
||||||
|
varia_model (0.2.0)
|
||||||
|
buff-extensions (~> 0.2)
|
||||||
|
hashie (>= 2.0.2)
|
||||||
wasabi (1.0.0)
|
wasabi (1.0.0)
|
||||||
nokogiri (>= 1.4.0)
|
nokogiri (>= 1.4.0)
|
||||||
winrm (1.1.2)
|
winrm (1.1.3)
|
||||||
gssapi (~> 1.0.0)
|
gssapi (~> 1.0.0)
|
||||||
httpclient (~> 2.2.0.2)
|
httpclient (~> 2.2, >= 2.2.0.2)
|
||||||
logging (~> 1.6.1)
|
logging (~> 1.6, >= 1.6.1)
|
||||||
nokogiri (~> 1.5.0)
|
nokogiri (~> 1.5)
|
||||||
rubyntlm (~> 0.1.1)
|
rubyntlm (~> 0.1.1)
|
||||||
savon (= 0.9.5)
|
savon (= 0.9.5)
|
||||||
uuidtools (~> 2.1.2)
|
uuidtools (~> 2.1.2)
|
||||||
@@ -198,10 +202,10 @@ PLATFORMS
|
|||||||
ruby
|
ruby
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
berkshelf (~> 1.4.5)
|
berkshelf (~> 2.0.10)
|
||||||
chef (~> 11.4.4)
|
chef (~> 11.4.4)
|
||||||
chefspec (~> 1.2.0)
|
chefspec (~> 3.0.2)
|
||||||
foodcritic
|
foodcritic (~> 3.0.3)
|
||||||
json (<= 1.7.7)
|
json (<= 1.7.7)
|
||||||
strainer
|
strainer
|
||||||
tailor
|
tailor
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ default["openstack"]["secret"]["user_passwords_data_bag"] = "user_passwords"
|
|||||||
# needs.
|
# needs.
|
||||||
|
|
||||||
# The coordinated release of OpenStack codename
|
# The coordinated release of OpenStack codename
|
||||||
default["openstack"]["release"] = "grizzly"
|
default["openstack"]["release"] = "havana"
|
||||||
|
|
||||||
# The Ubuntu Cloud Archive has packages for multiple Ubuntu releases. For
|
# The Ubuntu Cloud Archive has packages for multiple Ubuntu releases. For
|
||||||
# more information, see: https://wiki.ubuntu.com/ServerTeam/CloudArchive.
|
# more information, see: https://wiki.ubuntu.com/ServerTeam/CloudArchive.
|
||||||
@@ -71,7 +71,7 @@ default["openstack"]["release"] = "grizzly"
|
|||||||
# the node["lsb"]["codename"] Ohai value and %release% will be replaced
|
# the node["lsb"]["codename"] Ohai value and %release% will be replaced
|
||||||
# by the value of node["openstack"]["release"]
|
# by the value of node["openstack"]["release"]
|
||||||
default["openstack"]["apt"]["uri"] = "http://ubuntu-cloud.archive.canonical.com/ubuntu"
|
default["openstack"]["apt"]["uri"] = "http://ubuntu-cloud.archive.canonical.com/ubuntu"
|
||||||
default["openstack"]["apt"]["components"] = [ "precise-updates/grizzly", "main" ]
|
default["openstack"]["apt"]["components"] = [ "precise-updates/#{node["openstack"]["release"]}", "main" ]
|
||||||
# For the SRU packaging, use this:
|
# For the SRU packaging, use this:
|
||||||
# default["openstack"]["apt"]["components"] = [ "%codename%-proposed/%release%", "main" ]
|
# default["openstack"]["apt"]["components"] = [ "%codename%-proposed/%release%", "main" ]
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ maintainer_email "cookbooks@lists.tfoundry.com"
|
|||||||
license "Apache 2.0"
|
license "Apache 2.0"
|
||||||
description "Common OpenStack attributes, libraries and recipes."
|
description "Common OpenStack attributes, libraries and recipes."
|
||||||
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
||||||
version "0.4.7"
|
version "8.0.0"
|
||||||
|
|
||||||
recipe "openstack-common", "Installs/Configures common recipes"
|
recipe "openstack-common", "Installs/Configures common recipes"
|
||||||
recipe "openstack-common::set_endpoints_by_interface", "Set endpoints by interface"
|
recipe "openstack-common::set_endpoints_by_interface", "Set endpoints by interface"
|
||||||
|
|||||||
@@ -78,11 +78,11 @@ when "suse"
|
|||||||
rm -f cloud.asc
|
rm -f cloud.asc
|
||||||
EOH
|
EOH
|
||||||
|
|
||||||
not_if { `rpm -qa gpg-pubkey*`.include? zypp["repo-key"].downcase }
|
not_if { Mixlib::ShellOut.new("rpm -qa gpg-pubkey*").include? zypp["repo-key"].downcase }
|
||||||
end
|
end
|
||||||
|
|
||||||
execute "add repository" do
|
execute "add repository" do
|
||||||
command "zypper addrepo --check #{repo_uri} #{repo_alias}"
|
command "zypper addrepo --check #{repo_uri} #{repo_alias}"
|
||||||
not_if { `zypper repos --export -`.include? repo_uri }
|
not_if { Mixlib::ShellOut.new("zypper repos --export -").include? repo_uri }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ require ::File.join ::File.dirname(__FILE__), "..", "libraries", "database"
|
|||||||
|
|
||||||
describe ::Openstack do
|
describe ::Openstack do
|
||||||
before do
|
before do
|
||||||
@chef_run = ::ChefSpec::ChefRunner.new ::CHEFSPEC_OPTS
|
@chef_run = ::ChefSpec::Runner.new ::CHEFSPEC_OPTS
|
||||||
@chef_run.converge "openstack-common::default"
|
@chef_run.converge "openstack-common::default"
|
||||||
@subject = ::Object.new.extend ::Openstack
|
@subject = ::Object.new.extend ::Openstack
|
||||||
@subject.stub :include_recipe
|
@subject.stub :include_recipe
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ describe "openstack-common::default" do
|
|||||||
describe "ubuntu" do
|
describe "ubuntu" do
|
||||||
before do
|
before do
|
||||||
opts = ::UBUNTU_OPTS.merge :step_into => ["apt_repository"]
|
opts = ::UBUNTU_OPTS.merge :step_into => ["apt_repository"]
|
||||||
@chef_run = ::ChefSpec::ChefRunner.new(opts) do |n|
|
@chef_run = ::ChefSpec::Runner.new(opts) do |n|
|
||||||
n.set["lsb"]["codename"] = "precise"
|
n.set["lsb"]["codename"] = "precise"
|
||||||
end
|
end
|
||||||
@chef_run.converge "openstack-common::default"
|
@chef_run.converge "openstack-common::default"
|
||||||
@@ -16,9 +16,9 @@ describe "openstack-common::default" do
|
|||||||
|
|
||||||
it "configures openstack repository" do
|
it "configures openstack repository" do
|
||||||
file = "/etc/apt/sources.list.d/openstack-ppa.list"
|
file = "/etc/apt/sources.list.d/openstack-ppa.list"
|
||||||
expected = "deb http://ubuntu-cloud.archive.canonical.com/ubuntu precise-updates/grizzly main"
|
expected = "deb http://ubuntu-cloud.archive.canonical.com/ubuntu precise-updates/havana main"
|
||||||
|
|
||||||
expect(@chef_run).to create_file_with_content file, expected
|
expect(@chef_run).to render_file(file).with_content(expected)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ require ::File.join ::File.dirname(__FILE__), "..", "libraries", "endpoints"
|
|||||||
|
|
||||||
describe ::Openstack do
|
describe ::Openstack do
|
||||||
before do
|
before do
|
||||||
@chef_run = ::ChefSpec::ChefRunner.new ::CHEFSPEC_OPTS
|
@chef_run = ::ChefSpec::Runner.new ::CHEFSPEC_OPTS
|
||||||
@chef_run.converge "openstack-common::set_endpoints_by_interface"
|
@chef_run.converge "openstack-common::set_endpoints_by_interface"
|
||||||
@subject = ::Object.new.extend ::Openstack
|
@subject = ::Object.new.extend ::Openstack
|
||||||
end
|
end
|
||||||
@@ -76,7 +76,7 @@ describe ::Openstack do
|
|||||||
end
|
end
|
||||||
it "endpoints recipe bind_interface sets host" do
|
it "endpoints recipe bind_interface sets host" do
|
||||||
@subject.stub('address_for').and_return '10.0.0.100'
|
@subject.stub('address_for').and_return '10.0.0.100'
|
||||||
chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS
|
chef_run = ::ChefSpec::Runner.new ::UBUNTU_OPTS
|
||||||
chef_run.node.set['openstack']['endpoints']['identity-api']['bind_interface'] = 'eth0'
|
chef_run.node.set['openstack']['endpoints']['identity-api']['bind_interface'] = 'eth0'
|
||||||
chef_run.node.set['network'] = {
|
chef_run.node.set['network'] = {
|
||||||
'interfaces' => {
|
'interfaces' => {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ require_relative "spec_helper"
|
|||||||
describe "openstack-common::logging" do
|
describe "openstack-common::logging" do
|
||||||
describe "ubuntu" do
|
describe "ubuntu" do
|
||||||
before do
|
before do
|
||||||
@chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS
|
@chef_run = ::ChefSpec::Runner.new ::UBUNTU_OPTS
|
||||||
@chef_run.converge "openstack-common::logging"
|
@chef_run.converge "openstack-common::logging"
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -13,7 +13,8 @@ describe "openstack-common::logging" do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it "has proper owner" do
|
it "has proper owner" do
|
||||||
expect(@dir).to be_owned_by "root", "root"
|
expect(@dir.owner).to eq("root")
|
||||||
|
expect(@dir.group).to eq("root")
|
||||||
end
|
end
|
||||||
|
|
||||||
it "has proper modes" do
|
it "has proper modes" do
|
||||||
@@ -27,7 +28,8 @@ describe "openstack-common::logging" do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it "has proper owner" do
|
it "has proper owner" do
|
||||||
expect(@chef_run.template(@file)).to be_owned_by "root", "root"
|
expect(@chef_run.template(@file).owner).to eq("root")
|
||||||
|
expect(@chef_run.template(@file).group).to eq("root")
|
||||||
end
|
end
|
||||||
|
|
||||||
it "has proper modes" do
|
it "has proper modes" do
|
||||||
@@ -36,7 +38,7 @@ describe "openstack-common::logging" do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it "templates openstack.logging.ignore block" do
|
it "templates openstack.logging.ignore block" do
|
||||||
chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS
|
chef_run = ::ChefSpec::Runner.new ::UBUNTU_OPTS
|
||||||
chef_run.converge "openstack-common::logging"
|
chef_run.converge "openstack-common::logging"
|
||||||
node = chef_run.node
|
node = chef_run.node
|
||||||
node.set["openstack"]["logging"]["ignore"] = {
|
node.set["openstack"]["logging"]["ignore"] = {
|
||||||
@@ -49,7 +51,7 @@ describe "openstack-common::logging" do
|
|||||||
"handlers = prod,debug",
|
"handlers = prod,debug",
|
||||||
"qualname = test.nova.api.openstack.wsgi"
|
"qualname = test.nova.api.openstack.wsgi"
|
||||||
]
|
]
|
||||||
expect(chef_run).to create_file_with_content @file, tmp.join("\n")
|
expect(chef_run).to render_file(@file).with_content(tmp.join("\n"))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ require ::File.join ::File.dirname(__FILE__), "..", "libraries", "network"
|
|||||||
|
|
||||||
describe ::Openstack do
|
describe ::Openstack do
|
||||||
before do
|
before do
|
||||||
@chef_run = ::ChefSpec::ChefRunner.new(::CHEFSPEC_OPTS) do |n|
|
@chef_run = ::ChefSpec::Runner.new(::CHEFSPEC_OPTS) do |n|
|
||||||
n.set["network"] = {
|
n.set["network"] = {
|
||||||
"interfaces" => {
|
"interfaces" => {
|
||||||
"lo" => {
|
"lo" => {
|
||||||
|
|||||||
@@ -3,14 +3,14 @@ require ::File.join ::File.dirname(__FILE__), "..", "libraries", "passwords"
|
|||||||
|
|
||||||
describe ::Openstack do
|
describe ::Openstack do
|
||||||
before do
|
before do
|
||||||
@chef_run = ::ChefSpec::ChefRunner.new ::CHEFSPEC_OPTS
|
@chef_run = ::ChefSpec::Runner.new ::CHEFSPEC_OPTS
|
||||||
@chef_run.converge "openstack-common::default"
|
@chef_run.converge "openstack-common::default"
|
||||||
@subject = ::Object.new.extend(::Openstack)
|
@subject = ::Object.new.extend(::Openstack)
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "#secret" do
|
describe "#secret" do
|
||||||
it "returns index param when developer_mode is true" do
|
it "returns index param when developer_mode is true" do
|
||||||
@chef_run = ::ChefSpec::ChefRunner.new(::CHEFSPEC_OPTS) do |n|
|
@chef_run = ::ChefSpec::Runner.new(::CHEFSPEC_OPTS) do |n|
|
||||||
n.set["openstack"]["developer_mode"] = true
|
n.set["openstack"]["developer_mode"] = true
|
||||||
end
|
end
|
||||||
@chef_run.converge "openstack-common::default"
|
@chef_run.converge "openstack-common::default"
|
||||||
@@ -30,7 +30,7 @@ describe ::Openstack do
|
|||||||
|
|
||||||
describe "#service_password" do
|
describe "#service_password" do
|
||||||
it "returns index param when developer_mode is true" do
|
it "returns index param when developer_mode is true" do
|
||||||
@chef_run = ::ChefSpec::ChefRunner.new(::CHEFSPEC_OPTS) do |n|
|
@chef_run = ::ChefSpec::Runner.new(::CHEFSPEC_OPTS) do |n|
|
||||||
n.set["openstack"]["developer_mode"] = true
|
n.set["openstack"]["developer_mode"] = true
|
||||||
end
|
end
|
||||||
@chef_run.converge "openstack-common::default"
|
@chef_run.converge "openstack-common::default"
|
||||||
@@ -50,7 +50,7 @@ describe ::Openstack do
|
|||||||
|
|
||||||
describe "#db_password" do
|
describe "#db_password" do
|
||||||
it "returns index param when developer_mode is true" do
|
it "returns index param when developer_mode is true" do
|
||||||
@chef_run = ::ChefSpec::ChefRunner.new(::CHEFSPEC_OPTS) do |n|
|
@chef_run = ::ChefSpec::Runner.new(::CHEFSPEC_OPTS) do |n|
|
||||||
n.set["openstack"]["developer_mode"] = true
|
n.set["openstack"]["developer_mode"] = true
|
||||||
end
|
end
|
||||||
@chef_run.converge "openstack-common::default"
|
@chef_run.converge "openstack-common::default"
|
||||||
@@ -70,7 +70,7 @@ describe ::Openstack do
|
|||||||
|
|
||||||
describe "#user_password" do
|
describe "#user_password" do
|
||||||
it "returns index param when developer_mode is true" do
|
it "returns index param when developer_mode is true" do
|
||||||
@chef_run = ::ChefSpec::ChefRunner.new(::CHEFSPEC_OPTS) do |n|
|
@chef_run = ::ChefSpec::Runner.new(::CHEFSPEC_OPTS) do |n|
|
||||||
n.set["openstack"]["developer_mode"] = true
|
n.set["openstack"]["developer_mode"] = true
|
||||||
end
|
end
|
||||||
@chef_run.converge "openstack-common::default"
|
@chef_run.converge "openstack-common::default"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ require ::File.join ::File.dirname(__FILE__), "..", "libraries", "search"
|
|||||||
|
|
||||||
describe ::Openstack do
|
describe ::Openstack do
|
||||||
before do
|
before do
|
||||||
@chef_run = ::ChefSpec::ChefRunner.new(::CHEFSPEC_OPTS) do |n|
|
@chef_run = ::ChefSpec::Runner.new(::CHEFSPEC_OPTS) do |n|
|
||||||
n.set["openstack"]["mq"] = {
|
n.set["openstack"]["mq"] = {
|
||||||
"server_role" => "openstack-ops-mq",
|
"server_role" => "openstack-ops-mq",
|
||||||
"port" => 5672
|
"port" => 5672
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ require_relative "spec_helper"
|
|||||||
describe "openstack-common::sysctl" do
|
describe "openstack-common::sysctl" do
|
||||||
describe "ubuntu" do
|
describe "ubuntu" do
|
||||||
before do
|
before do
|
||||||
@chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS
|
@chef_run = ::ChefSpec::Runner.new ::UBUNTU_OPTS
|
||||||
@chef_run.converge "openstack-common::sysctl"
|
@chef_run.converge "openstack-common::sysctl"
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -13,7 +13,8 @@ describe "openstack-common::sysctl" do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it "has proper owner" do
|
it "has proper owner" do
|
||||||
expect(@file).to be_owned_by "root", "root"
|
expect(@file.owner).to eq("root")
|
||||||
|
expect(@file.group).to eq("root")
|
||||||
end
|
end
|
||||||
|
|
||||||
it "has proper modes" do
|
it "has proper modes" do
|
||||||
@@ -21,13 +22,13 @@ describe "openstack-common::sysctl" do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it "sets the all.rp_filter" do
|
it "sets the all.rp_filter" do
|
||||||
expect(@chef_run).to create_file_with_content @file.name,
|
match = 'net.ipv4.conf.all.rp_filter = 0'
|
||||||
'net.ipv4.conf.all.rp_filter = 0'
|
expect(@chef_run).to render_file(@file.name).with_content(match)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "sets the default.rp_filter" do
|
it "sets the default.rp_filter" do
|
||||||
expect(@chef_run).to create_file_with_content @file.name,
|
match = 'net.ipv4.conf.default.rp_filter = 0'
|
||||||
'net.ipv4.conf.default.rp_filter = 0'
|
expect(@chef_run).to render_file(@file.name).with_content(match)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user