diff options
author | Chris Doherty <cdoherty@chef.io> | 2015-10-27 16:54:06 -0700 |
---|---|---|
committer | Chris Doherty <cdoherty@chef.io> | 2015-11-10 14:50:22 -0800 |
commit | 3627567298769fcc3e6d9904c0f52a810e5a26b4 (patch) | |
tree | bdd211c9e16e7a57e8be431ebfbf8ba7f5886d5f /lib/chef_zero/server.rb | |
parent | 1fb96253a01920001ad9b1471309518bc28a93a0 (diff) | |
download | chef-zero-3627567298769fcc3e6d9904c0f52a810e5a26b4.tar.gz |
Implement oc_pedant's REST routes for policyfiles.
Diffstat (limited to 'lib/chef_zero/server.rb')
-rw-r--r-- | lib/chef_zero/server.rb | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/chef_zero/server.rb b/lib/chef_zero/server.rb index 016f299..5723ae4 100644 --- a/lib/chef_zero/server.rb +++ b/lib/chef_zero/server.rb @@ -61,17 +61,19 @@ require 'chef_zero/endpoints/environment_recipes_endpoint' require 'chef_zero/endpoints/environment_role_endpoint' require 'chef_zero/endpoints/license_endpoint' require 'chef_zero/endpoints/node_endpoint' +require 'chef_zero/endpoints/nodes_endpoint' require 'chef_zero/endpoints/node_identifiers_endpoint' require 'chef_zero/endpoints/organizations_endpoint' require 'chef_zero/endpoints/organization_endpoint' require 'chef_zero/endpoints/organization_association_requests_endpoint' require 'chef_zero/endpoints/organization_association_request_endpoint' require 'chef_zero/endpoints/organization_authenticate_user_endpoint' +require 'chef_zero/endpoints/organization_policies_endpoint' +require 'chef_zero/endpoints/organization_policy_groups_endpoint' require 'chef_zero/endpoints/organization_users_endpoint' require 'chef_zero/endpoints/organization_user_endpoint' require 'chef_zero/endpoints/organization_validator_key_endpoint' require 'chef_zero/endpoints/principal_endpoint' -require 'chef_zero/endpoints/policies_endpoint' require 'chef_zero/endpoints/role_endpoint' require 'chef_zero/endpoints/role_environments_endpoint' require 'chef_zero/endpoints/sandboxes_endpoint' @@ -89,6 +91,7 @@ require 'chef_zero/endpoints/version_endpoint' require 'chef_zero/endpoints/server_api_version_endpoint' module ChefZero + class Server DEFAULT_OPTIONS = { @@ -541,10 +544,16 @@ module ChefZero [ "/organizations/*/environments/*/nodes", EnvironmentNodesEndpoint.new(self) ], [ "/organizations/*/environments/*/recipes", EnvironmentRecipesEndpoint.new(self) ], [ "/organizations/*/environments/*/roles/*", EnvironmentRoleEndpoint.new(self) ], - [ "/organizations/*/nodes", RestListEndpoint.new(self) ], + [ "/organizations/*/nodes", NodesEndpoint.new(self) ], [ "/organizations/*/nodes/*", NodeEndpoint.new(self) ], [ "/organizations/*/nodes/*/_identifiers", NodeIdentifiersEndpoint.new(self) ], - [ "/organizations/*/policies/*/*", PoliciesEndpoint.new(self) ], + [ "/organizations/*/policies", OrganizationPoliciesEndpoint.new(self) ], + [ "/organizations/*/policies/*", OrganizationPoliciesEndpoint.new(self) ], + [ "/organizations/*/policies/*/revisions", OrganizationPoliciesEndpoint.new(self) ], + [ "/organizations/*/policies/*/revisions/*", OrganizationPoliciesEndpoint.new(self) ], + [ "/organizations/*/policy_groups", OrganizationPolicyGroupsEndpoint.new(self) ], + [ "/organizations/*/policy_groups/*", OrganizationPolicyGroupsEndpoint.new(self) ], + [ "/organizations/*/policy_groups/*/policies/*", OrganizationPolicyGroupsEndpoint.new(self) ], [ "/organizations/*/principals/*", PrincipalEndpoint.new(self) ], [ "/organizations/*/roles", RestListEndpoint.new(self) ], [ "/organizations/*/roles/*", RoleEndpoint.new(self) ], |