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

ROX-21118: change expired_at via API #1505

Merged
merged 7 commits into from
Dec 15, 2023
Merged

Conversation

parametalol
Copy link
Contributor

@parametalol parametalol commented Nov 27, 2023

$ curl -H "Authorization: Bearer $STATIC_TOKEN_ADMIN" \
"http://localhost:8000/api/rhacs/v1/admin/centrals/cl75fu8bs0bd6k334h0g/expired-at" \
-d "timestamp=2024-01-02T13:45:56Z" \
-d "reason=test" -X PATCH

Logs:

W1127 09:29:41.074361      13 admin_dinosaur.go:258] Setting expired_at to "2024-01-02T13:45:56Z" for central "cl75fu8bs0bd6k334h0g": test
I1127 09:29:41.076758      13 framework.go:51] user='rhacs-ms-test@redhat.com' action='admin-expired-at' src_ip='127.0.0.1:60156' session='20873d12-aae8-4d3b-9c14-44a5a253c367' tx_id='631' opid='cli631dfh90d6k12pjdg' operation ended successfully

expired_at field in GET centrals:

$ curl -H "Authorization: Bearer $STATIC_TOKEN_ADMIN" "http://localhost:8000/api/rhacs/v1/admin/centrals"
{
  "kind": "CentralList",
  "page": 1,
  "size": 1,
  "total": 1,
  "items": [
    {
      "id": "cl75fu8bs0bd6k334h0g",
      "kind": "CentralRequest",
      "href": "/api/rhacs/v1/centrals/cl75fu8bs0bd6k334h0g",
      "status": "ready",
      "cloud_provider": "aws",
      "multi_az": true,
      "region": "us-east-1",
      "owner": "acscs-trial-expiration-test-prod",
      "name": "test-central-1",
      "host": "acs-cl75fu8bs0bd6k334h0g.cluster.local",
      "created_at": "2023-11-10T16:19:06.767675Z",
      "updated_at": "2023-11-27T14:22:24.692756Z",
      "expired_at": "2024-01-02T13:45:56Z",
      "failed_reason": "Creation time went over the timeout. Interrupting central initialization.",
      "instance_type": "standard"
    }
  ]
}

@parametalol parametalol marked this pull request as draft November 27, 2023 10:07
@parametalol parametalol force-pushed the michael/ROX-19507-deprovision-disgraced branch from 942be5f to ab9356a Compare November 27, 2023 10:45
@parametalol parametalol force-pushed the michael/ROX-19507-deprovision-disgraced branch from ab9356a to 893133e Compare November 27, 2023 11:05
Base automatically changed from michael/ROX-19507-deprovision-disgraced to main November 27, 2023 13:05
@parametalol parametalol changed the title michael/api-change-expired-at ROX-21118: change expired_at via API Nov 27, 2023
@parametalol parametalol marked this pull request as ready for review November 28, 2023 15:24
Copy link
Contributor

@stehessel stehessel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, modulo the log which is wrong if ts == "".

Copy link
Contributor

openshift-ci bot commented Dec 1, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 0x656b694d, stehessel
Once this PR has been reviewed and has the lgtm label, please assign ivan-degtiarenko for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot removed the lgtm label Dec 15, 2023
Copy link
Contributor

openshift-ci bot commented Dec 15, 2023

New changes are detected. LGTM label has been removed.

@parametalol parametalol merged commit 71c6ab3 into main Dec 15, 2023
9 checks passed
@parametalol parametalol deleted the michael/api-change-expired-at branch December 15, 2023 17:52
johannes94 pushed a commit that referenced this pull request Jan 18, 2024
Co-authored-by: Stephan Hesselmann <shesselm@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants