UFM Plugins Management
UFM plugin management can be done either via the manage_ufm_plugins.sh script or via the Web UI.
UFM Plugin Management Using themanage_ufm_plugins.sh Script
The manage_ufm_plugins.sh script, located in the /opt/ufm/scripts directory, is designed to manage UFM plugins through the command line interface.
To see the actions supported by this script, run:
/manage_ufm_plugins.sh --help
usage: manage_ufm_plugins.sh <command> [<args>]
positional arguments:
{show,get-all,enable,start,stop,disable,add,upgrade,remove_image,remove,is-running,is-enable,get-http-proxy-port,debug,deploy,deploy-bundle}
Commands
show Show plugins info
get-all get all loaded plugins
enable Enable plugin
start Start plugins
stop Stop all plugins
disable Disable plugin
add Add plugin
upgrade Upgrade plugin
remove_image Remove plugin`s image
remove Remove plugin
notify Notify plugin
is-running Test plugin is running
is-enable Test plugin is enabled
get-http-proxy-port
Get plugin HTTP proxy port
debug Debug
deploy Deploy plugin image
deploy-bundle Deploy bundle of plugins
Optional Arguments:
-h, --help show this help message and exit
-v, --version Print version information
Each supported option has its own help flag, which can be received by requesting help for a specific parameter. For example:
./manage_ufm_plugins.sh add --help
Usage:
manage_ufm_plugins.pyc <command> [<args>] add [-h] -p <[A-Za-z0-9_-] Name size: 32> [-t <[A-Za-z0-9._-] Name size: 128>]
Optional Arguments:
-h, --help show this help message and exit
-p <[A-Za-z0-9_-] Name size: 32>, --plugin-name <[A-Za-z0-9_-] Name size: 32> Plugin name
-t <[A-Za-z0-9._-] Name size: 128>, --plugin-tag <[A-Za-z0-9._-] Name size: 128> Plugin tag
The following table lists the supported commands and provides their description and information on the parameters.
|
Command |
Description |
Parameters |
|---|---|---|
|
|
Shows information about running plugins |
N/A |
|
|
Gets information about deployed plugins in JSON format |
N/A |
|
|
Enables plugin |
Loaded Parameter: plugin image name |
|
|
Starts UFM plugin |
Loaded Parameter: plugin name |
|
|
Stops UFM plugin |
Loaded Parameter: plugin name |
|
|
Disables UFM plugin |
Loaded Parameter: plugin name |
|
|
Adds UFM plugin |
Loaded Parameter: image name |
|
|
Upgrades UFM plugin |
Loaded Parameter: plugin name |
|
|
Removes UFM plugin’s image |
Loaded Parameter: plugin image name |
|
|
Removes UFM plugin |
Loaded Parameter: plugin name |
|
|
Notify UFM plugin |
Loaded Parameter: plugin name |
|
|
Tests plugin is running |
Loaded Parameter: plugin name |
|
|
Tests plugin is enabled |
Loaded Parameter: plugin name |
|
|
Gets plugin HTTP proxy port |
Loaded Parameter: plugin name |
|
|
Deploys plugin image |
Loaded Parameter: - |
|
|
Deploys bundle of plugins |
Loaded Parameter: - |
UFM Plugins Upgrade
The following plugins support the upgrade option:
UFM Plugin Upgrade Procedure
Follow the steps below to upgrade a UFM plugin.
Step 1: Disable the plugin
Before upgrading, the plugin needs to be disabled to ensure a smooth upgrade process.
/opt/ufm/scripts/manage_ufm_plugins.sh disable -p <plugin_name>
Replace <plugin_name> with the actual name of the plugin you want to upgrade.
Step 2: Upgrade the plugin
Run the upgrade command with the version flag to specify the desired version. Replace <plugin_name> with the actual plugin name and <version> with the desired plugin version.
/opt/ufm/scripts/manage_ufm_plugins.sh upgrade -p <plugin_name> -t <version>
Example:
/opt/ufm/scripts/manage_ufm_plugins.sh upgrade -p ufm-plugin-gnmi_telemetry -t 1.1.8-3158
Step 3: Enable the plugin
Once the plugin has been successfully upgraded, enable the plugin again.
/opt/ufm/scripts/manage_ufm_plugins.sh enable -p <plugin_name>
Example:
-
Disable the plugin:
/opt/ufm/scripts/manage_ufm_plugins.sh disable -p ufm-plugin-gnmi_telemetry -
Upgrade the plugin to version 1.1.8-3158:
/opt/ufm/scripts/manage_ufm_plugins.sh upgrade -p ufm-plugin-gnmi_telemetry -t 1.1.8-3158 -
Enable the plugin:
/opt/ufm/scripts/manage_ufm_plugins.sh enable -p ufm-plugin-gnmi_telemetry
Plugin Split Configuration (--split-conf)
Enables per-host configuration directories for a UFM plugin: every infra node keeps its own private config on disk while the plugin definition stays shared across the cluster.
Restrictions
-
Supported only in the
ufm-infracontext (otherwise:--split-conf is only supported in ufm-infra context). -
Available only on
add(not onenable,upgrade, orremove). -
Persisted as
split_conf = Truefor the lifetime of the plugin.
On-Disk Layout
/opt/ufm/files/conf/plugins/<plugin>/ <shared files> # template, not mounted into the container host_<HOSTNAME>/ # per-host dir, mounted as /config
Usage
/opt/ufm/scripts/manage_ufm_plugins.sh add -p <plugin_name> -t <version> --split-conf /opt/ufm/scripts/manage_ufm_plugins.sh show # check "Split conf: True" /opt/ufm/scripts/manage_ufm_plugins.sh remove -p <plugin_name>
Example:
/opt/ufm/scripts/manage_ufm_plugins.sh add -p ufm-plugin-gnmi_telemetry -t 1.1.8-3158 --split-conf
Last updated: