Module netapp_ontap.resources.node
Copyright © 2023 NetApp Inc. All rights reserved.
This file has been automatically generated based on the ONTAP REST API documentation.
Overview
You can use this API to add nodes to a cluster, update node-specific configurations, and retrieve the current node configuration details.
Adding a node to a cluster
You can add a node to a cluster by issuing a POST /cluster/nodes request to a node currently in the cluster. All nodes must be running the same version of ONTAP to use this API. Mixed version joins are not supported in this release. You can provide properties as fields in the body of the POST request to configure node-specific settings. On a successful request, POST /cluster/nodes returns a status code of 202 and job information in the body of the request. You can use the /cluster/jobs APIs to track the status of the node add job.
Fields used for adding a node
Fields used for the /cluster/nodes APIs fall into the following categories:
- Required node fields
- Optional fields
- Network interface fields
- Records field
Required node fields
The following field is required for any POST /cluster/nodes request:
- cluster_interface.ip.address
Optional fields
All of the following fields are used to set up additional cluster-wide configurations:
- name
- location
- records
Network interface fields
You can set a node-specific configuration for each node by using the POST /cluster/nodes API. If you provide a field in the body of a node, provide it for all nodes in the POST body. You can provide the node management interface for each node if all node management interfaces in the cluster use the same subnet mask. If the node management interfaces use different subnet masks, use the /network/ip/interfaces API to configure the node management interfaces.
The records field
To add multiple nodes to the cluster in one request, provide an array named "records" with multiple node entries. Each node entry in "records" must follow the required and optional fields listed previously. When only adding a single node, you do not need a "records" field. See "Examples" for an example of how to use the "records" field.
Create recommended aggregates parameter
When you set the "create_recommended_aggregates" parameter to "true", aggregates based on an optimal layout recommended by the system are created on each of the nodes being added to the cluster. The default setting is "false".
Modifying node configurations
The following fields can be used to modify a node configuration:
- name
- location
Modifying service processor configurations
When modifying the "service_processor" properties, the job returns success immediately if valid network information is passed in. The values remain in their old state until the network information changes have taken effect on the service processor. You can poll the modified properties until the values are updated.
Deleting a node from a cluster
You can delete a node from the cluster. Before deleting a node from the cluster, shut down all of the node's shared resources, such as virtual interfaces to clients. If any of the node's shared resources are still active, the command fails.
You can use the "force" flag to forcibly remove a node that is down and cannot be brought online to remove its shared resources. This flag is set to "false" by default.
Node state
The node "state" field in the /cluster/nodes API represents the current operational state of individual nodes. Note that the state of a node is a transient value and can change depending on the current condition of the node, especially during reboot, takeover, and giveback. Possible values for the node state are:
- up - Node is fully operational and is able to accept and handle management requests. It is connected to a majority of healthy (up) nodes in the cluster through the cluster interconnect and all critical services are online.
- booting - Node is starting up and is not yet fully functional. It might not yet be accessible through the management interface or cluster interconnect. One or more critical services are offline on the node and the node is not taken over. The HA partner reports the node's firmware state as "SF_BOOTING", "SF_BOOTED", or "SF_CLUSTERWAIT".
- down - Node is known to be down. It cannot be reached through the management interface or cluster interconnect. The HA partner can be reached and reports that the node is halted/rebooted without takeover. Or, the HA partner cannot be reached (or no SFO configured) but the node shutdown request has been recorded by the quorum change coordinator. The state is reported by the node's HA partner.
- taken_over - Node is taken over by its HA partner. The state is reported by the node's HA partner.
- waiting_for_giveback - Node is taken over by its HA partner and is now ready and waiting for giveback. To bring the node up, either issue the "giveback" command to the HA partner node or wait for auto-giveback, if enabled. The state is reported by the node's HA partner.
- degraded - Node is known to be up but is not yet fully functional. The node can be reached through the cluster interconnect but one or more critical services are offline. Or, the node is not reachable but the node's HA partner can be reached and reports that the node is up with firmware state "SF_UP".
- unknown - Node state cannot be determined.
HA
The "ha" field in the /cluster/nodes API shows the takeover and giveback states of the node along with the current values of the HA fields "enabled"and "auto_giveback". You can modify the HA fields "enabled" and "auto_giveback", which will change the HA states of the node.
Takeover
The takeover "state" field shows the different takeover states of the node. When the state is "failed", the "code" and "message" fields display. Possible values for takeover states are:
- not_attempted - Takeover operation is not started and takeover is possible.
- not_possible - Takeover operation is not possible. Check the failure message.
- in_progress - Takeover operation is in progress. The node is taking over its partner.
- in_takeover - Takeover operation is complete.
- failed - Takeover operation failed. Check the failure message.
Possible values for takeover failure code and messages are:
- code: 852130 message: Failed to initiate takeover. Run the "storage failover show-takeover" command for more information.
- code: 852131 message: Takeover cannot be completed. Reason: disabled.
Giveback
The giveback "state" field shows the different giveback states of the node. When the state is "failed", the "code" and "message" fields display. Possible values for giveback states are:
- nothing_to_giveback - Node does not have partner aggregates to giveback.
- not_attempted - Giveback operation is not started.
- in_progress - Giveback operation is in progress.
- failed - Giveback operation failed. Check the failure message.
Possible values for giveback failure codes and messages are:
- code: 852126 message: Failed to initiate giveback. Run the "storage failover show-giveback" command for more information.
Performance monitoring
Performance of a node can be monitored by observing the metric.*
and statistics.*
properties. These properties show the performance of a node in terms of cpu utilization. The metric.*
properties denote an average whereas statistics.*
properties denote a real-time monotonically increasing value aggregated across all nodes.
Examples
The following examples show how to add nodes to a cluster, update node properties, shutdown and reboot a node, and remove a node from the cluster.
Adding a single node with a minimal configuration
from netapp_ontap import HostConnection
from netapp_ontap.resources import Node
with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
resource = Node()
resource.cluster_interface = {"ip": {"address": "1.1.1.1"}}
resource.post(hydrate=True)
print(resource)
Adding multiple nodes in the same request and creating recommended aggregates
from netapp_ontap import HostConnection
from netapp_ontap.resources import Node
with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
resource = Node()
resource.records = [
{"name": "node1", "cluster_interface": {"ip": {"address": "1.1.1.1"}}},
{"name": "node2", "cluster_interface": {"ip": {"address": "2.2.2.2"}}},
]
resource.post(hydrate=True, create_recommended_aggregates=True)
print(resource)
Modifying a cluster-wide configuration
from netapp_ontap import HostConnection
from netapp_ontap.resources import Node
with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
resource = Node()
resource.name = "renamedNode"
resource.location = "newLocation"
resource.patch()
Shutting down a node
from netapp_ontap import HostConnection
from netapp_ontap.resources import Node
with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
resource = Node(uuid="{uuid}")
resource.patch(hydrate=True, action="shutdown")
Powering off a node using SP assistance
from netapp_ontap import HostConnection
from netapp_ontap.resources import Node
with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
resource = Node(uuid="{uuid}")
resource.patch(hydrate=True, action="power_off")
Deleting a node from a cluster
from netapp_ontap import HostConnection
from netapp_ontap.resources import Node
with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
resource = Node(uuid="{uuid}")
resource.delete()
Force a node deletion from a cluster
from netapp_ontap import HostConnection
from netapp_ontap.resources import Node
with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
resource = Node(uuid="{uuid}")
resource.delete(force=True)
Retrieving the state of all nodes in a cluster
from netapp_ontap import HostConnection
from netapp_ontap.resources import Node
with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
print(list(Node.get_collection(fields="state")))
[
Node(
{
"name": "node2",
"state": "up",
"_links": {
"self": {
"href": "/api/cluster/nodes/54440ec3-6127-11e9-a959-005056bb76f9"
}
},
"uuid": "54440ec3-6127-11e9-a959-005056bb76f9",
}
),
Node(
{
"name": "node1",
"state": "up",
"_links": {
"self": {
"href": "/api/cluster/nodes/e02dbef1-6126-11e9-b8fb-005056bb9ce4"
}
},
"uuid": "e02dbef1-6126-11e9-b8fb-005056bb9ce4",
}
),
]
Retrieving nodes that are in the spare low condition in a cluster
from netapp_ontap import HostConnection
from netapp_ontap.resources import Node
with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
print(list(Node.get_collection(fields="is_spares_low")))
[
Node(
{
"name": "node2",
"_links": {
"self": {
"href": "/api/cluster/nodes/54440ec3-6127-11e9-a959-005056bb76f9"
}
},
"uuid": "54440ec3-6127-11e9-a959-005056bb76f9",
}
),
Node(
{
"name": "node1",
"_links": {
"self": {
"href": "/api/cluster/nodes/e02dbef1-6126-11e9-b8fb-005056bb9ce4"
}
},
"uuid": "e02dbef1-6126-11e9-b8fb-005056bb9ce4",
}
),
]
Retrieving statistics and metric for a node
In this example, the API returns the "statistics" and "metric" properties.
from netapp_ontap import HostConnection
from netapp_ontap.resources import Node
with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
print(list(Node.get_collection(fields="statistics,metric")))
[
Node(
{
"name": "prij-vsim1",
"statistics": {
"processor_utilization_base": 74330229886,
"processor_utilization_raw": 6409411622,
"status": "ok",
"timestamp": "2019-12-19T15:50:48+00:00",
},
"metric": {
"duration": "PT15S",
"timestamp": "2019-12-19T15:50:45+00:00",
"processor_utilization": 3,
"status": "ok",
},
"uuid": "6b29327b-21ca-11ea-99aa-005056bb420b",
}
)
]
Retrieving takeover and giveback failure codes and messages
from netapp_ontap import HostConnection
from netapp_ontap.resources import Node
with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
print(list(Node.get_collection(fields="ha")))
[
Node(
{
"ha": {
"auto_giveback": False,
"ports": [{}, {}],
"takeover": {
"state": "not_possible",
"failure": {
"code": 852131,
"message": "Takeover cannot be completed. Reason: disabled.",
},
},
"giveback": {"state": "nothing_to_giveback"},
"partners": [
{"name": "node1", "uuid": "e02dbef1-6126-11e9-b8fb-005056bb9ce4"}
],
"enabled": False,
},
"name": "node2",
"_links": {
"self": {
"href": "/api/cluster/nodes/54440ec3-6127-11e9-a959-005056bb76f9"
}
},
"uuid": "54440ec3-6127-11e9-a959-005056bb76f9",
}
),
Node(
{
"ha": {
"auto_giveback": False,
"ports": [{}, {}],
"takeover": {
"state": "not_possible",
"failure": {
"code": 852131,
"message": "Takeover cannot be completed. Reason: disabled.",
},
},
"giveback": {"state": "nothing_to_giveback"},
"partners": [
{"name": "node2", "uuid": "54440ec3-6127-11e9-a959-005056bb76f9"}
],
"enabled": False,
},
"name": "node1",
"_links": {
"self": {
"href": "/api/cluster/nodes/e02dbef1-6126-11e9-b8fb-005056bb9ce4"
}
},
"uuid": "e02dbef1-6126-11e9-b8fb-005056bb9ce4",
}
),
]
Retrieving external cache information for a node
In this example, the API returns the external_cache property.
from netapp_ontap import HostConnection
from netapp_ontap.resources import Node
with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
print(list(Node.get_collection(fields="external_cache")))
[
Node(
{
"name": "node2",
"_links": {
"self": {
"href": "/api/cluster/nodes/71af8235-bea9-11eb-874a-005056bbab13"
}
},
"external_cache": {
"is_hya_enabled": True,
"is_rewarm_enabled": False,
"is_enabled": False,
"pcs_size": 256,
},
"uuid": "71af8235-bea9-11eb-874a-005056bbab13",
}
),
Node(
{
"name": "node1",
"_links": {
"self": {
"href": "/api/cluster/nodes/8c4cbf08-bea9-11eb-b8ae-005056bb16aa"
}
},
"external_cache": {
"is_hya_enabled": True,
"is_rewarm_enabled": False,
"is_enabled": False,
"pcs_size": 256,
},
"uuid": "8c4cbf08-bea9-11eb-b8ae-005056bb16aa",
}
),
]
Classes
class Node (*args, **kwargs)
-
Complete node 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
Static methods
def count_collection (*args, connection: HostConnection = None, **kwargs) -> int
-
Returns a count of all Node resources that match the provided query
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('Node')] = None, body: Union[Resource, dict] = None, poll: bool = True, poll_interval: Optional[int] = None, poll_timeout: Optional[int] = None, connection: HostConnection = None, **kwargs) -> NetAppResponse
-
Deletes a node from the cluster. Note that before deleting a node from the cluster, you must shut down all of the node's shared resources, such as virtual interfaces to clients. If any of the node's shared resources are still active, the command fails.
Optional parameters:
force
- Forcibly removes a node that is down and cannot be brought online to remove its shared resources. This flag is set to "false" by default.
Related ONTAP commands
cluster remove-node
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 the nodes in the cluster.
Expensive properties
There is an added computational 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. SeeRequesting specific fields
to learn more. *statistics.*
*metric.*
Related ONTAP commands
system node 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 the nodes in the cluster.
Expensive properties
There is an added computational 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. SeeRequesting specific fields
to learn more. *statistics.*
*metric.*
Related ONTAP commands
system node 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
objectsRaises
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('Node')] = None, poll: bool = True, poll_interval: Optional[int] = None, poll_timeout: Optional[int] = None, connection: HostConnection = None, **kwargs) -> NetAppResponse
-
Updates the node information or performs shutdown/reboot actions on a node.
Related ONTAP commands
cluster ha modify
storage failover modify
system node modify
system node reboot
system node power off
system node power on
system service-processor network modify
system service-processor reboot-sp
system service-processor image modify
system service-processor network auto-configuration enable
system service-processor network auto-configuration disable
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('Node')], *args, hydrate: bool = False, poll: bool = True, poll_interval: Optional[int] = None, poll_timeout: Optional[int] = None, connection: HostConnection = None, **kwargs) -> Union[List[Node], NetAppResponse]
-
Adds a node or nodes to the cluster.
Required properties
cluster_interface.ip.address
Related ONTAP commands
cluster add-node
network interface create
storage aggregate auto-provision
system node modify
system service-processor network modify
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 aNetAppResponse
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: Optional[int] = None, poll_timeout: Optional[int] = None, **kwargs) -> NetAppResponse
-
Deletes a node from the cluster. Note that before deleting a node from the cluster, you must shut down all of the node's shared resources, such as virtual interfaces to clients. If any of the node's shared resources are still active, the command fails.
Optional parameters:
force
- Forcibly removes a node that is down and cannot be brought online to remove its shared resources. This flag is set to "false" by default.
Related ONTAP commands
cluster remove-node
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.
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
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 information for the node.
Related ONTAP commands
cluster add-node-status
cluster date show
cluster ha show
network interface show
network port show
storage failover show
system controller show
system node show
system node show-discovered
system service-processor network show
system service-processor show
system service-processor ssh show
system service-processor image show
version
system service-processor api-service show
system service-processor network auto-configuration 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: Optional[int] = None, poll_timeout: Optional[int] = None, **kwargs) -> NetAppResponse
-
Updates the node information or performs shutdown/reboot actions on a node.
Related ONTAP commands
cluster ha modify
storage failover modify
system node modify
system node reboot
system node power off
system node power on
system service-processor network modify
system service-processor reboot-sp
system service-processor image modify
system service-processor network auto-configuration enable
system service-processor network auto-configuration disable
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 def post (self, hydrate: bool = False, poll: bool = True, poll_interval: Optional[int] = None, poll_timeout: Optional[int] = None, **kwargs) -> NetAppResponse
-
Adds a node or nodes to the cluster.
Required properties
cluster_interface.ip.address
Related ONTAP commands
cluster add-node
network interface create
storage aggregate auto-provision
system node modify
system service-processor network modify
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.
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 NodeSchema (*, 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 Node object
Ancestors
- netapp_ontap.resource.ResourceSchema
- marshmallow.schema.Schema
- marshmallow.base.SchemaABC
Class variables
-
cluster_interface: ClusterNodesClusterInterface POST
-
The cluster_interface field of the node.
-
cluster_interfaces: List[ClusterNodesManagementInterfaces] GET
-
The cluster_interfaces field of the node.
-
controller: ClusterNodesController GET POST PATCH
-
The controller field of the node.
-
date: ImpreciseDateTime GET
-
The current or "wall clock" time of the node in ISO-8601 date, time, and time zone format. The ISO-8601 date and time are localized based on the ONTAP cluster's timezone setting.
Example: 2019-04-17T15:49:26.000+0000
-
external_cache: ClusterNodesExternalCache GET
-
The external_cache field of the node.
-
ha: NodeHa GET POST PATCH
-
The ha field of the node.
-
hw_assist: HwAssist GET
-
The hw_assist field of the node.
-
is_spares_low: bool GET
-
Specifies whether or not the node is in spares low condition.
-
links: SelfLink GET
-
The links field of the node.
-
location: str GET POST PATCH
-
The location field of the node.
Example: rack 2 row 5
-
management_interface: ClusterNodesManagementInterface POST
-
The management_interface field of the node.
-
management_interfaces: List[ClusterNodesManagementInterfaces] GET
-
The management_interfaces field of the node.
-
membership: str GET
-
Possible values:
- available - A node is detected on the internal cluster network and can be added to the cluster. Nodes that have a membership of "available" are not returned when a GET request is called when the cluster exists. Provide a query on the "membership" property for available to scan for nodes on the cluster network. Nodes that have a membership of "available" are returned automatically before a cluster is created.
- joining - Joining nodes are in the process of being added to the cluster. The node might be progressing through the steps to become a member or might have failed. The job to add the node or create the cluster provides details on the current progress of the node.
- member - Nodes that are members have successfully joined the cluster.
Valid choices:
- available
- joining
- member
-
metric: NodeMetrics GET
-
The metric field of the node.
-
metrocluster: ClusterNodesMetrocluster GET POST PATCH
-
The metrocluster field of the node.
-
model: str GET
-
The model field of the node.
Example: FAS3070
-
name: str GET POST PATCH
-
The name field of the node.
Example: node-01
-
nvram: ClusterNodesNvram GET POST PATCH
-
The nvram field of the node.
-
owner: str GET POST PATCH
-
Owner of the node.
Example: Example Corp
-
serial_number: str GET
-
The serial_number field of the node.
Example: 4048820-60-9
-
service_processor: ServiceProcessor GET POST PATCH
-
The service_processor field of the node.
-
snaplock: ClusterNodesSnaplock GET
-
The snaplock field of the node.
-
state: str GET
-
State of the node:
- up - Node is up and operational.
- booting - Node is booting up.
- down - Node has stopped or is dumping core.
- taken_over - Node has been taken over by its HA partner and is not yet waiting for giveback.
- waiting_for_giveback - Node has been taken over by its HA partner and is waiting for the HA partner to giveback disks.
- degraded - Node has one or more critical services offline.
- unknown - Node or its HA partner cannot be contacted and there is no information on the node's state.
Valid choices:
- up
- booting
- down
- taken_over
- waiting_for_giveback
- degraded
- unknown
-
statistics: NodeStatistics GET
-
The statistics field of the node.
-
storage_configuration: str GET
-
The storage configuration in the system. Possible values:
- mixed_path
- single_path
- multi_path
- quad_path
- mixed_path_ha
- single_path_ha
- multi_path_ha
- quad_path_ha
- unknown
Valid choices:
- unknown
- single_path
- multi_path
- mixed_path
- quad_path
- single_path_ha
- multi_path_ha
- mixed_path_ha
- quad_path_ha
-
system_id: str GET
-
The system_id field of the node.
Example: 92027651
-
system_machine_type: str GET
-
OEM system machine type.
Example: 7Y56-CTOWW1
-
uptime: Size GET
-
The total time, in seconds, that the node has been up.
Example: 300536
-
uuid: str GET
-
The uuid field of the node.
Example: 4ea7a442-86d1-11e0-ae1c-123478563412
-
vendor_serial_number: str GET
-
OEM vendor serial number.
Example: 791603000068
-
version: Version GET
-
The version field of the node.
-
vm: ClusterNodesVm GET POST PATCH
-
The vm field of the node.