Merge changes from topic 'ListenerAdapterTreeMigration'
[netconf.git] / netconf / tools / netconf-cli / README
1 usage: 
2 Submit address + port for initial TCP connection (PURE TCP CONNECTIONS ARE NOT SUPPORTED YET)
3 Submit username + password in addition to address + port for initial SSH connection
4 If no arguments(or unexpected combination) is submitted, cli will be started without initial connection
5 To use with ODL controller, run with: java -jar netconf-cli-0.2.5-SNAPSHOT-executable.jar  --server localhost --port 1830 --username admin --password admin
6
7 Generic cli for netconf devices
8
9 optional arguments:
10   -h, --help             show this help message and exit
11
12 TCP:
13   Base arguments to initiate TCP connection right away
14
15   --server SERVER        Netconf device ip-address/domain name
16   --port PORT            Netconf device port
17
18 SSH:
19   SSH credentials, if provided, initial connection will be attempted using SSH
20
21   --username USERNAME    Username for SSH connection
22   --password PASSWORD    Password for SSH connection
23 ------------------------------------------------------------------------
24
25 To run the cli execute:
26
27 java -jar netconf-cli-0.2.5-SNAPSHOT-executable.jar --username user --password password --server serverIP --port optionalPort
28
29 The cli will connect to the remote device automatically.
30 The initialization may take a few moments depending on the size of schemas provided by the device.
31 To view the progress, one can take a look inside netconfcli.log file (All logs are in this file starting with level TRACE).
32 Cli does not print any logging messages to the console, only to the file.
33
34 ------------------------------------------------------------------------
35
36 Correct initialization + connection should display following output:
37
38 [maros@localhost target]$ java -jar netconf-cli-0.2.5-SNAPSHOT-executable.jar  --server localhost --port 1830 --username admin --password admin
39 Connecting to localhost via SSH. Please wait.
40 Cli is up, available commands:
41
42 add-flow(sal-flow)                                                                            add-group(sal-group)                                                                          
43 add-meter(sal-meter)                                                                          begin-transaction(sal-remote)                                                                 
44 cancel-commit(ietf-netconf)                                                                   cancel-toast(toaster)                                                                         
45 clear-toasts-made(toaster-provider-impl)                                                      close(netconf-cli)                                                                            
46 close-session(ietf-netconf)                                                                   commit(ietf-netconf)                                                                          
47 connect(netconf-cli)                                                                          copy-config(ietf-netconf)                                                                     
48 create-data-change-event-subscription(sal-remote)                                             create-notification-stream(sal-remote)                                                        
49 delete-config(ietf-netconf)                                                                   discard-changes(ietf-netconf)                                                                 
50 disconnect(netconf-cli)                                                                       edit-config(ietf-netconf)                                                                     
51 finish-transaction(flow-capable-transaction)                                                  get(ietf-netconf)                                                                             
52 get-aggregate-flow-statistics-from-flow-table-for-all-flows(opendaylight-flow-statistics)     get-aggregate-flow-statistics-from-flow-table-for-given-match(opendaylight-flow-statistics)   
53 get-all-flow-statistics-from-flow-table(opendaylight-flow-statistics)                         get-all-flows-statistics-from-all-flow-tables(opendaylight-flow-statistics)                   
54 get-all-group-statistics(opendaylight-group-statistics)                                       get-all-meter-config-statistics(opendaylight-meter-statistics)                                
55 get-all-meter-statistics(opendaylight-meter-statistics)                                       get-all-node-connectors-statistics(opendaylight-port-statistics)                              
56 get-all-queues-statistics-from-all-ports(opendaylight-queue-statistics)                       get-all-queues-statistics-from-given-port(opendaylight-queue-statistics)                      
57 get-config(ietf-netconf)                                                                      get-dead-events-count(threadpool-impl)                                                        
58 get-flow-statistics-from-flow-table(opendaylight-flow-statistics)                             get-flow-tables-statistics(opendaylight-flow-table-statistics)                                
59 get-group-description(opendaylight-group-statistics)                                          get-group-features(opendaylight-group-statistics)                                             
60 get-group-statistics(opendaylight-group-statistics)                                           get-meter-features(opendaylight-meter-statistics)                                             
61 get-meter-statistics(opendaylight-meter-statistics)                                           get-next-transaction-id(flow-capable-transaction)                                             
62 get-node-connector-statistics(opendaylight-port-statistics)                                   get-queue(sal-queue)                                                                          
63 get-queue-statistics-from-given-port(opendaylight-queue-statistics)                           get-schema(ietf-netconf-monitoring)                                                           
64 help(netconf-cli)                                                                             kill-session(ietf-netconf)                                                                    
65 lock(ietf-netconf)                                                                            make-scrambled-with-wheat(kitchen-service-impl)                                               
66 make-toast(toaster)                                                                           remove-flow(sal-flow)                                                                         
67 remove-group(sal-group)                                                                       remove-meter(sal-meter)                                                                       
68 reset(config-logging)                                                                         restock-toaster(toaster)                                                                      
69 shutdown(shutdown-impl)                                                                       solicit-refresh(flow-topology-discovery)                                                      
70 transmit-packet(packet-processing)                                                            unlock(ietf-netconf)                                                                          
71 update-flow(sal-flow)                                                                         update-group(sal-group)                                                                       
72 update-meter(sal-meter)                                                                       update-port(sal-port)                                                                         
73 update-table(sal-table)                                                                       validate(ietf-netconf)                                                                        
74
75 netconf()>
76
77
78 ------------------------------------------------------------------------
79
80 At this stage, any supported rpc can be invoked. To see all possible rpcs press TAB (serves as autocomplete). The output contains all the commands reported after at start-up
81
82 ------------------------------------------------------------------------
83
84 Example step-by-step execution of get-config rpc:
85
86 1. Type get-config, hit TAB, hit enter
87 2. Cli will now walk all the input arguments of get-config rpc and ask for value
88 3. Cli asks for filter value
89 4. Submit filter (using TAB autocomplete) as a schema path or type "skip" (to not add any filter) and hit enter
90 5. Cli asks for config source (e.g. which data-store to query)
91 6. Use TAB to view options and submit either running or candidate data-store
92 7. Cli will display configuration of the remote device e.g. :
93
94 data {
95   a {
96     address {
97       last-name a
98       first-name o
99       street aaaaa
100     }
101     address {
102       last-name a
103       first-name t
104     }
105     address {
106       last-name a
107       first-name y
108     }
109   }
110 }
111
112
113 ------------------------------------------------------------------------