Skip to content

Commit

Permalink
feat(manager): return satellite_managed flag in
Browse files Browse the repository at this point in the history
package/package_name/systems

RHINENG-2627
  • Loading branch information
yungbender authored and psegedy committed Oct 19, 2023
1 parent 70eff4d commit c917b55
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions docs/v3/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -6519,6 +6519,9 @@
"rhsm": {
"type": "string"
},
"satellite_managed": {
"type": "boolean"
},
"tags": {
"type": "array",
"items": {
Expand Down
1 change: 1 addition & 0 deletions manager/controllers/package_systems.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ type PackageSystemItemV2 struct {
//nolint:lll
type PackageSystemItemV3 struct {
PackageSystemItemCommon
SystemSatelliteManaged
BaselineIDAttr
OSAttributes
UpdateStatus string `json:"update_status" csv:"update_status" query:"update_status(spkg.update_data)" gorm:"column:update_status"`
Expand Down
6 changes: 3 additions & 3 deletions manager/controllers/package_systems_export_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ func TestPackageSystemsExportHandlerCSV(t *testing.T) {

assert.Equal(t, 5, len(lines))
assert.Equal(t, "id,display_name,installed_evra,available_evra,updatable,tags,"+
"baseline_name,baseline_uptodate,baseline_id,os,rhsm,update_status,groups", lines[0])
"baseline_name,baseline_uptodate,satellite_managed,baseline_id,os,rhsm,update_status,groups", lines[0])
assert.Equal(t, "00000000-0000-0000-0000-000000000012,00000000-0000-0000-0000-000000000012,"+
"5.6.13-200.fc31.x86_64,5.10.13-200.fc31.x86_64,true,"+
"\"[{'key':'k1','namespace':'ns1','value':'val1'}]\",,,0,RHEL 8.1,8.1,Installable,[]",
"\"[{'key':'k1','namespace':'ns1','value':'val1'}]\",,,false,0,RHEL 8.1,8.1,Installable,[]",
lines[1])
assert.Equal(t, "00000000-0000-0000-0000-000000000013,00000000-0000-0000-0000-000000000013,"+
"5.6.13-200.fc31.x86_64,,false,\"[{'key':'k1','namespace':'ns1','value':'val1'}]\",,,"+
"0,RHEL 8.2,8.2,None,[]", lines[2])
"false,0,RHEL 8.2,8.2,None,[]", lines[2])
}

func TestPackageSystemsExportInvalidName(t *testing.T) {
Expand Down

0 comments on commit c917b55

Please sign in to comment.