bff6e2ba9353a0256b974a93dd083f28dc140a8c
[domino.git] / docs / userguide / api-documentation.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3
4 .. image:: ../etc/opnfv-logo.png
5   :height: 40
6   :width: 200
7   :alt: OPNFV
8   :align: left
9 .. these two pipes are to seperate the logo from the first title
10 |
11 |
12 Using domino-cli Client
13 =======================
14 Make sure that domino-cli.py is in +x mode.
15
16 Change directory to where domino-cli.py is located or include file path in the PATH environment variable.
17
18 * Registration Command
19
20 Command line input:
21
22 .. code-block:: bash
23
24   ./domino-cli.py register
25
26 This message has the following fields that are automatically filled in.
27
28 .. code-block:: bash
29
30   Message Type (= REGISTER)
31   DESIRED UDID (= if not allocated, this will be assigned as Unique Domino ID)
32   Sequence Number (=incremented after each RPC call)
33   IP ADDR (= IP address of DOMINO Client to be used by DOMINO Server for future RPC Calls to this client)
34   TCP PORT (= TCP port of DOMINO Client to be used by DOMINO Server for future RPC Calls to this client)
35   Supported Templates (= Null, this field not used currently)
36
37 * Heart Beat Command
38
39 Command line input:
40
41 .. code-block:: bash
42
43   ./domino-cli.py heartbeat
44
45 This message has the following fields that are automatically filled in.
46
47 .. code-block:: bash
48
49   Message Type (= HEART_BEAT)
50   UDID (= Unique Domino ID assigned during registration)
51   Sequence Number (=incremented after each RPC call)
52
53 * Label and Template Type Subscription Command
54
55 .. code-block:: bash
56
57   ./domino-cli.py subscribe -l <labelname> -t <templatetype>
58
59 Note that -l can be substituted by --label and -t can be substituted by --ttype.
60
61 To subscribe more than one label or template type, one can repeat the options -l and -t, e.g.:
62
63 .. code-block:: bash
64
65   ./domino-cli.py subscribe -l <label1> -l <label2> ... -l <labeln> -t <ttype1> -t <ttype2> ... -t <ttypen>
66
67 It is safe to call subscribe command multiple times with duplicate labels.
68
69 This message has the following fields that are automatically filled in.
70
71 .. code-block:: bash
72
73   Message Type (= SUBSCRIBE)
74   UDID (= Unique Domino IDassigned during registration)
75   Sequence Number (=incremented after each RPC call)
76   Template Operation (= APPEND)
77   Label Operation (= APPEND)
78
79 The following fields are filled in based on arguments passed on via -l/--label and -t/--ttype flags
80
81 .. code-block:: bash
82
83   Supported Template Types
84   Supported Labels
85
86 * Template Publishing Command
87
88 .. code-block:: bash
89
90   ./domino-cli.py publish -t <toscafile>
91
92 Note that -t can be substituted by --tosca-file.
93
94 If -t or --tosca-file flag is used multiple times, the last tosca file passed as input will be used. This usage is not recommended as undefined/unintended results may emerge as the Domino client will continue to publish.
95
96 This message has the following fields that are automatically filled in.
97
98 .. code-block:: bash
99
100   Message Type (= SUBSCRIBE)
101   UDID (= Unique Domino IDassigned during registration)
102   Sequence Number (=incremented after each RPC call)
103   Template Type (= TOSCA)
104   Template File
105
106 Interactive CLI mode
107 ====================
108
109
110
111 Revision: _sha1_
112
113 Build date: |today|