Module netapp_ontap.resources.dcn_cluster
Copyright © 2026 NetApp Inc. All rights reserved.
This file has been automatically generated based on the ONTAP REST API documentation.
Overview
This API can be used to create a compute cluster and retrieve the current compute cluster configuration.
Creating a compute cluster
A compute cluster can be created by issuing a POST request on /dcn/cluster. The following parameters are required:
- nodes
- network_pool
Nodes field
The nodes field should be populated with a subset of discovered data compute nodes. Available data compute nodes can be found by issuing a GET request on /dcn/cluster/nodes?membership=available. This request returns a list of discovered compute nodes found on the network. The membership=available query parameter is optional if a compute cluster does not already exist. If names are not provided for each node, then a name will be automatically generated.
Examples
Creating a compute cluster
from netapp_ontap import HostConnection
from netapp_ontap.resources import DcnCluster
with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
resource = DcnCluster()
resource.nodes = [
{"serial_number": "4048820-60-9"},
{"serial_number": "4048820-47-3"},
{"serial_number": "4048820-53-6"},
]
resource.network_pool = {
"subnet": {"address": "10.27.0.1", "netmask": "24"},
"ip_ranges": [{"start": "10.27.0.10", "end": "10.27.0.10"}],
}
resource.service_ip = {
"address": "10.10.10.7",
"netmask": "255.255.255.0",
"gateway": "10.1.1.1",
}
resource.post(hydrate=True)
print(resource)
DcnCluster(
{
"service_ip": {
"gateway": "10.1.1.1",
"netmask": "255.255.255.0",
"address": "10.10.10.7",
},
"nodes": [
{"serial_number": "4048820-60-9"},
{"serial_number": "4048820-47-3"},
{"serial_number": "4048820-53-6"},
],
"network_pool": {
"subnet": {"netmask": "24", "address": "10.27.0.1"},
"ip_ranges": [{"start": "10.27.0.10", "end": "10.27.0.10"}],
},
}
)
Modifying the cluster's data platform IP
from netapp_ontap import HostConnection
from netapp_ontap.resources import DcnCluster
with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
resource = DcnCluster()
resource.service_ip = {
"address": "10.10.10.1",
"netmask": "255.255.255.0",
"gateway": "10.1.1.1",
}
resource.patch()
Modifying the cluster's network pool
from netapp_ontap import HostConnection
from netapp_ontap.resources import DcnCluster
with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
resource = DcnCluster()
resource.network_pool = {
"subnet": {"address": "10.27.27.1", "netmask": "24"},
"ip_ranges": [{"start": "10.27.27.1", "end": "10.27.27.1"}],
}
resource.patch()
Delete the cluster
from netapp_ontap import HostConnection
from netapp_ontap.resources import DcnCluster
with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
resource = DcnCluster()
resource.delete()
Classes
class DcnCluster (*args, **kwargs)-
Compute cluster 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 delete (self, body: Union[Resource, dict] = None, poll: bool = True, poll_interval: Optional[int] = None, poll_timeout: Optional[int] = None, **kwargs) -> NetAppResponse-
Deletes a compute cluster.
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
HostConnectionobject 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
NetAppResponseobject containing the details of the HTTP response.Raises
NetAppRestError: If the API call returned a status code >= 400 def get (self, **kwargs) -> NetAppResponse-
Retrieves the compute cluster configuration.
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
NetAppResponseobject 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-
Modifies a compute 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
HostConnectionobject 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
NetAppResponseobject 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-
Creates a data compute cluster.
Required properties
nodesnetwork_pool
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
HostConnectionobject 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
NetAppResponseobject containing the details of the HTTP response.Raises
NetAppRestError: If the API call returned a status code >= 400
Inherited members
class DcnClusterSchema (*, 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 DcnCluster object
Ancestors
- netapp_ontap.resource.ResourceSchema
- marshmallow.schema.Schema
- marshmallow.base.SchemaABC
- abc.ABC
Class variables
-
links: SelfLink GET -
The links field of the dcn_cluster.
-
network_pool: DcnClusterNetworkPool GET POST PATCH -
Pool of usable IP addresses for the compute cluster network.
-
nodes: List[DcnNode] GET POST -
Compute node information.
-
service_ip: IpInterfaceAndGateway GET POST PATCH -
Object to setup an interface along with its default router.
-
software: DcnClusterSoftware GET -
The software information of the DCN cluster.
-
uuid: str GET -
The UUID of the compute cluster.
Example: 1cd8a442-86d1-11e0-ae1c-123478563412