From 22e086d8ea6ac2a4978eada0fa9ffb3a13a96ce3 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 20 Apr 2017 13:42:59 +0200 Subject: Add machine options --- bbot/agent.cxx | 8 +++++++- bbot/machine-manifest | 11 ++++++++--- doc/manual.cli | 21 +++++++++++++++++---- 3 files changed, 32 insertions(+), 8 deletions(-) diff --git a/bbot/agent.cxx b/bbot/agent.cxx index b926908..4ade0b4 100644 --- a/bbot/agent.cxx +++ b/bbot/agent.cxx @@ -263,7 +263,13 @@ try rm.push_back ( bootstrapped_machine_manifest { - machine_manifest {mh.id, mh.name, mh.summary, machine_type::kvm}, + machine_manifest { + mh.id, + mh.name, + mh.summary, + machine_type::kvm, + string ("de:ad:be:ef:de:ad"), + nullopt}, toolchain_manifest {tc_id}, bootstrap_manifest {} }); diff --git a/bbot/machine-manifest b/bbot/machine-manifest index 3801ae7..9975a3b 100644 --- a/bbot/machine-manifest +++ b/bbot/machine-manifest @@ -34,16 +34,21 @@ namespace bbot { public: machine_type type; - optional mac; // Required in bootstrapped machine manifest. + optional mac; // Required in bootstrapped machine manifest. + optional options; machine_manifest (std::string i, std::string n, std::string s, - machine_type t) + machine_type t, + optional m, + optional o) : machine_header_manifest (std::move (i), std::move (n), std::move (s)), - type (t) {} + type (t), + mac (std::move (m)), + options (std::move (o)) {} public: machine_manifest () = default; // VC export. diff --git a/doc/manual.cli b/doc/manual.cli index dc8dd37..a851008 100644 --- a/doc/manual.cli +++ b/doc/manual.cli @@ -203,8 +203,9 @@ id: name: summary: -type: -mac: +type: +mac: +options: \ The build machine manifest contains the complete description of a build @@ -231,7 +232,19 @@ the header values must appear before any non-header values. If it is not specified, then a random address is generated on the first machine bootstrap which is then reused for each build/re-bootstrap. Note that it you specify a fixed address, then the machine can only be used by a - single \c{bbot} agent. + single \c{bbot} agent.| + + +\li|\n\c{options: }\n + + Optional list of machine options. The exact semantics is machine + type-dependent (see below). A single level of quotes (either single or + double) is removed in each option before being passed on. Options can be + separated with spaces or newlines. + + For \c{kvm} machines, if this value is present, then it replaces the + default network and disk configuration when starting the QEMU/KVM + hypervisor. || @@ -414,7 +427,7 @@ starts with the task request manifest followed by a list of machine manifests. not to use the certificate-based authentication in which case it does not include this value. However, the controller may be configured to require the authentication in which case it will respond with the - 401 (unauthorized) HTTP status code.| + 401 (unauthorized) HTTP status code.|| \h#arch-task-res-manifest|Task Response Manifest| -- cgit v1.1