Skip to content

Commit

Permalink
PMM-12913 refactor /v1/role, rename tp /v1/accesscontrol
Browse files Browse the repository at this point in the history
  • Loading branch information
ademidoff committed Apr 9, 2024
1 parent a039868 commit 3f9f9f0
Show file tree
Hide file tree
Showing 34 changed files with 20,582 additions and 20,578 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/managed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,7 @@ jobs:
- name: Launch PMM Server (see docker-compose.yml)
run: |
# Note: launching the container with --wait fails for an unknown reason.
# A temporary workaround is to run it manually. To be reverted once the issue is resolved.
make env-compose-up # the container workdir is /root/go/src/github.com/percona/pmm
# docker compose --profile pmm up -d
# sleep 100s
docker logs pmm-server
- name: Restore Go build cache
Expand Down
6 changes: 3 additions & 3 deletions Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ gen-api: ## Generate PMM API
api/alerting/v1 \
api/backup/v1 \
api/dump/v1beta1 \
api/role/v1beta1 \
api/accesscontrol/v1beta1 \
api/qan/v1 \
api/platform/v1"; \
for API in $$SPECS; do \
Expand Down Expand Up @@ -118,7 +118,7 @@ gen-api: ## Generate PMM API
api/advisors/v1/json/v1.json \
api/backup/v1/json/v1.json \
api/dump/v1beta1/json/v1beta1.json \
api/role/v1beta1/json/v1beta1.json \
api/accesscontrol/v1beta1/json/v1beta1.json \
api/qan/v1/json/v1.json \
api/platform/v1/json/v1.json

Expand Down Expand Up @@ -162,7 +162,7 @@ clean: clean_swagger ## Remove generated files
api/advisors/v1 \
api/backup/v1 \
api/dump/v1beta1 \
api/role/v1beta1 \
api/accesscontrol/v1beta1 \
api/qan/v1 \
api/platform/v1"; \
for API in $$SPECS; do \
Expand Down
3 changes: 3 additions & 0 deletions api/MIGRATION_EXAMPLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,6 @@ curl -s -X GET "http://admin:[email protected]:8080/v1/advisors/checks/failed?serv

# POST /v1/backup/Artifacts/PITRTimeranges -> GET /v1/backups/artifacts/{artifact_id}/pitr-timeranges
curl -s -X GET http://admin:[email protected]:8080/v1/backups/artifacts/bcc83096-b006-4d2e-ac17-365a57c3e37a/pitr-timeranges

# POST /v1/role/List -> GET /v1/accesscontrol/roles
curl -i -X GET http://admin:[email protected]:8080/v1/roles
16 changes: 8 additions & 8 deletions api/MIGRATION_TO_V3.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,14 @@ POST /v1/dump/GetLogs GET /v1/dumps/{dump_id}/logs
POST /v1/dump/Start POST /v1/dumps:start
POST /v1/dump/Upload POST /v1/dumps:upload

**RoleService** **AccessControlService** TODO: rename to AccessControlService
POST /v1/role/Assign POST /v1/accesscontrol/roles:assign
POST /v1/role/Create POST /v1/accesscontrol/roles
POST /v1/role/Delete DELETE /v1/accesscontrol/roles/{id} ?replacement_role_id=id
POST /v1/role/Get GET /v1/accesscontrol/roles/{id}
POST /v1/role/List GET /v1/accesscontrol/roles
POST /v1/role/SetDefault POST /v1/accesscontrol/roles:setDefault
POST /v1/role/Update PUT /v1/accesscontrol/roles/{id} Extract the role_id from the body to {id}
**RoleService** **AccessControlService** NOTE: renamed to AccessControlService
POST /v1/role/Assign POST /v1/accesscontrol/roles:assign
POST /v1/role/Create POST /v1/accesscontrol/roles
POST /v1/role/Delete DELETE /v1/accesscontrol/roles/{role_id} ?replacement_role_id=abcdedf-123456
POST /v1/role/Get GET /v1/accesscontrol/roles/{role_id} ✅
POST /v1/role/List GET /v1/accesscontrol/roles
POST /v1/role/SetDefault POST /v1/accesscontrol/roles:setDefault
POST /v1/role/Update PUT /v1/accesscontrol/roles/{role_id}

**MgmtService** **ManagementV1Beta1Service** NOTE: promote to v1 from v1beta1
POST /v1/management/Agent/List GET /v1/management/agents
Expand Down
Loading

0 comments on commit 3f9f9f0

Please sign in to comment.