Skip to content

Commit

Permalink
RHINENG-2767: add missing satellite/pkgcache filters and sorts to api…
Browse files Browse the repository at this point in the history
… spec
  • Loading branch information
psegedy committed Oct 30, 2023
1 parent 9b46291 commit 5574edf
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 4 deletions.
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

0 comments on commit 5574edf

Please sign in to comment.