Fix upper case checks for SRIOV interface
Allow using upper case names for SRIOV interface names.
Fixes bug 1848483
Change-Id: I2d2cb42d87371f5807a4527eef22425416d4a774
(cherry picked from commit f5daa76982
)
This commit is contained in:
parent
697e7f498d
commit
7c9561bd5b
@ -4,7 +4,7 @@ Puppet::Type.newtype(:sriov_vf_config) do
|
||||
|
||||
newparam(:name) do
|
||||
desc "sriov_numvfs conf as <physical_network>:<number_of_vfs>:<mode> format"
|
||||
newvalues(/^[a-z0-9\-_]+:[0-9]+(:(switchdev|legacy))?$/)
|
||||
newvalues(/^[a-zA-Z0-9\-_]+:[0-9]+(:(switchdev|legacy))?$/)
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -0,0 +1,3 @@
|
||||
---
|
||||
fixes:
|
||||
- Allow using upper case names for SRIOV interface names.
|
@ -8,6 +8,12 @@ describe 'Puppet::Type.type(:sriov_vf_config)' do
|
||||
:ensure => 'present'
|
||||
)}.not_to raise_error
|
||||
end
|
||||
it 'should allow name to be passed' do
|
||||
expect{Puppet::Type.type(:sriov_vf_config).new(
|
||||
:name => 'eTH0:10',
|
||||
:ensure => 'present'
|
||||
)}.not_to raise_error
|
||||
end
|
||||
it 'should allow name to be passed with -' do
|
||||
expect{Puppet::Type.type(:sriov_vf_config).new(
|
||||
:name => 'eth-0:10',
|
||||
|
Loading…
Reference in New Issue
Block a user