Skip to main content
SnapCenter Software 5.0

Overview

Contributors netapp-nsriram netapp-soumikd

The SnapCenter Server enables you to deploy and manage your applications as plug-ins to SnapCenter. Applications of your choice can be plugged into the SnapCenter Server for data protection and management capabilities.

SnapCenter enables you to develop custom plug-ins using different programming languages. You can develop a custom plug-in using Perl, Java, BATCH, or other Scripting languages.

To use custom plug-ins in SnapCenter, you must perform the following tasks:

  • Create a plug-in for your application using the instructions in this guide

  • Create a description file

  • Export the custom plug-in to install it on the SnapCenter host

  • Upload the plug-in zip file into SnapCenter Server

Generic plug-in handling in all API calls

For every API call, use the following information:

  • Plug-in parameters

  • Exit codes

  • Log error messages

  • Data consistency

Use Plug-in parameters

A set of parameters are passed to the plug-in as part of every API call made. The following table lists the specific information for the parameters.

Parameter Purpose

ACTION

Determines the workflow name. For example, discover, backup, fileOrVolRestore or cloneVolAndLun

RESOURCES

Lists resources to be protected. A resource is identified by UID and Type. The list is presented to the plug-in in the following format:

“<UID>,<TYPE>;<UID>,<TYPE>”. For example, “Instance1,Instance;Instance2\\DB1,Database”

APP_NAME

Determines which plug-in is being used. For example, DB2, MYSQL. SnapCenter Server has built-in support for the listed applications. This parameter is case sensitive.

APP_IGNORE_ERROR

(Y or N) This causes SnapCenter to exit or not exit when an application error is encountered. This is useful when you are backing up multiple databases and do not want a single failure to stop the backup operation.

<RESOURCE_NAME>__APP_INSTANCE_USERNAME

SnapCenter credential is set for the resource.

<RESOURCE_NAME>_APP_INSTANCE_PASSWORD

SnapCenter credential is set for the resource.

<RESOURCE_NAME>_<CUSTOM_PARAM>

Every Resource level custom key value is available to plug-ins prefixed with “<RESOURCE_NAME>_”. For example, if a custom key is “MASTER_SLAVE” for a resource named “MySQLDB”, then it will be available as MySQLDB_MASTER_SLAVE

Use exit codes

The plug-in returns the status of the operation back to the host by means of exit codes. Each code has a specific meaning and the plug-in uses the right exit code to indicate the same.

The following table depicts error codes and their meaning.

Exit code Purpose

0

Successful operation.

99

Requested operation is not supported or implemented.

100

Failed operation, skip unquiesce, and exit. Unquiesce is by default.

101

Failed operation, continue with backup operation.

other

Failed operation, run unquiesce, and exit.

Log error messages

The error messages are passed from the plug-in to the SnapCenter Server. The message includes the message, log level, and time stamp.

The following table lists levels and their purposes.

Parameter Purpose

INFO

informational message

WARN

warning message

ERROR

error message

DEBUG

debug message

TRACE

trace message

Preserve data consistency

Custom plug-ins preserve data between operations of the same workflow execution. For example, a plug-in can store data at the end of quiesce, which can be used during unquiesce operation.

The data to be preserved is set as part of result object by plug-in. It follows a specific format and is described in detail under each style of plug-in development.