1
+ This file contains brief tutorial for new users. The second section describes
2
+ testing environment and test cases prepared for the OF-CONFIG server (OFC).
3
+
4
+ Tutorial
5
+ ========
6
+
7
+ After successful installation described in [ INSTALL.md] ( ../INSTALL.md )
8
+ OFC can be started using:
9
+
10
+ ```
11
+ $ ofc-server
12
+ ```
13
+
14
+ OFC starts automatically in the daemon mode (in the background).
15
+ Passing -f starts OFC in the foreground.
16
+
17
+ OFC can be used to configure running Open vSwitch (OVS). Therefore, OVS should
18
+ be running as well (it is recommended to start OVS before OFC). OFC modifies
19
+ OVSDB that means it is ** NOT** recommended to modify OVSDB by external tools.
20
+
21
+ The OF-CONFIG protocol that is implemented by OFC comes from the NETCONF
22
+ protocol specified by [ RFC6241] ( http://tools.ietf.org/html/rfc6241 ) . The RFC
23
+ document describes the protocol in detail. It contains various examples for
24
+ users' inspiration.
25
+
26
+ Data that should be send to OFC is in the XML format. It must be formed
27
+ according to rules specified by configuration data model
28
+ [ of-config.yang] ( ../model/of-config.yang ) . The data model is written in the
29
+ Yang language specified by [ RFC6020] ( http://tools.ietf.org/html/rfc6020 ) .
30
+
31
+ To communicate with OFC, any NETCONF or OF-CONFIG client application must be
32
+ used. Some examples of NETCONF clients
33
+ ([ netopeer-cli] ( https://code.google.com/p/netopeer ) and
34
+ [ Netopeer-GUI] ( https://github.com/CESNET/Netopeer-GUI ) ) are
35
+ referenced in [ ../INSTALL.md] ( ../INSTALL.md ) .
36
+
37
+ XML files contained in this directory can be used to understand how to apply
38
+ information from RFC6241 and RFC6020 on OFC. Bash scripts from this directory
39
+ execute a NETCONF client called netopeer-cli that connects to OFC and
40
+ communicates with it. netopeer-cli allows us to get or modify OVS configuration
41
+ and state data.
42
+
43
+ To get content of the current "running" configuration use:
44
+
45
+ ```
46
+ $ netopeer-cli
47
+ netconf> connect --login username address
48
+ .... prompt for password if required by the remote host ...
49
+ netconf> get-config running
50
+ .... probably long output with data ...
51
+ ```
52
+
53
+ This is what the [ get-config.sh] ( ./get-config.sh ) script does...
54
+ (Note: we use filter in the script to get only OVS related data)
55
+
56
+ To modify running configuration, there is edit-config command. When we execute:
57
+
58
+ ```
59
+ netconf> edit-config running
60
+ ```
61
+
62
+ We will be asked for configuration data (in XML) formed with respect to data
63
+ model. Valid data is sent to OFC and configuration changes.
64
+
65
+ There is a lot of examples of XML files for modification of configuration of
66
+ OVS.
67
+
1
68
Testing OF-CONFIG functionality
2
69
===============================
3
70
4
71
Testing environment
5
72
-------------------
6
73
7
- Test scripts work with installed netopeer-cli. Netopeer-cli comes from [ Netopeer package ] ( https://code.google.com/p/netopeer ) .
74
+ Test scripts work with installed netopeer-cli.
8
75
9
76
Scripts connect to localhost as current user.
10
77
It is required to have working public-key authentication
@@ -16,7 +83,7 @@ See 'config' file and edit credentials to login into OF-CONFIG server.
16
83
SSH server should be added into known hosts before running tests. Connect to the server
17
84
using netopeer-cli with the same username and approve server's fingerprint.
18
85
19
- Warning: this setting is highly insecure and MUST NOT be used in production environment.
86
+ Warning: this setting is highly insecure and ** MUST NOT** be used in production environment.
20
87
For testing purposes, empty password or private key without passphrase allows scripts
21
88
to be non-interactive.
22
89
0 commit comments