Module netapp_ontap.resources.svm

Copyright © 2023 NetApp Inc. All rights reserved.

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

Managing SVMs


Cluster administrators can manage any SVM bound to the cluster. In addition, SVMs can also be managed by their SVM administrators. The SVM administrator manages the SVM resources, such as volumes, protocols and services, depending on the capabilities assigned by the cluster administrator. SVM administrators cannot create, modify, or delete SVMs. The cluster administrator manages SVM create, modify, or delete operations.

While configuring CIFS, you must also configure IP interfaces and DNS. No other protocol configuration is allowed when configuring NVMe. NFS, FCP, CIFS and iSCSI protocols can be configured together.
SVM administrators might have all or some of the following administration capabilities: 1. Data access protocol configuration Configures data access protocols, such as NFS, CIFS, iSCSI, and Fibre Channel (FC) protocol (Fibre Channel over Ethernet included). 2. Services configuration Configures services such as LDAP, NIS, and DNS. 3. Monitoring SVM Monitors jobs, network connections, network interfaces, and SVM health. 4. Updating the TLS certificate for this SVM.

Classes

class Svm (*args, **kwargs)

Allows interaction with Svm objects on the host

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 Svm 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('Svm')] = 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 an SVM. As a prerequisite, SVM objects must be deleted first. SnapMirror relationships must be deleted and data volumes must be offline and deleted. * The number of parallel SVMs that can be created must not be greater than five. * If a sixth SVM POST request is issued, the following error message is generated: "Maximum allowed SVM jobs exceeded. Wait for the existing SVM jobs to complete and try again."

  • vserver delete

Example

Deleting an individual SVM in the cluster.
DELETE "/api/svm/svms/f16f0935-5281-11e8-b94d-005056b46485"

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 a list of SVMs and individual SVM properties. This includes protocol configurations such as CIFS and NFS, export policies, name service configurations, and network services.

Important notes

  • The SVM object includes a large set of fields and can be expensive to retrieve. Use this API to list the collection of SVMs, and to retrieve only the full details of individual SVMs as needed.
  • It is not recommended to create or delete more than five SVMs in parallel.
  • REST APIs only expose a data SVM as an SVM.

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. See Requesting specific fields to learn more. * snapmirror.*

  • vserver show

Examples

  1. Retrieves a list of SVMs in the cluster sorted by name
    GET "/api/svm/svms?order_by=name"
  2. Retrieves a list of SVMs in the cluster that have the NFS protocol enabled
    GET "/api/svm/svms?nfs.enabled=true"
  3. Retrieves a list of SVMs in the cluster that have the CIFS protocol enabled
    GET "/api/svm/svms?cifs.enabled=true"
  4. Retrieves a list of SVMs in the cluster that have the S3 protocol enabled
    GET "/api/svm/svms?s3.enabled=true"
    5 Retrieves a list of SVMs in the cluster that have the FCP protocol allowed
    GET "/api/svm/svms?fcp.allowed=true"
  5. Retrieves a list of SVMs in the cluster that have the CIFS protocol allowed
    GET "/api/svm/svms?cifs.allowed=true"
  6. Retrieves a list of SVMs in the cluster where the NDMP protocol is specified as allowed
    GET "/api/svm/svms?ndmp.allowed=true"
  7. Retrieves a list of SVMs in the cluster that have the s3 protocol allowed
    GET "/api/svm/svms?s3.allowed=true"

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 a list of SVMs and individual SVM properties. This includes protocol configurations such as CIFS and NFS, export policies, name service configurations, and network services.

Important notes

  • The SVM object includes a large set of fields and can be expensive to retrieve. Use this API to list the collection of SVMs, and to retrieve only the full details of individual SVMs as needed.
  • It is not recommended to create or delete more than five SVMs in parallel.
  • REST APIs only expose a data SVM as an SVM.

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. See Requesting specific fields to learn more. * snapmirror.*

  • vserver show

Examples

  1. Retrieves a list of SVMs in the cluster sorted by name
    GET "/api/svm/svms?order_by=name"
  2. Retrieves a list of SVMs in the cluster that have the NFS protocol enabled
    GET "/api/svm/svms?nfs.enabled=true"
  3. Retrieves a list of SVMs in the cluster that have the CIFS protocol enabled
    GET "/api/svm/svms?cifs.enabled=true"
  4. Retrieves a list of SVMs in the cluster that have the S3 protocol enabled
    GET "/api/svm/svms?s3.enabled=true"
    5 Retrieves a list of SVMs in the cluster that have the FCP protocol allowed
    GET "/api/svm/svms?fcp.allowed=true"
  5. Retrieves a list of SVMs in the cluster that have the CIFS protocol allowed
    GET "/api/svm/svms?cifs.allowed=true"
  6. Retrieves a list of SVMs in the cluster where the NDMP protocol is specified as allowed
    GET "/api/svm/svms?ndmp.allowed=true"
  7. Retrieves a list of SVMs in the cluster that have the s3 protocol allowed
    GET "/api/svm/svms?s3.allowed=true"

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.

def patch_collection (body: dict, *args, records: Iterable[_ForwardRef('Svm')] = None, poll: bool = True, poll_interval: Optional[int] = None, poll_timeout: Optional[int] = None, connection: HostConnection = None, **kwargs) -> NetAppResponse

Updates one or more of the following properties of an individual SVM: SVM name, SVM default volume language code, SVM comment, and SVM state.

  • vserver modify
  • vserver rename
  • vserver start
  • vserver stop
  • security ssl modify
  • vserver add-protocols
  • vserver remove-protocols

Examples

  1. Stops an SVM and updates the "comment" field for an individual SVM
    PATCH "/api/svm/svms/f16f0935-5281-11e8-b94d-005056b46485" '{"state":"stopped", "comment":"This SVM is stopped."}'
  2. Starts an SVM and updates the "comment" field for an individual SVM
    PATCH "/api/svm/svms/f16f0935-5281-11e8-b94d-005056b46485" '{"state":"running", "comment":"This SVM is running."}'
  3. Updates the "language" field for an individual SVM
    PATCH "/api/svm/svms/f16f0935-5281-11e8-b94d-005056b46485" '{"language":"en.UTF-8"}'
  4. Updates the "name" field for an SVM or renames the SVM
    PATCH "/api/svm/svms/f16f0935-5281-11e8-b94d-005056b46485" '{"name":"svm_new"}'
  5. Updates the aggregates for an individual SVM
    PATCH "/api/svm/svms/f16f0935-5281-11e8-b94d-005056b46485" '{"aggregates":{"name":["aggr1","aggr2","aggr3"]}}'
  6. Updates the Snapshot copy policy for an individual SVM
    PATCH "/api/svm/svms/f16f0935-5281-11e8-b94d-005056b46485" '{"snapshot_policy":{"name":"custom1"}}'
  7. Updates the TLS certificate for an individual SVM
    PATCH "/api/svm/svms/f16f0935-5281-11e8-b94d-005056b46485" '{"certificate":{"uuid":"1cd8a442-86d1-11e0-ae1c-123478563412"}}'
  8. Updates the QoS policy for the SVM
    PATCH "/api/svm/svms/f16f0935-5281-11e8-b94d-005056b46485" '{"qos_policy_group":{"name":"qpolicy1"}}'
  9. Allows NFS protocol which was previously disallowed for the SVM
    PATCH "/api/svm/svms/f16f0935-5281-11e8-b94d-005056b46485" '{"nfs":{"allowed":"true"}}'
  10. Updates the max volume limit for the SVM
    PATCH "/api/svm/svms/f16f0935-5281-11e8-b94d-005056b46485" '{"max_volumes":"200"}'
  11. Updates whether file system analytics is enabled on all newly created volumes in the SVM.
    PATCH "/api/svm/svms/f16f0935-5281-11e8-b94d-005056b46485" '{"auto_enable_analytics":"true"}'
  12. Updates whether volume activity tracking is enabled on all newly created volumes in the SVM.
    PATCH "/api/svm/svms/f16f0935-5281-11e8-b94d-005056b46485" '{"auto_enable_activity_tracking":"true"}'
  13. Updates the QoS adaptive policy group template for the SVM.
    PATCH "/api/svm/svms/f16f0935-5281-11e8-b94d-005056b46485" '{"qos_adaptive_policy_group_template":{"name":"aqpolicy1"}}'
  14. Updates the maximum storage permitted on a single SVM.
    PATCH "/api/svm/svms/f16f0935-5281-11e8-b94d-005056b46485" '{"storage_limit":"40GB"}'
  15. Updates the percentage of storage capacity at which an alert message is sent.
    PATCH "/api/svm/svms/f16f0935-5281-11e8-b94d-005056b46485" '{"storage_limit":"400MB", "storage_limit_threshold_alert":"98"}'

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('Svm')], *args, hydrate: bool = False, poll: bool = True, poll_interval: Optional[int] = None, poll_timeout: Optional[int] = None, connection: HostConnection = None, **kwargs) -> Union[List[Svm], NetAppResponse]

Creates and provisions an SVM. If no IPspace is provided, then the SVM is created on the Default IPspace. * The number of parallel SVMs that can be created must not be greater than five. * If a sixth SVM POST request is issued, the following error message is generated: "Maximum allowed SVM jobs exceeded. Wait for the existing SVM jobs to complete and try again."

Required properties

  • name - Name of the SVM to be created.
  • ipspace.name or ipspace.uuid - IPspace of the SVM
  • is_space_reporting_logical - Logical Space Reporting parameter of the SVM
  • is_space_enforcement_logical - Logical Space Enforcement parameter of the SVM
  • ip_interfaces - If provided, the following fields are required:
  • ip_interfaces.name - Name of the interface
  • ip_interfaces.ip.address - IP address
  • ip_interfaces.ip.netmask - Netmask length or IP address
  • ip_interfaces.location.broadcast_domain.uuid or ip_interfaces.location.broadcast_domain.name - Broadcast domain name or UUID belonging to the same IPspace of the SVM.
  • subnet.uuid or subnet.name - Either name or UUID of the subnet to create.
  • routes - If provided, the following field is required:
  • routes.gateway - Gateway IP address
  • cifs - If provided, interfaces, routes and DNS must be provided. The following fields are also required:
  • cifs.name - Name of the CIFS server to be created for the SVM.
  • cifs.ad_domain.fqdn - Fully qualified domain name
  • cifs.ad_domain.user - Administrator username
  • cifs.ad_domain.password - User password
  • ldap - If provided, the following fields are required:
  • ldap.servers or ldap.ad_domain - LDAP server list or Active Directory domain
  • ldap.bind_dn - Bind DN
  • ldap.base_dn - Base DN
  • nis - If provided, the following fields are required:
  • nis.servers - NIS servers
  • nis.domain - NIS domain
  • dns - If provided, the following fields are required:
  • dns.servers - Name servers
  • dns.domains - Domains
  • fc_interfaces - If provided, the following fields are required:
  • fc_interfaces.name - Fibre Channel interface name
  • fc_interfaces.data_protocol - Fibre Channel interface data protocol
  • fc_interfaces.location.port.uuid or fc_interfaces.location.port.name and fc_interfaces.location.port.node.name - Either port UUID or port name and node name together must be provided.
  • s3 - If provided, the following field should also be specified:
  • s3.name - Name of the S3 server. If s3.name' is not specified whiles3.enabled` is set to 'true', the S3 server will be created with the default name '_S3Server'.
  • auto_enable_analytics - Auto-enable file system analytics on new volumes created in the SVM.
  • auto_enable_activity_tracking - Auto-enable volume activity-tracking on new volumes created in the SVM.
  • storage_limit - Maximum storage permitted on a single SVM.
  • storage_limit_threshold_alert - At what percentage of storage capacity, alert message needs to be sent.

Default property values

If not specified in POST, the following default property values are assigned: * language - C.UTF-8 * ipspace.name - Default * snapshot_policy.name - Default * subtype - Default ( sync-source if MetroCluster configuration ) * anti_ransomware_default_volume_state - disabled

  • vserver create
  • vserver add-aggregates
  • network interface create
  • network route create
  • vserver services name-service dns create
  • vserver nfs create
  • vserver services name-service ldap client create
  • vserver cifs create
  • vserver services name-service nis-domain create
  • vserver iscsi create
  • vserver nvme create
  • vserver fcp create
  • vserver services name-service ns-switch create
  • vserver object-store-server create
  • vserver add-protocols
  • vserver remove-protocols

Examples

  1. Creates an SVM with default "snapshot_policy"
    POST "/api/svm/svms" '{"name":"testVs", "snapshot_policy":{"name":"default"}}'
  2. Creates an SVM and configures NFS, ISCSI and FCP
    POST "/api/svm/svms" '{"name":"testVs", "nfs":{"enabled":"true"}, "fcp":{"enabled":"true"}, "iscsi":{"enabled":"true"}}'
  3. Creates an SVM and configures NVMe
    POST "/api/svm/svms" '{"name":"testVs", "nvme":{"enabled":"true"}}'
  4. Creates an SVM and configures LDAP
    POST "/api/svm/svms" '{"name":"testVs", "snapshot_policy":{"name":"default"}, "ldap":{"servers":["10.140.101.1","10.140.101.2"], "ad_domain":"abc.com", "base_dn":"dc=netapp,dc=com", "bind_dn":"dc=netapp,dc=com"}}'
  5. Creates an SVM and configures NIS
    POST "/api/svm/svms" '{"name":"testVs", "snapshot_policy":{"name":"default"}, "nis":{"enabled":"true", "domain":"def.com","servers":["10.224.223.130", "10.224.223.131"]}}'
  6. Creates an SVM and configures DNS
    POST "/api/svm/svms" '{"name":"testVs", "snapshot_policy":{"name":"default"}, "dns":{"domains":["abc.com","def.com"], "servers":["10.224.223.130", "10.224.223.131"]}}'
  7. Creates an SVM and configures a LIF
    POST "/api/svm/svms" '{"name":"testVs", "ip_interfaces": [{"name":"lif1", "ip":{"address":"10.10.10.7", "netmask": "255.255.255.0"}, "location":{"broadcast_domain":{"name":"bd1"}, "home_node":{"name":"node1"}}, "service_policy": "default-management"}]}'
  8. Creates an SVM and configures a LIF with IPV6 address
    POST "/api/svm/svms" '{"name":"testVs", "ip_interfaces": [{"name":"lif2", "ip":{"address":"fd22:8b1e:b255:202:2a0:98ff:fe01:7d5b", "netmask":"24"}, "location":{"broadcast_domain":{"name":"bd1"}, "home_node":{"name":"node1"}}, "service_policy": "default-management"}]}'
  9. Creates an SVM and configures CIFS
    POST "/api/svm/svms" '{"name":"testVs", "cifs":{"name":"CIFDOC", "ad_domain":{"fqdn":"abc.def.com", "organizational_unit":"CN=Computers", "user":"cif_admin", "password":"abc123"}}, "ip_interfaces":[{"name":"lif1", "ip":{"address":"10.10.10.7", "netmask": "255.255.255.0"}, "location":{"broadcast_domain":{"name":"bd1"}, "home_node":{"name":"node1"}}, "service_policy": "default-management"}],"routes": [{"destination": {"address": "0.0.0.0", "netmask": "0"}, "gateway": "10.10.10.7"}], "dns":{"domains":["abc.def.com", "def.com"], "servers":["10.224.223.130", "10.224.223.131"]}}'
  10. Creates an SVM and configures an S3 server
    POST "/api/svm/svms" '{"name":"svm5", "s3":{"name":"s3-server-1", "enabled":true}}'
  11. Creates an SVM and disallows NVMe service for the SVM
    POST "/api/svm/svms" '{"name":"testVs", "nvme":{"allowed":"false"}}'
  12. Creates an SVM, allows and configures the NFS service for the SVM
    POST "/api/svm/svms" '{"name":"testVs", "nfs":{"allowed":"true", "enabled":true}}'
  13. Create an SVM and set the max volume limit for the SVM
    POST "/api/svm/svms/" '{"name":"testVs", "max_volumes":"200"}'
  14. Creates an SVM and disallows the NDMP service for the SVM.
    POST "/api/svm/svms" '{"name":"testVs", "ndmp":{"allowed":"false"}}'
  15. Creates an SVM and specifies whether file system analytics is enabled on all newly created volumes in the SVM.
    POST "/api/svm/svms" '{"name":"testVs", "auto_enable_analytics":true}}'
  16. Creates an SVM and specifies whether volume_activity_tracking is enabled on all newly created volumes in the SVM.
    POST "/api/svm/svms" '{"name":"testVs", "auto_enable_activity_tracking":true}}'
  17. Creates an SVM and specifies whether file system analytics is enabled on all newly created volumes in the SVM.
    POST "/api/svm/svms" '{"name":"testVs", "auto_enable_analytics":true}}'
  18. Creates an SVM and specifies the maximum storage limit for a single SVM.
    POST "/api/svm/svms" '{"name":"testVs", "storage_limit":"4GB"}'
  19. Creates an SVM and specifies at what percentage of storage capacity an alert message is sent. Default value is 90.
    POST "/api/svm/svms" '{"name":"testVs", "storage_limit":"20GB", "storage_limit_threshold_alert":"95"}'

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 a NetAppResponse 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 an SVM. As a prerequisite, SVM objects must be deleted first. SnapMirror relationships must be deleted and data volumes must be offline and deleted. * The number of parallel SVMs that can be created must not be greater than five. * If a sixth SVM POST request is issued, the following error message is generated: "Maximum allowed SVM jobs exceeded. Wait for the existing SVM jobs to complete and try again."

  • vserver delete

Example

Deleting an individual SVM in the cluster.
DELETE "/api/svm/svms/f16f0935-5281-11e8-b94d-005056b46485"

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 the properties for an individual SVM. This includes protocol configurations such as CIFS and NFS, export policies, name service configurations, and network services.

Important notes

  • The SVM object includes a large set of fields and can be expensive to retrieve.
  • REST APIs only expose a data SVM as an SVM.

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. See Requesting specific fields to learn more. * snapmirror.*

Example

Retrieving an individual SVM in the cluster
<br/>
```
GET "/api/svm/svms/f16f0935-5281-11e8-b94d-005056b46485"
```
<br/>

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 one or more of the following properties of an individual SVM: SVM name, SVM default volume language code, SVM comment, and SVM state.

  • vserver modify
  • vserver rename
  • vserver start
  • vserver stop
  • security ssl modify
  • vserver add-protocols
  • vserver remove-protocols

Examples

  1. Stops an SVM and updates the "comment" field for an individual SVM
    PATCH "/api/svm/svms/f16f0935-5281-11e8-b94d-005056b46485" '{"state":"stopped", "comment":"This SVM is stopped."}'
  2. Starts an SVM and updates the "comment" field for an individual SVM
    PATCH "/api/svm/svms/f16f0935-5281-11e8-b94d-005056b46485" '{"state":"running", "comment":"This SVM is running."}'
  3. Updates the "language" field for an individual SVM
    PATCH "/api/svm/svms/f16f0935-5281-11e8-b94d-005056b46485" '{"language":"en.UTF-8"}'
  4. Updates the "name" field for an SVM or renames the SVM
    PATCH "/api/svm/svms/f16f0935-5281-11e8-b94d-005056b46485" '{"name":"svm_new"}'
  5. Updates the aggregates for an individual SVM
    PATCH "/api/svm/svms/f16f0935-5281-11e8-b94d-005056b46485" '{"aggregates":{"name":["aggr1","aggr2","aggr3"]}}'
  6. Updates the Snapshot copy policy for an individual SVM
    PATCH "/api/svm/svms/f16f0935-5281-11e8-b94d-005056b46485" '{"snapshot_policy":{"name":"custom1"}}'
  7. Updates the TLS certificate for an individual SVM
    PATCH "/api/svm/svms/f16f0935-5281-11e8-b94d-005056b46485" '{"certificate":{"uuid":"1cd8a442-86d1-11e0-ae1c-123478563412"}}'
  8. Updates the QoS policy for the SVM
    PATCH "/api/svm/svms/f16f0935-5281-11e8-b94d-005056b46485" '{"qos_policy_group":{"name":"qpolicy1"}}'
  9. Allows NFS protocol which was previously disallowed for the SVM
    PATCH "/api/svm/svms/f16f0935-5281-11e8-b94d-005056b46485" '{"nfs":{"allowed":"true"}}'
  10. Updates the max volume limit for the SVM
    PATCH "/api/svm/svms/f16f0935-5281-11e8-b94d-005056b46485" '{"max_volumes":"200"}'
  11. Updates whether file system analytics is enabled on all newly created volumes in the SVM.
    PATCH "/api/svm/svms/f16f0935-5281-11e8-b94d-005056b46485" '{"auto_enable_analytics":"true"}'
  12. Updates whether volume activity tracking is enabled on all newly created volumes in the SVM.
    PATCH "/api/svm/svms/f16f0935-5281-11e8-b94d-005056b46485" '{"auto_enable_activity_tracking":"true"}'
  13. Updates the QoS adaptive policy group template for the SVM.
    PATCH "/api/svm/svms/f16f0935-5281-11e8-b94d-005056b46485" '{"qos_adaptive_policy_group_template":{"name":"aqpolicy1"}}'
  14. Updates the maximum storage permitted on a single SVM.
    PATCH "/api/svm/svms/f16f0935-5281-11e8-b94d-005056b46485" '{"storage_limit":"40GB"}'
  15. Updates the percentage of storage capacity at which an alert message is sent.
    PATCH "/api/svm/svms/f16f0935-5281-11e8-b94d-005056b46485" '{"storage_limit":"400MB", "storage_limit_threshold_alert":"98"}'

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

Creates and provisions an SVM. If no IPspace is provided, then the SVM is created on the Default IPspace. * The number of parallel SVMs that can be created must not be greater than five. * If a sixth SVM POST request is issued, the following error message is generated: "Maximum allowed SVM jobs exceeded. Wait for the existing SVM jobs to complete and try again."

Required properties

  • name - Name of the SVM to be created.
  • ipspace.name or ipspace.uuid - IPspace of the SVM
  • is_space_reporting_logical - Logical Space Reporting parameter of the SVM
  • is_space_enforcement_logical - Logical Space Enforcement parameter of the SVM
  • ip_interfaces - If provided, the following fields are required:
  • ip_interfaces.name - Name of the interface
  • ip_interfaces.ip.address - IP address
  • ip_interfaces.ip.netmask - Netmask length or IP address
  • ip_interfaces.location.broadcast_domain.uuid or ip_interfaces.location.broadcast_domain.name - Broadcast domain name or UUID belonging to the same IPspace of the SVM.
  • subnet.uuid or subnet.name - Either name or UUID of the subnet to create.
  • routes - If provided, the following field is required:
  • routes.gateway - Gateway IP address
  • cifs - If provided, interfaces, routes and DNS must be provided. The following fields are also required:
  • cifs.name - Name of the CIFS server to be created for the SVM.
  • cifs.ad_domain.fqdn - Fully qualified domain name
  • cifs.ad_domain.user - Administrator username
  • cifs.ad_domain.password - User password
  • ldap - If provided, the following fields are required:
  • ldap.servers or ldap.ad_domain - LDAP server list or Active Directory domain
  • ldap.bind_dn - Bind DN
  • ldap.base_dn - Base DN
  • nis - If provided, the following fields are required:
  • nis.servers - NIS servers
  • nis.domain - NIS domain
  • dns - If provided, the following fields are required:
  • dns.servers - Name servers
  • dns.domains - Domains
  • fc_interfaces - If provided, the following fields are required:
  • fc_interfaces.name - Fibre Channel interface name
  • fc_interfaces.data_protocol - Fibre Channel interface data protocol
  • fc_interfaces.location.port.uuid or fc_interfaces.location.port.name and fc_interfaces.location.port.node.name - Either port UUID or port name and node name together must be provided.
  • s3 - If provided, the following field should also be specified:
  • s3.name - Name of the S3 server. If s3.name' is not specified whiles3.enabled` is set to 'true', the S3 server will be created with the default name '_S3Server'.
  • auto_enable_analytics - Auto-enable file system analytics on new volumes created in the SVM.
  • auto_enable_activity_tracking - Auto-enable volume activity-tracking on new volumes created in the SVM.
  • storage_limit - Maximum storage permitted on a single SVM.
  • storage_limit_threshold_alert - At what percentage of storage capacity, alert message needs to be sent.

Default property values

If not specified in POST, the following default property values are assigned: * language - C.UTF-8 * ipspace.name - Default * snapshot_policy.name - Default * subtype - Default ( sync-source if MetroCluster configuration ) * anti_ransomware_default_volume_state - disabled

  • vserver create
  • vserver add-aggregates
  • network interface create
  • network route create
  • vserver services name-service dns create
  • vserver nfs create
  • vserver services name-service ldap client create
  • vserver cifs create
  • vserver services name-service nis-domain create
  • vserver iscsi create
  • vserver nvme create
  • vserver fcp create
  • vserver services name-service ns-switch create
  • vserver object-store-server create
  • vserver add-protocols
  • vserver remove-protocols

Examples

  1. Creates an SVM with default "snapshot_policy"
    POST "/api/svm/svms" '{"name":"testVs", "snapshot_policy":{"name":"default"}}'
  2. Creates an SVM and configures NFS, ISCSI and FCP
    POST "/api/svm/svms" '{"name":"testVs", "nfs":{"enabled":"true"}, "fcp":{"enabled":"true"}, "iscsi":{"enabled":"true"}}'
  3. Creates an SVM and configures NVMe
    POST "/api/svm/svms" '{"name":"testVs", "nvme":{"enabled":"true"}}'
  4. Creates an SVM and configures LDAP
    POST "/api/svm/svms" '{"name":"testVs", "snapshot_policy":{"name":"default"}, "ldap":{"servers":["10.140.101.1","10.140.101.2"], "ad_domain":"abc.com", "base_dn":"dc=netapp,dc=com", "bind_dn":"dc=netapp,dc=com"}}'
  5. Creates an SVM and configures NIS
    POST "/api/svm/svms" '{"name":"testVs", "snapshot_policy":{"name":"default"}, "nis":{"enabled":"true", "domain":"def.com","servers":["10.224.223.130", "10.224.223.131"]}}'
  6. Creates an SVM and configures DNS
    POST "/api/svm/svms" '{"name":"testVs", "snapshot_policy":{"name":"default"}, "dns":{"domains":["abc.com","def.com"], "servers":["10.224.223.130", "10.224.223.131"]}}'
  7. Creates an SVM and configures a LIF
    POST "/api/svm/svms" '{"name":"testVs", "ip_interfaces": [{"name":"lif1", "ip":{"address":"10.10.10.7", "netmask": "255.255.255.0"}, "location":{"broadcast_domain":{"name":"bd1"}, "home_node":{"name":"node1"}}, "service_policy": "default-management"}]}'
  8. Creates an SVM and configures a LIF with IPV6 address
    POST "/api/svm/svms" '{"name":"testVs", "ip_interfaces": [{"name":"lif2", "ip":{"address":"fd22:8b1e:b255:202:2a0:98ff:fe01:7d5b", "netmask":"24"}, "location":{"broadcast_domain":{"name":"bd1"}, "home_node":{"name":"node1"}}, "service_policy": "default-management"}]}'
  9. Creates an SVM and configures CIFS
    POST "/api/svm/svms" '{"name":"testVs", "cifs":{"name":"CIFDOC", "ad_domain":{"fqdn":"abc.def.com", "organizational_unit":"CN=Computers", "user":"cif_admin", "password":"abc123"}}, "ip_interfaces":[{"name":"lif1", "ip":{"address":"10.10.10.7", "netmask": "255.255.255.0"}, "location":{"broadcast_domain":{"name":"bd1"}, "home_node":{"name":"node1"}}, "service_policy": "default-management"}],"routes": [{"destination": {"address": "0.0.0.0", "netmask": "0"}, "gateway": "10.10.10.7"}], "dns":{"domains":["abc.def.com", "def.com"], "servers":["10.224.223.130", "10.224.223.131"]}}'
  10. Creates an SVM and configures an S3 server
    POST "/api/svm/svms" '{"name":"svm5", "s3":{"name":"s3-server-1", "enabled":true}}'
  11. Creates an SVM and disallows NVMe service for the SVM
    POST "/api/svm/svms" '{"name":"testVs", "nvme":{"allowed":"false"}}'
  12. Creates an SVM, allows and configures the NFS service for the SVM
    POST "/api/svm/svms" '{"name":"testVs", "nfs":{"allowed":"true", "enabled":true}}'
  13. Create an SVM and set the max volume limit for the SVM
    POST "/api/svm/svms/" '{"name":"testVs", "max_volumes":"200"}'
  14. Creates an SVM and disallows the NDMP service for the SVM.
    POST "/api/svm/svms" '{"name":"testVs", "ndmp":{"allowed":"false"}}'
  15. Creates an SVM and specifies whether file system analytics is enabled on all newly created volumes in the SVM.
    POST "/api/svm/svms" '{"name":"testVs", "auto_enable_analytics":true}}'
  16. Creates an SVM and specifies whether volume_activity_tracking is enabled on all newly created volumes in the SVM.
    POST "/api/svm/svms" '{"name":"testVs", "auto_enable_activity_tracking":true}}'
  17. Creates an SVM and specifies whether file system analytics is enabled on all newly created volumes in the SVM.
    POST "/api/svm/svms" '{"name":"testVs", "auto_enable_analytics":true}}'
  18. Creates an SVM and specifies the maximum storage limit for a single SVM.
    POST "/api/svm/svms" '{"name":"testVs", "storage_limit":"4GB"}'
  19. Creates an SVM and specifies at what percentage of storage capacity an alert message is sent. Default value is 90.
    POST "/api/svm/svms" '{"name":"testVs", "storage_limit":"20GB", "storage_limit_threshold_alert":"95"}'

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 SvmSchema (*, 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 Svm object

Ancestors

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

Class variables

aggregates: List[SvmAggregates] GET POST PATCH

List of allowed aggregates for SVM volumes. An administrator is allowed to create volumes on these aggregates.

aggregates_delegated: bool GET

This property is true when the administrator has delegated the aggregates for the SVM volumes.

anti_ransomware_auto_switch_duration_without_new_file_extension: Size GET POST PATCH

One of the many conditions to be satisfied to automatically switch the anti-ransomware state of the volumes in this SVM from “learning” (dry-run) to “enabled” is that no new file-extensions are observed in the volume in recent time. This parameter optionally specifies the recent time duration (in days) to be considered during which no new file-extension should be observed in a given volume to automatically switch the anti-ransomware state from ‘learning” to “enabled”.

anti_ransomware_auto_switch_from_learning_to_enabled: bool GET POST PATCH

This property specifies whether anti-ransomware state of the volumes in this SVM are automatically switched by the system from “learning” (dry-run) to “enabled” (active) state after sufficient learning.

anti_ransomware_auto_switch_minimum_file_count: Size GET POST PATCH

One of the many conditions to be satisfied to automatically switch the anti-ransomware state of the volumes in this SVM from “learning” (dry-run) to “enabled” is that the volume should have a minimum file count in “learning” state. This parameter optionally specifies the minimum number of newly created files in “learning” state in a given volume to automatically switch the anti-ransomware state from “learning” to “enabled”.

anti_ransomware_auto_switch_minimum_file_extension: Size GET POST PATCH

One of the many conditions to be satisfied to automatically switch the anti-ransomware state of the volumes in this SVM from “learning” (dry-run) to “enabled” is that the volume should have minimum number of file extensions in “learning” state. This parameter optionally specifies the minimum number of new file extensions in “learning” state in a given volume to automatically switch the anti-ransomware state from “learning” to “enabled”.

anti_ransomware_auto_switch_minimum_learning_period: Size GET POST PATCH

One of the many conditions to be satisfied to automatically switch the anti-ransomware state of the volumes in this SVM from “learning” (dry-run) to “enabled” is that the volume should be in “learning” state for sufficient time period. This parameter optionally specifies the minimum number of days a given volume should be in “learning” state to automatically switch the anti-ransomware state from “learning” to “enabled”.

anti_ransomware_default_volume_state: str GET POST PATCH

Specifies the default Anti-ransomware state of the volumes in the SVM. Default "anti_ransomware_default_volume_state" property is disabled for POST operation. If this value is "disabled", Anti-ransomware protection is disabled by default on the new volumes that are created in the SVM. If this value is "dry_run", Anti-ransomware protection is in learning mode by default on the new volumes that are created in the SVM. When the Anti-ransomware license is not present, this property is ignored and volumes will be created with the "disabled" state.

Valid choices:

  • disabled
  • dry_run
anti_ransomware_incoming_write_threshold: str GET POST PATCH

One of the many conditions to be satisfied to automatically switch the anti-ransomware state of the volumes in this SVM from “learning” (dry-run) to “enabled” is that the volume should have sufficient data ingested to do the learning. This parameter optionally specifies the minimum amount of data (in GB) to be written to a given volume during the learning period to automatically switch the anti-ransomware state from “learning” to “enabled”. The amount of data considered as ingested also includes the data that is deleted or overwritten after ingestion.

anti_ransomware_incoming_write_threshold_percent: str GET POST PATCH

One of the many conditions to be satisfied to automatically switch the anti-ransomware state of the volumes in this SVM from “learning” (dry-run) to “enabled” is that the volume should have sufficient data ingested to do the learning. This parameter optionally specifies the minimum amount of data (in percentage) to be written to a given volume during the learning period to automatically switch the anti-ransomware state from “learning” to “enabled”. The amount of data considered as ingested also includes the data that is deleted or overwritten after ingestion.

auto_enable_activity_tracking: bool GET POST PATCH

Specifies whether volume activity tracking is automatically enabled on volumes that are created in the SVM.

auto_enable_analytics: bool GET POST PATCH

Specifies whether file system analytics is automatically enabled on volumes that are created in the SVM.

certificate: SecurityCertificate GET PATCH

The certificate field of the svm.

cifs: SvmCifsService GET POST PATCH

The cifs field of the svm.

comment: str GET POST PATCH

Comment

dns: SvmDns GET POST

The dns field of the svm.

fc_interfaces: List[FcInterfaceSvm] GET POST

FC Interface for the SVM

fcp: SvmFcp GET POST PATCH

The fcp field of the svm.

ip_interfaces: List[IpInterfaceSvm] GET POST PATCH

IP interfaces for the SVM

ipspace: Ipspace GET POST

The ipspace field of the svm.

is_space_enforcement_logical: bool GET POST PATCH

Indicates whether logical space enforcement for the SVM is enabled.

is_space_reporting_logical: bool GET POST PATCH

Indicates whether logical space reporting for the SVM is enabled.

iscsi: SvmIscsi GET POST PATCH

The iscsi field of the svm.

language: str GET POST PATCH

Default volume language code. UTF-8 encoded languages are valid in POST or PATCH. Non UTF-8 language encodings are for backward compatibility and are not valid input for POST and PATCH requests.

Valid choices:

  • c
  • da
  • de
  • en
  • en_us
  • es
  • fi
  • fr
  • he
  • it
  • ja
  • ja_jp.pck
  • ko
  • no
  • nl
  • pt
  • sv
  • zh
  • zh.gbk
  • zh_tw
  • zh_tw.big5
  • c.utf_8
  • ar
  • ar.utf_8
  • cs
  • cs.utf_8
  • da.utf_8
  • de.utf_8
  • en.utf_8
  • en_us.utf_8
  • es.utf_8
  • fi.utf_8
  • fr.utf_8
  • he.utf_8
  • hr
  • hr.utf_8
  • hu
  • hu.utf_8
  • it.utf_8
  • ja.utf_8
  • ja_v1
  • ja_v1.utf_8
  • ja_jp.pck.utf_8
  • ja_jp.932
  • ja_jp.932.utf_8
  • ja_jp.pck_v2
  • ja_jp.pck_v2.utf_8
  • ko.utf_8
  • no.utf_8
  • nl.utf_8
  • pl
  • pl.utf_8
  • pt.utf_8
  • ro
  • ro.utf_8
  • ru
  • ru.utf_8
  • sk
  • sk.utf_8
  • sl
  • sl.utf_8
  • sv.utf_8
  • tr
  • tr.utf_8
  • zh.utf_8
  • zh.gbk.utf_8
  • zh_tw.utf_8
  • zh_tw.big5.utf_8
  • utf8mb4
ldap: SvmLdap GET POST

The ldap field of the svm.

The links field of the svm.

max_volumes: str GET POST PATCH

This property is used by cluster administrator to specify the limit on maximum number of volumes allowed in the SVM. The value can be either the string "unlimited" or a number.

name: str GET POST PATCH

The name of the SVM.

Example: svm1

ndmp: SvmNdmp GET POST PATCH

The ndmp field of the svm.

nfs: SvmNfs GET POST PATCH

The nfs field of the svm.

nis: SvmNis GET POST

The nis field of the svm.

nsswitch: SvmNsswitch GET POST PATCH

The nsswitch field of the svm.

number_of_volumes_in_recovery_queue: Size GET

Number of volumes in the recovery queue.

nvme: SvmNvme GET POST PATCH

The nvme field of the svm.

qos_adaptive_policy_group_template: QosPolicy GET PATCH

The qos_adaptive_policy_group_template field of the svm.

qos_policy: QosPolicy GET PATCH

The qos_policy field of the svm.

routes: List[NetworkRouteForSvm] POST

Optional array of routes for the SVM

s3: SvmS3Service GET POST

The s3 field of the svm.

snapmirror: SvmSnapmirror GET POST PATCH

The snapmirror field of the svm.

snapshot_policy: SnapshotPolicy GET POST PATCH

The snapshot_policy field of the svm.

state: str GET PATCH

SVM State

Valid choices:

  • starting
  • running
  • stopping
  • stopped
  • deleting
storage: SvmStorage GET POST PATCH

The storage field of the svm.

subtype: str GET POST

SVM subtype. The SVM subtype sync_destination is created automatically when an SVM of subtype sync_source is created on the source MetroCluster cluster. A POST request with sync_destination as SVM subtype is invalid.

Valid choices:

  • default
  • dp_destination
  • sync_source
  • sync_destination
total_volume_size_in_recovery_queue: Size GET

Sum of the sizes of the volumes in the recovery queue.

uuid: str GET

The unique identifier of the SVM.

Example: 02c9e252-41be-11e9-81d5-00a0986138f7