Difference between revisions of "Using Management CLI"

Line 1: Line 1:
# start cli
+
* start cli
cd cli
+
:* cd cli
./mgtcli.py
+
:* ./mgtcli.py
 
# add network element
 
# add network element
 
 <cli> add element --host=192.168.50.5 --
 
 <cli> add element --host=192.168.50.5 --

Revision as of 01:47, 24 January 2013

  • start cli
  • cd cli
  • ./mgtcli.py
  1. add network element

 <cli> add element --host=192.168.50.5 -- name=TexasUSA --user=me --password=foo

  1. list directory

 <cli> ls 192.168.30.4: NewEnglandRouter

X.y.z.a:             HoChiMinhCity.

Vietnam

192.168.50.5:  TexasUSA

DOWN!  <cli> ls /TexasUSA/ethernet/interfaces  <cli> ls /*/ethernet/interfaces  <cli> ls /TexasUSA/ethernet/interfaces[name=eth0]  <cli> ls /TexasUSA/ethernet/interfaces[name=eth*]  <cli> ls /[TexasUSA,*.VN]/ethernet/interfaces

  1. change directory

 <cli> cd /TexasUSA/ethernet/interfaces  <cli> cd /[TexasUSA,*.VN]/ethernet/interfaces

  1. set value

 <cli> set /[TexasUSA,*.VN]/ethernet/interfaces/status UP

  1. load user plugin

 <cli> load testplugin.py

  1. run commands define in the plugin

 <cli> show_by_name eth0  <cli> show_by_path /TexasUSA/ethernet/interfaces [name=eth0]

  1. demo notification when network disconnect

 <model deployment machine>./etc/init.d/asp stop  <cli>typing something  Disconnected to server TexasUSA!  <cli>typing something

  1. reconnect server

 connect TexasUSA