Module netapp_ontap.resources.plex
Copyright © 2019 NetApp Inc. All rights reserved.
Overview
The Storage Aggregate Plex API provides relevant state information for each plex in the aggregate.
For each plex, details are provided for the RAID groups in the plex and the disks that make up each RAID group.
Examples
Retrieving the list of plexes in an aggregate
The following example shows the response with the list of plexes in an aggregate:
# The API:
/api/storage/aggregates/{uuid}/plexes
# The call:
curl -X GET "https://<mgmt-ip>/api/storage/aggregates/19425837-f2fa-4a9f-8f01-712f626c983c/plexes" -H "accept: application/json"
# The response:
{
"records": [
{
"name": "plex0",
},
{
"name": "plex4",
}
],
"num_records": 2,
}
Retrieving a specific plex in an aggregate
The following example shows the response when requesting a specific plex of an aggregate:
# The API:
/api/storage/aggregates/{uuid}/plexes/{name}
# The call:
curl -X GET "https://<mgmt-ip>/api/storage/aggregates/19425837-f2fa-4a9f-8f01-712f626c983c/plexes/plex0" -H "accept: application/json"
# The response:
{
"aggregate": {
"uuid": "19425837-f2fa-4a9f-8f01-712f626c983c",
"name": "test1",
},
"name": "plex0",
"online": true,
"state": "normal",
"pool": "pool0",
"resync": {
"active": false
},
"raid_groups": [
{
"name": "rg0",
"cache_tier": false,
"degraded": false,
"recomputing_parity": {
"active": false
},
"reconstruct": {
"active": false
},
"disks": [
{
"position": "dparity",
"state": "normal",
"type": "ssd",
"usable_size": 86769664,
"disk": {
"name": "1.1.29",
}
},
{
"position": "parity",
"state": "normal",
"type": "ssd",
"usable_size": 86769664,
"disk": {
"name": "1.1.4",
}
},
{
"position": "data",
"state": "normal",
"type": "ssd",
"usable_size": 86769664,
"disk": {
"name": "1.1.30",
}
},
{
"position": "data",
"state": "normal",
"type": "ssd",
"usable_size": 86769664,
"disk": {
"name": "1.1.5",
}
},
{
"position": "data",
"state": "normal",
"type": "ssd",
"usable_size": 86769664,
"disk": {
"name": "1.1.31",
}
},
{
"position": "data",
"state": "normal",
"type": "ssd",
"usable_size": 86769664,
"disk": {
"name": "1.1.6",
}
}
]
}
],
}
Classes
class Plex (*args, **kwargs)
-
Allows interaction with Plex objects on the host
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 the collection of plexes for the specified aggregate.
Related ONTAP commands
storage aggregate plex 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 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 the collection of plexes for the specified aggregate.
Related ONTAP commands
storage aggregate plex show
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 the plex specified by the aggregate UUID and plex name.
Related ONTAP commands
storage aggregate plex 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
Inherited members
class PlexSchema (only=None, exclude=(), many=False, context=None, load_only=(), dump_only=(), partial=False, unknown=None)
-
The fields of the Plex object
Ancestors
- netapp_ontap.resource.ResourceSchema
- marshmallow.schema.Schema
- marshmallow.schema.BaseSchema
- marshmallow.base.SchemaABC
Class variables
var aggregate
-
The aggregate field of the plex.
var name
-
Plex name
Example: plex0
var online
-
Plex is online
var opts
var pool
-
SyncMirror pool assignment
Valid choices:
- pool0
- pool1
var raid_groups
-
The raid_groups field of the plex.
var resync
-
The resync field of the plex.
var state
-
Plex state
Valid choices:
- normal
- failed
- out_of_date