Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[infra-proxy-service] Update Role API #3857

Merged
merged 1 commit into from
Jun 1, 2020

Conversation

kvivek1115
Copy link

🔩 Description: What code changed, and why?

Read Write views consist of update role API, with the direct existing run list, attributes in multiple steps this API is a single source of truth for all updates tasks.

⛓️ Related Resources

Fixes: #3679

👍 Definition of Done

  • Infra service responds to Chef Server role update API.

👟 How to Build and Test the Change

  • rebuild componenets/infra-proxy-service
  • rebuild componenets/automate-gateway

Steps to test:

  • Add chef-server test env detail from infra views channel.
  • Create a role with the name web.
curl -sSkH "api-token: $(get_admin_token)"  https://a2-dev.test/api/v0/infra/servers/chef-server-dev-test/orgs/chef-org-dev/roles?pretty -X POST -d '{"name": "web", "run_list":["recipe[starter]"]}'
{
  "name": "web",
}

  • In order to update the existing role hit
curl -sSkH "api-token: $(get_admin_token)"  https://a2-dev.test/api/v0/infra/servers/chef-server-dev-test/orgs/chef-org-dev/roles/web1?pretty -X PUT -d '{"run_list":["recipe[starter]", "recipe[chef-client]"]}'
{
  "name": "web",
}

✅ Checklist

📷 Screenshots, if applicable

Signed-off-by: Vivek Singh [email protected]

@kvivek1115 kvivek1115 requested a review from a team as a code owner June 1, 2020 03:17
@kvivek1115 kvivek1115 self-assigned this Jun 1, 2020
@kvivek1115 kvivek1115 requested a review from vjeffrey June 1, 2020 03:19
@kvivek1115 kvivek1115 force-pushed the VSingh/infra-proxy-service-role-update-api branch from f9cbc8d to cbc06ef Compare June 1, 2020 15:43
@vjeffrey vjeffrey merged commit 8e45652 into master Jun 1, 2020
@chef-expeditor chef-expeditor bot deleted the VSingh/infra-proxy-service-role-update-api branch June 1, 2020 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Infra Views Read/Write] Role update API
2 participants