Aktualizr
C++ SOTA Client
All Classes Namespaces Files Functions Variables Enumerations Enumerator Pages
deploy.h
1 #ifndef SOTA_CLIENT_TOOLS_DEPLOY_H_
2 #define SOTA_CLIENT_TOOLS_DEPLOY_H_
3 
4 #include <string>
5 
6 #include "garage_common.h"
7 #include "ostree_ref.h"
8 #include "ostree_repo.h"
9 #include "server_credentials.h"
10 
11 /*
12  * Check current state of the request pool depending on the run mode.
13  * @return true if active, false if finished/inactive
14  */
15 bool CheckPoolState(const OSTreeObject::ptr& root_object, const RequestPool& request_pool);
16 
17 /**
18  * Upload a OSTree repository to Treehub.
19  * This will not push the root reference to /refs/heads/qemux86-64 or update
20  * the Uptane targets using garage-sign.
21  * \param src_repo Maybe either a OSTreeDirRepo (in which case the objects
22  * are fetched from disk), or OSTreeHttpRepo (in which case
23  * the objects will be pulled over https).
24  * \param push_server
25  * \param ostree_commit
26  * \param mode
27  * \param max_curl_requests
28  */
29 bool UploadToTreehub(const OSTreeRepo::ptr& src_repo, TreehubServer& push_server, const OSTreeHash& ostree_commit,
30  RunMode mode, int max_curl_requests);
31 
32 /**
33  * Use the garage-sign tool and the Image repo targets.json keys in credentials.zip
34  * to add an entry to the Image repo's targets.json
35  */
36 bool OfflineSignRepo(const ServerCredentials& push_credentials, const std::string& name, const OSTreeHash& hash,
37  const std::string& hardwareids);
38 
39 /**
40  * Update the ref on Treehub to the new commit.
41  */
42 bool PushRootRef(const TreehubServer& push_server, const OSTreeRef& ref);
43 
44 #endif
OSTreeHash
Definition: ostree_hash.h:10
ServerCredentials
Definition: server_credentials.h:25
TreehubServer
Definition: treehub_server.h:11
RequestPool
Definition: request_pool.h:12
garage_common.h
OSTreeRef
Definition: ostree_ref.h:13
RunMode
RunMode
Execution mode to run garage tools in.
Definition: garage_common.h:6