Module netapp_ontap.resources.xc_volume

Copyright © 2022 NetApp Inc. All rights reserved.

This file has been automatically generated based on the ONTAP REST API documentation.

Classes

class XcVolume (*args, **kwargs)

volume clone for cluster peer.

Initialize the instance of the resource.

Any keyword arguments are set on the instance as properties. For example, if the class was named 'MyResource', then this statement would be true:

MyResource(name='foo').name == 'foo'

Args

*args
Each positional argument represents a parent key as used in the URL of the object. That is, each value will be used to fill in a segment of the URL which refers to some parent object. The order of these arguments must match the order they are specified in the URL, from left to right.
**kwargs
each entry will have its key set as an attribute name on the instance and its value will be the value of that attribute.

Ancestors

Static methods

def count_collection(*args, connection: HostConnection = None, **kwargs) -> int

Fetch a count of all objects of this type from the host.

This calls GET on the object to determine the number of records. It is more efficient than calling get_collection() because it will not construct any objects. Query parameters can be passed in as kwargs to determine a count of objects that match some filtered criteria.

Args

*args
Each entry represents a parent key which is used to build the path to the child object. If the URL definition were /api/foos/{foo.name}/bars, then to get the count of bars for a particular foo, the foo.name value should be passed.
connection
The HostConnection object to use for this API call. If unset, tries to use the connection which is set globally for the library or from the current context.
**kwargs
Any key/value pairs passed will be sent as query parameters to the host. These query parameters can affect the count. A return_records query param will be ignored.

Returns

On success, returns an integer count of the objects of this type. On failure, returns -1.

Raises

NetAppRestError: If the API call returned a status code >= 400, or if there is no connection available to use either passed in or on the library.

def find(*args, connection: HostConnection = None, **kwargs) -> Resource

Cross cluster GET volumes


Find an instance of an object on the host given a query.

The host will be queried with the provided key/value pairs to find a matching resource. If 0 are found, None will be returned. If more than 1 is found, an error will be raised or returned. If there is exactly 1 matching record, then it will be returned.

Args

*args
Each entry represents a parent key which is used to build the path to the child object. If the URL definition were /api/foos/{foo.name}/bars, then to find a bar for a particular foo, the foo.name value should be passed.
connection
The HostConnection object to use for this API call. If unset, tries to use the connection which is set globally for the library or from the current context.
**kwargs
Any key/value pairs passed will be sent as query parameters to the host.

Returns

A Resource object containing the details of the object or None if no matches were found.

Raises

NetAppRestError: If the API call returned more than 1 matching resource.

def get_collection(*args, connection: HostConnection = None, max_records: int = None, **kwargs) -> Iterable[Resource]

Cross cluster GET volumes


Fetch a list of all objects of this type from the host.

This is a lazy fetch, making API calls only as necessary when the result of this call is iterated over. For instance, if max_records is set to 5, then iterating over the collection causes an API call to be sent to the server once for every 5 records. If the client stops iterating before getting to the 6th record, then no additional API calls are made.

Args

*args
Each entry represents a parent key which is used to build the path to the child object. If the URL definition were /api/foos/{foo.name}/bars, then to get the collection of bars for a particular foo, the foo.name value should be passed.
connection
The HostConnection object to use for this API call. If unset, tries to use the connection which is set globally for the library or from the current context.
max_records
The maximum number of records to return per call
**kwargs
Any key/value pairs passed will be sent as query parameters to the host.

Returns

A list of Resource objects

Raises

NetAppRestError: If there is no connection available to use either passed in or on the library. This would be not be raised when get_collection() is called, but rather when the result is iterated.

Inherited members

class XcVolumeSchema (*, only: Union[Sequence[str], Set[str]] = None, exclude: Union[Sequence[str], Set[str]] = (), many: bool = False, context: Dict = None, load_only: Union[Sequence[str], Set[str]] = (), dump_only: Union[Sequence[str], Set[str]] = (), partial: Union[bool, Sequence[str], Set[str]] = False, unknown: str = None)

The fields of the XcVolume object

Ancestors

  • netapp_ontap.resource.ResourceSchema
  • marshmallow.schema.Schema
  • marshmallow.base.SchemaABC

Class variables

access_time_enabled: bool GET PATCH

Indicates whether or not access time updates are enabled on the volume.

activity_tracking: VolumeActivityTracking GET POST PATCH

The activity_tracking field of the xc_volume.

aggregates: List[XcS3BucketAggregates] GET POST PATCH

Aggregate hosting the volume. Required on POST.

analytics: VolumeAnalytics GET POST PATCH

The analytics field of the xc_volume.

anti_ransomware: AntiRansomwareVolume GET POST PATCH

The anti_ransomware field of the xc_volume.

anti_ransomware_state: str GET POST PATCH

The Anti-ransomware state of the volume. If no "anti_ransomware_state" property is specified, the volume inherits the value from its parent SVM's "anti_ransomware_default_volume_state" property. If this value is "disabled", Anti-ransomware is disabled on the volume. If this value is "enabled", Anti-ransomware is enabled on the volume and alerts are raised if any suspect is detected for those volumes. If this value is "dry_run", Anti-ransomware is enabled in the dry-run or learning mode on the volume. The "dry_run" state is same as the "enabled" state except that the analytics data is used here for learning. No alerts are raised for any detections or violations. If this value is "paused", Anti-ransomware is paused on the volume. Additionally, three more states are available, which are only valid for GET. If this value is "disable_in_progress", Anti-ransomware monitoring is being disabled and a cleanup operation is in effect. If this value is "enable_paused", Anti-ransomware is paused on the volume from its earlier enabled state. If this value is "dry_run_paused", Anti-ransomware monitoring is paused on the volume from its earlier dry_run state. For POST, the valid Anti-ransomware states are only "disabled", "enabled" and "dry_run", whereas for PATCH, "paused" is also valid along with the three valid states for POST.

Valid choices:

  • disabled
  • enabled
  • dry_run
  • paused
  • disable_in_progress
  • enable_paused
  • dry_run_paused
application: VolumeApplication GET POST PATCH

The application field of the xc_volume.

asynchronous_directory_delete: VolumeAsynchronousDirectoryDelete GET POST PATCH

The asynchronous_directory_delete field of the xc_volume.

autosize: VolumeAutosize GET POST PATCH

The autosize field of the xc_volume.

clone: VolumeClone GET POST PATCH

The clone field of the xc_volume.

cloud_retrieval_policy: str GET POST PATCH

This parameter specifies the cloud retrieval policy for the volume. This policy determines which tiered out blocks to retrieve from the capacity tier to the performance tier. The available cloud retrieval policies are "default" policy retrieves tiered data based on the underlying tiering policy. If the tiering policy is 'auto', tiered data is retrieved only for random client driven data reads. If the tiering policy is 'none' or 'snapshot_only', tiered data is retrieved for random and sequential client driven data reads. If the tiering policy is 'all', tiered data is not retrieved. "on_read" policy retrieves tiered data for all client driven data reads. "never" policy never retrieves tiered data. "promote" policy retrieves all eligible tiered data automatically during the next scheduled scan. It is only supported when the tiering policy is 'none' or 'snapshot_only'. If the tiering policy is 'snapshot_only', the only data brought back is the data in the AFS. Data that is only in a snapshot copy stays in the cloud and if tiering policy is 'none' then all data is retrieved.

Valid choices:

  • default
  • on_read
  • never
  • promote
comment: str GET POST PATCH

A comment for the volume. Valid in POST or PATCH.

consistency_group: VolumeConsistencyGroup GET POST PATCH

The consistency_group field of the xc_volume.

constituents: List[VolumeConstituents] GET POST PATCH

FlexGroup Constituents. FlexGroup Constituents can be retrieved more efficiently by specifying "is_constituent=true" or "is_constituent=true&flexgroup.uuid=" as query parameters.

constituents_per_aggregate: Size POST PATCH

Specifies the number of times to iterate over the aggregates listed with the "aggregates.name" or "aggregates.uuid" when creating or expanding a FlexGroup volume. If a volume is being created on a single aggregate, the system creates a flexible volume if the "constituents_per_aggregate" field is not specified, or a FlexGroup volume if it is specified. If a volume is being created on multiple aggregates, the system always creates a FlexGroup volume. The root constituent of a FlexGroup volume is always placed on the first aggregate in the list.

convert_unicode: bool GET POST PATCH

Specifies whether directory Unicode format conversion is enabled when directories are accessed by NFS clients.

create_time: ImpreciseDateTime GET

Creation time of the volume. This field is generated when the volume is created.

Example: 2018-06-04T19:00:00Z

efficiency: VolumeEfficiency GET POST PATCH

The efficiency field of the xc_volume.

encryption: VolumeEncryption GET POST PATCH

The encryption field of the xc_volume.

error_state: VolumeErrorState GET POST PATCH

The error_state field of the xc_volume.

files: VolumeFiles GET POST PATCH

The files field of the xc_volume.

flash_pool: VolumeFlashPool GET POST PATCH

The flash_pool field of the xc_volume.

flexcache_endpoint_type: str GET

FlexCache endpoint type.
none ‐ The volume is neither a FlexCache nor origin of any FlexCache.
cache ‐ The volume is a FlexCache volume.
origin ‐ The volume is origin of a FlexCache volume.

Valid choices:

  • none
  • cache
  • origin
flexgroup: VolumeFlexgroup GET POST PATCH

The flexgroup field of the xc_volume.

granular_data: bool GET POST PATCH

State of granular data on the volume. This setting is true by default when creating a new FlexGroup volume, but can be specified as false at the time of creation via a POST request. On FlexVol volumes, the setting is always false, as only FlexGroup volumes and FlexGroup constituents support this feature. Once enabled, this setting can only be disabled by restoring a Snapshot copy. Earlier versions of ONTAP (pre 9.11) are not compatible with this feature. Therefore, reverting to an earlier version of ONTAP is not possible unless this volume is deleted or restored to a Snapshot copy that was taken before the setting was enabled.

guarantee: VolumeGuarantee GET POST PATCH

The guarantee field of the xc_volume.

idcs_scanner: VolumeIdcsScanner GET POST PATCH

The idcs_scanner field of the xc_volume.

is_object_store: bool GET

Specifies whether the volume is provisioned for an object store server.

is_svm_root: bool GET

Specifies whether the volume is a root volume of the SVM it belongs to.

language: str GET POST

Language encoding setting for volume. If no language is specified, the volume inherits its SVM language encoding setting.

Valid choices:

  • ar
  • ar.utf_8
  • c
  • c.utf_8
  • cs
  • cs.utf_8
  • da
  • da.utf_8
  • de
  • de.utf_8
  • en
  • en.utf_8
  • en_us
  • en_us.utf_8
  • es
  • es.utf_8
  • fi
  • fi.utf_8
  • fr
  • fr.utf_8
  • he
  • he.utf_8
  • hr
  • hr.utf_8
  • hu
  • hu.utf_8
  • it
  • it.utf_8
  • ja
  • ja.utf_8
  • ja_jp.932
  • ja_jp.932.utf_8
  • ja_jp.pck
  • ja_jp.pck.utf_8
  • ja_jp.pck_v2
  • ja_jp.pck_v2.utf_8
  • ja_v1
  • ja_v1.utf_8
  • ko
  • ko.utf_8
  • nl
  • nl.utf_8
  • no
  • no.utf_8
  • pl
  • pl.utf_8
  • pt
  • pt.utf_8
  • ro
  • ro.utf_8
  • ru
  • ru.utf_8
  • sk
  • sk.utf_8
  • sl
  • sl.utf_8
  • sv
  • sv.utf_8
  • tr
  • tr.utf_8
  • utf8mb4
  • zh
  • zh.gbk
  • zh.gbk.utf_8
  • zh.utf_8
  • zh_tw
  • zh_tw.big5
  • zh_tw.big5.utf_8
  • zh_tw.utf_8

The links field of the xc_volume.

max_dir_size: Size GET POST PATCH

Maximum directory size. This value sets maximum size, in bytes, to which a directory can grow. The default maximum directory size for FlexVol volumes is model-dependent, and optimized for the size of system memory. Before increasing the maximum directory size, involve technical support.

metric: VolumeMetrics GET

The metric field of the xc_volume.

movement: VolumeMovement GET POST PATCH

The movement field of the xc_volume.

msid: Size GET POST PATCH

The volume's Mirror Set ID.

name: str GET POST PATCH

Volume name. The name of volume must start with an alphabetic character (a to z or A to Z) or an underscore (_). The name must be 197 or fewer characters in length for FlexGroups, and 203 or fewer characters in length for all other types of volumes. Volume names must be unique within an SVM. Required on POST.

Example: vol_cs_dept

nas: VolumeNas GET POST PATCH

The nas field of the xc_volume.

qos: VolumeQos GET POST PATCH

The qos field of the xc_volume.

queue_for_encryption: bool GET PATCH

Specifies whether the volume is queued for encryption.

quota: VolumeQuota GET POST PATCH

The quota field of the xc_volume.

rebalancing: VolumeRebalancing GET POST PATCH

The rebalancing field of the xc_volume.

scheduled_snapshot_naming_scheme: str GET POST PATCH

Naming Scheme for automatic Snapshot copies:

  • create_time - Automatic Snapshot copies are saved as per the start of their current date and time.
  • ordinal - Latest automatic snapshot copy is saved as .0 and subsequent copies will follow the create_time naming convention.

Valid choices:

  • create_time
  • ordinal
size: Size GET POST PATCH

Physical size of the volume, in bytes. The minimum size for a FlexVol volume is 20MB and the minimum size for a FlexGroup volume is 200MB per constituent. The recommended size for a FlexGroup volume is a minimum of 100GB per constituent. For all volumes, the default size is equal to the minimum size.

snaplock: VolumeSnaplock GET POST PATCH

The snaplock field of the xc_volume.

snapmirror: VolumeSnapmirror GET POST PATCH

The snapmirror field of the xc_volume.

snapshot_count: Size GET

Number of Snapshot copies in the volume.

snapshot_policy: SnapshotPolicy GET POST PATCH

The snapshot_policy field of the xc_volume.

space: VolumeSpace GET POST PATCH

The space field of the xc_volume.

state: str GET POST PATCH

Volume state. Client access is supported only when volume is online and junctioned. Taking volume to offline or restricted state removes its junction path and blocks client access. When volume is in restricted state some operations like parity reconstruction and iron on commit are allowed. The 'mixed' state applies to FlexGroup volumes only and cannot be specified as a target state. An 'error' state implies that the volume is not in a state to serve data.

Valid choices:

  • error
  • mixed
  • offline
  • online
  • restricted
statistics: VolumeStatistics GET

The statistics field of the xc_volume.

status: List[str] GET

Describes the current status of a volume.

style: str GET POST

The style of the volume. If "style" is not specified, the volume type is determined based on the specified aggregates. Specifying a single aggregate, without "constituents_per_aggregate", creates a flexible volume. Specifying multiple aggregates, or a single aggregate with "constituents_per_aggregate", creates a FlexGroup. Specifying a volume "style" creates a volume of that type. For example, if the style is "flexvol" you must specify a single aggregate. If the style is "flexgroup", the system either uses the specified aggregates or automatically provisions aggregates if there are no specified aggregates. The style "flexgroup_constiutent" is not supported when creating a volume.
flexvol ‐ flexible volumes and FlexClone volumes
flexgroup ‐ FlexGroup volumes
flexgroup_constituent ‐ FlexGroup constituents.

Valid choices:

  • flexvol
  • flexgroup
  • flexgroup_constituent
svm: Svm GET POST

The svm field of the xc_volume.

tiering: VolumeTiering GET POST PATCH

The tiering field of the xc_volume.

type: str GET POST

Type of the volume.
rw ‐ read-write volume.
dp ‐ data-protection volume.
ls ‐ load-sharing dp volume. Valid in GET.

Valid choices:

  • rw
  • dp
  • ls
use_mirrored_aggregates: bool POST

Specifies whether mirrored aggregates are selected when provisioning a FlexGroup without specifying "aggregates.name" or "aggregates.uuid". Only mirrored aggregates are used if this parameter is set to 'true' and only unmirrored aggregates are used if this parameter is set to 'false'. Aggregate level mirroring for a FlexGroup can be changed by moving all of the constituents to the required aggregates. The default value is 'true' for a MetroCluster configuration and is 'false' for a non-MetroCluster configuration.

uuid: str GET

Unique identifier for the volume. This corresponds to the instance-uuid that is exposed in the CLI and ONTAPI. It does not change due to a volume move.

Example: 028baa66-41bd-11e9-81d5-00a0986138f7