Skip to content

Plugin Support in IECTL


Introduction

IECTL plugin can extend iectl with new sub commands. A plugin should be standalone binary which can be placed at $HOME/.iectl/plugins. Plugin binary name should start with "ie". Right now it comes with two default plugins:


Standalone Executable Plugin

  • Create a standalone executable binary
  • windows allowed formats are ".bat", ".cmd", ".com", ".exe", ".ps1"
  • linux all kind of executable files are allowed
  • Example Plugin: Below is the example of sample of a plugin, Copy the content given below and save as ie-config-plugin and place your plugin at $HOME/.iectl/plugins/ie-config-plugin OR set environment variable EDGE_PLUGINS with user defined folder path.

    #!/bin/bash
    
    iedUser=$1
    iedPw=$2
    iedUrl=$3
    iemPw=$4
    iemUrl=$5
    iemUser=$6
    
    iectl config add iem --user $iemUser --password $iemPw --url $iemUrl --name "mytestIEM"
    iectl config add device --user $iedUser --password $iedPw --url $iedUrl --name "mytestIED"
    
    echo "Test config added"
    
  • Usage:

iectl ie-config-plugin  "iemuser@iem.com" "iedpassword" "https://ied.com" "iempassword" "https://iemurl.com" "iem@iem.com"