// file : bbot/machine -*- C++ -*- // copyright : Copyright (c) 2014-2017 Code Synthesis Ltd // license : TBC; see accompanying LICENSE file #ifndef BBOT_MACHINE #define BBOT_MACHINE #include #include namespace bbot { // A running build machine (container, vm, etc). // class machine { public: // Shut the machine down cleanly. Return false if machine is still // running, true if machine exited successfully, and throw failed // otherwise. // virtual bool shutdown () = 0; // Force the machine down. // virtual void forcedown () = 0; public: const string mac; // MAC address (inside the machine). public: virtual ~machine () = default; protected: machine (string m) : mac (move (m)) {} }; class machine_manifest; unique_ptr start_machine (const dir_path&, const machine_manifest&, const optional& mac, const string& br_iface, uint16_t tftp_port); } #endif // BBOT_MACHINE