using this process, Script will clear the base config like port--channel related config, IP related config, VXlan related config and more related configuration.
Using the same way user can choose other options to use FM agent
root@ones-application:/ONES-4.1/ones_fm_agent# ./deploy_fmcli.sh
Available options for FMCLI installation:
1) install
- Install FMCLI
2) uninstall
- Uninstall FMCLI
3) installresetconfig
- Install FMCLI and reset the configuration
4) upgrade
- Upgrade FMCLI to the latest version
5) install_withQOS
- Install FMCLI and enable QoS feature
6) installresetconfig_withQOS
- Install FMCLI, reset the configuration, and enable QoS feature
Please enter your choice (1-6) to proceed with the FMCLI installation: 1
Installer will proceed with FMCLI-install ...
e2ef8a51359d: Loading layer [==================================================>] 72.54MB/72.54MB
ae2d55769c5e: Loading layer [==================================================>] 7.401MB/7.401MB
3054512b6f71: Loading layer [==================================================>] 31.35MB/31.35MB
997b8e79e84f: Loading layer [==================================================>] 5.12kB/5.12kB
e6c5004ee77f: Loading layer [==================================================>] 11.7MB/11.7MB
f58d795dfab9: Loading layer [==================================================>] 2.56kB/2.56kB
ed46ea0f4e17: Loading layer [==================================================>] 31.74MB/31.74MB
1c38a701a3d6: Loading layer [==================================================>] 42.7MB/42.7MB
c4456c24c820: Loading layer [==================================================>] 1.421MB/1.421MB
Loaded image: avizdock/agent_installer:latest
Docker image 'avizdock/agent_installer:latest' is loaded.
6b0ef823ee585b143d24a1473b4efb3509faeb047aadd5e3d719391d7f253098
Docker container 'agent_installer' is running.
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
6b0ef823ee58 avizdock/agent_installer:latest "python3" 6 seconds ago Up Less than a second agent_installer
Docker container 'ones-fm' is running.
Update success for 192.168.1.12
Update success for 192.168.1.13
/usr/local/lib/python3.8/site-packages/paramiko/pkey.py:82: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from this module in 48.0.0.
"cipher": algorithms.TripleDES,
/usr/local/lib/python3.8/site-packages/paramiko/transport.py:253: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from this module in 48.0.0.
"class": algorithms.TripleDES,
Ignore below Error if Installing Agent via docker installer
ones-fm container is not running
Operation = install
##### params = {'ip': '192.168.1.12', 'passwd': 'YourPaSsWoRd', 'user': 'admin', 'server_ip': '172.17.0.2', 'fm_port': None} #####
###############Connecting to switch###############
##### params = {'ip': '192.168.1.13', 'passwd': 'YourPaSsWoRd', 'user': 'admin', 'server_ip': '172.17.0.2', 'fm_port': None} #####
###############Connecting to switch###############
<paramiko.client.SSHClient object at 0x7fa8657bb3a0>
Connection to switch 192.168.1.12 successfull.....................
/home/ones_fm_agent
<paramiko.client.SSHClient object at 0x7fa8657bb7c0>
Connection to switch 192.168.1.13 successfull.....................
/home/ones_fm_agent
Creating work directory on the device 192.168.1.12........
Creating work directory on the device 192.168.1.12........
Work Directory ones-fm_1766131053_2486105 created successfully on the device 192.168.1.12 .............
Copying FMCLI_Installer.py to directory ones-fm_1766131053_2486105 on the device 192.168.1.12 .............
Work Directory ones-fm_1766131053_2962594 created successfully on the device 192.168.1.13 .............
Copying FMCLI_Installer.py to directory ones-fm_1766131053_2962594 on the device 192.168.1.13 .............
Debug command used:: sudo ls ones-fm_1766131053_2486105/FMCLI_Installer.py
The file 'ones-fm_1766131053_2486105/FMCLI_Installer.py' copy success on the device.
Copying FMCLI_Installer.py to directory ones-fm_1766131053_2486105 successful on the device 192.168.1.12 .............
Copying fmcli-app.tgz to directory ones-fm_1766131053_2486105 on the device 192.168.1.12 .............
Debug command used:: sudo ls ones-fm_1766131053_2962594/FMCLI_Installer.py
The file 'ones-fm_1766131053_2962594/FMCLI_Installer.py' copy success on the device.
Copying FMCLI_Installer.py to directory ones-fm_1766131053_2962594 successful on the device 192.168.1.13 .............
Copying fmcli-app.tgz to directory ones-fm_1766131053_2962594 on the device 192.168.1.13 .............
Debug command used:: sudo ls ones-fm_1766131053_2486105/fmcli-app.tgz
The file 'ones-fm_1766131053_2486105/fmcli-app.tgz' copy success on the device.
Copying fmcli-app.tgz to directory ones-fm_1766131053_2486105 successful on the device 192.168.1.12 .............
Debug command used:: sudo ls ones-fm_1766131053_2962594/fmcli-app.tgz
The file 'ones-fm_1766131053_2962594/fmcli-app.tgz' copy success on the device.
Copying fmcli-app.tgz to directory ones-fm_1766131053_2962594 successful on the device 192.168.1.13 .............
File '/usr/lib/frr/frr-reload.py' does not exist in container 'bgp'
Copying frr-reload.py to directory ones-fm_1766131053_2486105 on the device 192.168.1.12 .............
File '/usr/lib/frr/frr-reload.py' does not exist in container 'bgp'
Copying frr-reload.py to directory ones-fm_1766131053_2962594 on the device 192.168.1.13 .............
Debug command used:: sudo ls ones-fm_1766131053_2486105/frr-reload.py
The file 'ones-fm_1766131053_2486105/frr-reload.py' copy success on the device.
Copying frr-reload.py to directory ones-fm_1766131053_2486105 successful on the device 192.168.1.12 .............
Debug command used:: sudo ls ones-fm_1766131053_2962594/frr-reload.py
The file 'ones-fm_1766131053_2962594/frr-reload.py' copy success on the device.
Copying frr-reload.py to directory ones-fm_1766131053_2962594 successful on the device 192.168.1.13 .............
#################### Installing FMCLI on the device 192.168.1.12 ######################
#################### Installing FMCLI on the device 192.168.1.13 ######################
####### Debug LOGS on the device 192.168.1.12 #######
fmcli-app/
fmcli-app/ip_validate
fmcli-app/fmcli_read_db_schema
fmcli-app/fmclimain.service
fmcli-app/fmcli_composer.py
fmcli-app/fmcli
fmcli-app/device_cleanup
fmcli-app/frr-reload.py
fmcli-app/libcligen.so..
fmcli-app/fmcli.version
fmcli-app/fmcli.cli
fmcli-app/fmcli.sh
fmcli-app/fmcli_composer_mapping.cfg
fmcli-app/libhiredis.so.1.1.0
cli
cli/fmcli-app-amd.tgz
Extracting cli/fmcli-app-amd.tgz...
Installing Aviz-FMCLI ..........
File '/usr/lib/frr/frr-reload.py' already exists in container 'bgp'
Aviz-FMCLI installation successful........
FMCLI version: 4.1.9
Created symlink /etc/systemd/system/multi-user.target.wants/fmclimain.service → /etc/systemd/system/fmclimain.service.
/tmp/fmcliStartup.init
FM-Agent installed successfully on the device 192.168.1.12........
####### Debug LOGS on the device 192.168.1.13 #######
####### Deleting ones-fm_1766131053_2486105 dir on the device 192.168.1.12 #######
fmcli-app/
fmcli-app/ip_validate
fmcli-app/fmcli_read_db_schema
fmcli-app/fmclimain.service
fmcli-app/fmcli_composer.py
fmcli-app/fmcli
fmcli-app/device_cleanup
fmcli-app/frr-reload.py
fmcli-app/libcligen.so..
fmcli-app/fmcli.version
fmcli-app/fmcli.cli
fmcli-app/fmcli.sh
fmcli-app/fmcli_composer_mapping.cfg
fmcli-app/libhiredis.so.1.1.0
cli
cli/fmcli-app-amd.tgz
Extracting cli/fmcli-app-amd.tgz...
Installing Aviz-FMCLI ..........
File '/usr/lib/frr/frr-reload.py' already exists in container 'bgp'
Aviz-FMCLI installation successful........
FMCLI version: 4.1.9
Created symlink /etc/systemd/system/multi-user.target.wants/fmclimain.service → /etc/systemd/system/fmclimain.service.
/tmp/fmcliStartup.init
FM-Agent installed successfully on the device 192.168.1.13........
Deployment of FM-Agent to switch 192.168.1.12 is Completed
####### Deleting ones-fm_1766131053_2962594 dir on the device 192.168.1.13 #######
Deployment of FM-Agent to switch 192.168.1.12 is Completed
FMCLI install Result
{'192.168.1.12': {'status': 'PASS', 'fmcli_version': '4.1.9'}, '192.168.1.13': {'status': 'PASS', 'fmcli_version': '4.1.9'}}
╒═════════╤═════════════╤══════════════════╤═════════════════╕
│ SL.No │ Device │ install Result │ FMCLI Version │
╞═════════╪═════════════╪══════════════════╪═════════════════╡
│ 1 │ 192.168.1.12 │ PASS │ 4.1.9 │
├─────────┼─────────────┼──────────────────┼─────────────────┤
│ 2 │ 192.168.1.13 │ PASS │ 4.1.9 │
╘═════════╧═════════════╧══════════════════╧═════════════════╛
Deployment logs have been saved to the log file: ones-fm-agent-deploy-1766131052.log
agent_installer
Docker agent_installer has been stopped
agent_installer
Docker agent_installer has been removed
Untagged: avizdock/agent_installer:latest
Deleted: sha256:b115eb21a63518b47079a0f9b25ed56e8dd807a4aa054dc18efb1d5635b9728d
Deleted: sha256:a2052350dbedd8d19d573f1f81a333af50d33c157dd565c6fb3ea19ff32d7869
Deleted: sha256:403906165705c1c4c263865c7d2e8560424306ef76cc7dfd319565e1036a4b49
Deleted: sha256:71d4c516421d0cd5b08b0c7f7ddff68182ca799815c621e1bf1d7c2a247820f2
Deleted: sha256:ed5221ab4eb63334a3121c173d4b6e0fb882b13eb0de6f1daa781908da91a464
Deleted: sha256:11b1633cb703032b065434387b48194f3e97a57aaddc61a31aa2918a1fd32780
Deleted: sha256:aa353210edce17d0370066fc6184cff9e2a9197884e6f43a0ad1fd32b630f8de
Deleted: sha256:b23b2f4af61d8cc745c6bea66be93bd59b97c3971c36466ae4ea345f52fdfc67
Deleted: sha256:b55ff4d1eb4dd15edbc9ffc15b1bd5771cd09c371b0e7c44cbcbd5c5f62ec76a
Deleted: sha256:e2ef8a51359d088511d34c725305c220294a1fcd5fe5e5dbe4d698c7239ce2c9
Docker avizdock/agent_installer:latest image has been removed
root@Switch:~$ sudo fmcli
fmcli#
Available options for FMCLI installation:
1) install
- Install FMCLI
2) uninstall
- Uninstall FMCLI
3) installresetconfig
- Install FMCLI and reset the configuration
4) upgrade
- Upgrade FMCLI to the latest version
5) install_withQOS
- Install FMCLI and enable QoS feature
6) installresetconfig_withQOS
- Install FMCLI, reset the configuration, and enable QoS feature
Please enter your choice (1-6) to proceed with the FMCLI installation: 2
Installer will proceed with FMCLI-uninstall ...
e2ef8a51359d: Loading layer [==================================================>] 72.54MB/72.54MB
ae2d55769c5e: Loading layer [==================================================>] 7.401MB/7.401MB
3054512b6f71: Loading layer [==================================================>] 31.35MB/31.35MB
997b8e79e84f: Loading layer [==================================================>] 5.12kB/5.12kB
e6c5004ee77f: Loading layer [==================================================>] 11.7MB/11.7MB
f58d795dfab9: Loading layer [==================================================>] 2.56kB/2.56kB
ed46ea0f4e17: Loading layer [==================================================>] 31.74MB/31.74MB
1c38a701a3d6: Loading layer [==================================================>] 42.7MB/42.7MB
c4456c24c820: Loading layer [==================================================>] 1.421MB/1.421MB
Loaded image: avizdock/agent_installer:latest
Docker image 'avizdock/agent_installer:latest' is loaded.
e22198c32863c975fa69ed971a952810205c8648231dbd27b56a6b64ab0ae0a2
Docker container 'agent_installer' is running.
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e22198c32863 avizdock/agent_installer:latest "python3" 6 seconds ago Up Less than a second agent_installer
Docker container 'ones-fm' is running.
Update success for 192.168.1.12
Update success for 192.168.1.13
/usr/local/lib/python3.8/site-packages/paramiko/pkey.py:82: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from this module in 48.0.0.
"cipher": algorithms.TripleDES,
/usr/local/lib/python3.8/site-packages/paramiko/transport.py:253: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from this module in 48.0.0.
"class": algorithms.TripleDES,
Ignore below Error if Installing Agent via docker installer
ones-fm container is not running
Operation = uninstall
##### params = {'ip': '192.168.1.12', 'passwd': 'YourPaSsWoRd', 'user': 'admin', 'server_ip': '172.17.0.2', 'fm_port': None} #####
###############Connecting to switch###############
##### params = {'ip': '192.168.1.13', 'passwd': 'YourPaSsWoRd', 'user': 'admin', 'server_ip': '172.17.0.2', 'fm_port': None} #####
###############Connecting to switch###############
<paramiko.client.SSHClient object at 0x7fb3a86843a0>
Connection to switch 192.168.1.12 successfull.....................
/home/ones_fm_agent
############### Uninstalling FM Agent ###############
<paramiko.client.SSHClient object at 0x7fb3a8684760>
Connection to switch 192.168.1.13 successfull.....................
/home/ones_fm_agent
############### Uninstalling FM Agent ###############
FMCLI uninstall Result
{'192.168.1.12': {'status': 'PASS', 'fmcli_version': '4.1.9'}, '192.168.1.13': {'status': 'PASS', 'fmcli_version': '4.1.9'}}
╒═════════╤═════════════╤════════════════════╤═════════════════╕
│ SL.No │ Device │ uninstall Result │ FMCLI Version │
╞═════════╪═════════════╪════════════════════╪═════════════════╡
│ 1 │ 192.168.1.12 │ PASS │ 4.1.9 │
├─────────┼─────────────┼────────────────────┼─────────────────┤
│ 2 │ 192.168.1.13 │ PASS │ 4.1.9 │
╘═════════╧═════════════╧════════════════════╧═════════════════╛
Deployment logs have been saved to the log file: ones-fm-agent-deploy-1766131370.log
agent_installer
Docker agent_installer has been stopped
agent_installer
Docker agent_installer has been removed
Untagged: avizdock/agent_installer:latest
Deleted: sha256:b115eb21a63518b47079a0f9b25ed56e8dd807a4aa054dc18efb1d5635b9728d
Deleted: sha256:a2052350dbedd8d19d573f1f81a333af50d33c157dd565c6fb3ea19ff32d7869
Deleted: sha256:403906165705c1c4c263865c7d2e8560424306ef76cc7dfd319565e1036a4b49
Deleted: sha256:71d4c516421d0cd5b08b0c7f7ddff68182ca799815c621e1bf1d7c2a247820f2
Deleted: sha256:ed5221ab4eb63334a3121c173d4b6e0fb882b13eb0de6f1daa781908da91a464
Deleted: sha256:11b1633cb703032b065434387b48194f3e97a57aaddc61a31aa2918a1fd32780
Deleted: sha256:aa353210edce17d0370066fc6184cff9e2a9197884e6f43a0ad1fd32b630f8de
Deleted: sha256:b23b2f4af61d8cc745c6bea66be93bd59b97c3971c36466ae4ea345f52fdfc67
Deleted: sha256:b55ff4d1eb4dd15edbc9ffc15b1bd5771cd09c371b0e7c44cbcbd5c5f62ec76a
Deleted: sha256:e2ef8a51359d088511d34c725305c220294a1fcd5fe5e5dbe4d698c7239ce2c9
Docker avizdock/agent_installer:latest image has been removed