mesos git commit: Renamed RegisterAgent.agent to RegisterAgent.agents in acls.proto.
Repository: mesos Updated Branches: refs/heads/1.3.x e9e759aac -> 230a08c73 Renamed RegisterAgent.agent to RegisterAgent.agents in acls.proto. Renames the field `RegisterAgent.agent` to `RegisterAgent.agents` in order to come make it consistent with other ACLs. Review: https://reviews.apache.org/r/59453/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/230a08c7 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/230a08c7 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/230a08c7 Branch: refs/heads/1.3.x Commit: 230a08c73676cac7a5c239e99a137125b0d7ef79 Parents: e9e759a Author: Alexander Rojas Authored: Wed May 24 09:24:20 2017 -0700 Committer: Neil Conway Committed: Wed May 24 09:43:33 2017 -0700 -- include/mesos/authorizer/acls.proto | 2 +- src/authorizer/local/authorizer.cpp | 6 +++--- src/tests/authorization_tests.cpp| 6 +++--- src/tests/master_authorization_tests.cpp | 8 src/tests/script.cpp | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/mesos/blob/230a08c7/include/mesos/authorizer/acls.proto -- diff --git a/include/mesos/authorizer/acls.proto b/include/mesos/authorizer/acls.proto index ae0b1ea..36b3ac2 100644 --- a/include/mesos/authorizer/acls.proto +++ b/include/mesos/authorizer/acls.proto @@ -351,7 +351,7 @@ message ACL { // Objects: Given implicitly. Use Entity type ANY or NONE to allow or deny // access. -required Entity agent = 2; +required Entity agents = 2; } } http://git-wip-us.apache.org/repos/asf/mesos/blob/230a08c7/src/authorizer/local/authorizer.cpp -- diff --git a/src/authorizer/local/authorizer.cpp b/src/authorizer/local/authorizer.cpp index 89aaf4b..1f2a990 100644 --- a/src/authorizer/local/authorizer.cpp +++ b/src/authorizer/local/authorizer.cpp @@ -1242,7 +1242,7 @@ private: foreach (const ACL::RegisterAgent& acl, acls.register_agents()) { GenericACL acl_; acl_.subjects = acl.principals(); - acl_.objects = acl.agent(); + acl_.objects = acl.agents(); acls_.push_back(acl_); } @@ -1337,9 +1337,9 @@ Option LocalAuthorizer::validate(const ACLs& acls) } foreach (const ACL::RegisterAgent& acl, acls.register_agents()) { -if (acl.agent().type() == ACL::Entity::SOME) { +if (acl.agents().type() == ACL::Entity::SOME) { return Error( - "acls.register_agents.agent type must be either NONE or ANY"); + "acls.register_agents type must be either NONE or ANY"); } } http://git-wip-us.apache.org/repos/asf/mesos/blob/230a08c7/src/tests/authorization_tests.cpp -- diff --git a/src/tests/authorization_tests.cpp b/src/tests/authorization_tests.cpp index 32aa6ac..6d85a54 100644 --- a/src/tests/authorization_tests.cpp +++ b/src/tests/authorization_tests.cpp @@ -4898,14 +4898,14 @@ TYPED_TEST(AuthorizationTest, RegisterAgent) // "foo" principal can register as an agent. mesos::ACL::RegisterAgent* acl = acls.add_register_agents(); acl->mutable_principals()->add_values("foo"); -acl->mutable_agent()->set_type(mesos::ACL::Entity::ANY); +acl->mutable_agents()->set_type(mesos::ACL::Entity::ANY); } { // Nobody else can register as an agent. mesos::ACL::RegisterAgent* acl = acls.add_register_agents(); acl->mutable_principals()->set_type(mesos::ACL::Entity::ANY); -acl->mutable_agent()->set_type(mesos::ACL::Entity::NONE); +acl->mutable_agents()->set_type(mesos::ACL::Entity::NONE); } Try create = TypeParam::create(parameterize(acls)); @@ -4936,7 +4936,7 @@ TYPED_TEST(AuthorizationTest, RegisterAgent) mesos::ACL::RegisterAgent* acl = invalid.add_register_agents(); acl->mutable_principals()->add_values("foo"); -acl->mutable_agent()->add_values("yoda"); +acl->mutable_agents()->add_values("yoda"); Try create = TypeParam::create(parameterize(invalid)); EXPECT_ERROR(create); http://git-wip-us.apache.org/repos/asf/mesos/blob/230a08c7/src/tests/master_authorization_tests.cpp -- diff --git a/src/tests/master_authorization_tests.cpp b/src/tests/master_authorization_tests.cpp index e4233c1..0a2f31b 100644 --- a/src/tests/master_authorization_tests.cpp +++ b/src/tests/master_authorization_tests.cpp @@ -2339,7 +2339,7 @@ TEST_F(MasterAuthorizationTest, AuthorizedToRegisterAndReregisterAgent) ACLs acls; mesos::ACL::RegisterAgent* acl = acls.add_register_agents(); acl->mutable_principals(
mesos git commit: Renamed RegisterAgent.agent to RegisterAgent.agents in acls.proto.
Repository: mesos Updated Branches: refs/heads/master fe7ca914d -> d225d4d41 Renamed RegisterAgent.agent to RegisterAgent.agents in acls.proto. Renames the field `RegisterAgent.agent` to `RegisterAgent.agents` in order to come make it consistent with other ACLs. Review: https://reviews.apache.org/r/59453/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/d225d4d4 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/d225d4d4 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/d225d4d4 Branch: refs/heads/master Commit: d225d4d4122e773e2416ba0d0eee653da8ced352 Parents: fe7ca91 Author: Alexander Rojas Authored: Wed May 24 09:24:20 2017 -0700 Committer: Neil Conway Committed: Wed May 24 09:43:07 2017 -0700 -- include/mesos/authorizer/acls.proto | 2 +- src/authorizer/local/authorizer.cpp | 6 +++--- src/tests/authorization_tests.cpp| 6 +++--- src/tests/master_authorization_tests.cpp | 8 src/tests/script.cpp | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/mesos/blob/d225d4d4/include/mesos/authorizer/acls.proto -- diff --git a/include/mesos/authorizer/acls.proto b/include/mesos/authorizer/acls.proto index ae0b1ea..36b3ac2 100644 --- a/include/mesos/authorizer/acls.proto +++ b/include/mesos/authorizer/acls.proto @@ -351,7 +351,7 @@ message ACL { // Objects: Given implicitly. Use Entity type ANY or NONE to allow or deny // access. -required Entity agent = 2; +required Entity agents = 2; } } http://git-wip-us.apache.org/repos/asf/mesos/blob/d225d4d4/src/authorizer/local/authorizer.cpp -- diff --git a/src/authorizer/local/authorizer.cpp b/src/authorizer/local/authorizer.cpp index 89aaf4b..1f2a990 100644 --- a/src/authorizer/local/authorizer.cpp +++ b/src/authorizer/local/authorizer.cpp @@ -1242,7 +1242,7 @@ private: foreach (const ACL::RegisterAgent& acl, acls.register_agents()) { GenericACL acl_; acl_.subjects = acl.principals(); - acl_.objects = acl.agent(); + acl_.objects = acl.agents(); acls_.push_back(acl_); } @@ -1337,9 +1337,9 @@ Option LocalAuthorizer::validate(const ACLs& acls) } foreach (const ACL::RegisterAgent& acl, acls.register_agents()) { -if (acl.agent().type() == ACL::Entity::SOME) { +if (acl.agents().type() == ACL::Entity::SOME) { return Error( - "acls.register_agents.agent type must be either NONE or ANY"); + "acls.register_agents type must be either NONE or ANY"); } } http://git-wip-us.apache.org/repos/asf/mesos/blob/d225d4d4/src/tests/authorization_tests.cpp -- diff --git a/src/tests/authorization_tests.cpp b/src/tests/authorization_tests.cpp index 32aa6ac..6d85a54 100644 --- a/src/tests/authorization_tests.cpp +++ b/src/tests/authorization_tests.cpp @@ -4898,14 +4898,14 @@ TYPED_TEST(AuthorizationTest, RegisterAgent) // "foo" principal can register as an agent. mesos::ACL::RegisterAgent* acl = acls.add_register_agents(); acl->mutable_principals()->add_values("foo"); -acl->mutable_agent()->set_type(mesos::ACL::Entity::ANY); +acl->mutable_agents()->set_type(mesos::ACL::Entity::ANY); } { // Nobody else can register as an agent. mesos::ACL::RegisterAgent* acl = acls.add_register_agents(); acl->mutable_principals()->set_type(mesos::ACL::Entity::ANY); -acl->mutable_agent()->set_type(mesos::ACL::Entity::NONE); +acl->mutable_agents()->set_type(mesos::ACL::Entity::NONE); } Try create = TypeParam::create(parameterize(acls)); @@ -4936,7 +4936,7 @@ TYPED_TEST(AuthorizationTest, RegisterAgent) mesos::ACL::RegisterAgent* acl = invalid.add_register_agents(); acl->mutable_principals()->add_values("foo"); -acl->mutable_agent()->add_values("yoda"); +acl->mutable_agents()->add_values("yoda"); Try create = TypeParam::create(parameterize(invalid)); EXPECT_ERROR(create); http://git-wip-us.apache.org/repos/asf/mesos/blob/d225d4d4/src/tests/master_authorization_tests.cpp -- diff --git a/src/tests/master_authorization_tests.cpp b/src/tests/master_authorization_tests.cpp index e4233c1..0a2f31b 100644 --- a/src/tests/master_authorization_tests.cpp +++ b/src/tests/master_authorization_tests.cpp @@ -2339,7 +2339,7 @@ TEST_F(MasterAuthorizationTest, AuthorizedToRegisterAndReregisterAgent) ACLs acls; mesos::ACL::RegisterAgent* acl = acls.add_register_agents(); acl->mutable_principal