The cinder.volume.drivers.vmware.vim_util Module

The VMware API utility module.

build_object_spec(client_factory, root_folder, traversal_specs)

Builds the object Spec.

Parameters:
  • client_factory – Factory to get API input specs
  • root_folder – Root folder reference as the starting point for traversal
  • traversal_specs – filter specs required for traversal
Returns:

Object spec

build_property_filter_spec(client_factory, property_specs, object_specs)

Builds the Property Filter Spec.

Parameters:
  • client_factory – Factory to get API input specs
  • property_specs – Property specs to be collected for filtered objects
  • object_specs – Object specs to identify objects to be filtered
Returns:

Property filter spec

build_property_spec(client_factory, type='VirtualMachine', properties_to_collect=None, all_properties=False)

Builds the Property Spec.

Parameters:
  • client_factory – Factory to get API input specs
  • type – Type of the managed object reference property
  • properties_to_collect – Properties of the managed object reference to be collected while traversal filtering
  • all_properties – Whether all the properties of managed object reference needs to be collected
Returns:

Property spec

build_recursive_traversal_spec(client_factory)

Builds Recursive Traversal Spec to traverse managed object hierarchy.

Parameters:client_factory – Factory to get API input specs
Returns:Recursive traversal spec
build_selection_spec(client_factory, name)

Builds the selection spec.

Parameters:
  • client_factory – Factory to get API input specs
  • name – Name for the selection spec
Returns:

Selection spec

build_traversal_spec(client_factory, name, type, path, skip, select_set)

Builds the traversal spec object.

Parameters:
  • client_factory – Factory to get API input specs
  • name – Name for the traversal spec
  • type – Type of the managed object reference
  • path – Property path of the managed object reference
  • skip – Whether or not to filter the object identified by param path
  • select_set – Set of selection specs specifying additional objects to filter
Returns:

Traversal spec

cancel_retrieval(vim, retrieve_result)

Cancels the retrive operation if necessary.

Parameters:
  • vim – Vim object
  • retrieve_result – Result from the RetrievePropertiesEx API
continue_retrieval(vim, retrieve_result)

Continue retrieving results, if present.

Parameters:
  • vim – Vim object
  • retrieve_result – Result from the RetrievePropertiesEx API
get_object_properties(vim, mobj, properties)

Gets properties of the managed object specified.

Parameters:
  • vim – Vim object
  • mobj – Reference to the managed object
  • properties – Properties of the managed object reference to be retrieved
Returns:

Properties of the managed object specified

get_object_property(vim, mobj, property_name)

Gets property of the managed object specified.

Parameters:
  • vim – Vim object
  • mobj – Reference to the managed object
  • property_name – Name of the property to be retrieved
Returns:

Property of the managed object specified

get_objects(vim, type, max_objects, props_to_collect=None, all_properties=False)

Gets all managed object references of a specified type.

It is caller’s responsibility to continue or cancel retrieval.

Parameters:
  • vim – Vim object
  • type – Type of the managed object reference
  • max_objects – Maximum number of objects that should be returned in a single call
  • props_to_collect – Properties of the managed object reference to be collected
  • all_properties – Whether all properties of the managed object reference are to be collected
Returns:

All managed object references of a specified type

Previous topic

The cinder.volume.drivers.vmware.vim Module

Next topic

The cinder.volume.drivers.vmware.vmdk Module

This Page