-
Notifications
You must be signed in to change notification settings - Fork 13
2.8 Requirements for query operations #73
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
Open
mpristro
wants to merge
2
commits into
opentelekomcloud-infra:main
Choose a base branch
from
mpristro:2.8_Requirements_for_query_operations
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
public/manual-checklist/Requirements_for_query_operations.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| rules: | ||
| - id: "QUE-040-01-2507-2507-M" | ||
| title: "Evaluation of perfomance of resourse query operation" | ||
| message: | | ||
| "The impact on the interface performance needs to be evaluated. If the impact on the interface performance is great, it is recommended that an independent API be provided to return the total number of resources" | ||
| option: Mandatory | ||
|
|
||
| - id: "QUE-050-01-2507-2507-M" | ||
| title: "Cloud services must provide APIs for querying their own service quotas" | ||
| message: | | ||
| "Services that are not interconnected with Quota Center do not need to provide the Quota API. Services that are interconnected with Quota Center must provide the Quota API." |
61 changes: 61 additions & 0 deletions
61
public/rulesets/default/Requirements_for_query_operations.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| rules: | ||
| - id: "QUE-040-01-2507-2507-M" | ||
| title: "The total number of resources that meet the query conditions is returned when the resource list is queried." | ||
| message: The API response must include the total number of matching resources using the field 'count'. | ||
| option: Mandatory | ||
| description: This rule checks that GET list query responses include the total number of resources using the standardized 'count' field. | ||
| location: paths | ||
| element: responses | ||
| call: | ||
| function: CheckResponseIncludesCount | ||
| functionParams: | ||
| method: "get" | ||
| pathMustNotContainPathParams: true | ||
| responseCode: "200" | ||
| responseContainArray: true | ||
| fieldName: "count" | ||
| fieldType: "integer" | ||
| required: true | ||
| allowedNames: | ||
| - "count" | ||
| disallowedNames: | ||
| - "total" | ||
| - "total_count" | ||
| severity: high | ||
| status: devel | ||
|
|
||
| - id: "QUE-050-01-2507-2507-M" | ||
| title: "Cloud services must provide APIs for querying their own service quotas." | ||
| message: Service must expose a quota query endpoint like GET /v1/quotas. | ||
| option: Mandatory | ||
| description: Checks that a service exposes a quota query endpoint, e.g. GET /v1/quotas. | ||
| location: paths | ||
| element: path | ||
| call: | ||
| function: CheckQuotaApiPresence | ||
| functionParams: | ||
| pathPattern: "/v1/quotas" | ||
| method: "get" | ||
| severity: high | ||
| status: devel | ||
|
|
||
| - id: "QUE-060-01-2507-2507-M" | ||
| title: "Querying resource details requires returning creation and modification time parameters" | ||
| message: Resourse detail query APIs must return 'create_time' and 'update_time' fields in the response. | ||
| option: Mandatory | ||
| description: Verifies that resource detail GET endpoints with path parameters (e.g., /resource/{id}) return 'create_time' and 'update_time' fields. | ||
| location: paths | ||
| element: responses | ||
| call: | ||
| function: CheckTimeFieldsInDetailQuery | ||
| functionParams: | ||
| method: "get" | ||
| pathMustContainPathParameter: "id" | ||
| responseCode: "200" | ||
| requiredFields: | ||
| - "create_time" | ||
| - "update_time" | ||
| - "created_at" | ||
| - "updated_at" | ||
| severity: high | ||
| status: devel | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
add also created_at, updated_at
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.
done