Class: PuppetX::VMware::Mapper::ClusterConfigSpecExMap

Inherits:
Map
  • Object
show all
Defined in:
lib/puppet_x/vmware/mapper/cluster_config_spec_ex_map.rb

Instance Attribute Summary

Attributes inherited from Map

#leaf_list, #node_list

Instance Method Summary collapse

Methods inherited from Map

#annotate_is_now, #objectify

Constructor Details

#initializeClusterConfigSpecExMap

Returns a new instance of ClusterConfigSpecExMap.



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
46
47
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# File 'lib/puppet_x/vmware/mapper/cluster_config_spec_ex_map.rb', line 5

def initialize
  @initTree = {
    Node => NodeData[
      :node_type => 'ClusterConfigSpecEx',
    ],
    :dasConfig => {
      Node => NodeData[
        :node_type => 'ClusterDasConfigInfo',
      ],
      :enabled => LeafData[
        :prop_name => :das_config_enabled,
        :desc => "Is HA enabled? true or false",
        :valid_enum => [:true, :false],
      ],
      :admissionControlEnabled => LeafData[
        :desc => "Is admission control enabled? true or false",
        :valid_enum => [:true, :false],
      ],
      :admissionControlPolicy => {
        Node => NodeData[
          :node_type => :ABSTRACT
        ],
        :vsphereType => LeafData[
          :prop_name => :admission_control_policy_type,
          :valid_enum => [
            :ClusterFailoverHostAdmissionControlPolicy,
            :ClusterFailoverLevelAdmissionControlPolicy,
            :ClusterFailoverResourcesAdmissionControlPolicy,
          ],
        ],
        :failoverHosts => LeafData[
          :misc => [Array],
          :requires => [:admission_control_policy_type],
        ],
        :failoverLevel => LeafData[
          :desc => \
            "Number of host failures that should be tolerated, "\
            "still guaranteeing sufficient resources to restart "\
            "virtual machines on available hosts. ",
          :validate => PuppetX::VMware::Mapper::validate_i_ge(0),
          :munge => PuppetX::VMware::Mapper::munge_to_i,
          :requires => [:admission_control_policy_type],
        ],
        :cpuFailoverResourcesPercent => LeafData[
          :valid_enum => 1..100,
          :munge => PuppetX::VMware::Mapper::munge_to_i,
          :requires => [:admission_control_policy_type, :memory_failover_resources_percent],
        ],
        :memoryFailoverResourcesPercent => LeafData[
          :valid_enum => 1..100,
          :munge => PuppetX::VMware::Mapper::munge_to_i,
          :requires => [:admission_control_policy_type, :cpu_failover_resources_percent],
        ],
      },
      :defaultVmSettings => {
        Node => NodeData[
          :node_type => 'ClusterDasVmSettings',
        ],
        :isolationResponse => LeafData[
          :desc => \
            "isolation response when a virtual machine has no "\
            "HA configuration of its own (ClusterDasVmConfigSpec). ",
          :valid_enum => [:none, :powerOff, :shutdown,],
        ],
        :restartPriority => LeafData[
          :desc => \
            "restart priority when a virtual machine has no HA "\
            "configuration of its own (ClusterDasVmConfigSpec). ",
          :valid_enum => [:disabled, :high, :low, :medium,],
        ],
        :vmToolsMonitoringSettings => {
          Node => NodeData[
            :node_type => 'ClusterVmToolsMonitoringSettings',
          ],
          :failureInterval => LeafData[
            :validate => PuppetX::VMware::Mapper::validate_i_ge(1),
            :munge => PuppetX::VMware::Mapper::munge_to_i,
          ],
          :maxFailures => LeafData[
            :validate => PuppetX::VMware::Mapper::validate_i_ge(-1),
            :munge => PuppetX::VMware::Mapper::munge_to_i,
          ],
          :maxFailureWindow => LeafData[
            :validate => PuppetX::VMware::Mapper::validate_i_ge(-1),
            :munge => PuppetX::VMware::Mapper::munge_to_i,
          ],
          :minUpTime => LeafData[
            :validate => PuppetX::VMware::Mapper::validate_i_ge(1),
            :munge => PuppetX::VMware::Mapper::munge_to_i,
          ],
          :vmMonitoring => LeafData[
            :munge => PuppetX::VMware::Mapper::munge_to_sym,
            :valid_enum => [
                :vmMonitoringDisabled,
                :vmMonitoringOnly,
                :vmAndAppMonitoring,
            ],
          ],
        },
      },
      :hostMonitoring => LeafData[
          :desc => "Is host monitoring enabled? enabled or disabled",
          :valid_enum => [:enabled, :disabled],
      ],
      :vmMonitoring => LeafData[
        :prop_name => :das_config_vm_monitoring,
        :munge => PuppetX::VMware::Mapper::munge_to_sym,
        :valid_enum => [
            :vmMonitoringDisabled,
            :vmMonitoringOnly,
            :vmAndAppMonitoring,
        ],
      ],
    },
  }

  super
end