From 7edbb3249294241db05316b34c31e9cce01cf9ee Mon Sep 17 00:00:00 2001 From: Lukas Bezdicka Date: Mon, 8 Jun 2015 15:57:53 +0200 Subject: [PATCH] Explicitly say that ovs_redhat parent is ovs Fix coding error where puppet autopreloaded provider before instead of the provider being specifically defined. This fixes puppet 4 error: Could not find parent provider ovs_redhat of ovs_redhat_el6 Change-Id: I96931b67dbc18087abe7d673b202ef976bee4f83 --- lib/puppet/provider/vs_port/ovs_redhat.rb | 7 ++++++- lib/puppet/provider/vs_port/ovs_redhat_el6.rb | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/puppet/provider/vs_port/ovs_redhat.rb b/lib/puppet/provider/vs_port/ovs_redhat.rb index 41f64454..c4a3205c 100644 --- a/lib/puppet/provider/vs_port/ovs_redhat.rb +++ b/lib/puppet/provider/vs_port/ovs_redhat.rb @@ -1,4 +1,5 @@ require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', '..', 'puppetx', 'redhat', 'ifcfg.rb')) +require File.expand_path(File.join(File.dirname(__FILE__), '.','ovs.rb')) BASE = '/etc/sysconfig/network-scripts/ifcfg-' @@ -10,7 +11,11 @@ DEFAULT = { 'NM_CONTROLLED' => 'no', 'NOZEROCONF' => 'yes' } -Puppet::Type.type(:vs_port).provide(:ovs_redhat, :parent => :ovs) do +Puppet::Type.type(:vs_port).provide( + :ovs_redhat, + :parent => Puppet::Type.type(:vs_port).provider(:ovs) +) do + desc 'Openvswitch port manipulation for RedHat OSes family' confine :osfamily => :redhat diff --git a/lib/puppet/provider/vs_port/ovs_redhat_el6.rb b/lib/puppet/provider/vs_port/ovs_redhat_el6.rb index bb6edccc..514e1afd 100644 --- a/lib/puppet/provider/vs_port/ovs_redhat_el6.rb +++ b/lib/puppet/provider/vs_port/ovs_redhat_el6.rb @@ -1,6 +1,9 @@ require File.expand_path(File.join(File.dirname(__FILE__), '.','ovs_redhat.rb')) -Puppet::Type.type(:vs_port).provide(:ovs_redhat_el6, :parent => :ovs_redhat) do +Puppet::Type.type(:vs_port).provide( + :ovs_redhat_el6, + :parent => Puppet::Type.type(:vs_port).provider(:ovs_redhat) +) do desc 'Openvswitch port manipulation for RedHat OSes family' confine :osfamily => :redhat, :operatingsystemmajrelease => 6