You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- add syntax explanation
- add documentation about reading configuration from standard input
Signed-off-by: Mauricio Vasquez B <mauriciovasquezbernal@gmail.com>
Copy file name to clipboardExpand all lines: Documentation/polycubectl/polycubectl.rst
+63-7Lines changed: 63 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -15,17 +15,15 @@ How to use
15
15
----------
16
16
17
17
**NOTE**: ``polycubed`` must be running, in order to use ``polycubectl``.
18
-
You can start the daemon typing ``sudo polycubed`` in another terminal. Refer to :doc:`Quick Start <../quickstart>`.
18
+
You can start the daemon typing ``sudo polycubed`` in another terminal.
19
+
Refer to :doc:`Quick Start <../quickstart>`.
19
20
20
21
``polycubectl`` is a generic CLI, that enables the user to interact with ``Cubes`` (``bridge``, ``router``, ...) and with some framework primitives to ``connect``, ``show`` and build complex ``topologies``.
21
22
22
23
::
23
24
24
25
# Show help
25
26
polycubectl --help
26
-
27
-
::
28
-
29
27
Keyword Type Description
30
28
simpleforwarder service Simple Forwarder Base Service
31
29
simplebridge service Simple L2 Bridge Service
@@ -45,14 +43,71 @@ You can start the daemon typing ``sudo polycubed`` in another terminal. Refer to
# create a helloworld instance with loglevel debug and action forward
91
+
polycubectl helloworld add hw0 << EOF
92
+
{
93
+
"loglevel": "debug",
94
+
"action": "forward"
95
+
}
96
+
EOF
97
+
98
+
99
+
Reading configuration from a file
100
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
101
+
::
102
+
103
+
# create helloworld from a yaml file
104
+
polycubectl helloworld add hw0 < hw0.yaml
105
+
106
+
# create a router from a json file
107
+
polycubectl router add r0 < r0.json
108
+
109
+
# add a list of cubes
110
+
polycubectl cubes add < mycubes.yaml
56
111
57
112
Help
58
113
^^^^
@@ -124,7 +179,8 @@ More complete examples are available in :doc:`tutorials <../tutorials/index>`.
124
179
Configuration
125
180
-------------
126
181
127
-
By default, the CLI contacts ``polycubed`` daemon at ``http://localhost:9000/polycube/v1/``. The user can override this configuration with following instructions.
182
+
By default, ``polycubectl`` contacts ``polycubed`` at ``http://localhost:9000/polycube/v1/``.
183
+
The user can override this configuration with following instructions.
0 commit comments