This is an automated email from the ASF dual-hosted git repository.
asekretenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git
The following commit(s) were added to refs/heads/master by this push:
new 1d9a157 Fixed build on platforms not treating initializer_list<enum>
as literal.
1d9a157 is described below
commit 1d9a1578575074a2407184d70998891b9605b549
Author: Andrei Sekretenko <[email protected]>
AuthorDate: Tue Mar 3 21:09:58 2020 +0100
Fixed build on platforms not treating initializer_list<enum> as literal.
Review: https://reviews.apache.org/r/72187/
---
src/master/framework.cpp | 31 ++++++++++++-------------------
1 file changed, 12 insertions(+), 19 deletions(-)
diff --git a/src/master/framework.cpp b/src/master/framework.cpp
index 7e46469..e9e2d20 100644
--- a/src/master/framework.cpp
+++ b/src/master/framework.cpp
@@ -739,24 +739,6 @@ Try<bool> Framework::approved(const ActionObject&
actionObject) const
}
-constexpr std::initializer_list<authorization::Action> SCHEDULER_API_ACTIONS{
- authorization::REGISTER_FRAMEWORK,
- authorization::RUN_TASK,
-
- authorization::UNRESERVE_RESOURCES,
- authorization::RESERVE_RESOURCES,
-
- authorization::CREATE_VOLUME,
- authorization::DESTROY_VOLUME,
- authorization::RESIZE_VOLUME,
-
- authorization::CREATE_MOUNT_DISK,
- authorization::CREATE_BLOCK_DISK,
- authorization::DESTROY_MOUNT_DISK,
- authorization::DESTROY_BLOCK_DISK,
- authorization::DESTROY_RAW_DISK};
-
-
Future<Owned<ObjectApprovers>> Framework::createObjectApprovers(
const Option<Authorizer*>& authorizer,
const FrameworkInfo& frameworkInfo)
@@ -766,7 +748,18 @@ Future<Owned<ObjectApprovers>>
Framework::createObjectApprovers(
frameworkInfo.has_principal()
? Option<Principal>(frameworkInfo.principal())
: Option<Principal>::none(),
- SCHEDULER_API_ACTIONS);
+ {authorization::REGISTER_FRAMEWORK,
+ authorization::RUN_TASK,
+ authorization::UNRESERVE_RESOURCES,
+ authorization::RESERVE_RESOURCES,
+ authorization::CREATE_VOLUME,
+ authorization::DESTROY_VOLUME,
+ authorization::RESIZE_VOLUME,
+ authorization::CREATE_MOUNT_DISK,
+ authorization::CREATE_BLOCK_DISK,
+ authorization::DESTROY_MOUNT_DISK,
+ authorization::DESTROY_BLOCK_DISK,
+ authorization::DESTROY_RAW_DISK});
}