aboutsummaryrefslogtreecommitdiff
path: root/bbot
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-10-19 18:00:33 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-10-19 18:00:33 +0300
commit3ddab9d7360213cda421ac25f62cbf7ef92b513b (patch)
treecf9e74d76bd2c5d8c744aca3a2cd17edbd75ec77 /bbot
parente466601f79ea1493ffaa7486595f3cd2d5b11e64 (diff)
Add support for machine_manifest changes value
Diffstat (limited to 'bbot')
-rw-r--r--bbot/agent/agent.cxx3
-rw-r--r--bbot/machine-manifest.cxx10
-rw-r--r--bbot/machine-manifest.hxx7
3 files changed, 17 insertions, 3 deletions
diff --git a/bbot/agent/agent.cxx b/bbot/agent/agent.cxx
index dac70ee..ea0bb34 100644
--- a/bbot/agent/agent.cxx
+++ b/bbot/agent/agent.cxx
@@ -311,7 +311,8 @@ try
mh.summary,
machine_type::kvm,
string ("de:ad:be:ef:de:ad"),
- nullopt},
+ nullopt,
+ strings ()},
toolchain_manifest {tc_id},
bootstrap_manifest {}
});
diff --git a/bbot/machine-manifest.cxx b/bbot/machine-manifest.cxx
index be921d9..b30d551 100644
--- a/bbot/machine-manifest.cxx
+++ b/bbot/machine-manifest.cxx
@@ -144,6 +144,13 @@ namespace bbot
options = move (op);
}
+ else if (n == "changes")
+ {
+ if (v.empty ())
+ bad_value ("empty machine changes");
+
+ changes.emplace_back (move (v));
+ }
else if (!iu)
bad_name ("unknown name '" + n + "' in machine manifest");
}
@@ -187,6 +194,9 @@ namespace bbot
s.next ("options", v);
}
+ for (const string& c: changes)
+ s.next ("changes", c);
+
s.next ("", ""); // End of manifest.
}
diff --git a/bbot/machine-manifest.hxx b/bbot/machine-manifest.hxx
index efcdda4..47dd7ac 100644
--- a/bbot/machine-manifest.hxx
+++ b/bbot/machine-manifest.hxx
@@ -36,6 +36,7 @@ namespace bbot
machine_type type;
optional<string> mac; // Required in bootstrapped machine manifest.
optional<strings> options; // Note: could be quoted.
+ strings changes;
strings
unquoted_options () const; // Return empty if absent.
@@ -45,13 +46,15 @@ namespace bbot
std::string s,
machine_type t,
optional<string> m,
- optional<strings> o)
+ optional<strings> o,
+ strings c)
: machine_header_manifest (std::move (i),
std::move (n),
std::move (s)),
type (t),
mac (std::move (m)),
- options (std::move (o)) {}
+ options (std::move (o)),
+ changes (std::move (c)) {}
public:
machine_manifest () = default; // VC export.