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

Add DC Resources API #65

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

OdedViner
Copy link

@OdedViner OdedViner commented Sep 20, 2023

Add elements to DB via admin
http://127.0.0.1:8000/admin/resoucesdc/resoucesdc/

Get APIs via UI:
http://127.0.0.1:8000/resoucesdc/resourcesdc/

Get API via CLI: [All DCs]

$ curl http://127.0.0.1:8000/resoucesdc/resourcesdc/
[{"id":1,"dc":"dc-cp","storage":100,"cpu":200,"memory":300}]

Get API via CLI: [for specific DC]

$ curl http://127.0.0.1:8000/resoucesdc/resourcesdc/1/
{"id":1,"dc":"dc-cp","storage":100,"cpu":200,"memory":300}

Change cpu parma to 555:

$ curl -X PATCH -H "Content-Type: application/json" -d '{"cpu": "555"}' http://127.0.0.1:8000/resoucesdc/resourcesdc/1/
{"id":1,"dc":"dc-cp","storage":100,"cpu":555,"memory":300}

Signed-off-by: oviner <[email protected]>
@openshift-ci
Copy link

openshift-ci bot commented Sep 20, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: OdedViner

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

Signed-off-by: oviner <[email protected]>
Signed-off-by: oviner <[email protected]>
@jimdevops19
Copy link
Contributor

How is it going here? Let me know if any help needed @OdedViner @petr-balogh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants