17 #ifndef __MASTER_AUTHORIZATION_HPP__ 18 #define __MASTER_AUTHORIZATION_HPP__ 30 #include <mesos/authorizer/authorizer.pb.h> 33 namespace authorization {
39 Action
action()
const {
return action_; }
47 const FrameworkInfo& framework);
52 const FrameworkInfo& frameworkInfo);
56 const SlaveInfo& slaveInfo);
65 static std::vector<ActionObject>
unreserve(
66 const Offer::Operation::Unreserve&
unreserve);
68 static std::vector<ActionObject>
reserve(
69 const Offer::Operation::Reserve&
reserve);
72 const Offer::Operation::Create&
create);
75 const Offer::Operation::Destroy&
destroy);
78 const Offer::Operation::GrowVolume& grow);
81 const Offer::Operation::ShrinkVolume& shrink);
88 const Offer::Operation::CreateDisk&
createDisk);
102 : action_(action), object_(
object){};
112 const Resource& resource,
129 static void pushUnreserveActionObjects(
131 std::vector<ActionObject>* result);
144 std::ostream& stream,
151 #endif // __MASTER_AUTHORIZATION_HPP__
static Try< ActionObject > destroyDisk(const Offer::Operation::DestroyDisk &destroyDisk)
static std::vector< ActionObject > reserve(const Offer::Operation::Reserve &reserve)
const Option< Object > & object() const &
Definition: authorization.hpp:41
Definition: resources.hpp:83
Definition: authorization.hpp:36
static Try< ActionObject > createDisk(const Offer::Operation::CreateDisk &createDisk)
static std::vector< ActionObject > destroyVolume(const Offer::Operation::Destroy &destroy)
static std::vector< ActionObject > unreserve(const Offer::Operation::Unreserve &unreserve)
static ActionObject taskLaunch(const TaskInfo &task, const FrameworkInfo &framework)
static ActionObject frameworkRegistration(const FrameworkInfo &frameworkInfo)
process::Future< Nothing > destroy(const std::string &hierarchy, const std::string &cgroup="/")
static std::vector< ActionObject > agentRegistration(const SlaveInfo &slaveInfo)
static ActionObject growVolume(const Offer::Operation::GrowVolume &grow)
static ActionObject shrinkVolume(const Offer::Operation::ShrinkVolume &shrink)
std::ostream & operator<<(std::ostream &stream, const ActionObject &actionObject)
static std::vector< ActionObject > createVolume(const Offer::Operation::Create &create)
Option< Object > && object()&&
Definition: authorization.hpp:42
Try< Nothing > create(const std::string &hierarchy, const std::string &cgroup, bool recursive=false)
Action action() const
Definition: authorization.hpp:39