-
Notifications
You must be signed in to change notification settings - Fork 0
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
Check create method + db unit test #6
Conversation
coral_credits/api/views.py
Outdated
Example (blazar) request: | ||
{ | ||
"context": { | ||
"user_id": "c631173e-dec0-4bb7-a0c3-f7711153c06c", | ||
"project_id": "a0b86a98-b0d3-43cb-948e-00689182efd4", | ||
"auth_url": "https://api.example.com:5000/v3", | ||
"region_name": "RegionOne" | ||
}, | ||
"lease": { | ||
# TODO(assumptionsandg): "lease_id": "e96b5a17-ada0-4034-a5ea-34db024b8e04" | ||
# TODO(assumptionsandg): "lease_name": "e96b5a17-ada0-4034-a5ea-34db024b8e04" | ||
"start_date": "2020-05-13T00:00:00.012345+02:00", | ||
"end_time": "2020-05-14T23:59:00.012345+02:00", | ||
"reservations": [ | ||
{ | ||
"resource_type": "physical:host", | ||
"min": 2, | ||
"max": 3, | ||
"hypervisor_properties": "[]", | ||
"resource_properties": "[\"==\", \"$availability_zone\", \"az1\"]", | ||
"allocations": [ | ||
{ | ||
"id": "1", | ||
"hypervisor_hostname": "32af5a7a-e7a3-4883-a643-828e3f63bf54", | ||
"extra": { | ||
"availability_zone": "az1" | ||
} | ||
}, | ||
{ | ||
"id": "2", | ||
"hypervisor_hostname": "af69aabd-8386-4053-a6dd-1a983787bd7f", | ||
"extra": { | ||
"availability_zone": "az1" | ||
} | ||
} | ||
] | ||
# TODO(assumptionsandg): "resource_requests" : | ||
{ | ||
"vcpu" / "pcpu" : "8" | ||
"memory" : "4096" # MB ? | ||
"storage" : "30" # GB ? | ||
"storage_type" : "SSD" | ||
} | ||
} | ||
] | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should be able to have the same request format standardised across all resource providers?
@assumptionsandg I've added some TODOs on what additions we need to the request that blazar sends to the coral-credits API, perhaps @JohnGarbutt has some suggestions on this
4e4ae36
to
b2773b4
Compare
* Dockerfile * initial CI setup * initial helm charts * add functional test * make database configurable, with default --------- Co-authored-by: Jake Hutchinson <[email protected]>
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
required for next bits so merging |
No description provided.