Module netapp_ontap.resources.vscan

Copyright © 2019 NetApp Inc. All rights reserved.

Overview

Vscan can be used to protect data from being compromised by viruses or other malicious code. This combines best-in-class third party antivirus software with ONTAP features that give you the flexibility you need to control which files get scanned and when. Storage systems offload scanning operations to external servers hosting antivirus software from third party vendors. An Antivirus Connector on the external server handles communications between the storage system and the antivirus software.

Examples

Retrieving all of the Vscan configurations

# The API:
/api/protocols/vscan
# The call:
curl -X GET "https://<mgmt-ip>/api/protocols/vscan?fields=*&return_records=true&return_timeout=15" -H "accept: application/json"
# The response:
{
  "records": [
    {
      "svm": {
        "uuid": "03ce5c36-f269-11e8-8852-0050568e5298",
        "name": "vs1"
      },
      "enabled": true,
      "scanner_pools": [
        {
          "name": "scanner-1",
          "servers": [
            "1.1.1.1",
            "10.72.204.27"
          ],
          "privileged_users": [
            "cifs\\u1",
            "cifs\\u2"
          ],
          "role": "primary",
          "cluster": {
            "name": "Cluster1",
            "uuid": "0228714d-f268-11e8-8851-0050568e5298"
          }
        },
        {
          "name": "scanner-2",
          "servers": [
            "1.1.1.1",
            "10.72.204.27"
          ],
          "privileged_users": [
            "cifs\\u1",
            "cifs\\u2"
          ],
          "role": "primary",
          "cluster": {
            "name": "Cluster1",
            "uuid": "0228714d-f268-11e8-8851-0050568e5298"
          }
        }
      ],
      "on_access_policies": [
        {
          "name": "default_CIFS",
          "vsName": "vs1",
          "enabled": true,
          "mandatory": true,
          "scope": {
            "max_file_size": 2147483648,
            "include_extensions": [
              "*"
            ],
            "scan_without_extension": true,
            "scan_readonly_volumes": false,
            "only_execute_access": false
          }
        },
        {
          "name": "on-access-test1",
          "vsName": "vs1",
          "enabled": false,
          "mandatory": true,
          "scope": {
            "max_file_size": 10000,
            "exclude_paths": [
              "\dir"
            ],
            "include_extensions": [
              "mp*",
              "txt"
            ],
            "exclude_extensions": [
              "mp*",
              "txt"
            ],
            "scan_without_extension": true,
            "scan_readonly_volumes": false,
            "only_execute_access": false
          }
        },
        {
          "name": "on-access-test2",
          "vsName": "vs1",
          "enabled": false,
          "mandatory": true,
          "scope": {
            "max_file_size": 10000,
            "exclude_paths": [
              "\dir"
            ],
            "include_extensions": [
              "mp*",
              "txt"
            ],
            "exclude_extensions": [
              "mp*",
              "txt"
            ],
            "scan_without_extension": true,
            "scan_readonly_volumes": false,
            "only_execute_access": false
          }
        }
      ],
      "on_demand_policies": [
        {
          "name": "task-1",
          "scan_paths": [
            "/vol1"
          ],
          "log_path": "/vol1",
          "scope": {
            "max_file_size": 10000,
            "exclude_paths": [
              "/vol1"
            ],
            "include_extensions": [
              "vmdk",
              "mp*"
            ],
            "exclude_extensions": [
              "mp3",
              "mp4"
            ],
            "scan_without_extension": true
          }
        },
        {
          "name": "task-2",
          "scan_paths": [
            "/vol1"
          ],
          "log_path": "/vol2",
          "scope": {
            "max_file_size": 10000,
            "exclude_paths": [
              "/vol2"
            ],
            "include_extensions": [
              "vmdk",
              "mp*"
            ],
            "exclude_extensions": [
              "mp3",
              "mp4"
            ],
            "scan_without_extension": true
          }
        }
      ]
    },
    {
      "svm": {
        "uuid": "24c2567a-f269-11e8-8852-0050568e5298",
        "name": "vs2"
      },
      "enabled": false,
      "scanner_pools": [
        {
          "name": "sp2",
          "servers": [
            "1.1.1.1"
          ],
          "privileged_users": [
            "cifs\\u1"
          ],
          "role": "idle"
        }
      ],
      "on_access_policies": [
        {
          "name": "default_CIFS",
          "vsName": "vs2",
          "enabled": true,
          "mandatory": true,
          "scope": {
            "max_file_size": 2147483648,
            "include_extensions": [
              "*"
            ],
            "scan_without_extension": true,
            "scan_readonly_volumes": false,
            "only_execute_access": false
          }
        },
        {
          "name": "ap1",
          "vsName": "vs2",
          "enabled": false,
          "mandatory": true,
          "scope": {
            "max_file_size": 2147483648,
            "include_extensions": [
              "*"
            ],
            "scan_without_extension": true,
            "scan_readonly_volumes": false,
            "only_execute_access": false
          }
        }
      ],
      "on_demand_policies": [
        {
          "name": "t1",
          "scan_paths": [
            "/vol1"
          ],
          "log_path": "/vol1",
          "scope": {
            "max_file_size": 10737418240,
            "include_extensions": [
              "*"
            ],
            "scan_without_extension": true
          }
        }
      ]
    }
  ],
  "num_records": 2
}

Retrieving all Vscan configurations for a particular SVM

# The API:
/api/protocols/vscan/{svm.uuid}
# The call:
curl -X GET "https://<mgmt-ip>/api/protocols/vscan/24c2567a-f269-11e8-8852-0050568e5298?fields=*" -H "accept: application/json"
# The response:
{
  "svm": {
    "uuid": "24c2567a-f269-11e8-8852-0050568e5298",
    "name": "vs2"
  },
  "enabled": false,
  "scanner_pools": [
    {
      "name": "sp2",
      "servers": [
        "1.1.1.1"
      ],
      "privileged_users": [
        "cifs\\u1"
      ],
      "role": "idle"
    }
  ],
  "on_access_policies": [
    {
      "name": "default_CIFS",
      "vsName": "vs2",
      "enabled": true,
      "mandatory": true,
      "scope": {
        "max_file_size": 2147483648,
        "include_extensions": [
          "*"
        ],
        "scan_without_extension": true,
        "scan_readonly_volumes": false,
        "only_execute_access": false
      }
    },
    {
      "name": "ap1",
      "vsName": "vs2",
      "enabled": false,
      "mandatory": true,
      "scope": {
        "max_file_size": 2147483648,
        "include_extensions": [
          "*"
        ],
        "scan_without_extension": true,
        "scan_readonly_volumes": false,
        "only_execute_access": false
      }
    }
  ],
  "on_demand_policies": [
    {
      "name": "t1",
      "scan_paths": [
        "/vol1"
      ],
      "log_path": "/vol1",
      "scope": {
        "max_file_size": 10737418240,
        "include_extensions": [
          "*"
        ],
        "scan_without_extension": true
      }
    }
  ]
}

Creating a Vscan configuration

# The API:
/api/protocols/vscan
# The call:
curl -X POST "https://<mgmt-ip>/api/protocols/vscan?return_records=true" -H "accept: appication/json" -H "Content-Type: application/json" -d "{ \"enabled\": true, \"on_access_policies\": [ { \"enabled\": true, \"mandatory\": true, \"name\": \"on-access-test\", \"scope\": { \"exclude_extensions\": [ \"mp*\", \"txt\" ], \"exclude_paths\": [ \"\\vol\" ], \"include_extensions\": [ \"mp*\", \"txt\" ], \"max_file_size\": 21474, \"only_execute_access\": false, \"scan_readonly_volumes\": false, \"scan_without_extension\": true } } ], \"on_demand_policies\": [ { \"log_path\": \"/vol\", \"name\": \"task-1\", \"scan_paths\": [ \"/vol\" ], \"schedule\": { \"name\": \"daily\", \"uuid\": \"d4984822-17b7-11e9-b450-0050568ecd85\" }, \"scope\": { \"exclude_extensions\": [ \"mp3\", \"mp4\" ], \"exclude_paths\": [ \"/vol\" ], \"include_extensions\": [ \"vmdk\", \"mp*\" ], \"max_file_size\": 10737, \"scan_without_extension\": true } } ], \"scanner_pools\": [ { \"cluster\": { \"name\": \"Cluster1\", \"uuid\": \"ab746d77-17b7-11e9-b450-0050568ecd85\" }, \"name\": \"scanner-1\", \"privileged_users\": [ \"cifs\\\\u1\", \"cifs\\\\u2\" ], \"role\": \"primary\", \"servers\": [ \"1.1.1.1\", \"10.72.204.27\" ] } ], \"svm\": { \"name\": \"vs1\", \"uuid\": \"b103be27-17b8-11e9-b451-0050568ecd85\" }}"
# The response:
{
  "num_records": 1,
  "records": [
    {
      "svm": {
      "uuid": "b103be27-17b8-11e9-b451-0050568ecd85",
      "name": "vs1"
      },
      "enabled": true,
      "scanner_pools": [
        {
          "name": "scanner-1",
          "servers": [
            "1.1.1.1",
            "10.72.204.27"
          ],
          "privileged_users": [
            "cifs\\u1",
            "cifs\\u2"
          ],
          "role": "primary",
          "cluster": {
            "name": "Cluster1",
            "uuid": "ab746d77-17b7-11e9-b450-0050568ecd85"
          }
        }
      ],
      "on_access_policies": [
        {
          "name": "on-access-test",
          "enabled": true,
          "mandatory": true,
          "scope": {
            "max_file_size": 21474,
            "exclude_paths": [
              "\\vol"
            ],
            "include_extensions": [
              "mp*",
              "txt"
            ],
            "exclude_extensions": [
              "mp*",
              "txt"
            ],
            "scan_without_extension": true,
            "scan_readonly_volumes": false,
            "only_execute_access": false
          }
        }
      ],
      "on_demand_policies": [
        {
          "name": "task-1",
          "scan_paths": [
            "/vol"
          ],
          "log_path": "/vol",
          "schedule": {
            "uuid": "d4984822-17b7-11e9-b450-0050568ecd85",
            "name": "daily"
          },
          "scope": {
            "max_file_size": 10737,
            "exclude_paths": [
              "//"
            ],
            "include_extensions": [
              "vmdk",
              "mp*"
            ],
            "exclude_extensions": [
              "mp3",
              "mp4"
            ],
            "scan_without_extension": true
          }
        }
      ]
    }
  ]
}

Creating multiple Vscan scanner-pools for the specified SVM

# The API:
/api/protocols/vscan
# The call:
curl -X POST "https://<mgmt-ip>/api/protocols/vscan?return_records=true" -H "accept: appication/json" -H "Content-Type: application/json" -d "{ \"scanner_pools\": [ { \"cluster\": { \"name\": \"Cluster1\", \"uuid\": \"ab746d77-17b7-11e9-b450-0050568ecd85\" }, \"name\": \"scanner-1\", \"privileged_users\": [ \"cifs\\\\u1\", \"cifs\\\\u2\" ], \"role\": \"primary\", \"servers\": [ \"1.1.1.1\", \"10.72.204.27\" ] }, { \"cluster\": { \"name\": \"Cluster1\", \"uuid\": \"ab746d77-17b7-11e9-b450-0050568ecd85\" }, \"name\": \"scanner-2\", \"privileged_users\": [ \"cifs\\\\u3\", \"cifs\\\\u4\" ], \"role\": \"primary\", \"servers\": [ \"1.1.1.5\", \"10.72.3.27\" ] } ], \"svm\": { \"name\": \"vs1\", \"uuid\": \"b103be27-17b8-11e9-b451-0050568ecd85\" }}"
# The response:
{
"num_records": 1,
"records": [
    {
      "svm": {
      "uuid": "b103be27-17b8-11e9-b451-0050568ecd85",
      "name": "vs1"
      },
      "scanner_pools": [
        {
          "name": "scanner-1",
          "servers": [
            "1.1.1.1",
            "10.72.204.27"
          ],
          "privileged_users": [
            "cifs\\u1",
            "cifs\\u2"
          ],
          "role": "primary",
          "cluster": {
            "name": "Cluster1",
            "uuid": "ab746d77-17b7-11e9-b450-0050568ecd85"
          }
        },
        {
          "name": "scanner-2",
          "servers": [
            "1.1.1.5",
            "10.72.3.27"
          ],
          "privileged_users": [
            "cifs\\u3",
            "cifs\\u4"
          ],
          "role": "primary",
          "cluster": {
            "name": "Cluster1",
            "uuid": "ab746d77-17b7-11e9-b450-0050568ecd85"
          }
        }
      ]
    }
  ]
}

Creating multiple Vscan On-access policies for a specified SVM

# The API:
/api/protocols/vscan
# The call:
curl -X POST "https://<mgmt-ip>/api/protocols/vscan?return_records=true" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"on_access_policies\": [ { \"enabled\": false, \"mandatory\": true, \"name\": \"on-access-test11\", \"scope\": { \"exclude_extensions\": [ \"mp*\", \"txt\" ], \"exclude_paths\": [ \"\\\\vol\" ], \"include_extensions\": [ \"mp*\", \"txt\" ], \"max_file_size\": 214748, \"only_execute_access\": false, \"scan_readonly_volumes\": false, \"scan_without_extension\": true } }, { \"enabled\": false, \"mandatory\": true, \"name\": \"on-access-test10\", \"scope\": { \"exclude_extensions\": [ \"mp*\", \"txt\" ], \"exclude_paths\": [ \"\\\\vol\" ], \"include_extensions\": [ \"mp*\", \"txt\" ], \"max_file_size\": 21474, \"only_execute_access\": false, \"scan_readonly_volumes\": false, \"scan_without_extension\": true } } ], \"svm\": { \"name\": \"vs1\", \"uuid\": \"b103be27-17b8-11e9-b451-0050568ecd85\" }}"
# The response:
{
  "num_records": 1,
  "records": [
    {
      "svm": {
        "uuid": "b103be27-17b8-11e9-b451-0050568ecd85",
        "name": "vs1"
      },
      "on_access_policies": [
        {
          "name": "on-access-test11",
          "enabled": false,
          "mandatory": true,
          "scope": {
            "max_file_size": 214748,
            "exclude_paths": [
              "\\vol"
            ],
            "include_extensions": [
              "mp*",
              "txt"
            ],
            "exclude_extensions": [
              "mp*",
              "txt"
            ],
            "scan_without_extension": true,
            "scan_readonly_volumes": false,
            "only_execute_access": false
          }
        },
        {
          "name": "on-access-test10",
          "enabled": false,
          "mandatory": true,
          "scope": {
            "max_file_size": 21474,
            "exclude_paths": [
              "\\vol"
            ],
            "include_extensions": [
              "mp*",
              "txt"
            ],
            "exclude_extensions": [
              "mp*",
              "txt"
            ],
            "scan_without_extension": true,
            "scan_readonly_volumes": false,
            "only_execute_access": false
          }
        }
      ]
    }
  ]
}

Creating multiple Vscan On-demand policies for a specified SVM

# The API:
/api/protocols/vscan
# The call:
curl -X POST "https://<mgmt-ip>/api/protocols/vscan?return_records=true" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"on_demand_policies\": [ { \"log_path\": \"/vol\", \"name\": \"task-1\", \"scan_paths\": [ \"/vol\" ], \"schedule\": { \"name\": \"daily\", \"uuid\": \"d4984822-17b7-11e9-b450-0050568ecd85\" }, \"scope\": { \"exclude_extensions\": [ \"mp3\", \"mp4\" ], \"exclude_paths\": [ \"/vol1\" ], \"include_extensions\": [ \"vmdk\", \"mp*\" ], \"max_file_size\": 107374, \"scan_without_extension\": true } }, { \"log_path\": \"/vol\", \"name\": \"task-2\", \"scan_paths\": [ \"/vol\" ], \"scope\": { \"exclude_extensions\": [ \"mp3\", \"mp4\" ], \"exclude_paths\": [ \"/vol1\" ], \"include_extensions\": [ \"vmdk\", \"mp*\" ], \"max_file_size\": 107374, \"scan_without_extension\": true } } ], \"svm\": { \"name\": \"vs1\", \"uuid\": \"b103be27-17b8-11e9-b451-0050568ecd85\" }}"
# The response:
{
  "num_records": 1,
  "records": [
    {
      "svm": {
        "uuid": "b103be27-17b8-11e9-b451-0050568ecd85",
        "name": "vs1"
      },
      "on_demand_policies": [
        {
          "name": "task-1",
          "scan_paths": [
            "/vol"
          ],
          "log_path": "/vol",
          "schedule": {
            "uuid": "d4984822-17b7-11e9-b450-0050568ecd85",
            "name": "daily"
          },
          "scope": {
            "max_file_size": 107374,
            "exclude_paths": [
              "/vol1"
            ],
            "include_extensions": [
              "vmdk",
              "mp*"
            ],
            "exclude_extensions": [
              "mp3",
              "mp4"
            ],
            "scan_without_extension": true
          }
        },
        {
          "name": "task-2",
          "scan_paths": [
            "/vol"
          ],
          "log_path": "/vol",
          "scope": {
            "max_file_size": 107374,
            "exclude_paths": [
              "/vol1"
            ],
            "include_extensions": [
              "vmdk",
              "mp*"
            ],
            "exclude_extensions": [
              "mp3",
              "mp4"
            ],
            "scan_without_extension": true
          }
        }
      ]
    }
  ]
}

Enabling Vscan for a specified SVM

# The API:
/api/protocols/vscan/{svm.uuid}
# The call:
curl -X PATCH "https://<mgmt-ip>/api/protocols/vscan/03ce5c36-f269-11e8-8852-0050568e5298" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"enabled\": true}"

Clearing the Vscan cache for the specified SVM

# The call:
curl -X PATCH "https://<mgmt-ip>/api/protocols/vscan/03ce5c36-f269-11e8-8852-0050568e5298" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"cache_clear\": true}"

Deleting the Vscan configuration for a specified SVM

# The API:
/api/protocols/vscan/{svm.uuid}
# The call:
curl -X DELETE "https://<mgmt-ip>/api/protocols/vscan/03ce5c36-f269-11e8-8852-0050568e5298" -H "accept: application/json"

Classes

class Vscan (*args, **kwargs)

Vscan can be used to protect data from being compromised by viruses or other malicious code. This combines best-in-class third-party antivirus software with ONTAP features that give you the flexibility you need to control which files get scanned and when. Storage systems offload scanning operations to external servers hosting antivirus software from thirdparty vendors. An Antivirus Connector on the external server handles communications between the storage system and the antivirus software.

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 delete_collection(*args, connection: HostConnection = None, **kwargs) -> NetAppResponse

Deletes a Vscan configuration.
Important notes: * The Vscan DELETE endpoint deletes all of the Vscan configuration of an SVM. It first disables the Vscan and then deletes all of the SVM scanner-pools, On-Access policies, and On-Demand policies. * Any active Vscan On-Access policy must first be disabled on an SVM before performing the Vscan delete operation on that SVM.

  • vserver vscan scanner-pool delete
  • vserver vscan on-access-policy delete
  • vserver vscan on-demand-policy delete

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.
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 find(*args, connection: HostConnection = None, **kwargs) -> Resource

Retrieves the Vscan configuration. This includes scanner-pools, On-Access policies, On-Demand policies, and information about whether a Vscan is enabled or disabled on an SVM.
Important notes: * There can be only one Vscan configuration enabled for an SVM at any time. * You can only query using svm.uuid or svm.name.

  • vserver vscan show
  • vserver vscan scanner-pool show
  • vserver vscan scanner-pool servers show
  • vserver vscan scanner-pool privileged-users show
  • vserver vscan scanner-pool show-active
  • vserver vscan on-access-policy show
  • vserver vscan on-access-policy file-ext-to-exclude show
  • vserver vscan on-access-policy file-ext-to-include show
  • vserver vscan on-access-policy paths-to-exclude show
  • vserver vscan on-demand-task 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 or 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.

Raises

NetAppRestError: If the API call did not return exactly 1 matching resource.

def get_collection(*args, connection: HostConnection = None, max_records: int = None, **kwargs) -> typing.Iterable

Retrieves the Vscan configuration. This includes scanner-pools, On-Access policies, On-Demand policies, and information about whether a Vscan is enabled or disabled on an SVM.
Important notes: * There can be only one Vscan configuration enabled for an SVM at any time. * You can only query using svm.uuid or svm.name.

  • vserver vscan show
  • vserver vscan scanner-pool show
  • vserver vscan scanner-pool servers show
  • vserver vscan scanner-pool privileged-users show
  • vserver vscan scanner-pool show-active
  • vserver vscan on-access-policy show
  • vserver vscan on-access-policy file-ext-to-exclude show
  • vserver vscan on-access-policy file-ext-to-include show
  • vserver vscan on-access-policy paths-to-exclude show
  • vserver vscan on-demand-task show

Learn more


Fetch a list of all objects of this type from the host.

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.

def patch_collection(body: dict, *args, connection: HostConnection = None, **kwargs) -> NetAppResponse

Updates the Vscan configuration of an SVM. Allows you to either enable or disable a Vscan, and allows you to clear the Vscan cache that stores the past scanning data for an SVM.
Important note: * The Vscan PATCH endpoint does not allow you to modify scanner-pools, On-Demand policies or On-Access policies. Those modifications can only be done through their respective endpoints.

  • vserver vscan enable
  • vserver vscan disable
  • vserver vscan reset

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.
*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.
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

Methods

def delete(self, poll: bool = True, poll_interval: typing.Union = None, poll_timeout: typing.Union = None, **kwargs) -> NetAppResponse

Deletes a Vscan configuration.
Important notes: * The Vscan DELETE endpoint deletes all of the Vscan configuration of an SVM. It first disables the Vscan and then deletes all of the SVM scanner-pools, On-Access policies, and On-Demand policies. * Any active Vscan On-Access policy must first be disabled on an SVM before performing the Vscan delete operation on that SVM.

  • vserver vscan scanner-pool delete
  • vserver vscan on-access-policy delete
  • vserver vscan on-demand-policy delete

Learn more


Send a deletion request to the host for this object.

Args

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 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 Vscan configuration for a specified SVM. This includes scanner-pools, On-Access policies, On-Demand policies, and information about whether a Vscan is enabled or disabled on an SVM.
Important note: * There can be only one Vscan configuration enabled for an SVM at any time.

  • vserver vscan show
  • vserver vscan scanner-pool show
  • vserver vscan scanner-pool servers show
  • vserver vscan scanner-pool privileged-users show
  • vserver vscan scanner-pool show-active
  • vserver vscan on-access-policy show
  • vserver vscan on-access-policy file-ext-to-exclude show
  • vserver vscan on-access-policy file-ext-to-include show
  • vserver vscan on-access-policy paths-to-exclude show
  • vserver vscan on-demand-task 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: typing.Union = None, poll_timeout: typing.Union = None, **kwargs) -> NetAppResponse

Updates the Vscan configuration of an SVM. Allows you to either enable or disable a Vscan, and allows you to clear the Vscan cache that stores the past scanning data for an SVM.
Important note: * The Vscan PATCH endpoint does not allow you to modify scanner-pools, On-Demand policies or On-Access policies. Those modifications can only be done through their respective endpoints.

  • vserver vscan enable
  • vserver vscan disable
  • vserver vscan reset

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.
**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 post(self, hydrate: bool = False, poll: bool = True, poll_interval: typing.Union = None, poll_timeout: typing.Union = None, **kwargs) -> NetAppResponse

Creates a Vscan configuration, which includes a list of scanner-pools, Vscan On-Access policies and Vscan On-Demand policies. Defines whether the Vscan configuration you’re creating is enabled or disabled for a specified SVM.
Important notes: * There can be only one Vscan configuration enabled for an SVM at any time. * There needs to be at least one active scanner-pool and one enabled On-Access policy for Vscan to be enabled successfully. * By default, a Vscan is enabled when it’s created. * By default, the Vscan On-Access policies created from this endpoint are in the disabled state. You can use the On-Access policy PATCH endpoint to enable a particular On-Access policy. In ONTAP 9.6, only one Vscan On-Access policy can be enabled and only one Vscan On-Demand policy can be scheduled on an SVM.

Required properties

  • svm.uuid or svm.name - Existing SVM in which to create the Vscan configuration.
  • scanner_pools - There must be at least one active scanner-pool for Vscan configuration. Created either through Vscan POST operation or scanner-pools POST operation.

Default property values

If not specified in POST, the following default property value is assigned: * enabled - true

  • vserver vscan enable
  • vserver vscan scanner-pool create
  • vserver vscan scanner-pool apply-policy
  • vserver vscan scanner-pool servers add
  • vserver vscan scanner-pool privileged-users add
  • vserver vscan on-access-policy create
  • vserver vscan on-access-policy file-ext-to-exclude add
  • vserver vscan on-access-policy file-ext-to-include add
  • vserver vscan on-access-policy paths-to-exclude add
  • vserver vscan on-demand-task create

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 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

Inherited members

class VscanSchema (only=None, exclude=(), many=False, context=None, load_only=(), dump_only=(), partial=False, unknown=None)

The fields of the Vscan object

Ancestors

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

Class variables

var cache_clear

Discards the cached information of the files that have been successfully scanned. Once the cache is cleared, files are scanned again when they are accessed. PATCH only

var enabled

Specifies whether or not Vscan is enabled on the SVM.

The links field of the vscan.

var on_access_policies

The on_access_policies field of the vscan.

var on_demand_policies

The on_demand_policies field of the vscan.

var opts
var scanner_pools

The scanner_pools field of the vscan.

var svm

The svm field of the vscan.