Module netapp_ontap.resources.select_pre_expansion
Copyright © 2022 NetApp Inc. All rights reserved.
This file has been automatically generated based on the ONTAP REST API documentation.
Overview
Sets configuration parameters required for ONTAP Select cluster expansion.
Expansion depends on the operation-type: Single node to 2-node, single node to 4-node or 2-node to 4-node.
Select Pre-expansion APIs
Following API is used to set the configuration parameters:
- POST /api/private/cluster/select-pre-expansion
Example
Setting the parameters for 1 to 2-node cluster expansion
The POST request is used to set the configuration parameters required for 1-node to 2-node cluster expansion. ````python from netapp_ontap import HostConnection from netapp_ontap.resources import SelectPreExpansion
with HostConnection("<mgmt-ip", username="admin", password="password", verify=False): resource = SelectPreExpansion() resource.operation_type = "1to2" resource.mediator = { "ip": "10.1.2.3", "target": "iqn.2012-05.local:mailbox.target.test", } resource.local_mac = "00:16:3e:1a:16:2d" resource.partner = {"mac": "00:16:3e:48:c9:6d", "name": "node2"} resource.mtu = "9000" resource.post(hydrate=True) print(resource)
``
Classes
class SelectPreExpansion (*args, **kwargs)
-
Configuration parameters for ONTAP Select cluster expansion.
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 post_collection(records: Iterable[_ForwardRef('SelectPreExpansion')], *args, hydrate: bool = False, poll: bool = True, poll_interval: Optional[int] = None, poll_timeout: Optional[int] = None, connection: HostConnection = None, **kwargs) -> Union[List[SelectPreExpansion], NetAppResponse]
-
Sets the configuration parameters required for expanding an ONTAP Select cluster. After setting the parameters, deploy automates the workflow of node reconfiguration and node join.
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 post(self, hydrate: bool = False, poll: bool = True, poll_interval: Optional[int] = None, poll_timeout: Optional[int] = None, **kwargs) -> NetAppResponse
-
Sets the configuration parameters required for expanding an ONTAP Select cluster. After setting the parameters, deploy automates the workflow of node reconfiguration and node join.
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.
**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 SelectPreExpansionSchema (*, 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 SelectPreExpansion object
Ancestors
- netapp_ontap.resource.ResourceSchema
- marshmallow.schema.Schema
- marshmallow.base.SchemaABC
Class variables
-
links: SelfLink GET
-
The links field of the select_pre_expansion.
-
local_mac: str GET POST PATCH
-
MAC address of local node. Not applicable for operation_type 2to4.
Example: 00:16:3e:1a:16:2d
-
mediator: SelectPreExpansionMediator GET POST PATCH
-
The mediator field of the select_pre_expansion.
-
mtu: Size GET POST PATCH
-
Maximum Transmission Unit size for internal network. Not applicable for operation_type 2to4.
-
operation_type: str GET POST PATCH
-
Type of expansion.
Valid choices:
- 1to2
- 1to4
- 2to4
-
partner: SelectPreExpansionPartner GET POST PATCH
-
The partner field of the select_pre_expansion.