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
This commit is contained in:
Lukas Bezdicka 2015-06-08 15:57:53 +02:00
parent a0cc00d98e
commit 7edbb32492
2 changed files with 10 additions and 2 deletions

View File

@ -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__), '..', '..', '..', 'puppetx', 'redhat', 'ifcfg.rb'))
require File.expand_path(File.join(File.dirname(__FILE__), '.','ovs.rb'))
BASE = '/etc/sysconfig/network-scripts/ifcfg-' BASE = '/etc/sysconfig/network-scripts/ifcfg-'
@ -10,7 +11,11 @@ DEFAULT = {
'NM_CONTROLLED' => 'no', 'NM_CONTROLLED' => 'no',
'NOZEROCONF' => 'yes' } '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' desc 'Openvswitch port manipulation for RedHat OSes family'
confine :osfamily => :redhat confine :osfamily => :redhat

View File

@ -1,6 +1,9 @@
require File.expand_path(File.join(File.dirname(__FILE__), '.','ovs_redhat.rb')) 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' desc 'Openvswitch port manipulation for RedHat OSes family'
confine :osfamily => :redhat, :operatingsystemmajrelease => 6 confine :osfamily => :redhat, :operatingsystemmajrelease => 6