PluginAPI Classes

NexentaStor plugins are created by extending one of the NexentaStor classes. The list of classes are:

  • NZA::Plugin
  • NZA::IpcPlugin
  • NZA::IpcPluginService
  • NZA::PluginSmfNetworkService

plugin_objects.png

NZA::Plugin

NZA::Plugin is a top level plugin object (the others are derived directly/indirectly from it).

The various attributes (type, plugindir, classname, etc) are explained here.

plugin_error(msg)

This function is used to notify and trace an error in the Appliance.

Parameters

  • msg : A string specifying the error message

setnmsoptions(h, desc, storage, sysopts, netopts)

This function is used to set an option in NMS.

Parameters

  • h : TODO
  • h_desc : TODO
  • h_storage : TODO
  • h_sysopts : TODO
  • h_netopts : TODO

iseulaconfirmed()

Function to check if the eula has been confirmed.

NZA::IpcPlugin

This class is derived from NZA::Plugin.

Attributes are explained here.

NZA::IpcPluginService

This object is used to create plugins that provide a new service to the NexentaStor appliance. It is derived from NZA::IpcPlugin.

resolvelunto_services(disk)

This function needs to be implemented only for those plugins which acquire LUN for its own use.

Parameters

  • disk : The disk for which services need to be resolved

resolvezfsnameto_services(name)

This function needs to be implemented only for those plugins which acquire ZFS object (Folder/Zvol/Volume/Snapshot) for its own use.

Parameters

  • zname : The ZFS object full name

resolveconfigchangetoplugins()

This function implemented only by plugins which implement group and appliance configuration synchronization.

getsharedvolumes()

This function needs to be implemented only for those plugins which acquire ZFS volume for its own use and making it "sharable", like block-level replication using AVS, etc..

NZA::PluginSmfNetworkService

This object is used to create plugin that provides a SMF managed network service. It is derived from NZA::Plugin

Also available in: HTML TXT