# CLI plugin for ExtensiveAutomation server
This plugin enable to interact with remote system throught the SSH protocol.
## Table of contents
* [Installing from pypi](#installing-from-pypi)
* [Installing from source](#installing-from-source)
* [About actions](#about-actions)
* [ssh/send_commands.yml](#sshsend_commandsyml)
* [ssh/send_expect.yml](#sshsend_expectyml)
* [About workflows](#about-workflows)
* [ssh/send_commands.yml](#sshsend_commandsyml)
* [ssh/send_expect.yml](#sshsend_expectyml)
## Installing from pypi
1. Run the following command
pip install extensiveautomation_plugin_cli
2. Execute the following command to take in account this new plugin
./extensiveautomation --reload
3. Samples are deployed on data storage.
## Installing from source
1. Clone the following repository
git clone https://github.com/ExtensiveAutomation/extensiveautomation-plugin-cli.git
cd extensiveautomation-plugin-cli/src/ea/
2. Copy the folder `sutadapters` in the source code server and overwrite-it
cp -rf sutadapters/ /<install_path_project>/src/ea/
3. Copy the folder `var` in the source code server/ and overwrite-it
cp -rf var/ /<install_path_project>/src/ea/
4. Finally execute the following command to install depandencies
cd /<install_path_project>/src/
python3 extensiveautomation.py --install-adapter CLI
python3 extensiveautomation.py --reload
## About actions
## ssh/send_commands.yml
Send ssh commands on one or severals hosts.
Parameter(s):
- ssh-commands (text): bash commands
```yaml
- name: ssh-commands
value: |-
echo "hello world" >> /var/log/messages
echo "hola mondu" >> /var/log/messages
```
- ssh-hosts (list): ssh remote addresses
```yaml
- name: ssh-hosts
value:
- ssh-host: 10.0.0.55
ssh-login: root
ssh-password: bonjour
```
- agent (text): agent name to use
```yaml
- name: ssh-agent
value: agent02.ssh
```
## ssh/send_expect.yml
Send ssh commands on one or severals hosts and expect outputs.
Parameter(s):
- ssh-commands (text): bash commands
```yaml
- name: ssh-commands
value: |-
# get hostname
uname -n
.*\n[!CAPTURE:MACHINE_HOSTNAME:]\n.*
```
- ssh-hosts (dict): ssh remote addresses
```yaml
- name: ssh-hosts
value:
- ssh-host: 10.0.0.55
ssh-login: root
ssh-password: bonjour
```
- agent (text): agent name to use
```yaml
- name: ssh-agent
value: agent02.ssh
```
## About workflows
## ssh/send_commands.yml
This worflow show how to use `ssh` actions.
## ssh/send_expect.yml
This worflow show how to use `ssh` actions.
Raw data
{
"_id": null,
"home_page": "https://www.extensiveautomation.org/",
"name": "extensiveautomation-plugin-cli",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "extensiveautomation automation testautomation testing plugin",
"author": "Denis MACHARD",
"author_email": "d.machard@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/26/9a/9ccdf76e1afc876ad4ae0f0a1d1a53810a12a6ee4fb070a04ad8da095d11/extensiveautomation_plugin_cli-1.5.0.tar.gz",
"platform": "any",
"description": "# CLI plugin for ExtensiveAutomation server\n\nThis plugin enable to interact with remote system throught the SSH protocol.\n\n## Table of contents\n* [Installing from pypi](#installing-from-pypi)\n* [Installing from source](#installing-from-source)\n* [About actions](#about-actions)\n * [ssh/send_commands.yml](#sshsend_commandsyml)\n * [ssh/send_expect.yml](#sshsend_expectyml)\n* [About workflows](#about-workflows) \n * [ssh/send_commands.yml](#sshsend_commandsyml)\n * [ssh/send_expect.yml](#sshsend_expectyml)\n \n## Installing from pypi\n\n1. Run the following command\n\n pip install extensiveautomation_plugin_cli\n\n2. Execute the following command to take in account this new plugin\n\n ./extensiveautomation --reload\n \n3. Samples are deployed on data storage.\n\n## Installing from source\n\n1. Clone the following repository \n\n git clone https://github.com/ExtensiveAutomation/extensiveautomation-plugin-cli.git\n cd extensiveautomation-plugin-cli/src/ea/\n \n2. Copy the folder `sutadapters` in the source code server and overwrite-it\n\n cp -rf sutadapters/ /<install_path_project>/src/ea/\n \n3. Copy the folder `var` in the source code server/ and overwrite-it\n\n cp -rf var/ /<install_path_project>/src/ea/\n\n4. Finally execute the following command to install depandencies\n\n cd /<install_path_project>/src/\n python3 extensiveautomation.py --install-adapter CLI\n python3 extensiveautomation.py --reload\n \n## About actions\n\n## ssh/send_commands.yml\n\nSend ssh commands on one or severals hosts.\n\nParameter(s):\n- ssh-commands (text): bash commands\n\n```yaml\n- name: ssh-commands\n value: |-\n echo \"hello world\" >> /var/log/messages\n echo \"hola mondu\" >> /var/log/messages\n```\n \n- ssh-hosts (list): ssh remote addresses\n\n```yaml\n- name: ssh-hosts\n value:\n - ssh-host: 10.0.0.55\n ssh-login: root\n ssh-password: bonjour\n```\n\n- agent (text): agent name to use\n\n```yaml\n- name: ssh-agent\n value: agent02.ssh\n```\n\n## ssh/send_expect.yml\n\nSend ssh commands on one or severals hosts and expect outputs.\n\nParameter(s):\n- ssh-commands (text): bash commands\n\n```yaml\n- name: ssh-commands\n value: |-\n # get hostname\n uname -n\n .*\\n[!CAPTURE:MACHINE_HOSTNAME:]\\n.*\n```\n \n- ssh-hosts (dict): ssh remote addresses\n\n```yaml\n- name: ssh-hosts\n value:\n - ssh-host: 10.0.0.55\n ssh-login: root\n ssh-password: bonjour\n```\n\n- agent (text): agent name to use\n\n```yaml\n- name: ssh-agent\n value: agent02.ssh\n```\n\n## About workflows\n\n## ssh/send_commands.yml\n\nThis worflow show how to use `ssh` actions.\n\n## ssh/send_expect.yml\n\nThis worflow show how to use `ssh` actions.\n",
"bugtrack_url": null,
"license": "",
"summary": "CLI plugin for extensiveautomation server",
"version": "1.5.0",
"project_urls": {
"Homepage": "https://www.extensiveautomation.org/"
},
"split_keywords": [
"extensiveautomation",
"automation",
"testautomation",
"testing",
"plugin"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "269a9ccdf76e1afc876ad4ae0f0a1d1a53810a12a6ee4fb070a04ad8da095d11",
"md5": "b114cb82d56b70eda8c05d1d2e9737a1",
"sha256": "85c49dd36cc641988fb7b47316f649ffffe11c20faead5c250e1ccd9b28c00b2"
},
"downloads": -1,
"filename": "extensiveautomation_plugin_cli-1.5.0.tar.gz",
"has_sig": false,
"md5_digest": "b114cb82d56b70eda8c05d1d2e9737a1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 22681,
"upload_time": "2023-08-18T08:46:39",
"upload_time_iso_8601": "2023-08-18T08:46:39.039846Z",
"url": "https://files.pythonhosted.org/packages/26/9a/9ccdf76e1afc876ad4ae0f0a1d1a53810a12a6ee4fb070a04ad8da095d11/extensiveautomation_plugin_cli-1.5.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-18 08:46:39",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "extensiveautomation-plugin-cli"
}