1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
4 .. image:: ../etc/opnfv-logo.png
9 .. these two pipes are to seperate the logo from the first title
12 Using domino-cli Client
13 =======================
16 1. Make sure that domino-cli.py is in +x mode.
18 2. Change directory to where domino-cli.py, DominoClient.py and DominoServer.py are located or include file path in the PATH environment variable.
20 3. Start the Domino Server:
24 ./DominoServer.py --log=debug
26 4. Start the Domino Client:
30 ./DominoClient.py -p <portnumber> --cliport <cli-portnumber> --log=debug
32 Note1: The default log level is WARNING and omitting --log option will lead to minimal/no logging on the console
34 Note2: domino_conf.py file includes most of the default values
36 * Registration Command
42 ./domino-cli.py <cli-portnumber> register
44 This message has the following fields that are automatically filled in.
48 Message Type (= REGISTER)
49 DESIRED UDID (= if not allocated, this will be assigned as Unique Domino ID)
50 Sequence Number (=incremented after each RPC call)
51 IP ADDR (= IP address of DOMINO Client to be used by DOMINO Server for future RPC Calls to this client)
52 TCP PORT (= TCP port of DOMINO Client to be used by DOMINO Server for future RPC Calls to this client)
53 Supported Templates (= Null, this field not used currently)
61 ./domino-cli.py <cli-portnumber> heartbeat
63 This message has the following fields that are automatically filled in.
67 Message Type (= HEART_BEAT)
68 UDID (= Unique Domino ID assigned during registration)
69 Sequence Number (=incremented after each RPC call)
71 * Label and Template Type Subscription Command
75 ./domino-cli.py <cli-portnumber> subscribe -l <labelname> -t <templatetype>
77 Note that -l can be substituted by --label and -t can be substituted by --ttype.
79 More than one label or template type can be subscribed within the same command line as comma separated labels or template types
83 ./domino-cli.py <cli-portnumber> subscribe -l <label1>,<label2>,<labeln> -t <ttype1>,<ttype2>,<ttypen>
85 To subscribe more than one label or template type, one can also repeat the options -l and -t, e.g.:
89 ./domino-cli.py <cli-portnumber> subscribe -l <label1> -l <label2> -l <labeln> -t <ttype1> -t <ttype2> -t <ttypen>
91 It is safe to call subscribe command multiple times with duplicate labels.
93 This message has the following fields that are automatically filled in.
97 Message Type (= SUBSCRIBE)
98 UDID (= Unique Domino ID assigned during registration)
99 Sequence Number (=incremented after each RPC call)
100 Template Operation (= APPEND)
101 Label Operation (= APPEND)
103 The following fields are filled in based on arguments passed on via -l/--label and -t/--ttype flags
105 Subscribe RPC also supports options for label using
106 --lop=APPEND/DELETE/OVERWRITE
107 and for supported template types using
108 --top=APPEND/DELETE/OVERWRITE.
109 When unspecified, the default is APPEND.
110 DELETE deletes existing labels (template types) specified in the current call via key -l/--label (-t/--ttype).
111 OVERWRITE removes the current set of labels (template types) and sets it to the new set of values passed in the same RPC call.
115 Supported Template Types
118 * Template Publishing Command
122 ./domino-cli.py <cli-portnumber> publish -t <toscafile>
124 Note that -t can be substituted by --tosca-file.
126 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.
128 This message has the following fields that are automatically filled in.
132 Message Type (= SUBSCRIBE)
133 UDID (= Unique Domino ID assigned during registration)
134 Sequence Number (=incremented after each RPC call)
135 Template Type (= TOSCA)
141 To enter this mode, start Domino Client with interactive console option set as true, i.e., --iac=true:
145 ./DominoClient -p <portnumber> --iax=true --log=DEBUG
147 The rest of the API calls are the same as in the case of using domino-cli.py except that at the prompt there is no need to write "domino-cli.py <cli-portnumber>, e.g.,:
153 >>subscribe -l <label1> -t <ttype1>
154 >>publish -t <toscafile>
156 The interactive CLI mode is mainly supported for manual testing.