X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=manifests%2Fconfig.pp;h=373b8ad688edc9ee1d20eb270ca96c40d762e938;hb=refs%2Fchanges%2F86%2F63286%2F4;hp=2f16454c9c725a45a49678ec2fedf3e8c9f88534;hpb=787aa03ba61336cd2f71d86b16235da4d5416319;p=integration%2Fpackaging%2Fpuppet-opendaylight.git diff --git a/manifests/config.pp b/manifests/config.pp index 2f16454..373b8ad 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -20,14 +20,37 @@ class opendaylight::config { } # Configuration of ODL NB REST port to listen on - file { 'jetty.xml': - ensure => file, - path => '/opt/opendaylight/etc/jetty.xml', - # Set user:group owners - owner => 'odl', - group => 'odl', - # Use a template to populate the content - content => template('opendaylight/jetty.xml.erb'), + augeas {'ODL REST Port': + incl => '/opt/opendaylight/etc/jetty.xml', + context => '/files/opt/opendaylight/etc/jetty.xml/Configure', + lens => 'Xml.lns', + changes => [ + "set Call[2]/Arg/New/Set[#attribute[name='port']]/Property/#attribute/default ${opendaylight::odl_rest_port}"] + } + + if $opendaylight::odl_bind_ip != '0.0.0.0' { + # Configuration of ODL NB REST IP to listen on + augeas { 'ODL REST IP': + incl => '/opt/opendaylight/etc/jetty.xml', + context => '/files/opt/opendaylight/etc/jetty.xml/Configure', + lens => 'Xml.lns', + changes => [ + "set Call[1]/Arg/New/Set[#attribute[name='host']]/Property/#attribute/default ${opendaylight::odl_bind_ip}", + "set Call[2]/Arg/New/Set[#attribute[name='host']]/Property/#attribute/default ${opendaylight::odl_bind_ip}"] + } + + file { 'org.ops4j.pax.web.cfg': + ensure => file, + path => '/opt/opendaylight/etc/org.ops4j.pax.web.cfg', + # Set user:group owners + owner => 'odl', + group => 'odl', + } + -> file_line { 'org.ops4j.pax.web.cfg': + ensure => present, + path => '/opt/opendaylight/etc/org.ops4j.pax.web.cfg', + line => "org.ops4j.pax.web.listening.addresses = ${opendaylight::odl_bind_ip}" + } } # Set any custom log levels @@ -101,9 +124,9 @@ class opendaylight::config { } } - # Configure ACL security group - # Requires at least CentOS 7.3 for RHEL/CentOS systems - if ('odl-netvirt-openstack' in $opendaylight::features) { + if ('odl-netvirt-openstack' in $opendaylight::features or 'odl-netvirt-sfc' in $opendaylight::features) { + # Configure ACL security group + # Requires at least CentOS 7.3 for RHEL/CentOS systems if $opendaylight::security_group_mode == 'stateful' { if defined('$opendaylight::stateful_unsupported') and $opendaylight::stateful_unsupported { warning("Stateful is unsupported in ${::operatingsystemrelease} setting to 'learn'") @@ -135,10 +158,8 @@ class opendaylight::config { group => 'odl', content => template('opendaylight/netvirt-aclservice-config.xml.erb'), } - } - # Configure SNAT - if ('odl-netvirt-openstack' in $opendaylight::features) { + # Configure SNAT file { 'netvirt-natservice-config.xml': ensure => file, path => '/opt/opendaylight/etc/opendaylight/datastore/initial/config/netvirt-natservice-config.xml', @@ -149,6 +170,27 @@ class opendaylight::config { } } + # SFC Config + if ('odl-netvirt-sfc' in $opendaylight::features) { + file { 'netvirt-elanmanager-config.xml': + ensure => file, + path => '/opt/opendaylight/etc/opendaylight/datastore/initial/config/netvirt-elanmanager-config.xml', + owner => 'odl', + group => 'odl', + source => 'puppet:///modules/opendaylight/netvirt-elanmanager-config.xml', + require => File['/opt/opendaylight/etc/opendaylight/datastore/initial/config'], + } + + file { 'genius-itm-config.xml': + ensure => file, + path => '/opt/opendaylight/etc/opendaylight/datastore/initial/config/genius-itm-config.xml', + owner => 'odl', + group => 'odl', + source => 'puppet:///modules/opendaylight/genius-itm-config.xml', + require => File['/opt/opendaylight/etc/opendaylight/datastore/initial/config'], + } + } + #configure VPP routing node if ! empty($::opendaylight::vpp_routing_node) { file { 'org.opendaylight.groupbasedpolicy.neutron.vpp.mapper.startup.cfg':