hpeOneView.resources.hypervisors package

Submodules

hpeOneView.resources.hypervisors.hypervisor_cluster_profiles module

class hpeOneView.resources.hypervisors.hypervisor_cluster_profiles.HypervisorClusterProfiles(connection, data=None)[source]

Bases: Resource

The cluster profile resource manager REST APIs to create, retrieve, modify and delete hypervisor cluster profiles.

DEFAULT_VALUES = {'2200': {'type': 'HypervisorClusterProfileV4'}}
URI = '/rest/hypervisor-cluster-profiles'
create_virtual_switch_layout(data=None, timeout=-1)[source]

Generates vSwitch layout using information specified in the request body.

Parameters
  • data – Fields passed to create the resource.

  • timeout – Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneView; it just stops waiting for its completion.

Returns

Created virtual switch layout.

delete(timeout=-1, soft_delete=False, force=False)[source]

Deletes a hypervisor cluster profile object from the appliance based on Hypervisor Cluster Profile UUID

Parameters
  • force – If set to true, the operation completes despite any probles with network connectivity or errors on the resource itself. Default is false.

  • soft_delete – If set to true, the hypervisor cluster profile and its hypervisor profiles are removed from appliance only. If set to false, the associated cluster and hosts are also removed in the hypervisor manager.

Returns

Boolean value. True for success and False for failure.

get_all(start=0, count=-1, filter='', sort='', query='', scope_uris='')[source]

Gets a list of hypervisor cluster profiles based on optional sorting and filtering, and constrained by start and count parameters.

The maximum number of profiles is restricted to 100, i.e., if user requests more than 100, this will be internally limited to 100.

Parameters
  • start – The first item to return, using 0-based indexing. If not specified, the default is 0 - start with the first available item.

  • count – The number of resources to return. A count of -1 requests all items. The actual number of items in the response might differ from the requested count if the sum of start and count exceeds the total number of items.

  • filter (list or str) – A general filter/query string to narrow the list of items returned. The default is no filter; all resources are returned.

  • sort – The sort order of the returned data set. By default, the sort order is based on create time with the oldest entry first.

  • query – A general query string to narrow the list of resources returned. The default is no query - all resources are returned.

  • scope_uris – An expression to restrict the resources returned according to the scopes to which they are assigned.

Returns

List of Hypervisor cluster profiles

Return type

list

get_compliance_preview()[source]

Gets the preview of manual and automatic updates required to make the cluster profile consistent with its template.

Returns

cluster profile compliance preview

hpeOneView.resources.hypervisors.hypervisor_managers module

class hpeOneView.resources.hypervisors.hypervisor_managers.HypervisorManagers(connection, data=None)[source]

Bases: Resource

Hypervisor Managers API client.

URI = '/rest/hypervisor-managers'
get_all(start=0, count=-1, filter='', sort='', query='', scope_uris='')[source]

Gets a list of Hypervisor Managers based on optional sorting and filtering, and constrained by start and count parameters.

Parameters
  • start – The first item to return, using 0-based indexing. If not specified, the default is 0 - start with the first available item.

  • count – The number of resources to return. A count of -1 requests all items. The actual number of items in the response might differ from the requested count if the sum of start and count exceeds the total number of items.

  • filter (list or str) – A general filter/query string to narrow the list of items returned. The default is no filter; all resources are returned.

  • sort – The sort order of the returned data set. By default, the sort order is based on create time with the oldest entry first.

  • query – A general query string to narrow the list of resources returned. The default is no query - all resources are returned.

  • scope_uris – An expression to restrict the resources returned according to the scopes to which they are assigned.

Returns

List of Hypervisor Managers

Return type

list

Module contents