aboutsummaryrefslogtreecommitdiffstats
path: root/manifests/profile/base/neutron/sriov.pp
blob: 24c7b63c33bf8ae397f793af64370b1b06c06a8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Copyright 2016 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# == Class: tripleo::profile::base::neutron::sriov
#
# Neutron SR-IOV nic Agent profile for tripleo
#
# === Parameters
#
# [*step*]
#   (Optional) The current step in deployment. See tripleo-heat-templates
#   for more details.
#   Defaults to hiera('step')
#
# [*mechanism_drivers*]
#   (Optional) The mechanism drivers to use with the Ml2 plugin
#   Defaults to hiera('neutron::plugins::ml2::mechanism_drivers')
#

class tripleo::profile::base::neutron::sriov(
  $step               = hiera('step'),
  $mechanism_drivers  = hiera('neutron::plugins::ml2::mechanism_drivers'),
) {

  include ::tripleo::profile::base::neutron

  if $step >= 4 {
    if 'sriovnicswitch' in $mechanism_drivers  {
      include ::neutron::agents::ml2::sriov
      include ::tripleo::host::sriov
    }
  }

}
bscriptionNeutronDhcp: default: 'overcloud-neutron-dhcp' type: string NeutronDhcpAgentLoggingSource: type: json default: tag: openstack.neutron.agent.dhcp path: /var/log/neutron/dhcp-agent.log NeutronDhcpAgentDnsmasqDnsServers: default: [] description: List of servers to use as dnsmasq forwarders type: comma_delimited_list resources: NeutronBase: type: ./neutron-base.yaml properties: ServiceNetMap: {get_param: ServiceNetMap} DefaultPasswords: {get_param: DefaultPasswords} EndpointMap: {get_param: EndpointMap} outputs: role_data: description: Role data for the Neutron DHCP agent service. value: service_name: neutron_dhcp monitoring_subscription: {get_param: MonitoringSubscriptionNeutronDhcp} logging_source: {get_param: NeutronDhcpAgentLoggingSource} logging_groups: - neutron config_settings: map_merge: - get_attr: [NeutronBase, role_data, config_settings] - neutron::agents::dhcp::enable_isolated_metadata: {get_param: NeutronEnableIsolatedMetadata} neutron::agents::dhcp::enable_force_metadata: {get_param: NeutronEnableForceMetadata} neutron::agents::dhcp::enable_metadata_network: {get_param: NeutronEnableMetadataNetwork} neutron::agents::dhcp::dnsmasq_dns_servers: {get_param: NeutronDhcpAgentDnsmasqDnsServers} tripleo.neutron_dhcp.firewall_rules: '115 neutron dhcp input': proto: 'udp' dport: 67 '116 neutron dhcp output': proto: 'udp' chain: 'OUTPUT' dport: 68 step_config: | include tripleo::profile::base::neutron::dhcp upgrade_tasks: - name: Check if neutron_dhcp_agent is deployed command: systemctl is-enabled neutron-dhcp-agent tags: common ignore_errors: True register: neutron_dhcp_agent_enabled - name: "PreUpgrade step0,validation: Check service neutron-dhcp-agent is running" shell: /usr/bin/systemctl show 'neutron-dhcp-agent' --property ActiveState | grep '\bactive\b' when: neutron_dhcp_agent_enabled.rc == 0 tags: step0,validation - name: Stop neutron_dhcp service tags: step1 when: neutron_dhcp_agent_enabled.rc == 0 service: name=neutron-dhcp-agent state=stopped