The ceilometer.compute.virt.vmware.vsphere_operations Module

class ceilometer.compute.virt.vmware.vsphere_operations.VsphereOperations(api_session, max_objects)[source]

Bases: object

Class to invoke vSphere APIs calls.

vSphere APIs calls are required by various pollsters, collecting data from VMware infrastructure.

get_perf_counter_id(counter_full_name)[source]

Method returns the ID of VC performance counter by its full name.

A VC performance counter is uniquely identified by the tuple {‘Group Name’, ‘Counter Name’, ‘Rollup Type’}. It will have an id - counter ID (changes from one VC to another), which is required to query performance stats from that VC. This method returns the ID for a counter, assuming ‘CounterFullName’ => ‘Group Name:CounterName:RollupType’.

get_vm_moid(vm_instance_id)[source]

Method returns VC MOID of the VM by its NOVA instance ID.

query_vm_aggregate_stats(vm_moid, counter_id, duration)[source]

Method queries the aggregated real-time stat value for a VM.

This method should be used for aggregate counters.

Parameters:
  • vm_moid – moid of the VM
  • counter_id – id of the perf counter in VC
  • duration – in seconds from current time, over which the stat value was applicable
Returns:

the aggregated stats value for the counter

query_vm_device_stats(vm_moid, counter_id, duration)[source]

Method queries the real-time stat values for a VM, for all devices.

This method should be used for device(non-aggregate) counters.

Parameters:
  • vm_moid – moid of the VM
  • counter_id – id of the perf counter in VC
  • duration – in seconds from current time, over which the stat value was applicable
Returns:

a map containing the stat values keyed by the device ID/name

query_vm_property(vm_moid, property_name)[source]

Method returns the value of specified property for a VM.

Parameters:
  • vm_moid – moid of the VM whose property is to be queried
  • property_name – path of the property

Previous topic

The ceilometer.compute.virt.vmware.inspector Module

Next topic

The ceilometer.compute.virt.xenapi.inspector Module

Project Source

This Page