updated subscribe command usage
[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 More than one label or template type can be subscribed within the same command line as comma separated labels or template types
62
63 .. code-block:: bash
64
65   ./domino-cli.py subscribe -l <label1>,<label2>,<labeln> -t <ttype1>,<ttype2>,<ttypen>
66
67 To subscribe more than one label or template type, one can also repeat the options -l and -t, e.g.:
68
69 .. code-block:: bash
70
71   ./domino-cli.py subscribe -l <label1> -l <label2> -l <labeln> -t <ttype1> -t <ttype2> -t <ttypen>
72
73 It is safe to call subscribe command multiple times with duplicate labels.
74
75 This message has the following fields that are automatically filled in.
76
77 .. code-block:: bash
78
79   Message Type (= SUBSCRIBE)
80   UDID (= Unique Domino IDassigned during registration)
81   Sequence Number (=incremented after each RPC call)
82   Template Operation (= APPEND)
83   Label Operation (= APPEND)
84
85 The following fields are filled in based on arguments passed on via -l/--label and -t/--ttype flags
86
87 .. code-block:: bash
88
89   Supported Template Types
90   Supported Labels
91
92 * Template Publishing Command
93
94 .. code-block:: bash
95
96   ./domino-cli.py publish -t <toscafile>
97
98 Note that -t can be substituted by --tosca-file.
99
100 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.
101
102 This message has the following fields that are automatically filled in.
103
104 .. code-block:: bash
105
106   Message Type (= SUBSCRIBE)
107   UDID (= Unique Domino IDassigned during registration)
108   Sequence Number (=incremented after each RPC call)
109   Template Type (= TOSCA)
110   Template File
111
112 Interactive CLI mode
113 ====================
114
115
116
117 Revision: _sha1_
118
119 Build date: |today|