summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorFeng Pan <fpan@redhat.com>2017-09-17 22:47:51 -0400
committerFeng Pan <fpan@redhat.com>2017-09-17 23:09:45 -0400
commitdcda81db3eb61bdf69751ce6963b564abf7b7e0c (patch)
treedbef777092fad9e863f12f7486eb4f92487d7d79 /lib
parenta96d2dfb135f93a74f070d1c27374351f5b064a4 (diff)
Add vhost-user configurations
This patch adds capability for configuring the following options in vhost-user section: - coalesce-frames - coalesce-time - dont-dump-memory JIRA: PUP-8 Change-Id: I906e7d3c937d2f1133e2bfc0838c16063b535b87 Signed-off-by: Feng Pan <fpan@redhat.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/provider/vpp_config/vpp.rb2
-rw-r--r--lib/puppet/type/vpp_config.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/puppet/provider/vpp_config/vpp.rb b/lib/puppet/provider/vpp_config/vpp.rb
index eb49fe3..767e96d 100644
--- a/lib/puppet/provider/vpp_config/vpp.rb
+++ b/lib/puppet/provider/vpp_config/vpp.rb
@@ -16,7 +16,7 @@ Puppet::Type.type(:vpp_config).provide(:vpp) do
end
if @dev
- @search_regex = /^\s*dev\s+#{@dev}\s*({[^}]*})?/
+ @search_regex = /^\s*dev\s+#{@dev}\s*{([^}]*)}?/
else
@search_regex = /^\s*#{@real_setting}\s+(\S+)?/
end
diff --git a/lib/puppet/type/vpp_config.rb b/lib/puppet/type/vpp_config.rb
index 17c910f..bfb511b 100644
--- a/lib/puppet/type/vpp_config.rb
+++ b/lib/puppet/type/vpp_config.rb
@@ -7,7 +7,7 @@ Puppet::Type.newtype(:vpp_config) do
newproperty(:value) do
munge do |value|
- value.strip if value.is_a? String
+ value.to_s.strip
end
end