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

Inherits:
Map
  • Object
show all
Defined in:
lib/puppet_x/vmware/mapper.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.



263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
# File 'lib/puppet_x/vmware/mapper.rb', line 263

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