Module netapp_ontap.resources.flexcache

Copyright © 2022 NetApp Inc. All rights reserved.

Overview

FlexCache is a persistent cache of an origin volume. An origin volume can only be a FlexVol while a FlexCache is always a FlexGroup.
The following relationship configurations are supported:

  • Intra-Vserver where FlexCache and the corresponding origin volume reside in the same Vserver.
  • Cross-Vserver but intra-cluster where FlexCache and the origin volume reside in the same cluster but belong to different Vservers.
  • Cross-cluster where FlexCache and the origin volume reside in different clusters.
    FlexCache supports fan-out and more than one FlexCache can be created from one origin volume. This API retrieves and manages FlexCache configurations in the cache cluster.

FlexCache APIs

The following APIs can be used to perform operations related with FlexCache:

  • GET /api/storage/flexcache/flexcaches
  • GET /api/storage/flexcache/flexcaches/{uuid}
  • POST /api/storage/flexcache/flexcaches
  • DELETE /api/storage/flexcache/flexcaches/{uuid}

Examples

Creating a FlexCache

The POST request is used to create a FlexCache.

from netapp_ontap import HostConnection
from netapp_ontap.resources import Flexcache

with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
    resource = Flexcache()
    resource.aggregates = [{"name": "aggr_1"}]
    resource.name = "fc_333"
    resource.origins = [{"svm": {"name": "vs_3"}, "volume": {"name": "vol_o1"}}]
    resource.svm = {"name": "vs_1"}
    resource.post(hydrate=True)
    print(resource)

Flexcache(
    {
        "origins": [{"svm": {"name": "vs_3"}, "volume": {"name": "vol_o1"}}],
        "svm": {"name": "vs_1"},
        "aggregates": [{"name": "aggr_1"}],
        "name": "fc_333",
    }
)

curl -X POST "https:///api/storage/flexcache/flexcaches" -H "accept: application/json" -H "Content-Type: application/json" -d "{ "aggregates": [ { "name": "aggr_1" } ], "name": "fc_333", "origins": [ { "svm": { "name": "vs_3" }, "volume": { "name": "vol_o1" } } ], "svm": { "name": "vs_1" }, "path": "/fc_333", "prepopulate": { "dir_paths": [ "/dir1" ] } }"

The response:

{ "job": { "uuid": "e751dd5d-0f3c-11e9-8b2b-0050568e0b79", "_links": { "self": { "href": "/api/cluster/jobs/e751dd5d-0f3c-11e9-8b2b-0050568e0b79" } } } }

from netapp_ontap import HostConnection
from netapp_ontap.resources import Flexcache

with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
    resource = Flexcache()
    resource.aggregates = [{"name": "aggr_1"}]
    resource.name = "fc_333"
    resource.origins = [{"svm": {"name": "vs_3"}, "volume": {"name": "vol_o1"}}]
    resource.svm = {"name": "vs_1"}
    resource.path = "/       fc_333"
    resource.prepopulate = {
        "dir_paths": ["/dir1"],
        "exclude_dir_paths": ["/dir1/dir11"],
    }
    resource.post(hydrate=True)
    print(resource)

Flexcache(
    {
        "origins": [{"svm": {"name": "vs_3"}, "volume": {"name": "vol_o1"}}],
        "svm": {"name": "vs_1"},
        "path": "/       fc_333",
        "prepopulate": {"dir_paths": ["/dir1"], "exclude_dir_paths": ["/dir1/dir11"]},
        "aggregates": [{"name": "aggr_1"}],
        "name": "fc_333",
    }
)

` curl -X POST "https:///api/storage/flexcache/flexcaches" -H "accept: application/json" -H "Content-Type: application/json" -d "{ "aggregates": [ { "name": "aggr_1" } ], "name": "fc_333", "origins": [ { "svm": { "name": "vs_3" }, "volume": { "name": "vol_o1" } } ], "svm":{ "name": "vs_1" }, "dr_cache": true, "path": "/fc_333", "prepopulate": { "dir_paths": [ "/dir1" ] } }"

The response:

{ "job": { "uuid": "e751dd5d-0f3c-11e9-8b2b-0050568e0b79", "_links": { "self": { "href": "/api/cluster/jobs/e751dd5d-0f3c-11e9-8b2b-0050568e0b79" } } } }

### Retrieving FlexCache attributes
The GET request is used to retrieve FlexCache attributes. The object includes a large set of fields which can be expensive to retrieve. Most notably, the fields size, guarantee.type, aggregates, path, origins.ip_address, origins.size, and origins.state are expensive to retrieve. The recommended method to use this API is to filter and retrieve only the required fields.
```python
from netapp_ontap import HostConnection
from netapp_ontap.resources import Flexcache

with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
    print(list(Flexcache.get_collection()))

[
    Flexcache(
        {
            "uuid": "04d5e07b-0ebe-11e9-8180-0050568e0b79",
            "name": "fc_322",
            "_links": {
                "self": {
                    "href": "/api/storage/flexcache/flexcaches/04d5e07b-0ebe-11e9-8180-0050568e0b79"
                }
            },
        }
    ),
    Flexcache(
        {
            "uuid": "47902654-0ea4-11e9-8180-0050568e0b79",
            "name": "fc_321",
            "_links": {
                "self": {
                    "href": "/api/storage/flexcache/flexcaches/47902654-0ea4-11e9-8180-0050568e0b79"
                }
            },
        }
    ),
    Flexcache(
        {
            "uuid": "77e911ff-0ebe-11e9-8180-0050568e0b79",
            "name": "fc_323",
            "_links": {
                "self": {
                    "href": "/api/storage/flexcache/flexcaches/77e911ff-0ebe-11e9-8180-0050568e0b79"
                }
            },
        }
    ),
    Flexcache(
        {
            "uuid": "ddb42bbc-0e95-11e9-8180-0050568e0b79",
            "name": "fc_32",
            "_links": {
                "self": {
                    "href": "/api/storage/flexcache/flexcaches/ddb42bbc-0e95-11e9-8180-0050568e0b79"
                }
            },
        }
    ),
    Flexcache(
        {
            "uuid": "ec774932-0f3c-11e9-8b2b-0050568e0b79",
            "name": "fc_333",
            "_links": {
                "self": {
                    "href": "/api/storage/flexcache/flexcaches/ec774932-0f3c-11e9-8b2b-0050568e0b79"
                }
            },
        }
    ),
]

Retrieving the attributes of a FlexCache

The GET request is used to retrieve the attributes of a FlexCache. The object includes a large set of fields which can be expensive to retrieve. Most notably, the fields size, guarantee.type, aggregates, path, origins.ip_address, origins.size, and origins.state are expensive to retrieve. The recommended method to use this API is to filter and retrieve only the required fields.

from netapp_ontap import HostConnection
from netapp_ontap.resources import Flexcache

with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
    resource = Flexcache(uuid="ec774932-0f3c-11e9-8b2b-0050568e0b79")
    resource.get()
    print(resource)

Flexcache(
    {
        "origins": [
            {
                "cluster": {
                    "uuid": "50733f81-0e90-11e9-b391-0050568e4115",
                    "name": "node2",
                },
                "svm": {"uuid": "8aa2cd28-0e92-11e9-b391-0050568e4115", "name": "vs_3"},
                "volume": {
                    "uuid": "2bc957dd-2617-4afb-8d2f-66ac6070d313",
                    "name": "vol_o1",
                },
                "create_time": "2019-01-03T15:19:55+05:30",
                "ip_address": "10.140.103.175",
                "state": "online",
                "size": 20971520,
            }
        ],
        "svm": {"uuid": "e708fbe2-0e92-11e9-8180-0050568e0b79", "name": "vs_1"},
        "uuid": "ec774932-0f3c-11e9-8b2b-0050568e0b79",
        "guarantee": {"type": "volume"},
        "dr_cache": True,
        "size": 4294967296,
        "aggregates": [
            {"name": "aggr_1", "uuid": "26f34b76-88f8-4a47-b5e0-d8e901fb1114"}
        ],
        "name": "fc_333",
        "_links": {
            "self": {
                "href": "/api/storage/flexcache/flexcaches/ec774932-0f3c-11e9-8b2b-0050568e0b79"
            }
        },
    }
)

Deleting a FlexCache

The DELETE request is used to delete a FlexCache.

from netapp_ontap import HostConnection
from netapp_ontap.resources import Flexcache

with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
    resource = Flexcache(uuid="ec774932-0f3c-11e9-8b2b-0050568e0b79")
    resource.delete()

Modifying a FlexCache volume

Use the PATCH request to update a FlexCache volume.

from netapp_ontap import HostConnection
from netapp_ontap.resources import Flexcache

with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
    resource = Flexcache(uuid="ec774932-0f3c-11e9-8b2b-0050568e0b79")
    resource.prepopulate = {"dir_paths": ["/dir1"]}
    resource.patch()

The call

curl -X PATCH "https:///api/storage/flexcache/flexcaches/ec774932-0f3c-11e9-8b2b-0050568e0b79" -H "accept: application/json" -H "Content-Type: application/json" -d "{ "prepopulate": { "dir_paths": [ "/dir1" ], "exclude_dir_paths": [ "/dir1/dir11" ] } }"

The response:

{ "job": { "uuid": "b574c48c-1da7-11eb-b006-005056ac6a93", "_links": { "self": { "href": "/api/cluster/jobs/b574c48c-1da7-11eb-b006-005056ac6a93" } } } } ````

Classes

class Flexcache (*args, **kwargs)

Defines the cache endpoint of FlexCache.

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 delete_collection(*args, records: Iterable[_ForwardRef('Flexcache')] = None, body: Union[Resource, dict] = None, poll: bool = True, poll_interval: Union[int, NoneType] = None, poll_timeout: Union[int, NoneType] = None, connection: HostConnection = None, **kwargs) -> NetAppResponse

Deletes a FlexCache. If a FlexCache volume is online, it is offlined before deletion.

  • volume flexcache delete

Learn more


Delete all objects in a collection which match the given query.

All records on the host which match the query will be deleted.

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 delete the collection of bars for a particular foo, the foo.name value should be passed.
records
Can be provided in place of a query. If so, this list of objects will be deleted from the host.
body
The body of the delete request. This could be a Resource instance or a dictionary object.
poll
If set to True, the call will not return until the asynchronous job on the host has completed. Has no effect if the host did not return a job response.
poll_interval
If the operation returns a job, this specifies how often to query the job for updates.
poll_timeout
If the operation returns a job, this specifies how long to continue monitoring the job's status for completion.
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. Only resources matching this query will be deleted.

Returns

A NetAppResponse object containing the details of the HTTP response.

Raises

NetAppRestError: If the API call returned a status code >= 400

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

Retrieves FlexCache in the cluster.

Expensive properties

There is an added cost to retrieving values for these properties. They are not included by default in GET results and must be explicitly requested using the fields query parameter. See Requesting specific fields to learn more. * origins.ip_address - IP address of origin. * origins.size - Physical size of origin. * origins.state - State of origin. * size - Physical size of FlexCache. * guarantee.type - Space guarantee style of FlexCache. * aggregates.name or aggregates.uuid - Name or UUID of aggregrate of FlexCache volume. * path - Fully-qualified path of the owning SVM's namespace where the FlexCache is mounted.

  • volume flexcache show

Learn more


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]

Retrieves FlexCache in the cluster.

Expensive properties

There is an added cost to retrieving values for these properties. They are not included by default in GET results and must be explicitly requested using the fields query parameter. See Requesting specific fields to learn more. * origins.ip_address - IP address of origin. * origins.size - Physical size of origin. * origins.state - State of origin. * size - Physical size of FlexCache. * guarantee.type - Space guarantee style of FlexCache. * aggregates.name or aggregates.uuid - Name or UUID of aggregrate of FlexCache volume. * path - Fully-qualified path of the owning SVM's namespace where the FlexCache is mounted.

  • volume flexcache show

Learn more


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.

def patch_collection(body: dict, *args, records: Iterable[_ForwardRef('Flexcache')] = None, poll: bool = True, poll_interval: Union[int, NoneType] = None, poll_timeout: Union[int, NoneType] = None, connection: HostConnection = None, **kwargs) -> NetAppResponse

Prepopulates a FlexCache volume in the cluster.

Required properties

  • uuid - FlexCache volume UUID.
  • prepopulate.dir_paths - List of directory-paths to be prepopulated for the FlexCache volume.
  • prepopulate.exclude_dir_paths - List of directory-paths to be excluded from prepopulation for the FlexCache volume.

Default property values

If not specified in PATCH, the following default property value is assigned: * prepopulate.recurse - Default value is "true".

  • volume flexcache prepopulate start

Learn more


Patch all objects in a collection which match the given query.

All records on the host which match the query will be patched with the provided body.

Args

body
A dictionary of name/value pairs to set on all matching members of the collection. The body argument will be ignored if records is provided.
*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 patch the collection of bars for a particular foo, the foo.name value should be passed.
records
Can be provided in place of a query. If so, this list of objects will be patched on the host.
poll
If set to True, the call will not return until the asynchronous job on the host has completed. Has no effect if the host did not return a job response.
poll_interval
If the operation returns a job, this specifies how often to query the job for updates.
poll_timeout
If the operation returns a job, this specifies how long to continue monitoring the job's status for completion.
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. Only resources matching this query will be patched.

Returns

A NetAppResponse object containing the details of the HTTP response.

Raises

NetAppRestError: If the API call returned a status code >= 400

def post_collection(records: Iterable[_ForwardRef('Flexcache')], *args, hydrate: bool = False, poll: bool = True, poll_interval: Union[int, NoneType] = None, poll_timeout: Union[int, NoneType] = None, connection: HostConnection = None, **kwargs) -> Union[List[Flexcache], NetAppResponse]

Creates a FlexCache in the cluster.

Required properties

  • name - Name of FlexCache volume.
  • origins.volume.name or origins.volume.uuid - Name or UUID of origin volume.
  • origins.svm.name - Name of origin Vserver.
  • svm.name or svm.uuid - Name or UUID of Vserver where FlexCache will be created.
  • path - Path to mount the FlexCache volume
  • prepopulate.dir_paths - List of directory-paths to be prepopulated for the FlexCache volume.
  • prepopulate.exclude_dir_paths - List of directory-paths to be excluded from prepopulation for he FlexCache volume.

Default property values

If not specified in POST, the following default property values are assigned: * size - 10% of origin volume size or 1GB per constituent, whichever is greater. * guarantee.type - none. FlexCache is thin provisioned by default. * constituents_per_aggregate - 4 if aggregates.name or aggregates.uuid is used. * use_tiered_aggregate - false if aggr-list is not used. This property is only used when auto-provisioning a FlexCache volume. * is_disconnected_mode_off_for_locks - false. This property specifies if the origin will honor the cache side locks when doing the lock checks in the disconnected mode. * dr_cache - false if FlexCache is not a DR cache. This property is used to create a DR FlexCache. * global_file_locking_enabled - false. This property specifies whether global file locking is enabled on the FlexCache volume.

  • volume flexcache create
  • volume flexcache prepopulate start

Learn more


Send this collection of objects to the host as a creation request.

Args

records
A list of Resource objects to send to the server to be created.
*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 create a bar for a particular foo, the foo.name value should be passed.
hydrate
If set to True, after the response is received from the call, a a GET call will be made to refresh all fields of each object. When hydrate is set to True, poll must also be set to True.
poll
If set to True, the call will not return until the asynchronous job on the host has completed. Has no effect if the host did not return a job response.
poll_interval
If the operation returns a job, this specifies how often to query the job for updates.
poll_timeout
If the operation returns a job, this specifies how long to continue monitoring the job's status for completion.
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. Only resources matching this query will be patched.

Returns

A list of Resource objects matching the provided
type which have been created by the host and returned. This is _not_
 
the same list that was provided, so to continue using the object, you
 

should save this list. If poll is set to False, then a NetAppResponse object is returned instead.

Raises

NetAppRestError: If the API call returned a status code >= 400

Methods

def delete(self, body: Union[Resource, dict] = None, poll: bool = True, poll_interval: Union[int, NoneType] = None, poll_timeout: Union[int, NoneType] = None, **kwargs) -> NetAppResponse

Deletes a FlexCache. If a FlexCache volume is online, it is offlined before deletion.

  • volume flexcache delete

Learn more


Send a deletion request to the host for this object.

Args

body
The body of the delete request. This could be a Resource instance or a dictionary object.
poll
If set to True, the call will not return until the asynchronous job on the host has completed. Has no effect if the host did not return a job response.
poll_interval
If the operation returns a job, this specifies how often to query the job for updates.
poll_timeout
If the operation returns a job, this specifies how long to continue monitoring the job's status for completion.
**kwargs
Any key/value pairs passed will be sent as query parameters to the host.

Returns

A NetAppResponse object containing the details of the HTTP response.

Raises

NetAppRestError: If the API call returned a status code >= 400

def get(self, **kwargs) -> NetAppResponse

Retrieves attributes of the FlexCache in the cluster.

Expensive properties

There is an added cost to retrieving values for these properties. They are included by default in GET. The recommended method to use this API is to filter and retrieve only the required fields. See Requesting specific fields to learn more. * origins.ip_address - IP address of origin. * origins.size - Physical size of origin. * origins.state - State of origin. * size - Physical size of FlexCache. * guarantee.type - Space guarantee style of FlexCache. * aggregates.name or aggregates.uuid - Name or UUID of aggregrate of FlexCache volume. * path - Fully-qualified path of the owning SVM's namespace where the FlexCache is mounted.

  • volume flexcache show

Learn more


Fetch the details of the object from the host.

Requires the keys to be set (if any). After returning, new or changed properties from the host will be set on the instance.

Returns

A NetAppResponse object containing the details of the HTTP response.

Raises

NetAppRestError: If the API call returned a status code >= 400

def patch(self, hydrate: bool = False, poll: bool = True, poll_interval: Union[int, NoneType] = None, poll_timeout: Union[int, NoneType] = None, **kwargs) -> NetAppResponse

Prepopulates a FlexCache volume in the cluster.

Required properties

  • uuid - FlexCache volume UUID.
  • prepopulate.dir_paths - List of directory-paths to be prepopulated for the FlexCache volume.
  • prepopulate.exclude_dir_paths - List of directory-paths to be excluded from prepopulation for the FlexCache volume.

Default property values

If not specified in PATCH, the following default property value is assigned: * prepopulate.recurse - Default value is "true".

  • volume flexcache prepopulate start

Learn more


Send the difference in the object's state to the host as a modification request.

Calculates the difference in the object's state since the last time we interacted with the host and sends this in the request body.

Args

hydrate
If set to True, after the response is received from the call, a a GET call will be made to refresh all fields of the object.
poll
If set to True, the call will not return until the asynchronous job on the host has completed. Has no effect if the host did not return a job response.
poll_interval
If the operation returns a job, this specifies how often to query the job for updates.
poll_timeout
If the operation returns a job, this specifies how long to continue monitoring the job's status for completion.
**kwargs
Any key/value pairs passed will normally be sent as query parameters to the host. If any of these pairs are parameters that are sent as formdata then only parameters of that type will be accepted and all others will be discarded.

Returns

A NetAppResponse object containing the details of the HTTP response.

Raises

NetAppRestError: If the API call returned a status code >= 400

def post(self, hydrate: bool = False, poll: bool = True, poll_interval: Union[int, NoneType] = None, poll_timeout: Union[int, NoneType] = None, **kwargs) -> NetAppResponse

Creates a FlexCache in the cluster.

Required properties

  • name - Name of FlexCache volume.
  • origins.volume.name or origins.volume.uuid - Name or UUID of origin volume.
  • origins.svm.name - Name of origin Vserver.
  • svm.name or svm.uuid - Name or UUID of Vserver where FlexCache will be created.
  • path - Path to mount the FlexCache volume
  • prepopulate.dir_paths - List of directory-paths to be prepopulated for the FlexCache volume.
  • prepopulate.exclude_dir_paths - List of directory-paths to be excluded from prepopulation for he FlexCache volume.

Default property values

If not specified in POST, the following default property values are assigned: * size - 10% of origin volume size or 1GB per constituent, whichever is greater. * guarantee.type - none. FlexCache is thin provisioned by default. * constituents_per_aggregate - 4 if aggregates.name or aggregates.uuid is used. * use_tiered_aggregate - false if aggr-list is not used. This property is only used when auto-provisioning a FlexCache volume. * is_disconnected_mode_off_for_locks - false. This property specifies if the origin will honor the cache side locks when doing the lock checks in the disconnected mode. * dr_cache - false if FlexCache is not a DR cache. This property is used to create a DR FlexCache. * global_file_locking_enabled - false. This property specifies whether global file locking is enabled on the FlexCache volume.

  • volume flexcache create
  • volume flexcache prepopulate start

Learn more


Send this object to the host as a creation request.

Args

hydrate
If set to True, after the response is received from the call, a a GET call will be made to refresh all fields of the object.
poll
If set to True, the call will not return until the asynchronous job on the host has completed. Has no effect if the host did not return a job response.
poll_interval
If the operation returns a job, this specifies how often to query the job for updates.
poll_timeout
If the operation returns a job, this specifies how long to continue monitoring the job's status for completion.
**kwargs
Any key/value pairs passed will normally be sent as query parameters to the host. If any of these pairs are parameters that are sent as formdata then only parameters of that type will be accepted and all others will be discarded.

Returns

A NetAppResponse object containing the details of the HTTP response.

Raises

NetAppRestError: If the API call returned a status code >= 400

Inherited members

class FlexcacheSchema (*, 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 Flexcache object

Ancestors

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

Class variables

aggregates GET POST

The aggregates field of the flexcache.

constituents_per_aggregate GET POST

Number of FlexCache constituents per aggregate when the 'aggregates' field is mentioned.

dr_cache GET POST

If set to true, a DR cache is created.

global_file_locking_enabled GET POST

Specifies whether or not a FlexCache volume has global file locking mode enabled. Global file locking mode is a mode where protocol read locking semantics are enforced across all FlexCaches and origins of a FlexCache volume. When global file locking mode is enabled, the "is_disconnected_mode_off_for_locks" flag is always set to "true".

guarantee GET POST

The guarantee field of the flexcache.

The links field of the flexcache.

name GET POST

FlexCache name

Example: vol1

origins GET POST

The origins field of the flexcache.

path GET POST

The fully-qualified path in the owning SVM's namespace at which the FlexCache is mounted. The path is case insensitive and must be unique within a SVM's namespace. Path must begin with '/' and must not end with '/'. Only one FlexCache be mounted at any given junction path.

Example: /user/my_fc

prepopulate POST PATCH

The prepopulate field of the flexcache.

size GET POST

Physical size of the FlexCache. The recommended size for a FlexCache is 10% of the origin volume. The minimum FlexCache constituent size is 1GB.

svm GET POST

The svm field of the flexcache.

use_tiered_aggregate GET POST

Specifies whether or not a Fabricpool-enabled aggregate can be used in FlexCache creation. The use_tiered_aggregate is only used when auto-provisioning a FlexCache volume.

uuid GET

FlexCache UUID. Unique identifier for the FlexCache.

Example: 1cd8a442-86d1-11e0-ae1c-123478563412