Puppet Class: tripleo::host::liquidio::compute

Defined in:
manifests/host/liquidio/compute.pp

Overview

Parameters:

  • vf_nums (Any)
  • configure_mode (Any)
  • bonding_options (Any)
  • enable_bonding (Any)
  • provider_mappings (Any)
  • tenant_subnet (Any) (defaults to: hiera('tenant_subnet'))
  • step (Any) (defaults to: Integer(hiera('step')))
  • ovn_dbs_vip (Any) (defaults to: hiera('ovn_dbs_vip', undef))
  • controller_virtual_ip (Any) (defaults to: hiera('controller_virtual_ip', undef))
  • pci_passthrough (Any) (defaults to: hiera('nova::compute::pci::passthrough', undef))


48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# File 'manifests/host/liquidio/compute.pp', line 48

class tripleo::host::liquidio::compute (
  $vf_nums,
  $configure_mode,
  $bonding_options,
  $enable_bonding,
  $provider_mappings,
  $tenant_subnet         = hiera('tenant_subnet'),
  $step                  = Integer(hiera('step')),
  $ovn_dbs_vip           = hiera('ovn_dbs_vip', undef),
  $controller_virtual_ip = hiera('controller_virtual_ip', undef),
  $pci_passthrough       = hiera('nova::compute::pci::passthrough', undef),
) {

    if $step >= 5 {
        case $configure_mode {

          'ml2-ovn': { $controller_node_ip = $ovn_dbs_vip }
          default  : { $controller_node_ip = $controller_virtual_ip }

        }

        if !$controller_node_ip {
            fail("No controller node ip set for mode '${configure_mode}'")
        }

        liquidio_config {
            'main/controller_node':   value => $controller_node_ip;
            'main/tenant_ip':         value => $tenant_subnet;
            'main/vf_num':            value => $vf_nums;
            'main/configure_mode':    value => $configure_mode;
            'main/enable_bonding':    value => $enable_bonding;
            'main/bonding_options':   value => $bonding_options;
            'main/provider_mappings': value => $provider_mappings;
            'main/pci_passthrough':   value => $pci_passthrough;
            'main/status':            value => 'install-completed';
        }
        service { 'liquidio-compute-service':
          ensure => running,
          name   => 'liquidio-compute-service',
          enable => true,
        }
    }
  }