- if $compute == 'True' {
- exec { 'patch_ovs_agent':
- command => "cp ${plugin_dir}/files/neutron-plugin-openvswitch-agent.conf /etc/init/neutron-plugin-openvswitch-agent.conf",
- path => ['/usr/bin','/bin'],
- user => root,
- }
-
- service {"${openvswitch_agent}":
- ensure => 'running',
- require => [ Exec['restart_ovs'], Service["${openvswitch_service_name}"], Exec['patch_ovs_agent'] ],
- }
-
- exec { "ovs-vsctl --no-wait set Open_vSwitch . other_config:pmd-cpu-mask=${ovs_pmd_core_mask}":
- path => ['/usr/bin','/bin'],
- user => root,
- require => Service["${openvswitch_agent}"],
- }
+ # common part
+ exec {'adapt_ml2_conf_mechanism_driver':
+ command => "sudo crudini --set ${ml2_conf} ml2 mechanism_drivers ovsdpdk",
+ path => ['/usr/bin','/bin'],
+ user => root,
+ onlyif => "test -f ${ml2_conf}",
+ require => Package['crudini'],