Bug fix pyparsing upgrade for python quantum client

The python-quantumclient package may not include the correct
version of pyparsing in its dependencies, requiring us to
ensure that it is upgraded to the latest version prior to usage.
Needed to correct tests to pass openstack-common 0.4.0 changes.

Change-Id: Ia8507a5fe94322ff3106d12d161dcedf2ee19fdd
This commit is contained in:
John Dewey 2013-08-12 17:49:21 -07:00
parent 10f35a4c67
commit 4c428ad08c
7 changed files with 33 additions and 24 deletions

View File

@ -6,12 +6,12 @@
"openstack-identity": {
"locked_version": "7.0.0",
"git": "https://github.com/stackforge/cookbook-openstack-identity.git",
"ref": "54e05e5f2e6f57934310c10d418ab263a9eb14bf"
"ref": "b881af26095cfa869a6970067c49597a0ee63586"
},
"openstack-common": {
"locked_version": "0.3.5",
"locked_version": "0.4.3",
"git": "https://github.com/stackforge/cookbook-openstack-common.git",
"ref": "4af229d56319b44945fe9e8ebd2ab2aa87b29c83"
"ref": "eb5eed7126b6a6efbaf803e8a594d610cf661e97"
},
"database": {
"locked_version": "1.4.0"

View File

@ -720,7 +720,7 @@ when "ubuntu"
"nova_network_packages" => [ "nova-network" ],
"quantum_lb_packages" => ["quantum-lbaas-agent", "haproxy"],
"quantum_packages" => [ "quantum-common", "python-pyparsing", "python-cliff" ],
"quantum_client_packages" => [ "python-quantumclient" ],
"quantum_client_packages" => [ "python-quantumclient", "python-pyparsing" ],
"quantum_dhcp_packages" => [ "quantum-dhcp-agent" ],
"quantum_dhcp_build_packages" => [ "build-essential", "pkg-config", "libidn11-dev", "libdbus-1-dev", "libnetfilter-conntrack-dev", "gettext" ],
"quantum_l3_packages" => [ "quantum-l3-agent" ],

View File

@ -17,4 +17,3 @@ depends "openstack-identity", "~> 7.0"
depends "openstack-common", "~> 0.4.0"
depends "mysql"
depends "postgresql"
depends "python"

View File

@ -127,21 +127,12 @@ else
local_ip = address_for node["openstack"]["network"]["openvswitch"]["local_ip_interface"]
end
# https://bugs.launchpad.net/neutron/+bug/1111572
platform_options["quantum_client_packages"].each do |pkg|
package pkg do
action :install
action :upgrade
options platform_options["package_overrides"]
notifies :upgrade, "python_pip[python-quantumclient]", :immediately
end
end
if platform?("ubuntu", "debian")
include_recipe "python::pip"
end
python_pip "python-quantumclient" do
action :nothing
only_if { platform?("ubuntu", "debian") }
end
# all recipes include common.rb, and some servers
# may just be running a subset of agents (like l3_agent)

19
spec/common_spec.rb Normal file
View File

@ -0,0 +1,19 @@
require_relative 'spec_helper'
describe "openstack-network::common" do
describe "ubuntu" do
before do
quantum_stubs
@chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS
@chef_run.converge "openstack-network::common"
end
it "upgrades python quantumclient" do
expect(@chef_run).to upgrade_package "python-quantumclient"
end
it "upgrades python pyparsing" do
expect(@chef_run).to upgrade_package "python-pyparsing"
end
end
end

View File

@ -14,7 +14,7 @@ describe "openstack-network::identity_registration" do
).to_hash
expect(resource).to include(
:auth_uri => "https://127.0.0.1:35357/v2.0",
:auth_uri => "http://127.0.0.1:35357/v2.0",
:bootstrap_token => "bootstrap-token",
:service_type => "network",
:service_description => "OpenStack Network Service",
@ -29,13 +29,13 @@ describe "openstack-network::identity_registration" do
).to_hash
expect(resource).to include(
:auth_uri => "https://127.0.0.1:35357/v2.0",
:auth_uri => "http://127.0.0.1:35357/v2.0",
:bootstrap_token => "bootstrap-token",
:service_type => "network",
:endpoint_region => "RegionOne",
:endpoint_adminurl => "https://127.0.0.1:9696",
:endpoint_internalurl => "https://127.0.0.1:9696",
:endpoint_publicurl => "https://127.0.0.1:9696",
:endpoint_adminurl => "http://127.0.0.1:9696",
:endpoint_internalurl => "http://127.0.0.1:9696",
:endpoint_publicurl => "http://127.0.0.1:9696",
:action => [:create_endpoint]
)
end
@ -47,7 +47,7 @@ describe "openstack-network::identity_registration" do
).to_hash
expect(resource).to include(
:auth_uri => "https://127.0.0.1:35357/v2.0",
:auth_uri => "http://127.0.0.1:35357/v2.0",
:bootstrap_token => "bootstrap-token",
:tenant_name => "service",
:tenant_description => "Service Tenant",
@ -62,7 +62,7 @@ describe "openstack-network::identity_registration" do
).to_hash
expect(resource).to include(
:auth_uri => "https://127.0.0.1:35357/v2.0",
:auth_uri => "http://127.0.0.1:35357/v2.0",
:bootstrap_token => "bootstrap-token",
:tenant_name => "service",
:user_name => "quantum",
@ -78,7 +78,7 @@ describe "openstack-network::identity_registration" do
).to_hash
expect(resource).to include(
:auth_uri => "https://127.0.0.1:35357/v2.0",
:auth_uri => "http://127.0.0.1:35357/v2.0",
:bootstrap_token => "bootstrap-token",
:tenant_name => "service",
:role_name => "admin",

View File

@ -30,7 +30,7 @@ describe 'openstack-network::metadata_agent' do
it "sets auth url correctly" do
expect(@chef_run).to create_file_with_content @file.name,
"auth_url = https://127.0.0.1:5000/v2.0"
"auth_url = http://127.0.0.1:5000/v2.0"
end
it "sets auth region correctly" do
expect(@chef_run).to create_file_with_content @file.name,