Module netapp_ontap.resources.cluster_space

Copyright © 2024 NetApp Inc. All rights reserved.

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

Retrieves cluster-wide storage details across the different tiers. Storage details include storage efficiency, block storage and cloud storage information.


Example

Retrieving cluster-wide storage details

The following example shows the details returned for a GET request on cluster-wide storage:


from netapp_ontap import HostConnection
from netapp_ontap.resources import ClusterSpace

with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
    resource = ClusterSpace()
    resource.get()
    print(resource)

ClusterSpace(
    {
        "efficiency": {
            "ratio": 1.134099616858238,
            "savings": 143360,
            "logical_used": 1212416,
        },
        "efficiency_without_snapshots_flexclones": {
            "ratio": 1.0,
            "savings": 0,
            "logical_used": 167936,
        },
        "efficiency_without_snapshots": {
            "ratio": 1.0,
            "savings": 0,
            "logical_used": 167936,
        },
        "block_storage": {
            "used": 6269812736,
            "inactive_data": 0,
            "size": 56125612032,
            "available": 49855799296,
            "medias": [
                {
                    "efficiency": {"ratio": 1.0, "savings": 0, "logical_used": 0},
                    "efficiency_without_snapshots_flexclones": {
                        "ratio": 1.0,
                        "savings": 0,
                        "logical_used": 0,
                    },
                    "used": 6163390464,
                    "size": 9891430400,
                    "efficiency_without_snapshots": {
                        "ratio": 1.0,
                        "savings": 0,
                        "logical_used": 0,
                    },
                    "available": 3728039936,
                    "type": "ssd",
                    "physical_used": 1832886272,
                },
                {
                    "efficiency": {
                        "ratio": 1.303964757709251,
                        "savings": 282624,
                        "logical_used": 1212416,
                    },
                    "efficiency_without_snapshots_flexclones": {
                        "ratio": 1.0,
                        "savings": 0,
                        "logical_used": 167936,
                    },
                    "used": 106422272,
                    "size": 46234181632,
                    "efficiency_without_snapshots": {
                        "ratio": 1.0,
                        "savings": 0,
                        "logical_used": 167936,
                    },
                    "available": 46127759360,
                    "type": "vmdisk",
                    "physical_used": 5398528,
                },
            ],
            "physical_used": 1838284800,
        },
    }
)




from netapp_ontap import HostConnection
from netapp_ontap.resources import ClusterSpace

with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
    resource = ClusterSpace()
    resource.get()
    print(resource)

ClusterSpace(
    {
        "efficiency_without_snapshots": {
            "ratio": 1.0,
            "savings": 73728,
            "logical_used": 73728,
        },
        "block_storage": {
            "delayed_frees": 57139200,
            "total_metadata_used": 58679865344,
            "full_threshold_percent": 98,
            "nearly_full_threshold_percent": 85,
            "physical_used_percent": 46,
            "size": 125357654016,
            "available": 66677788672,
            "physical_used": 58679865344,
        },
    }
)


Updating the threshold value for a cluster


from netapp_ontap import HostConnection
from netapp_ontap.resources import ClusterSpace

with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
    resource = ClusterSpace()
    resource.block_storage.nearly_full_threshold_percent = "85"
    resource.patch()


Classes

class ClusterSpace (*args, **kwargs)

Provides information on cluster-wide storage details across the different tiers. Storage details include storage efficiency, block storage and cloud storage information.

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

Methods

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

Retrieves cluster-wide storage details across the different tiers. By default, this endpoint returns all fields. Storage details include storage efficiency, block storage and cloud storage information. Supports the following roles: admin, and readonly.

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 or if not all of the keys required are present and config.STRICT_GET has been set to True.

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

Updates full_threshold_percent and nearly_full_threshold_percent for the complete cluster.

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.
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 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 ClusterSpaceSchema (*, only: types.StrSequenceOrSet | None = None, exclude: types.StrSequenceOrSet = (), many: bool | None = None, context: dict | None = None, load_only: types.StrSequenceOrSet = (), dump_only: types.StrSequenceOrSet = (), partial: bool | types.StrSequenceOrSet | None = None, unknown: str | None = None)

The fields of the ClusterSpace object

Ancestors

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

Class variables

block_storage: ClusterSpaceBlockStorage GET POST PATCH

Configuration information for the locally attached portion of the storage across the cluster. When a cloud store is also used by the storage, this is referred to as the performance tier.

cloud_storage: ClusterSpaceCloudStorage GET

Configuration information for the cloud storage portion of all the aggregates across the cluster. This is referred to as the capacity tier.

efficiency: SpaceEfficiency GET

The efficiency field of the cluster_space.

efficiency_without_snapshots: SpaceEfficiency GET

The efficiency_without_snapshots field of the cluster_space.

efficiency_without_snapshots_flexclones: SpaceEfficiency GET

The efficiency_without_snapshots_flexclones field of the cluster_space.