[openstack-puppet-modules/f21] Updated patches from f21-patches
Ivan Chavero
ichavero at fedoraproject.org
Thu Dec 11 00:16:21 UTC 2014
commit 02a14eec8cc61577d4fb6f94be7c6f1450ae0717
Author: Ivan Chavero <ichavero at redhat.com>
Date: Wed Dec 10 16:51:07 2014 -0700
Updated patches from f21-patches
...-Fix-the-subnet-dhcp-enable-disable-param.patch | 82 ++++++++++++++++++++
openstack-puppet-modules.spec | 2 +
2 files changed, 84 insertions(+), 0 deletions(-)
---
diff --git a/0025-Fix-the-subnet-dhcp-enable-disable-param.patch b/0025-Fix-the-subnet-dhcp-enable-disable-param.patch
new file mode 100644
index 0000000..fd6bfa0
--- /dev/null
+++ b/0025-Fix-the-subnet-dhcp-enable-disable-param.patch
@@ -0,0 +1,82 @@
+From ad51a20ab33ecaa9041278ade40141810f3cb096 Mon Sep 17 00:00:00 2001
+From: Mehdi Abaakouk <mehdi.abaakouk at enovance.com>
+Date: Fri, 22 Aug 2014 11:09:40 +0200
+Subject: [PATCH] Fix the subnet dhcp enable/disable param
+
+neutron subnet-create/update use --enable-dhcp and --disable-dhcp
+to manage the dhcp of the subnet
+
+Change-Id: I4c19a770adba2c9eb601e4f389964d3da49cc93e
+---
+ .../lib/puppet/provider/neutron_subnet/neutron.rb | 12 +++++++++---
+ .../unit/provider/neutron_subnet/neutron_spec.rb | 22 +++++++++++++++++++++-
+ 2 files changed, 30 insertions(+), 4 deletions(-)
+
+diff --git a/neutron/lib/puppet/provider/neutron_subnet/neutron.rb b/neutron/lib/puppet/provider/neutron_subnet/neutron.rb
+index 25dfbbb..6679e88 100644
+--- a/neutron/lib/puppet/provider/neutron_subnet/neutron.rb
++++ b/neutron/lib/puppet/provider/neutron_subnet/neutron.rb
+@@ -101,8 +101,10 @@ Puppet::Type.type(:neutron_subnet).provide(
+ end
+ end
+
+- if @resource[:enable_dhcp]
+- opts << "--enable-dhcp=#{@resource[:enable_dhcp]}"
++ if @resource[:enable_dhcp] == 'False'
++ opts << "--disable-dhcp"
++ else
++ opts << "--enable-dhcp"
+ end
+
+ if @resource[:allocation_pools]
+@@ -175,7 +177,11 @@ Puppet::Type.type(:neutron_subnet).provide(
+ end
+
+ def enable_dhcp=(value)
+- auth_neutron('subnet-update', "--enable-dhcp=#{value}", name)
++ if value == 'False'
++ auth_neutron('subnet-update', "--disable-dhcp", name)
++ else
++ auth_neutron('subnet-update', "--enable-dhcp", name)
++ end
+ end
+
+ def dns_nameservers=(values)
+diff --git a/neutron/spec/unit/provider/neutron_subnet/neutron_spec.rb b/neutron/spec/unit/provider/neutron_subnet/neutron_spec.rb
+index c2a6583..ed49cd6 100644
+--- a/neutron/spec/unit/provider/neutron_subnet/neutron_spec.rb
++++ b/neutron/spec/unit/provider/neutron_subnet/neutron_spec.rb
+@@ -51,7 +51,7 @@ describe provider_class do
+
+ it 'should call subnet-update to change enable_dhcp' do
+ provider.expects(:auth_neutron).with('subnet-update',
+- '--enable-dhcp=True',
++ '--enable-dhcp',
+ subnet_name)
+ provider.enable_dhcp=('True')
+ end
+@@ -84,4 +84,24 @@ describe provider_class do
+ end
+ end
+
++ describe 'when updating a subnet (reverse)' do
++ let :subnet_attrs_mod do
++ subnet_attrs.merge!({:enable_dhcp => 'True'})
++ end
++ let :resource do
++ Puppet::Type::Neutron_subnet.new(subnet_attrs_mod)
++ end
++
++ let :provider do
++ provider_class.new(resource)
++ end
++
++
++ it 'should call subnet-update to change enable_dhcp' do
++ provider.expects(:auth_neutron).with('subnet-update',
++ '--disable-dhcp',
++ subnet_name)
++ provider.enable_dhcp=('False')
++ end
++ end
+ end
diff --git a/openstack-puppet-modules.spec b/openstack-puppet-modules.spec
index d030d49..db09db4 100644
--- a/openstack-puppet-modules.spec
+++ b/openstack-puppet-modules.spec
@@ -33,6 +33,7 @@ Patch0021: 0021-neutron-Fixed-manage_service-feature.patch
Patch0022: 0022-nova-vlan-is-not-the-same-as-vlan_start.patch
Patch0023: 0023-neutron-New-manifest-file-to-deploy-Cisco-N1KV-VEM.patch
Patch0024: 0024-vswitch-Fixed-issue-with-vlan-on-redhat-provider.patch
+Patch0025: 0025-Fix-the-subnet-dhcp-enable-disable-param.patch
BuildArch: noarch
Requires: rubygem-json
@@ -69,6 +70,7 @@ OpenStack via installers using Puppet configuration tool.
%patch0022 -p1
%patch0023 -p1
%patch0024 -p1
+%patch0025 -p1
find %{_builddir}/%{name}-%{version}/ -type f -name ".*" -exec rm {} +
find %{_builddir}/%{name}-%{version}/ -size 0 -exec rm {} +
More information about the scm-commits
mailing list