Module netapp_ontap.resources.flexcache_origin
Copyright © 2019 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 the origin of FlexCache onfigurations in the origin cluster.
FlexCache APIs
The following APIs can be used to perform operations related to the origin of a FlexCache: – GET /api/storage/flexcache/origins – GET /api/storage/flexcache/origins/{uuid}
Examples
Retrieving origins of FlexCache attributes
The GET request is used to retrieve the origins of FlexCache attributes.
# The API:
/api/storage/flexcache/origins
# The call:
curl -X GET "https://<mgmt-ip>/api/storage/flexcache/origins?" -H "accept: application/json"
# The response:
{
"records": [
{
"uuid": "2bc957dd-2617-4afb-8d2f-66ac6070d313",
"name": "vol_o1",
"_links": {
"self": {
"href": "/api/storage/flexcache/origins/2bc957dd-2617-4afb-8d2f-66ac6070d313"
}
}
},
{
"uuid": "80fcaee4-0dc2-488b-afb8-86d28a34cda8",
"name": "vol_1",
"_links": {
"self": {
"href": "/api/storage/flexcache/origins/80fcaee4-0dc2-488b-afb8-86d28a34cda8"
}
}
}
],
"num_records": 2,
"_links": {
"self": {
"href": "/api/storage/flexcache/origins?"
}
}
}
Retrieving the attributes of an origin volume
The GET request is used to retrieve the attributes of an origin volume.
# The API:
/api/storage/flexcache/origins/{uuid}
# The call:
curl -X GET "https://<mgmt-ip>/api/storage/flexcache/origins/80fcaee4-0dc2-488b-afb8-86d28a34cda8" -H "accept: application/json"
# The response:
{
"uuid": "80fcaee4-0dc2-488b-afb8-86d28a34cda8",
"name": "vol_1",
"svm": {
"name": "vs_3",
"uuid": "8aa2cd28-0e92-11e9-b391-0050568e4115"
},
"flexcaches": [
{
"ip_address": "10.140.103.183",
"create_time": "2019-01-02T19:27:22+05:30",
"volume": {
"name": "fc_42",
"uuid": "4e7f9d49-0e96-11e9-aed0-0050568eddbe"
},
"svm": {
"name": "vs_1_4",
"uuid": "36f68322-0e93-11e9-aed0-0050568eddbe"
},
"cluster": {
"name": "node4",
"uuid": "c32f16b8-0e90-11e9-aed0-0050568eddbe"
}
},
{
"ip_address": "10.140.103.183",
"create_time": "2019-01-02T21:08:34+05:30",
"volume": {
"name": "fc_421",
"uuid": "71ee8f36-0ea4-11e9-aed0-0050568eddbe"
},
"svm": {
"name": "vs_1_4",
"uuid": "36f68322-0e93-11e9-aed0-0050568eddbe"
},
"cluster": {
"name": "node4",
"uuid": "c32f16b8-0e90-11e9-aed0-0050568eddbe"
}
},
{
"ip_address": "10.140.103.183",
"create_time": "2019-01-03T11:14:38+05:30",
"volume": {
"name": "fc_422"
},
"svm": {
"name": "vs_1_4",
"uuid": "36f68322-0e93-11e9-aed0-0050568eddbe"
},
"cluster": {
"name": "node4",
"uuid": "c32f16b8-0e90-11e9-aed0-0050568eddbe"
}
},
{
"ip_address": "10.140.103.179",
"size": 4294967296,
"create_time": "2019-01-02T19:24:14+05:30",
"state": "online",
"volume": {
"name": "fc_32",
"uuid": "ddb42bbc-0e95-11e9-8180-0050568e0b79"
},
"svm": {
"name": "vs_1",
"uuid": "e708fbe2-0e92-11e9-8180-0050568e0b79"
},
"cluster": {
"name": "node3",
"uuid": "8eb21b3b-0e90-11e9-8180-0050568e0b79"
}
},
{
"ip_address": "10.140.103.179",
"size": 4294967296,
"create_time": "2019-01-02T21:07:23+05:30",
"state": "online",
"volume": {
"name": "fc_321",
"uuid": "47902654-0ea4-11e9-8180-0050568e0b79"
},
"svm": {
"name": "vs_1",
"uuid": "e708fbe2-0e92-11e9-8180-0050568e0b79"
},
"cluster": {
"name": "node3",
"uuid": "8eb21b3b-0e90-11e9-8180-0050568e0b79"
}
},
{
"ip_address": "10.140.103.179",
"size": 4294967296,
"create_time": "2019-01-03T00:11:38+05:30",
"state": "online",
"volume": {
"name": "fc_322",
"uuid": "04d5e07b-0ebe-11e9-8180-0050568e0b79"
},
"svm": {
"name": "vs_1",
"uuid": "e708fbe2-0e92-11e9-8180-0050568e0b79"
},
"cluster": {
"name": "node3",
"uuid": "8eb21b3b-0e90-11e9-8180-0050568e0b79"
}
},
{
"ip_address": "10.140.103.179",
"size": 4294967296,
"create_time": "2019-01-03T00:14:52+05:30",
"state": "online",
"volume": {
"name": "fc_323",
"uuid": "77e911ff-0ebe-11e9-8180-0050568e0b79"
},
"svm": {
"name": "vs_1",
"uuid": "e708fbe2-0e92-11e9-8180-0050568e0b79"
},
"cluster": {
"name": "node3",
"uuid": "8eb21b3b-0e90-11e9-8180-0050568e0b79"
}
}
],
"_links": {
"self": {
"href": "/api/storage/flexcache/origins/80fcaee4-0dc2-488b-afb8-86d28a34cda8"
}
}
}
Classes
class FlexcacheOrigin (*args, **kwargs)
-
Defines the origin 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 find(*args, connection: HostConnection = None, **kwargs) -> Resource
-
Retrieves origin of FlexCaches 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. SeeDOC Requesting specific fields
to learn more. *flexcaches.ip_address
- IP address of FlexCache. *flexcaches.size
- Physical size of FlexCache. *flexcaches.state
- State of FlexCache.Related ONTAP commands
volume flexcache origin show-caches
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 or 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.Raises
NetAppRestError
: If the API call did not return exactly 1 matching resource. def get_collection(*args, connection: HostConnection = None, max_records: int = None, **kwargs) -> typing.Iterable
-
Retrieves origin of FlexCaches 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. SeeDOC Requesting specific fields
to learn more. *flexcaches.ip_address
- IP address of FlexCache. *flexcaches.size
- Physical size of FlexCache. *flexcaches.state
- State of FlexCache.Related ONTAP commands
volume flexcache origin show-caches
Learn more
Fetch a list of all objects of this type from the host.
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
objectsRaises
NetAppRestError
: If there is no connection available to use either passed in or on the library.
Methods
def get(self, **kwargs) -> NetAppResponse
-
Retrieves attributes of the origin of a FlexCache in the cluster.
Expensive properties
There is an added cost to retrieving values for these properties. They are included by default in GET results. The recommended method to use this API is to use filter and retrieve only the required fields. See
DOC Requesting specific fields
to learn more. *flexcaches.ip_address
- IP address of FlexCache. *flexcaches.size
- Physical size of FlexCache. *flexcaches.state
- State of FlexCache.Related ONTAP commands
volume flexcache origin show-caches
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
Inherited members
class FlexcacheOriginSchema (only=None, exclude=(), many=False, context=None, load_only=(), dump_only=(), partial=False, unknown=None)
-
The fields of the FlexcacheOrigin object
Ancestors
- netapp_ontap.resource.ResourceSchema
- marshmallow.schema.Schema
- marshmallow.schema.BaseSchema
- marshmallow.base.SchemaABC
Class variables
var flexcaches
-
The flexcaches field of the flexcache_origin.
var links
-
The links field of the flexcache_origin.
var name
-
Origin volume name
Example: vol1, vol_2
var opts
var svm
-
The svm field of the flexcache_origin.
var uuid
-
Origin volume UUID. Unique identifier for origin of FlexCache.
Example: 1cd8a442-86d1-11e0-ae1c-123478563512