Module netapp_ontap.resources.nvme_subsystem_controller

Copyright © 2022 NetApp Inc. All rights reserved.

Overview

Non-Volatile Memory Express (NVMe) subsystem controllers represent dynamic connections between hosts and a storage solution.
The NVMe subsystem controllers REST API provides information about connected hosts.

Examples

Retrieving the NVMe subsystem controllers for the entire system

from netapp_ontap import HostConnection
from netapp_ontap.resources import NvmeSubsystemController

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

[
    NvmeSubsystemController(
        {
            "svm": {
                "_links": {
                    "self": {
                        "href": "/api/svm/svms/f0f5b928-2593-11e9-94c4-00a0989a1c8e"
                    }
                },
                "uuid": "f0f5b928-2593-11e9-94c4-00a0989a1c8e",
                "name": "symmcon_fcnvme_vserver_0",
            },
            "id": "0040h",
            "subsystem": {
                "uuid": "14875240-2594-11e9-abde-00a098984313",
                "name": "symmcon_symmcon_fcnvme_vserver_0_subsystem_0",
                "_links": {
                    "self": {
                        "href": "/api/protocols/nvme/subsystems/14875240-2594-11e9-abde-00a098984313"
                    }
                },
            },
            "_links": {
                "self": {
                    "href": "/api/protocols/nvme/subsystem-controllers/14875240-2594-11e9-abde-00a098984313/0040h"
                }
            },
        }
    ),
    NvmeSubsystemController(
        {
            "svm": {
                "_links": {
                    "self": {
                        "href": "/api/svm/svms/f0f5b928-2593-11e9-94c4-00a0989a1c8e"
                    }
                },
                "uuid": "f0f5b928-2593-11e9-94c4-00a0989a1c8e",
                "name": "symmcon_fcnvme_vserver_0",
            },
            "id": "0041h",
            "subsystem": {
                "uuid": "14875240-2594-11e9-abde-00a098984313",
                "name": "symmcon_symmcon_fcnvme_vserver_0_subsystem_0",
                "_links": {
                    "self": {
                        "href": "/api/protocols/nvme/subsystems/14875240-2594-11e9-abde-00a098984313"
                    }
                },
            },
            "_links": {
                "self": {
                    "href": "/api/protocols/nvme/subsystem-controllers/14875240-2594-11e9-abde-00a098984313/0041h"
                }
            },
        }
    ),
    NvmeSubsystemController(
        {
            "svm": {
                "_links": {
                    "self": {
                        "href": "/api/svm/svms/f0f5b928-2593-11e9-94c4-00a0989a1c8e"
                    }
                },
                "uuid": "f0f5b928-2593-11e9-94c4-00a0989a1c8e",
                "name": "symmcon_fcnvme_vserver_0",
            },
            "id": "0040h",
            "subsystem": {
                "uuid": "1489d0d5-2594-11e9-94c4-00a0989a1c8e",
                "name": "symmcon_symmcon_fcnvme_vserver_0_subsystem_1",
                "_links": {
                    "self": {
                        "href": "/api/protocols/nvme/subsystems/1489d0d5-2594-11e9-94c4-00a0989a1c8e"
                    }
                },
            },
            "_links": {
                "self": {
                    "href": "/api/protocols/nvme/subsystem-controllers/1489d0d5-2594-11e9-94c4-00a0989a1c8e/0040h"
                }
            },
        }
    ),
    NvmeSubsystemController(
        {
            "svm": {
                "_links": {
                    "self": {
                        "href": "/api/svm/svms/f0f5b928-2593-11e9-94c4-00a0989a1c8e"
                    }
                },
                "uuid": "f0f5b928-2593-11e9-94c4-00a0989a1c8e",
                "name": "symmcon_fcnvme_vserver_0",
            },
            "id": "0041h",
            "subsystem": {
                "uuid": "1489d0d5-2594-11e9-94c4-00a0989a1c8e",
                "name": "symmcon_symmcon_fcnvme_vserver_0_subsystem_1",
                "_links": {
                    "self": {
                        "href": "/api/protocols/nvme/subsystems/1489d0d5-2594-11e9-94c4-00a0989a1c8e"
                    }
                },
            },
            "_links": {
                "self": {
                    "href": "/api/protocols/nvme/subsystem-controllers/1489d0d5-2594-11e9-94c4-00a0989a1c8e/0041h"
                }
            },
        }
    ),
]


Retrieving the NVMe subsystem controllers for a specific subsystem

from netapp_ontap import HostConnection
from netapp_ontap.resources import NvmeSubsystemController

with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
    print(
        list(
            NvmeSubsystemController.get_collection(
                **{"subsystem.uuid": "14875240-2594-11e9-abde-00a098984313"}
            )
        )
    )

[
    NvmeSubsystemController(
        {
            "svm": {
                "_links": {
                    "self": {
                        "href": "/api/svm/svms/f0f5b928-2593-11e9-94c4-00a0989a1c8e"
                    }
                },
                "uuid": "f0f5b928-2593-11e9-94c4-00a0989a1c8e",
                "name": "symmcon_fcnvme_vserver_0",
            },
            "id": "0040h",
            "subsystem": {
                "uuid": "14875240-2594-11e9-abde-00a098984313",
                "name": "symmcon_symmcon_fcnvme_vserver_0_subsystem_0",
                "_links": {
                    "self": {
                        "href": "/api/protocols/nvme/subsystems/14875240-2594-11e9-abde-00a098984313"
                    }
                },
            },
            "_links": {
                "self": {
                    "href": "/api/protocols/nvme/subsystem-controllers/14875240-2594-11e9-abde-00a098984313/0040h"
                }
            },
        }
    ),
    NvmeSubsystemController(
        {
            "svm": {
                "_links": {
                    "self": {
                        "href": "/api/svm/svms/f0f5b928-2593-11e9-94c4-00a0989a1c8e"
                    }
                },
                "uuid": "f0f5b928-2593-11e9-94c4-00a0989a1c8e",
                "name": "symmcon_fcnvme_vserver_0",
            },
            "id": "0041h",
            "subsystem": {
                "uuid": "14875240-2594-11e9-abde-00a098984313",
                "name": "symmcon_symmcon_fcnvme_vserver_0_subsystem_0",
                "_links": {
                    "self": {
                        "href": "/api/protocols/nvme/subsystems/14875240-2594-11e9-abde-00a098984313"
                    }
                },
            },
            "_links": {
                "self": {
                    "href": "/api/protocols/nvme/subsystem-controllers/14875240-2594-11e9-abde-00a098984313/0041h"
                }
            },
        }
    ),
]


Retrieving a specific NVMe subsystem controller

from netapp_ontap import HostConnection
from netapp_ontap.resources import NvmeSubsystemController

with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
    resource = NvmeSubsystemController(
        id="0040h", **{"subsystem.uuid": "14875240-2594-11e9-abde-00a098984313"}
    )
    resource.get()
    print(resource)

NvmeSubsystemController(
    {
        "host": {
            "nqn": "nqn.2014-08.org.nvmexpress:uuid:c2846cb1-89d2-4020-a3b0-71ce907b4eef",
            "transport_address": "nn-0x20000090fae00806:pn-0x10000090fae00806",
            "id": "b8546ca6097349e5b1558dc154fc073b",
        },
        "io_queue": {"count": 4, "depth": [32, 32, 32, 32]},
        "interface": {
            "name": "symmcon_lif_fcnvme_symmcon_fcnvme_vserver_0_3a_0",
            "uuid": "fa1c5941-2593-11e9-94c4-00a0989a1c8e",
            "transport_address": "nn-0x200400a0989a1c8d:pn-0x200500a0989a1c8d",
        },
        "svm": {
            "_links": {
                "self": {"href": "/api/svm/svms/f0f5b928-2593-11e9-94c4-00a0989a1c8e"}
            },
            "uuid": "f0f5b928-2593-11e9-94c4-00a0989a1c8e",
            "name": "symmcon_fcnvme_vserver_0",
        },
        "id": "0040h",
        "subsystem": {
            "uuid": "14875240-2594-11e9-abde-00a098984313",
            "name": "symmcon_symmcon_fcnvme_vserver_0_subsystem_0",
            "_links": {
                "self": {
                    "href": "/api/protocols/nvme/subsystems/14875240-2594-11e9-abde-00a098984313"
                }
            },
        },
        "admin_queue": {"depth": 32},
        "node": {
            "_links": {
                "self": {
                    "href": "/api/cluster/nodes/ebf66f05-2590-11e9-abde-00a098984313"
                }
            },
            "uuid": "ebf66f05-2590-11e9-abde-00a098984313",
            "name": "ssan-8040-94a",
        },
        "_links": {
            "self": {
                "href": "/api/protocols/nvme/subsystem-controllers/14875240-2594-11e9-abde-00a098984313/0040h"
            }
        },
    }
)

Classes

class NvmeSubsystemController (*args, **kwargs)

A Non-Volatile Memory Express (NVMe) subsystem controller represents a connection between a host and a storage solution.
An NVMe subsystem controller is identified by the NVMe subsystem UUID and the controller ID.

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

Retrieves NVMe subsystem controllers.

  • vserver nvme subsystem controller 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 NVMe subsystem controllers.

  • vserver nvme subsystem controller 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.

Methods

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

Retrieves an NVMe subsystem controller.

  • vserver nvme subsystem controller 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 NvmeSubsystemControllerSchema (*, 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 NvmeSubsystemController object

Ancestors

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

Class variables

admin_queue GET POST PATCH

The admin_queue field of the nvme_subsystem_controller.

host GET POST PATCH

The host field of the nvme_subsystem_controller.

id GET

The identifier of the subsystem controller. This field consists of 4 zero-filled hexadecimal digits followed by an 'h'.

Example: 0040h

interface GET POST PATCH

The interface field of the nvme_subsystem_controller.

io_queue GET POST PATCH

The io_queue field of the nvme_subsystem_controller.

The links field of the nvme_subsystem_controller.

node GET POST PATCH

The node field of the nvme_subsystem_controller.

subsystem GET POST PATCH

The subsystem field of the nvme_subsystem_controller.

svm GET POST PATCH

The svm field of the nvme_subsystem_controller.