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

RHINENG-2767: add missing satellite/pkgcache filters and sorts to api… #1331

Merged
merged 1 commit into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 54 additions & 2 deletions docs/v3/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,9 @@
"stale",
"status",
"template",
"groups"
"groups",
"satellite_managed",
"built_pkgcache"
]
}
},
Expand Down Expand Up @@ -426,6 +428,22 @@
"type": "string"
}
},
{
"name": "filter[satellite_managed]",
"in": "query",
"description": "Filter",
"schema": {
"type": "string"
}
},
{
"name": "filter[built_pkgcache]",
"in": "query",
"description": "Filter",
"schema": {
"type": "string"
}
},
{
"name": "tags",
"in": "query",
Expand Down Expand Up @@ -3446,6 +3464,14 @@
"schema": {
"type": "string"
}
},
{
"name": "filter[satellite_managed]",
"in": "query",
"description": "Filter systems managed by satellite",
"schema": {
"type": "string"
}
}
],
"responses": {
Expand Down Expand Up @@ -4353,6 +4379,14 @@
"type": "string"
}
},
{
"name": "filter[satellite_managed]",
"in": "query",
"description": "Filter systems managed by satellite",
"schema": {
"type": "string"
}
},
{
"name": "filter[updatable]",
"in": "query",
Expand Down Expand Up @@ -4531,7 +4565,9 @@
"stale",
"packages_installed",
"baseline_name",
"groups"
"groups",
"satellite_managed",
"built_pkgcache"
]
}
},
Expand Down Expand Up @@ -4655,6 +4691,22 @@
"type": "string"
}
},
{
"name": "filter[satellite_managed]",
"in": "query",
"description": "Filter",
"schema": {
"type": "string"
}
},
{
"name": "filter[built_pkgcache]",
"in": "query",
"description": "Filter",
"schema": {
"type": "string"
}
},
{
"name": "filter[os]",
"in": "query",
Expand Down
4 changes: 3 additions & 1 deletion manager/controllers/advisory_systems.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,16 @@ func advisorySystemsCommon(c *gin.Context) (*gorm.DB, *ListMeta, []string, error
// @Param advisory_id path string true "Advisory ID"
// @Param limit query int false "Limit for paging, set -1 to return all"
// @Param offset query int false "Offset for paging"
// @Param sort query string false "Sort field" Enums(id,display_name,last_evaluation,last_upload,stale,status,template,groups)
// @Param sort query string false "Sort field" Enums(id,display_name,last_evaluation,last_upload,stale,status,template,groups,satellite_managed,built_pkgcache)
// @Param search query string false "Find matching text"
// @Param filter[id] query string false "Filter"
// @Param filter[display_name] query string false "Filter"
// @Param filter[stale] query string false "Filter"
// @Param filter[status] query string false "Filter"
// @Param filter[template] query string false "Filter"
// @Param filter[os] query string false "Filter OS version"
// @Param filter[satellite_managed] query string false "Filter"
// @Param filter[built_pkgcache] query string false "Filter"
// @Param tags query []string false "Tag filter"
// @Param filter[group_name] query []string false "Filter systems by inventory groups"
// @Param filter[system_profile][sap_system] query string false "Filter only SAP systems"
Expand Down
2 changes: 2 additions & 0 deletions manager/controllers/package_systems.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ func packageSystemsCommon(db *gorm.DB, c *gin.Context) (*gorm.DB, *ListMeta, []s
// @Param filter[system_profile][ansible][controller_version] query string false "Filter systems by ansible version"
// @Param filter[system_profile][mssql] query string false "Filter systems by mssql version"
// @Param filter[system_profile][mssql][version] query string false "Filter systems by mssql version"
// @Param filter[satellite_managed] query string false "Filter systems managed by satellite"
// @Param filter[updatable] query bool false "Filter"
// @Success 200 {object} PackageSystemsResponseV3
// @Failure 400 {object} utils.ErrorResponse
Expand Down Expand Up @@ -199,6 +200,7 @@ func PackageSystemsListHandler(c *gin.Context) {
// @Param filter[system_profile][ansible][controller_version] query string false "Filter systems by ansible version"
// @Param filter[system_profile][mssql] query string false "Filter systems by mssql version"
// @Param filter[system_profile][mssql][version] query string false "Filter systems by mssql version"
// @Param filter[satellite_managed] query string false "Filter systems managed by satellite"
// @Success 200 {object} IDsStatusResponse
// @Failure 400 {object} utils.ErrorResponse
// @Failure 404 {object} utils.ErrorResponse
Expand Down
4 changes: 3 additions & 1 deletion manager/controllers/systems.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ func systemsCommon(c *gin.Context, apiver int) (*gorm.DB, *ListMeta, []string, e
// @Produce json
// @Param limit query int false "Limit for paging, set -1 to return all"
// @Param offset query int false "Offset for paging"
// @Param sort query string false "Sort field" Enums(id,display_name,last_upload,rhsa_count,rhba_count,rhea_count,other_count,stale,packages_installed,baseline_name,groups)
// @Param sort query string false "Sort field" Enums(id,display_name,last_upload,rhsa_count,rhba_count,rhea_count,other_count,stale,packages_installed,baseline_name,groups,satellite_managed,built_pkgcache)
// @Param search query string false "Find matching text"
// @Param filter[id] query string false "Filter"
// @Param filter[display_name] query string false "Filter"
Expand All @@ -215,6 +215,8 @@ func systemsCommon(c *gin.Context, apiver int) (*gorm.DB, *ListMeta, []string, e
// @Param filter[culled_timestamp] query string false "Filter"
// @Param filter[created] query string false "Filter"
// @Param filter[baseline_name] query string false "Filter"
// @Param filter[satellite_managed] query string false "Filter"
// @Param filter[built_pkgcache] query string false "Filter"
// @Param filter[os] query string false "Filter OS version"
// @Param tags query []string false "Tag filter"
// @Param filter[group_name] query []string false "Filter systems by inventory groups"
Expand Down
Loading