aboutsummaryrefslogtreecommitdiff
path: root/bbot/agent/agent-options.hxx
blob: 03ae04597af30a88e36fdad62e86fb7afe141134 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
// -*- C++ -*-
//
// This file was generated by CLI, a command line interface
// compiler for C++.
//

#ifndef BBOT_AGENT_AGENT_OPTIONS_HXX
#define BBOT_AGENT_AGENT_OPTIONS_HXX

// Begin prologue.
//
//
// End prologue.

#include <libbbot/manifest.hxx>

#include <bbot/common-options.hxx>

namespace bbot
{
  class agent_options
  {
    public:
    agent_options ();

    // Return true if anything has been parsed.
    //
    bool
    parse (int& argc,
           char** argv,
           bool erase = false,
           ::bbot::cli::unknown_mode option = ::bbot::cli::unknown_mode::fail,
           ::bbot::cli::unknown_mode argument = ::bbot::cli::unknown_mode::stop);

    bool
    parse (int start,
           int& argc,
           char** argv,
           bool erase = false,
           ::bbot::cli::unknown_mode option = ::bbot::cli::unknown_mode::fail,
           ::bbot::cli::unknown_mode argument = ::bbot::cli::unknown_mode::stop);

    bool
    parse (int& argc,
           char** argv,
           int& end,
           bool erase = false,
           ::bbot::cli::unknown_mode option = ::bbot::cli::unknown_mode::fail,
           ::bbot::cli::unknown_mode argument = ::bbot::cli::unknown_mode::stop);

    bool
    parse (int start,
           int& argc,
           char** argv,
           int& end,
           bool erase = false,
           ::bbot::cli::unknown_mode option = ::bbot::cli::unknown_mode::fail,
           ::bbot::cli::unknown_mode argument = ::bbot::cli::unknown_mode::stop);

    bool
    parse (::bbot::cli::scanner&,
           ::bbot::cli::unknown_mode option = ::bbot::cli::unknown_mode::fail,
           ::bbot::cli::unknown_mode argument = ::bbot::cli::unknown_mode::stop);

    // Option accessors.
    //
    const bool&
    help () const;

    const bool&
    version () const;

    const uint16_t&
    verbose () const;

    bool
    verbose_specified () const;

    const bool&
    systemd_daemon () const;

    const string&
    toolchain_name () const;

    bool
    toolchain_name_specified () const;

    const uint16_t&
    toolchain_num () const;

    bool
    toolchain_num_specified () const;

    const string&
    toolchain_lock () const;

    bool
    toolchain_lock_specified () const;

    const standard_version&
    toolchain_ver () const;

    bool
    toolchain_ver_specified () const;

    const string&
    toolchain_id () const;

    bool
    toolchain_id_specified () const;

    const interactive_mode&
    interactive () const;

    bool
    interactive_specified () const;

    const uint16_t&
    instance () const;

    bool
    instance_specified () const;

    const uint16_t&
    instance_max () const;

    bool
    instance_max_specified () const;

    const size_t&
    cpu () const;

    bool
    cpu_specified () const;

    const size_t&
    ram () const;

    bool
    ram_specified () const;

    const string&
    bridge () const;

    bool
    bridge_specified () const;

    const path&
    auth_key () const;

    bool
    auth_key_specified () const;

    const strings&
    trust () const;

    bool
    trust_specified () const;

    const dir_path&
    machines () const;

    bool
    machines_specified () const;

    const dir_path&
    tftp () const;

    bool
    tftp_specified () const;

    const uint16_t&
    tftp_port () const;

    bool
    tftp_port_specified () const;

    const size_t&
    bootstrap_startup () const;

    bool
    bootstrap_startup_specified () const;

    const size_t&
    bootstrap_timeout () const;

    bool
    bootstrap_timeout_specified () const;

    const size_t&
    bootstrap_retries () const;

    bool
    bootstrap_retries_specified () const;

    const size_t&
    build_startup () const;

    bool
    build_startup_specified () const;

    const size_t&
    build_timeout () const;

    bool
    build_timeout_specified () const;

    const size_t&
    build_retries () const;

    bool
    build_retries_specified () const;

    const size_t&
    intactive_timeout () const;

    bool
    intactive_timeout_specified () const;

    const size_t&
    connect_timeout () const;

    bool
    connect_timeout_specified () const;

    const size_t&
    request_timeout () const;

    bool
    request_timeout_specified () const;

    const size_t&
    request_retries () const;

    bool
    request_retries_specified () const;

    const path&
    openssl () const;

    bool
    openssl_specified () const;

    const strings&
    openssl_option () const;

    bool
    openssl_option_specified () const;

    const bool&
    dump_machines () const;

    const bool&
    dump_task () const;

    const bool&
    dump_result () const;

    const bool&
    fake_bootstrap () const;

    const bool&
    fake_build () const;

    const path&
    fake_machine () const;

    bool
    fake_machine_specified () const;

    const path&
    fake_request () const;

    bool
    fake_request_specified () const;

    // Print usage information.
    //
    static ::bbot::cli::usage_para
    print_usage (::std::ostream&,
                 ::bbot::cli::usage_para = ::bbot::cli::usage_para::none);

    // Implementation details.
    //
    protected:
    bool
    _parse (const char*, ::bbot::cli::scanner&);

    private:
    bool
    _parse (::bbot::cli::scanner&,
            ::bbot::cli::unknown_mode option,
            ::bbot::cli::unknown_mode argument);

    public:
    bool help_;
    bool version_;
    uint16_t verbose_;
    bool verbose_specified_;
    bool systemd_daemon_;
    string toolchain_name_;
    bool toolchain_name_specified_;
    uint16_t toolchain_num_;
    bool toolchain_num_specified_;
    string toolchain_lock_;
    bool toolchain_lock_specified_;
    standard_version toolchain_ver_;
    bool toolchain_ver_specified_;
    string toolchain_id_;
    bool toolchain_id_specified_;
    interactive_mode interactive_;
    bool interactive_specified_;
    uint16_t instance_;
    bool instance_specified_;
    uint16_t instance_max_;
    bool instance_max_specified_;
    size_t cpu_;
    bool cpu_specified_;
    size_t ram_;
    bool ram_specified_;
    string bridge_;
    bool bridge_specified_;
    path auth_key_;
    bool auth_key_specified_;
    strings trust_;
    bool trust_specified_;
    dir_path machines_;
    bool machines_specified_;
    dir_path tftp_;
    bool tftp_specified_;
    uint16_t tftp_port_;
    bool tftp_port_specified_;
    size_t bootstrap_startup_;
    bool bootstrap_startup_specified_;
    size_t bootstrap_timeout_;
    bool bootstrap_timeout_specified_;
    size_t bootstrap_retries_;
    bool bootstrap_retries_specified_;
    size_t build_startup_;
    bool build_startup_specified_;
    size_t build_timeout_;
    bool build_timeout_specified_;
    size_t build_retries_;
    bool build_retries_specified_;
    size_t intactive_timeout_;
    bool intactive_timeout_specified_;
    size_t connect_timeout_;
    bool connect_timeout_specified_;
    size_t request_timeout_;
    bool request_timeout_specified_;
    size_t request_retries_;
    bool request_retries_specified_;
    path openssl_;
    bool openssl_specified_;
    strings openssl_option_;
    bool openssl_option_specified_;
    bool dump_machines_;
    bool dump_task_;
    bool dump_result_;
    bool fake_bootstrap_;
    bool fake_build_;
    path fake_machine_;
    bool fake_machine_specified_;
    path fake_request_;
    bool fake_request_specified_;
  };
}

// Print page usage information.
//
namespace bbot
{
  ::bbot::cli::usage_para
  print_bbot_agent_usage (::std::ostream&,
                          ::bbot::cli::usage_para = ::bbot::cli::usage_para::none);
}

#include <bbot/agent/agent-options.ixx>

// Begin epilogue.
//
//
// End epilogue.

#endif // BBOT_AGENT_AGENT_OPTIONS_HXX