Welcome to pytanix’s documentation!

Contents:

Indices and tables

API Reference

client Module

class pytanix.client.Nutanix(ip, auth=None, requests_session=True)[source]

Bases: object

Example usage:

import pytanix
nu = pytanix.Nutanix('1.2.3.4')
alerts = nu.alerts()
print(alerts)
abort_replication(pd_name, replication_id)[source]

abort a replication in a protection domain

Parameters:
  • pd_name (str) – name of the protection domain
  • replication_id (str) – ID of the replication
acknowledge_alert(id)[source]

acknowledge alert by id

Parameters:id – Alert id
acknowledge_alerts(**kwargs)[source]

acknowledge alerts using a filter criteria

Kwargs:

Parameters:
  • startTimeInUsecs – Start time in microseconds
  • endTimeInUsecs – End time in microseconds
  • severity – Alert severities
  • entityType – Entity type
  • entityTypeIds – Entity type ids
  • count – Maximum number of alerts
acknowledge_event(id)[source]

acknowledge event with the specified ID

Parameters:id – Event ID
acknowledge_events(**kwargs)[source]

acknowledge events using a filter criteria

Kwargs:

Parameters:
  • startTimeInUsecs – Start time in microseconds
  • endTimeInUsecs – End time in microseconds
  • severity – Severity
  • entityType – Entity type
  • entityTypeIds – Entity type IDs
  • count – Maximum number of events
activate_protection_domain(name)[source]

activate a protection domain with the specified name

Parameters:name – name of the protection domain
add_auth_directory(payload)[source]

add directory config to the cluster

Parameters:payload – json auth directory config
add_auth_types(payload)[source]

add authentication types

Parameters:payload – json array of auth types
add_ca_cert(cert, **kwargs)[source]

add trusted CA certificate to the cluster

Parameters:cert (file) – file object of certificate, rb mode

Kwargs:

Parameters:name (str) – cert name
add_cluster_nameserver(server)[source]

add a nameserver to the cluster

Parameters:server – address of nameserver
add_container(payload)[source]

add a container to the cluster

Parameters:payload – json container configuration
add_datastore(payload)[source]

add an NFS datastore

Parameters:payload – json datastore configuration
add_http_proxy(address, username=None, password=None)[source]

add an HTTP proxy to the cluster

Parameters:
  • address – proxy address
  • username – proxy username
  • password – proxy password
add_kms(payload)[source]

add key management server to the cluster

Parameters:payload – json key management server configuration
add_license(license_file)[source]

apply license file to the cluster

Parameters:cert (file) – file object of license, rb mode
add_nfs_whitelist(entry)[source]

add an address to the NFS subnet whitelist

Parameters:entry – value to add to NFS whitelist
add_ntp_server(server)[source]

add NTP server to the cluster

Parameters:server – NTP server to add to the cluster
add_oob_schedule(name, payload)[source]

add an out of band snapshot schedule in the specified protection domain

Parameters:
  • name – name of the protection domain
  • payload – json out of band snapshot schedule configuration
add_protection_domain(payload)[source]

add a protection domain to be used for disaster recovery and backups

Parameters:payload – json protection domain configuration
add_public_key(name, key)[source]

add a public key to the cluster

Parameters:
  • name – name for the public key
  • key – key to be added
add_remote_site(payload)[source]

add a remote site

Parameters:payload – json remote site configuration
add_snapshot_schedule(name, payload)[source]

add a snapshot schedule to the specified protection domain

Parameters:
  • name – name of the protection domains
  • payload – json snapshot schedule configuration
add_snmp_transports(**kwargs)[source]

add SNMP transports to the existing SNMP transports

Kwargs:

Parameters:transports – list of SNMP transports
add_snmp_trap(payload)[source]

add SNMP trap to the cluster

Parameters:payload – json snmp trap configuration
add_snmp_user(payload)[source]

add SNMP user to the cluster

Parameters:payload – json snmp user configuration
add_storage_pool(payload, **kwargs)[source]

add a storage pool to the cluster

Parameters:payload – json storage pool configuration

Kwargs:

Parameters:force (boolean) – force the operation
add_svm_cert(cert, **kwargs)[source]

add certificate to the cluster

Parameters:cert (file) – file object of certificate, rb mode

Kwargs:

Parameters:keyManagementServerName (str) – key management server name
add_svm_certs(certs, **kwargs)[source]

add multiple certificates to the cluster

Parameters:certs – file objects of certificate, rb mode
add_vdisk(payload)[source]

add a vDisk to the cluster

Parameters:payload – json vDisk configuration
clear_retention_policies(pd_name, schedule_id)[source]

clear retention policies of specified snapshot schedule from the specified protection domain

Parameters:
  • pd_name – name of the protection domain
  • schedule_id – ID of the snapshot schedule
cluster_domain(payload)[source]

join/unjoin the storage cluster to/from a Windows AD domain

Parameters:payload – information pertaining to the Windows AD domain
create_snapshot(vdisk_name, snapshot_name)[source]

create a snapshot for the specified vDisk

Parameters:
  • vdisk_name (str) – name of the vdisk
  • snapshot_name (str) – name of the snapshot
deactivate_protection_domain(name)[source]

deactivate a protection domain with the specified name

Parameters:name – name of the protection domain
delete_auth_config()[source]

delete auth configuration

delete_auth_directory(name)[source]

delete directory with the specified name

Parameters:name – name of directory
delete_ca_cert(name)[source]

delete a CA certificate from the cluster

Parameters:name – Certificate Authority name
delete_client_auth(name)[source]

delete client chain certificate on the cluster

Parameters:name – name of the certificate
delete_cluster_nameserver(server)[source]

delete a nameserver with the specified name

Parameters:server – name of nameserver to delete
delete_container(id, **kwargs)[source]

delete a container with the specified ID from the cluster

Parameters:id – ID of the container

Kwargs:

Parameters:
  • ignoreSmallFiles – ignore small files
  • ignoreVDisks – ignore all vdisks
delete_disk(id, **kwargs)[source]

mark specified disk for removal

Parameters:id – ID of the disk

Kwargs:

Parameters:force – force the operation (ignores all system validations)
delete_http_proxy(name)[source]

delete an HTTP proxy with the specified name

Parameters:name – name of an HTTP proxy
delete_kms(name)[source]

delete key management server with the specified name

Parameters:name – key management server name
delete_nfs_whitelist(name)[source]

delete an address from the NFS subnet whitelist

Parameters:name – NFS whitelist entry to delete
delete_ntp_server(server)[source]

remove NTP server from the cluster

Parameters:server – NTP server to be removed from the cluster
delete_oob_schedule(pd_name, shedule_id)[source]

delete an out of band schedule

Parameters:
  • pd_name – name of the protection domain
  • schedule_id – ID of the out of band schedule
delete_protection_domain(name, **kwargs)[source]

mark a protection domain for removal Protection domain will be removed from the cluster when all outstanding operations on it are cancelled

Parameters:name – name of the protection domain

Kwargs:

Parameters:skipRemoteCheck – skip checking remote protection domain
delete_public_key(name)[source]

delete a public key from the cluster

Parameters:name – name of the key to be deleted
delete_rackable_unit(id)[source]

delete a rackable unit with the specified ID

Parameters:id – ID of a rackable unit
delete_remote_site(name)[source]

delete a remote site with the specified name from the cluster

Parameters:name – name of the remote site
delete_smtp_config()[source]

delete the cluster’s SMTP server configuration

delete_snapshot(pd_name, snapshot_id)[source]

delete a snapshot of a protection domain

Parameters:
  • pd_name – name of the protection domain
  • snapshot_id – ID of the snapshot
delete_snapshot_schedule(pd_name, schedule_id)[source]

remove a snapshot schedule from the specified protection domain

Parameters:
  • pd_name – name of the protection domain
  • schedule_id – ID of the snapshot schedule
delete_snapshot_schedules(name)[source]

remove all snapshot schedules from the specified protection domain

Parameters:name – name of the protection domain
delete_snmp_trap(address)[source]

delete SNMP trap with the specified address

Parameters:address (str) – address of SNMP trap
delete_snmp_user(address)[source]

delete SNMP user with the specified username

Parameters:username (str) – name of SNMP user
delete_storage_pool(id)[source]

delete a storage pool with the specified ID

Parameters:id – ID of the storage pool
delete_svm_cert(**kwargs)[source]

delete an svm certificate from cluster

Kwargs:

Parameters:
  • nodeId – id of the node on which the cert is installed
  • serverName – key management server for which cert is installed
delete_vdisk(name)[source]

delete a vdisk with the specified name

Parameters:name (str) – name of the snapshot
demote_protection_domain(name, **kwargs)[source]

demotes to standby metro availability role for a specified protection domain

Parameters:name – name of the protection domain

Kwargs:

Parameters:skipRemoteCheck – skip checking remote protection domain
disable_metro_availability(name, **kwargs)[source]

disable metro availability for a specified protection domain

Parameters:name – name of the protection domain

Kwargs:

Parameters:skipRemoteCheck – skip checking remote protection domain
edit_auth_directory(payload)[source]

edit the specified directory config

Parameters:payload – json auth directory config
enable_metro_availability(name, payload, **kwargs)[source]

enable metro availability for a specific protection domain based on vStore and remote site

Parameters:
  • name – name of the protection domain
  • payload – vStore and remote site configuration

Kwargs:

Parameters:
  • reEnable – re-enable operation
  • skipRemoteCheck – skip checking remote protection domain
  • force – skip checking remote container emptiness
enable_snmp(enable)[source]

enable/disable SNMP configuration in the cluster

Parameters:enable (boolean) – enable/disable SNMP
get_alerts(**kwargs)[source]

returns a list of alerts

Kwargs:

Parameters:
  • startTimeInUsecs (int) – Start time in microseconds
  • endTimeInUsecs (int) – End time in microseconds
  • count (int) – Maximum number of alerts
  • resolved (boolean) – Alerts which have been resolved
  • acknowledged (boolean) – Alerts which have been acknowledged
  • severity (list) – Alert severities
  • alertTypeUuid (list) – Alert type ids
  • page (int) – Page number
  • entityType (str) – Entity type
  • entityIds (list) – Entity ids
get_alerts_configuration()[source]

get the configuration that is used to send alert emails

get_alerts_metadata(alertTypeUuid)[source]

get the list of alerts metadata generated in the cluster

Parameters:alertTypeUuid – Alert type UUID of the Alert metadata
get_auth_config()[source]

get auth configuration

get_auth_directories()[source]

get the list of directories configured in the cluster

get_auth_directory(name)[source]

get directory with the specified name

Parameters:name – name of directory
get_auth_types()[source]

get authentication types

get_ca_certs()[source]

get all CA certificates from cluster

get_cert_info()[source]

get certificate signing information

get_cert_test_results(**kwargs)[source]

get recent certificate test results

Kwargs:

Parameters:
  • hostIds – list of host IDs
  • kmsServerNames – list of key management server names
get_client_auth_status()[source]

get authentication types

get_cluster()[source]

get cluster details

get_cluster_alerts(id, **kwargs)[source]

get the list of alerts generated on a specified cluster

Parameters:id – id of the cluster

Kwargs:

Parameters:
  • startTimeInUsecs – Start time in microseconds
  • endTimeInUsecs – End time in microseconds
  • count – Maximum number of alerts
  • resolved – Alerts which have been resolved
  • acknowledged – Alerts which have been acknowledged
  • severity – Alert severities
  • alertTypeUuid – Alert type ids
  • page – Page number
get_cluster_by_id(id, **kwargs)[source]

get a cluster

Parameters:id – id of the cluster

Kwargs:

Parameters:projection – projections on the attributes
get_cluster_csrs(**kwargs)[source]

download csr files from cluster

Kwargs:

Parameters:nodeIdList – list of node IDs
get_cluster_events(id, **kwargs)[source]

get the list of events generated on a specified cluster

Parameters:id – id of the cluster

Kwargs:

Parameters:
  • startTimeInUsecs – Start time in microseconds
  • endTimeInUsecs – End time in microseconds
  • count – Maximum number of events
  • acknowledged – Events which have been acknowledged
  • page – Page number
get_cluster_license_info()[source]

get cluster license info

get_cluster_nameservers()[source]

get the list of nameservers configured on the cluster

get_cluster_stats(id, **kwargs)[source]

get the stats for a specified cluster

Parameters:id – id of the cluster

Kwargs:

Parameters:
  • metrics – (required) list of metrics
  • startTimeInUsecs – Start time in microseconds
  • endTimeInUsecs – End time in microseconds
  • intervalInSecs – sampling interval of stats
get_clusters(**kwargs)[source]

get the list of clusters

Kwargs:

Parameters:
  • count – number of clusters to retrieve
  • filterCriteria – filter criteria
  • sortCriteria – sort criteria
  • searchString – search string
  • page – page number
  • projection – projections on the attributes
get_clusters_events(**kwargs)[source]

get the list of events generated on any cluster

Kwargs:

Parameters:
  • startTimeInUsecs – Start time in microseconds
  • endTimeInUsecs – End time in microseconds
  • count – Maximum number of events
  • acknowledged – Events which have been acknowledged
  • page – Page number
get_consistency_groups(name)[source]

get list of consistency groups in a specified protection domain

Parameters:name – name of the protection domain
get_container(id, **kwargs)[source]

get a container with the specified ID

Parameters:id – id of the container

Kwargs:

Parameters:projection – projections on the attributes
get_container_alerts(id, **kwargs)[source]

get the list of alerts generated on any container

Parameters:id – id of the container

Kwargs:

Parameters:
  • startTimeInUsecs – Start time in microseconds
  • endTimeInUsecs – End time in microseconds
  • count – Maximum number of alerts
  • resolved – Alerts which have been resolved
  • acknowledged – Alerts which have been acknowledged
  • severity – Alert severities
  • alertTypeUuid – Alert type ids
  • page – Page number
get_container_events(id, **kwargs)[source]

get the list of events generated on any container

Parameters:id – id of the container

Kwargs:

Parameters:
  • startTimeInUsecs – Start time in microseconds
  • endTimeInUsecs – End time in microseconds
  • count – Maximum number of events
  • acknowledged – Events which have been acknowledged
  • page – Page number
get_container_stats(id, **kwargs)[source]

get the stats for a specified container

Parameters:id – id of the container

Kwargs:

Parameters:
  • metrics – (required) List of metrics
  • startTimeInUsecs – Start time in microseconds
  • endTimeInUsecs – End time in microseconds
  • intervalInSecs – Sampling interval of stats
get_container_vdisks(id)[source]

get the list of vDisks of the specified container

Parameters:id – id of the container
get_containers(**kwargs)[source]

get the list of containers

Kwargs:

Parameters:
  • count – number of containers to retrieve
  • filterCriteria – filter criteria
  • sortCriteria – sort criteria
  • searchString – search string
  • page – page number
  • projection – projections on the attributes
get_csf()[source]

get cluster summary file

get_datastores()[source]

get the list of NFS datastores mounted using containers in the cluster

get_disk(id, **kwargs)[source]

get a disk with the specified id

Parameters:id – ID of the disk

Kwargs:

Parameters:projection – projections on the attributes
get_disk_alerts(id, **kwargs)[source]

get the list of alerts generated on any disk

Parameters:id – id of the disk

Kwargs:

Parameters:
  • startTimeInUsecs – Start time in microseconds
  • endTimeInUsecs – End time in microseconds
  • count – Maximum number of alerts
  • resolved – Alerts which have been resolved
  • acknowledged – Alerts which have been acknowledged
  • severity – Alert severities
  • alertTypeUuid – Alert type ids
  • page – Page number
get_disk_events(svm_id, **kwargs)[source]

get the list of events generated on any host

Parameters:svm_id – service VM ID

Kwargs:

Parameters:
  • startTimeInUsecs – Start time in microseconds
  • endTimeInUsecs – End time in microseconds
  • count – Maximum number of events
  • acknowledged – Events which have been acknowledged
  • page – Page number
get_disk_health_check(**kwargs)[source]

get the health check summary for the disks

Kwargs:

Parameters:
  • filterCriteria – filter criteria
  • detailedSummary – detailed summary
get_disk_stats(id, **kwargs)[source]

get the stats for a specified disk

Parameters:id – id of the disk

Kwargs:

Parameters:
  • metrics – (required) List of metrics
  • startTimeInUsecs – Start time in microseconds
  • endTimeInUsecs – End time in microseconds
  • intervalInSecs – Sampling interval of stats
get_disks(**kwargs)[source]

get the list of disks configured in the cluster

Kwargs:

Parameters:
  • count – number of disks to retrieve
  • filterCriteria – filter criteria
  • sortCriteria – sort criteria
  • searchString – search string
  • page – page number
  • projection – projections on the attributes
get_dr_snapshots(name, **kwargs)[source]

get the list of snapshots created in a specified protection domain

Parameters:name – name of the protection domain

Kwargs:

Parameters:
  • count – number of DR snapshots to retrieve
  • filterCriteria – filter criteria
  • sortCriteria – sort criteria
  • fullDetails – whether to include CG/VM details
get_encryption_status()[source]

get encryption status of the cluster

get_events(**kwargs)[source]

get the list of events generated in the cluster

Kwargs:

Parameters:
  • startTimeInUsecs – Start time in microseconds
  • endTimeInUsecs – End time in microseconds
  • count – Maximum number of events
  • acknowledged – Events which have been acknowledged
  • page – Page number
get_hardware_alerts(**kwargs)[source]

get the list of hardware alerts generated in the cluster

Kwargs:

Parameters:
  • startTimeInUsecs – Start time in microseconds
  • endTimeInUsecs – End time in microseconds
  • count – Maximum number of alerts
  • resolved – Alerts which have been resolved
  • acknowledged – Alerts which have been acknowledged
  • severity – Alert severities
  • alertTypeUuid – Alert type ids
  • page – Page number
  • entityType – Entity type
  • entityIds – Entity ids
get_hardware_events(**kwargs)[source]

get the list of hardware events generated in the cluster

Kwargs:

Parameters:
  • startTimeInUsecs – Start time in microseconds
  • endTimeInUsecs – End time in microseconds
  • count – Maximum number of events
  • acknowledged – Events which have been acknowledged
  • page – Page number
get_health_check(id)[source]

get the health check with the specified ID

Parameters:id – ID of the health check
get_health_checks()[source]

get the list of health checks configured in the cluster

get_host_alerts(svm_id, **kwargs)[source]

get the list of alerts generated on any host

Parameters:svm_id – service VM ID

Kwargs:

Parameters:
  • startTimeInUsecs – Start time in microseconds
  • endTimeInUsecs – End time in microseconds
  • count – Maximum number of alerts
  • resolved – Alerts which have been resolved
  • acknowledged – Alerts which have been acknowledged
  • severity – Alert severities
  • alertTypeUuid – Alert type ids
  • page – Page number
get_host_events(**kwargs)[source]

get the list of events generated on any host

Kwargs:

Parameters:
  • startTimeInUsecs – Start time in microseconds
  • endTimeInUsecs – End time in microseconds
  • count – Maximum number of events
  • acknowledged – Events which have been acknowledged
  • page – Page number
get_host_health_check(**kwargs)[source]

get the health check summary for the hosts

Kwargs:

Parameters:
  • filterCriteria – filter criteria
  • detailedSummary – detailed summary
get_host_stats(svm_id, **kwargs)[source]

get the stats for a specified host

Parameters:svm_id – service VM ID

Kwargs:

Parameters:
  • metrics – (required) List of metrics
  • startTimeInUsecs – Start time in microseconds
  • endTimeInUsecs – End time in microseconds
  • intervalInSecs – Sampling interval of stats
get_hosts(**kwargs)[source]

get the list of physical hosts configured in the cluster

Kwargs:

Parameters:
  • count – number of physical hosts to retrieve
  • filterCriteria – filter criteria
  • sortCriteria – sort criteria
  • searchString – search string
  • page – page number
  • projection – projections on the attributes
get_http_proxies()[source]

get the list of HTTP proxies configured in the cluster

get_http_proxy(name)[source]

get an HTTP proxy with the specified name

Parameters:name – name of an HTTP proxy
get_kms(name)[source]

get key management server with the specified name

Parameters:name – key management server name
get_license()[source]

get current license file from the cluster

get_license_alerts(**kwargs)[source]

get the list of alerts generated for any license

Kwargs:

Parameters:
  • startTimeInUsecs – Start time in microseconds
  • endTimeInUsecs – End time in microseconds
  • count – Maximum number of alerts
  • resolved – Alerts which have been resolved
  • acknowledged – Alerts which have been acknowledged
  • severity – Alert severities
  • alertTypeUuid – Alert type ids
  • page – Page number
  • entityType – Entity type
  • entityIds – Entity ids
get_license_allowances()[source]

show allowances for all features

get_license_events(**kwargs)[source]

get the list of events generated for any license

Kwargs:

Parameters:
  • startTimeInUsecs – Start time in microseconds
  • endTimeInUsecs – End time in microseconds
  • count – Maximum number of events
  • acknowledged – Events which have been acknowledged
  • page – Page number
get_license_feature(feature_name)[source]

show allowances for a particular feature

Parameters:feature_name – name of the feature
get_nfs_whitelist()[source]

get the NFS subnet whitelist on the cluster

get_node_csr(**kwargs)[source]

download csr for node with given ip

Kwargs:

Parameters:nodeIp – IP address of node
get_ntp_servers()[source]

get the list of NTP servers for the cluster

get_oob_schedules(name)[source]

get the list of out of band schedules in the specified protection domain

Parameters:name – name of the protection domain
get_pending_actions(name)[source]

get list of pending actions in the specified protection domain

Parameters:name – name of the protection domain
get_pending_remote_replications(name, **kwargs)[source]

get all pending replications on the cluster

Parameters:name – name of the remote site

Kwargs:

Parameters:
  • protectionDomainNames – protection domain names
  • remoteSiteNames – remote site names
get_pending_replications(name, **kwargs)[source]

get list of pending replications in the specified protection domain

Parameters:name – name of the protection domain

Kwargs:

Parameters:remoteSiteNames – names of remote sites
get_protection_domain(name, **kwargs)[source]

get a protection domain with the specified name

Parameters:name – name of the protection domain

Kwargs:

Parameters:
  • metroAvail – whether to include only metro availability related protection domains
  • vStoreName – vStore name
  • remoteSiteName – remote site name
  • projection – projections on the attributes
get_protection_domain_alerts(name, **kwargs)[source]

get the list of alerts generated on a specified protection domain

Parameters:name – name of the protection domain

Kwargs:

Parameters:
  • startTimeInUsecs – Start time in microseconds
  • endTimeInUsecs – End time in microseconds
  • count – Maximum number of alerts
  • resolved – Alerts which have been resolved
  • acknowledged – Alerts which have been acknowledged
  • severity – Alert severities
  • alertTypeUuid – Alert type ids
  • page – Page number
  • entityType – Entity type
  • entityIds – Entity ids
get_protection_domain_events(name, **kwargs)[source]

get the list of events generated on a specified protection domain

Parameters:name – name of the protection domain

Kwargs:

Parameters:
  • startTimeInUsecs – Start time in microseconds
  • endTimeInUsecs – End time in microseconds
  • count – Maximum number of events
  • acknowledged – Events which have been acknowledged
  • page – Page number
get_protection_domain_health(**kwargs)[source]

get the health check summary for the protection domain

Kwargs:

Parameters:
  • filterCriteria – filter criteria
  • detailedSummary – detailed summary
get_protection_domain_stats(name, **kwargs)[source]

get the status for a specified protection domain If start time and end time are included in the query string, then historical stats are retrieved. Otherwise, the latest stats are retrieved.

Parameters:name – name of the protection domain

Kwargs:

Parameters:
  • metrics – (required) list of metrics
  • startTimeInUsecs – start time in microseconds
  • endTimeInUsecs – end time in microseconds
  • intervalInSecs – sampling interval of stats
get_protection_domain_status()[source]

get the data protection status for all protection domains

get_protection_domains(**kwargs)[source]

get the list of protection domains configured in the cluster

Kwargs:

Parameters:
  • names – protection domain names
  • metroAvail – metro availability protection domain
  • vStoreName – vStore name
  • remoteSiteName – remote site name
  • includeDeleted – include deleted
  • projection – projections on the attributes
get_public_key(name)[source]

get a public key by name

Parameters:name – name of public key
get_public_keys()[source]

get cluster’s public keys

get_rackable_unit(id)[source]

get a rackable unit with the specified ID

Parameters:id – ID of a rackable unit
get_rackable_units()[source]

get a list of rackable units configured on the cluster

get_remote_site(name, **kwargs)[source]

get a remote site with the specified name

Parameters:name – name of the remote site

Kwargs:

Parameters:projection – projections on the attributes
get_remote_site_alerts(name, **kwargs)[source]

get the list of alerts generated on a specified remote site

Parameters:name – name of the remote site

Kwargs:

Parameters:
  • startTimeInUsecs – Start time in microseconds
  • endTimeInUsecs – End time in microseconds
  • count – Maximum number of alerts
  • resolved – Alerts which have been resolved
  • acknowledged – Alerts which have been acknowledged
  • severity – Alert severities
  • alertTypeUuid – Alert type ids
  • page – Page number
  • entityType – Entity type
  • entityIds – Entity ids
get_remote_site_events(name, **kwargs)[source]

get the list of events generated on a specified remote site

Parameters:name – name of the remote site

Kwargs:

Parameters:
  • startTimeInUsecs – Start time in microseconds
  • endTimeInUsecs – End time in microseconds
  • count – Maximum number of events
  • acknowledged – Events which have been acknowledged
  • page – Page number
get_remote_site_snapshots(name, **kwargs)[source]

get the list of snapshots created in a particular remote site

Parameters:name – name of the remote site

Kwargs:

Parameters:
  • count – maximum number of DR snapshots to retrieve
  • filterCriteria – filter criteria
  • sortCriteria – sort criteria
  • fullDetails – whether to include consistency group/VM details
get_remote_site_stats(name, **kwargs)[source]

get the stats for a specified remote site If start time and end time are included in the query string, then historical stats are retrieved. Otherwise, the latest stats are retrieved.

Parameters:name – name of the remote site

Kwargs:

Parameters:
  • metrics – (required) list of metrics
  • startTimeInUsecs – start time in microseconds
  • endTimeInUsecs – end time in microseconds
  • intervalInSecs – sampling interval of stats
get_remote_sites(**kwargs)[source]

get the list of remote sites configured in the cluster

Kwargs:

Parameters:
  • names – remote site names
  • metroCompatible – remote site stretchable
  • fullDetails – remote cluster full detail
  • includeDeleted – include deleted
  • projection – projections on the attributes
get_remote_sites_alerts(**kwargs)[source]

get the list of alerts generated on any remote site

Kwargs:

Parameters:
  • startTimeInUsecs – Start time in microseconds
  • endTimeInUsecs – End time in microseconds
  • count – Maximum number of alerts
  • resolved – Alerts which have been resolved
  • acknowledged – Alerts which have been acknowledged
  • severity – Alert severities
  • alertTypeUuid – Alert type ids
  • page – Page number
  • entityType – Entity type
  • entityIds – Entity ids
get_remote_sites_events(**kwargs)[source]

get the list of events generated on any remote site

Kwargs:

Parameters:
  • startTimeInUsecs – Start time in microseconds
  • endTimeInUsecs – End time in microseconds
  • count – Maximum number of events
  • acknowledged – Events which have been acknowledged
  • page – Page number
get_remote_sites_health(**kwargs)[source]

get the health check summary for the remote sites

Kwargs:

Parameters:
  • filterCriteria – filter criteria
  • detailedSummary – detailed summary
get_remote_sites_snapshots(**kwargs)[source]

get the list of all snapshots created in remote sites

Kwargs:

Parameters:
  • count – maximum number of DR snapshots to retrieve
  • filterCriteria – filter criteria
  • sortCriteria – sort criteria
  • fullDetails – whether to include consistency group/VM details
get_remote_support_status()[source]

get the status of remote support settings on the cluster

get_replications(name)[source]

get list of replications in a protection domain

Parameters:name – name of protection domain
get_smb_config()[source]

retrieves SMB server configuration settings for the cluster

get_smtp_config()[source]

get the SMTP server configuration

get_smtp_security_modes()[source]

get the list of supported security modes for the SMTP server

get_snapshot_schedules(name)[source]

retrieve all snapshot schedules from the specified protection domain

get_snapshots(name)[source]

get the list of snapshots for the specified vDisk

Parameters:name (str) – name of the vdisk
get_snmp_config()[source]

get the complete SNMP configuration including users, transports, and traps configured in the cluster

get_snmp_status()[source]

get the SNMP status

get_snmp_transports()[source]

get the list of SNMP transports configured in the cluster

get_snmp_trap(address)[source]

get SNMP trap with the specified address

Parameters:address (str) – address of SNMP trap
get_snmp_traps()[source]

get the list of SNMP traps configured in the cluster

get_snmp_user(address)[source]

get SNMP user with the specified username

Parameters:username (str) – name of SNMP user
get_storage_alerts(**kwargs)[source]

get the list of storage alerts generated in the cluster

Kwargs:

Parameters:
  • startTimeInUsecs – Start time in microseconds
  • endTimeInUsecs – End time in microseconds
  • count – Maximum number of alerts
  • resolved – Alerts which have been resolved
  • acknowledged – Alerts which have been acknowledged
  • severity – Alert severities
  • alertTypeUuid – Alert type ids
  • page – Page number
  • entityType – Entity type
  • entityIds – Entity ids
get_storage_events(**kwargs)[source]

get the list of storage events generated in the cluster

Kwargs:

Parameters:
  • startTimeInUsecs – Start time in microseconds
  • endTimeInUsecs – End time in microseconds
  • count – Maximum number of events
  • acknowledged – Events which have been acknowledged
  • page – Page number
get_storage_pool(id, **kwargs)[source]

get a storage pool with the specified ID

Parameters:id – ID of the storage pool

Kwargs:

Parameters:
  • count – number of clusters to retrieve
  • filterCriteria – filter criteria
  • sortCriteria – sort criteria
  • searchString – search string
  • page – page number
  • projection – projections on the attributes
get_storage_pool_alerts(id, **kwargs)[source]

get the list of alerts generated on a specified storage pool

Parameters:id – ID of a storage pool

Kwargs:

Parameters:
  • startTimeInUsecs (int) – Start time in microseconds
  • endTimeInUsecs (int) – End time in microseconds
  • count (int) – Maximum number of alerts
  • resolved (boolean) – Alerts which have been resolved
  • acknowledged (boolean) – Alerts which have been acknowledged
  • severity (list) – Alert severities
  • alertTypeUuid (list) – Alert type ids
  • page (int) – Page number
get_storage_pool_events(id, **kwargs)[source]

get the list of events generated on a specified storage pool

Parameters:id – ID of a storage pool

Kwargs:

Parameters:
  • startTimeInUsecs (int) – Start time in microseconds
  • endTimeInUsecs (int) – End time in microseconds
  • count (int) – Maximum number of alerts
  • acknowledged (boolean) – Alerts which have been acknowledged
  • page (int) – Page number
get_storage_pool_stats(id, **kwargs)[source]

get the stats for a specified storage pool

Parameters:id – ID of a storage pool

Kwargs:

Parameters:
  • metrics – (required) list of metrics
  • startTimeInUsecs – start time in microseconds
  • endTimeInUsecs – end time in microseconds
  • intervalInSecs – sampling interval of stats
get_storage_pools(**kwargs)[source]

get the list of storage pools configured in the cluster

Kwargs:

Parameters:
  • count – number of clusters to retrieve
  • filterCriteria – filter criteria
  • sortCriteria – sort criteria
  • searchString – search string
  • page – page number
  • projection – projections on the attributes
get_unprotected_vms(**kwargs)[source]

get list of unprotected VMs in a cluster that can participate in Nutanix native backup and DR

Kwargs:

Parameters:
  • hostIds – host IDs
  • vmNames – VM names
  • containerNames – container names
get_vdisk(name, **kwargs)[source]

get a vdisk with the specified name

Parameters:name (str) – name of the snapshot

Kwargs:

Parameters:projection – projections on the attributes
get_vdisk_alerts(name, **kwargs)[source]

get the list of alerts generated on any vDisk

Parameters:name (str) – name of the vdisk

Kwargs:

Parameters:
  • startTimeInUsecs (int) – Start time in microseconds
  • endTimeInUsecs (int) – End time in microseconds
  • count (int) – Maximum number of alerts
  • resolved (boolean) – Alerts which have been resolved
  • acknowledged (boolean) – Alerts which have been acknowledged
  • severity (list) – Alert severities
  • alertTypeUuid (list) – Alert type ids
  • page (int) – Page number
get_vdisk_events(name, **kwargs)[source]

get the list of events generated on any vDisk

Parameters:name (str) – name of the vdisk

Kwargs:

Parameters:
  • startTimeInUsecs – Start time in microseconds
  • endTimeInUsecs – End time in microseconds
  • count – Maximum number of events
  • acknowledged – Events which have been acknowledged
  • page – Page number
get_vdisk_stats(name, **kwargs)[source]

get the stats for a specified vDisk

Parameters:name (str) – name of the vDisk

Kwargs:

Parameters:
  • metrics – (required) list of metrics
  • startTimeInUsecs – Start time in microseconds
  • endTimeInUsecs – End time in microseconds
  • intervalInSecs – sampling interval of stats
get_vdisks(**kwargs)[source]

get the list of vDisks configured in the cluster

Kwargs:

Parameters:
  • includedeleted (boolean) – include deleted vDisks
  • vdiskNames – vDisk names
  • projection – projections on the attributes
get_virtual_disk(id, **kwargs)[source]

get the VirtualDisk with the specified ID

Parameters:id – id of the vDisk

Kwargs:

Parameters:projection – projections on the attributes
get_virtual_disk_stats(id, **kwargs)[source]

get the stats for the specified VirtualDisk

Parameters:id – id of the vDisk

Kwargs:

Parameters:
  • metrics – (required) list of metrics
  • startTimeInUsecs – Start time in microseconds
  • endTimeInUsecs – End time in microseconds
  • intervalInSecs – sampling interval of stats
get_virtual_disks(**kwargs)[source]

get the list of VirtualDisks configured in the cluster

Kwargs:

Parameters:
  • count – number of clusters to retrieve
  • filterCriteria – filter criteria
  • sortCriteria – sort criteria
  • searchString – search string
  • page – page number
  • projection – projections on the attributes
get_vm(id, **kwargs)[source]

get VM with the specified ID

Parameters:id – id of the vDisk

Kwargs:

Parameters:projection – projections on the attributes
get_vm_alerts(id, **kwargs)[source]

get the list of alerts generated on any VM

Parameters:id – ID of the VM

Kwargs:

Parameters:
  • startTimeInUsecs (int) – Start time in microseconds
  • endTimeInUsecs (int) – End time in microseconds
  • count (int) – Maximum number of alerts
  • resolved (boolean) – Alerts which have been resolved
  • acknowledged (boolean) – Alerts which have been acknowledged
  • severity (list) – Alert severities
  • alertTypeUuid (list) – Alert type ids
  • page (int) – Page number
get_vm_events(id, **kwargs)[source]

get the list of events generated on any VM

Parameters:id – ID of the VM

Kwargs:

Parameters:
  • startTimeInUsecs – Start time in microseconds
  • endTimeInUsecs – End time in microseconds
  • count – Maximum number of events
  • acknowledged – Events which have been acknowledged
  • page – Page number
get_vm_health_check(**kwargs)[source]

get the health check summary for VMs

Kwargs:

Parameters:
  • filterCriteria – filter criteria
  • detailedSummary – detailed summary
get_vm_stats(id, **kwargs)[source]

get the stats for a specified VM

Parameters:id – id of the vDisk

Kwargs:

Parameters:
  • metrics – (required) list of metrics
  • startTimeInUsecs – Start time in microseconds
  • endTimeInUsecs – End time in microseconds
  • intervalInSecs – sampling interval of stats
get_vm_vdisks(vm_id)[source]

get the list of vDisks attached to the specified VM

Parameters:id – id of the vDisk
get_vm_virtual_disks(vm_id, **kwargs)[source]

get the list of VirtualDisks attached to the specified VM

Parameters:vm_id (str) – ID of the VM

Kwargs:

Parameters:
  • sortCriteria – sort criteria
  • projection – projections on the attributes
get_vms(**kwargs)[source]

get the list of VMs configured in the cluster

Kwargs:

Parameters:
  • count – number of clusters to retrieve
  • filterCriteria – filter criteria
  • sortCriteria – sort criteria
  • searchString – search string
  • page – page number
  • projection – projections on the attributes
get_vstore(id)[source]

get a vStore with the specified ID

Parameters:id (str) – ID of the vStore
get_vstores(**kwargs)[source]

get the list of vStores configured in the cluster

Kwargs:

Parameters:
  • ids – vStore IDs
  • names – vStore names
  • includeDeleted – include deleted vStores
manage_kerberos(payload)[source]

manages enabling/disabling Kerberos security for the cluster

Parameters:payload – json kerberos configuration
migrate_protection_domain(name)[source]

mark the specified protection domain as inactive and failover to the given remote site

Parameters:name – name of the protection domain
promote_protection_domain(name, **kwargs)[source]

promotes to active metro availability role for a specified protection domain

Parameters:name – name of the protection domain

Kwargs:

Parameters:skipRemoteCheck – skip checking remote protection domain
protect_vms(name, payload)[source]

add VMs to a protection domain to enable backup and disaster recovery

Parameters:
  • name – name of the protection domain
  • payload – json vm protection configuration
protect_vstore(id)[source]

protect a vStore with the specified ID

Parameters:id (str) – ID of the vStore
rekey_disks(**kwargs)[source]

set new password for encryption capable disks

Kwargs:

Parameters:array – list of disk ids on which rekey needs to be performed
remove_auth_types(payload)[source]

remove auth types from the existing auth types

Parameters:payload – json containing user, pass, and AD name
remove_datastore(payload)[source]

remove an NFS datastore

Parameters:payload – json removal request
remove_snmp_transports(**kwargs)[source]

remove SNMP transports to the existing SNMP transports

Kwargs:

Parameters:transports – list of SNMP transports
resolve_alert(id)[source]

resolve alert by id

Parameters:id – Alert id
resolve_alerts(**kwargs)[source]

resolve alerts using a filter criteria

Kwargs:

Parameters:
  • startTimeInUsecs – Start time in microseconds
  • endTimeInUsecs – End time in microseconds
  • severity – Alert severities
  • entityType – Entity type
  • entityTypeIds – Entity type ids
  • count – Maximum number of alerts
restore_entities(name, payload)[source]

rollback VMs and/or NFS files in a protection domain to a given snapshot

Parameters:
  • name – name of the protection domain
  • payload – json restore configuration
retain_snapshot(pd_name, snapshot_id, retention_time)[source]

retain a snapshot of a protection domain

Parameters:
  • pd_name – name of the protection domain
  • snapshot_id – ID of the snapshot
  • retention_time – retention time in microseconds
rollback(pd_name, snapshot_id)[source]

rollback the specified protection domain to a given snapshot

Parameters:
  • pd_name – name of the protection domain
  • snapshot_id – ID of the snapshot
search(**kwargs)[source]

perform a spotlight search on the cluster

Kwargs:

searchString (str): search string
Parameters:
  • entityTypes – entity types
  • fieldNames – field names
send_email(payload)[source]

send an email using the smtp server configuration

Parameters:payload – json email instance
set_client_auth_status(enable)[source]

enable or disable client authentication

Parameters:enable – boolean for enabling or disabling client auth
set_encryption(enable)[source]

enable or disable encryption on the cluster

Parameters:enable – enable encryption
set_retention_policies(pd_name, schedule_id, payload)[source]

set retention policies of specified snapshot schedule from the specified protection domain

Parameters:
  • pd_name – name of the protection domain
  • schedule_id – ID of the snapshot schedule
  • payload – json snapshot schedule configuration
test_auth_connection(payload)[source]

test LDAP directory connection status

Parameters:payload – json containing user, pass, and AD name
test_encryption(node_ids, kms_names)[source]

test encryption configuration of the cluster

Parameters:
  • node_ids – list of node IDs
  • kms_names – list of key management server names
trace = False
unprotect_vms(name, **kwargs)[source]

remove VMs from a protection domain

Parameters:name – name of the protection domain

Kwargs:

Parameters:array – (required) list of VMs
unprotect_vstore(id)[source]

unprotect a vStore with the specified ID

Parameters:id (str) – ID of the vStore
update_alerts_configuration(payload)[source]

update the configuration that is used to send alert emails

Parameters:payload – json object of new alert configuration
update_alerts_metadata(payload)[source]

get the list of alerts metadata generated in the cluster

Parameters:payload – json object of new alert metadata
update_auth_config(payload)[source]

update auth configuration

Parameters:payload – json of updated auth config
update_auth_types(payload)[source]

add authentication types

Parameters:payload – json array of auth types
update_cert_info(payload)[source]

update the certification information

Parameters:payload – json certification information
update_cluster(payload)[source]

update cluster details

Parameters:payload – cluster detail json
update_container(payload)[source]

update a container’s configuration

Parameters:payload – json container configuration
update_health_checks(payload)[source]

update health check details

Parameters:payload – json health check instance
update_http_proxy(payload)[source]

update an HTTP proxy

Parameters:payload – json HTTP proxy configuration
update_kms(payload)[source]

update the key management server configuration

Parameters:payload – json key management server configuration
update_remote_site(payload)[source]

update a remote site

Parameters:payload – json remote site configuration
update_remote_support(payload)[source]

update the remote support settings on the cluster

Parameters:payload – a timed bool instance
update_replication_status(pd_name, replication_id, payload)[source]

update the state of the replication in a protection domain

Parameters:
  • pd_name – name of the protection domain
  • replication_id – ID of the replication
  • payload – json of updated replication status (pause, resume, abort)
update_replication_timeout(name, payload)[source]

update metro availability timeout for a specific protection domain

Parameters:
  • name – name of the protection domain
  • payload – json replication timeout configuration
update_smtp_config(payload)[source]

update the cluster SMTP server configuration

Parameters:payload – json SMTP server configuration
update_snapshot_schedule(pd_name, schedule_id, payload)[source]

replace a snapshot schedule from the specified protection domain

Parameters:
  • pd_name – name of the protection domain
  • schedule_id – ID of the snapshot schedule
  • payload – json snapshot schedule configuration
update_snmp_trap(payload)[source]

edit the specified SNMP trap

Parameters:payload – json snmp trap configuration
update_snmp_user(payload)[source]

edit SNMP user to the cluster

Parameters:payload – json snmp user configuration
update_storage_pool(payload, **kwargs)[source]

update the specified storage pool

Parameters:payload – json storage pool configuration

Kwargs:

Parameters:force (boolean) – force the operation
update_vdisk(payload)[source]

update a vDisk

Parameters:payload – json vDisk configuration
verify_ssl = True
exception pytanix.client.NutanixException(http_status, code, msg)[source]

Bases: exceptions.Exception