Skip to content

Macrix/procontel.cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 

Repository files navigation

Title github_url Weight Description
ProconTEL CLI
8
Use the ProconTelCli.exe command line

Table of Contents

  1. Quick introduction
  2. Available commands
  3. Container commands
  4. Endpoint commands
  5. Import commands
  6. Plugin commands
  7. Workspace commands
  8. Erase all
  9. Avatar comands
  10. About CLI
  11. Compose
  12. Secure connection
  13. Exit Codes

1.1 List item List item

1. Quick introduction

The ProconTelCli makes it easy to create and manage a ProconTel ecosystem. It already follows our best practices!

2. Available commands

To list available commands, either run .\ProconTelCli.exe with no parameters or execute .\ProconTelCLI.exe --help

ProconTelCLI is command line interface for managing ProconTEL server. THIS IS AN ALPHA RELEASE, YOU ARE USING IT AT YOUR OWN RISK.

Usage: procontelCLI [options] [command]

Options:
  -?|-h|--help  Show help information

Commands:
  about         Information about CLI
  avatar        Allow user to manage Avatar feature.
  compose       Manage ProconTEL ecosystem by executing yaml strcipt. This is experimental feature!!!
  container     Manage containers (channel or pools) running on ProconTEL server.
  endpoint      Manage endpoints running on ProconTEL server.
  import        Import PEX file.
  plugin        Manage plugins installed on ProconTEL server.
  prune         Completelly erasing all declared ProconTEL workspaces/channel/endpoints and Plugins
  workspace     Manage workspaces running on ProconTEL server.

Run 'procontelCLI [command] --help' for more information about a command.

3. Container commands

Create a pool called TestPool in workspace TestWorkspace

.\procontelcli.exe container new -p -w TestWorkspace TestPool

Create a channel called TestChannel in workspace TestWorkspace

.\procontelcli.exe container new -w TestWorkspace TestChannel

Deletes TestPool

.\procontelcli.exe container delete TestPool1

Activate container(s) TestPool1, TestPool2 (Not covered by security)

.\procontelcli.exe container activate TestPool1 TestPool2

Deactivate container(s) TestPool1, TestPool2

.\procontelcli.exe container deactivate TestPool1 TestPool2

Add new dependency between TestPool1 and TestPool2

.\procontelcli.exe container dependency create TestPool1 TestPool2

Options:
Startup delay in [ms]

-d or --delay

Flag indicating waiting for dependent channels/pools to be fully active

-w or --wait

Timeout in [ms] for waiting for dependent channels/pools

-wt or --wait-timeout

Get details about container

.\procontelcli.exe container describe TestPool

List containers

.\procontelcli.exe container list

Options:
Container type (All, Pool, Channel)

-c or --container

to be continued...

4. Endpoint commands

Create new endpoint called TestEndpoint in the channel called TestChannel from TestPlugin plugin on localhost

.\procontelcli.exe endpoint new -c TestChannel -p TestPlugin.Endpoint@TestPlugin -s localhost

One remark: this: TestPlugin.Endpoint@TestPlugin hopefully will be replaced by something better in the newer version of ProcontelCLI. It's built as namespace of endpoint class @ name of plugin.


Display list of endpoints running on TestChannel

.\procontelcli.exe endpoint list TestChannel -s localhost:9000

Display parameters of endpoint called TestEndpoint

.\procontelcli.exe endpoint params TestEndpoint -s localhost:9000

Update parameter ActsAsProvider to true of endpoint called TestEndpoint

.\procontelcli.exe endpoint params TestEndpoint -u="ActsAsProvider=true" -s localhost:9000

Display internal configuration of endpoint called TestEndpoint

.\procontelcli.exe endpoint config TestEndpoint -s localhost:9000

Update internal configuration to CONFIGURATION_VALUE of endpoint called TestEndpoint

.\procontelcli.exe endpoint config TestEndpoint -u="CONFIGURATION_VALUE" -s localhost:9000

Load internal configuration from local file C:\configuration.txt of endpoint called TestEndpoint

.\procontelcli.exe endpoint config TestEndpoint -f="C:\configuration.txt" -s localhost:9000

Replace xml internal configuration property of endpoint called TestEndpoint

.\procontelcli.exe endpoint config TestEndpoint -r-xml="PluginConfiguration/MethodName=NEW_VALUE" -s localhost:9000

Replace json internal configuration property of endpoint called TestEndpoint

.\procontelcli.exe endpoint config TestEndpoint -r-json="PluginConfiguration.MethodName=NEW_VALUE" -s localhost:9000

Activate endpoint(s) TestEndpoint1, TestEndpoint2

.\procontelcli.exe endpoint activate TestEndpoint1 TestEndpoint2 -s localhost:9000

Dectivate endpoint(s) TestEndpoint1, TestEndpoint2

.\procontelcli.exe endpoint deactivate TestEndpoint1 TestEndpoint2 -s localhost:9000

Deletes endpoint TestEndpoint

.\procontelcli.exe endpoint delete TestEndpoint1 -s localhost:9000

Options:
Container name

-c or --container

Get details about TestEndpoint

.\procontelcli.exe endpoint describe TestEndpoint -s localhost:9000

to be continued...

5. Import commands

Import PEX file from path 'c:\testfolder\test_import.pex'

.\procontelcli.exe import c:\testfolder\test_import.pex

Options:
Import also plugins

-p or --with-plugins

Clean import

-c or --clean

to be continued...

6. Plugin commands


Installation of new plugin


Install plugin called Test Plugin

.\procontelcli.exe plugin install D:\SampleProject\TestPlugin.dll

Install plugin called Test Plugin with dependent an additional dll binaries

.\procontelcli.exe plugin install D:\SampleProject\TestPlugin.dll -f D:\SampleProject\contrib\|*.dll||R

Where 'R' is a flag to search for defined files recursively in mentioned path


Install plugin called Test Plugin with dependent an additional dll binaries from two directories (additional directories require adding next -f parameter)

.\procontelcli.exe plugin install D:\SampleProject\TestPlugin.dll -f D:\SampleProject\contrib\|*.dll||R -f D:\SampleProject\additionalLibs\|*.dll||R

Get information about installed plugin

.\ProconTelCLI.exe plugin describe ExampleTelegramEndpoint
Plugin:
  FullName: ExampleTelegramEndpoint, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
  Version: 1.0.0.0
  UpdateDate: 2021-03-23 12:33:59
  InstallDate: 2021-03-19 09:41:45

Upgrading existing plugin


There is also possibillity to upgrade existing, already installed, plugins by using command

.\ProconTelCLI.exe plugin upgrade PluginName

or even few plugins at the same time

.\ProconTelCLI.exe plugin upgrade PluginName AnotherPluginName AdditionalPluginName

There is also option to upgrade all installed plugins in simple way:

.\ProconTelCLI.exe plugin upgrade *

The * character can be used only alone, i.e.

.\ProconTelCLI.exe plugin upgrade ExampleTelegramEndpoint *

is illegal, the * character will be filter out and only names will be processing


7. Workspace commands

Create new workspace called TestWorkspace

.\procontelcli.exe workspace new TestWorkspace

Remove workspace called TestWorkspace

.\procontelcli.exe workspace delete TestWorkspace

Activate workspace(s) TestWorkspace1, TestWorkspace2

.\procontelcli.exe workspace activate TestWorkspace1 TestWorkspace2

Deactivate workspace(s) TestWorkspace1, TestWorkspace2

.\procontelcli.exe workspace deactivate TestWorkspace1 TestWorkspace2

Get all workspaces

.\procontelcli.exe workspace list

8. Erase all

Completelly erasing all declared ProconTEL workspaces/channel/endpoints and Plugins

.\procontelcli.exe prune

9. Avatar comands

Create Avatar for TestEndpoint inside of TestChannel

.\procontelcli.exe avatar create TestEndpoint TestChannel

Options:
Source avatar address

-a or --address

Delete Avatar for TestEndpoint inside of TestChannel

.\procontelcli.exe avatar delete TestEndpoint TestChannel

Get list of Avatars in TestChannel

.\procontelcli.exe avatar list TestChannel

10. About CLI

Get version of CLI (Not covered by security)

.\procontelcli.exe about version

11. Compose

Execute yaml strcipt. This is experimental feature!!! Compose script file path

.\procontelcli.exe compose up C:\script.yaml

12. Secure connection

If the ProconTel is secured with password and/or certificate, the CLI is still able to work, but need some additional parameters to be set up. For example command below will not be executed if there are security features turned on:

.\ProconTelCLI.exe  container new exampleContainer 

but code below, with additional security parameters, will work fine

.\ProconTelCLI.exe  container new exampleContainer --certificate client-certificate --certificateStorage TrustedPeople --password test 

There are 4 security parameters which can be used in CLI:

  1. --certificate - specify the name of certificate used to sign communication with ProconTel api
  2. --certificateStorage - specify the place where certificate is store, i.e. Personal, TrustedPeople...
  3. --revocationMode - specify the revocation mode for secure communication, it supports following options NoCheck, Online, Offline
  4. --password - here is specified a password for establishing connection

--password and three other parameters can be used separately i.e. in case when you have specified certificates only the password is not required. For establishing communication with server secured by certificate --certificate and --certificateStorage parameters are mandatrory, the --revocationMode is optional (by default is used NoCheck).


13. Exit codes

Global exit codes

Exit Code Description
0 Success
1 Incorrect Command
2 Command Failure

Specific exit codes and description
Exit Code Description
100 Endpoint deos not exist
101 Container does not exist
102 Workspace does not exist
103 Plugin does not exist
104 Dependency does not exist
105 Destination container already contain avatar of selected endpoint
106 Destination container cannot be pool
107 Container is active
108 No avatar in container
109 No endpoint in container
110 Transfering plugin files failed
111 Upgrading plugin failed
112 Plugin validation failed
113 Pool cannot contain avatar
114 Wrong container type

to be continued...

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published