Skip to content
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
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ require (
github.com/onsi/ginkgo/v2 v2.27.2
github.com/onsi/gomega v1.38.2
github.com/open-edge-platform/cluster-connect-gateway v1.2.4
github.com/open-edge-platform/infra-core/inventory/v2 v2.31.1
github.com/open-edge-platform/infra-core/inventory/v2 v2.32.0
github.com/open-edge-platform/orch-library/go v0.6.1
github.com/open-policy-agent/opa v1.10.1
github.com/rs/zerolog v1.34.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -771,8 +771,8 @@ github.com/onsi/gomega v1.38.2/go.mod h1:W2MJcYxRGV63b418Ai34Ud0hEdTVXq9NW9+Sx6u
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
github.com/open-edge-platform/cluster-connect-gateway v1.2.4 h1:SBr2xXhMlCOFOrDjZPAvBySEeI5TW6AgqqDcihBhFsc=
github.com/open-edge-platform/cluster-connect-gateway v1.2.4/go.mod h1:QDYeLlziDltMzqLtobbqUZJcxyGl9LmmXx/fUhH1RqQ=
github.com/open-edge-platform/infra-core/inventory/v2 v2.31.1 h1:k2yEmRfqhKABJNYG7bV+D5eJ5CnG50S3j1yZ8sWdZu8=
github.com/open-edge-platform/infra-core/inventory/v2 v2.31.1/go.mod h1:7bHaRxSL+e5XFt2cGCFS3DuI405Nz2u6q0vlMv6/twY=
github.com/open-edge-platform/infra-core/inventory/v2 v2.32.0 h1:u5hVoEpTiD5JL4jTYA1DJ5iXM4t4WULd8Rwn7mfPqSQ=
github.com/open-edge-platform/infra-core/inventory/v2 v2.32.0/go.mod h1:7bHaRxSL+e5XFt2cGCFS3DuI405Nz2u6q0vlMv6/twY=
github.com/open-edge-platform/orch-library/go v0.6.1 h1:IGR2ic73f3obnhlxTRfHcyYMbPbYu7BSqa9UYyEZ78Q=
github.com/open-edge-platform/orch-library/go v0.6.1/go.mod h1:3Tes/GJfwYbnQa/1scbKiLbjZrL4fJEouFk28oo5/c8=
github.com/open-edge-platform/orch-library/go/dazl v0.5.4 h1:Rx/bSAZiLjEEBjUiJEzBvT0fQv5huT5FQ2Ke3IMUhiE=
Expand Down
12 changes: 6 additions & 6 deletions pkg/inventory/inventory_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func TestGetHostAndInstanceByHostUUID(t *testing.T) {
SerialNumber: hostSerialNumber,
Instance: &computev1.InstanceResource{
ResourceId: instanceResourceId,
CurrentOs: &osv1.OperatingSystemResource{
Os: &osv1.OperatingSystemResource{
Name: instanceOsName,
},
},
Expand All @@ -72,7 +72,7 @@ func TestGetHostAndInstanceByHostUUID(t *testing.T) {
SerialNumber: hostSerialNumber,
Instance: &computev1.InstanceResource{
ResourceId: instanceResourceId,
CurrentOs: &osv1.OperatingSystemResource{
Os: &osv1.OperatingSystemResource{
Name: instanceOsName,
},
},
Expand All @@ -94,7 +94,7 @@ func TestGetHostAndInstanceByHostUUID(t *testing.T) {
assert.Equal(t, tc.expectedHost.GetSerialNumber(), host.GetSerialNumber())
require.NotNil(t, host.GetInstance())
assert.Equal(t, tc.expectedHost.GetInstance().GetResourceId(), host.GetInstance().GetResourceId())
assert.Equal(t, tc.expectedHost.GetInstance().GetCurrentOs().GetName(), host.GetInstance().GetCurrentOs().GetName())
assert.Equal(t, tc.expectedHost.GetInstance().GetOs().GetName(), host.GetInstance().GetOs().GetName())
})
}
}
Expand Down Expand Up @@ -171,7 +171,7 @@ func TestGetInstance(t *testing.T) {
tenantId: tenantId,
expectedInstance: &computev1.InstanceResource{
ResourceId: instanceResourceId,
CurrentOs: &osv1.OperatingSystemResource{
Os: &osv1.OperatingSystemResource{
Name: instanceOsName,
},
},
Expand All @@ -183,7 +183,7 @@ func TestGetInstance(t *testing.T) {
Resource: &inventoryv1.Resource_Instance{
Instance: &computev1.InstanceResource{
ResourceId: instanceResourceId,
CurrentOs: &osv1.OperatingSystemResource{
Os: &osv1.OperatingSystemResource{
Name: instanceOsName,
},
},
Expand All @@ -204,7 +204,7 @@ func TestGetInstance(t *testing.T) {
require.Nil(t, err)
require.NotNil(t, out)
assert.Equal(t, out.GetResourceId(), tc.instanceId)
assert.Equal(t, tc.expectedInstance.GetCurrentOs().GetName(), out.GetCurrentOs().GetName())
assert.Equal(t, tc.expectedInstance.GetOs().GetName(), out.GetOs().GetName())
})
}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/inventory/machine_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func (n *MachineProvider) GetInstanceByMachineId(in GetInstanceByMachineIdInput)
&Instance{
Id: instance.GetResourceId(),
SerialNo: host.GetSerialNumber(),
Os: instance.GetCurrentOs().GetName(),
Os: instance.GetOs().GetName(),
MachineId: in.MachineId},
nil}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/inventory/machine_provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ func TestGetInstanceByMachineId(t *testing.T) {
SerialNumber: hostSerialNumber,
Instance: &computev1.InstanceResource{
ResourceId: instanceResourceId,
CurrentOs: &osv1.OperatingSystemResource{
Os: &osv1.OperatingSystemResource{
Name: instanceOsName,
},
},
Expand Down
4 changes: 2 additions & 2 deletions test/inventory-stub/inventory_stub.go
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ func GetStubClient() client.TenantAwareInventoryClient {
Response: &computev1.HostResource{
Instance: &computev1.InstanceResource{
ResourceId: defaultInstanceID,
CurrentOs: &osv1.OperatingSystemResource{
Os: &osv1.OperatingSystemResource{
Name: "Linux",
},
},
Expand All @@ -341,7 +341,7 @@ func GetStubClient() client.TenantAwareInventoryClient {
Resource: &inv_v1.Resource_Instance{
Instance: &computev1.InstanceResource{
ResourceId: defaultInstanceID,
CurrentOs: &osv1.OperatingSystemResource{
Os: &osv1.OperatingSystemResource{
Name: "Linux",
},
WorkloadMembers: []*computev1.WorkloadMember{
Expand Down
4 changes: 2 additions & 2 deletions test/inventory-stub/inventory_stub_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func TestGetHostByUUID(t *testing.T) {
require.NoError(t, err)
require.NotNil(t, host)
assert.Equal(t, defaultInstanceID, host.Instance.ResourceId)
assert.Equal(t, "Linux", host.Instance.CurrentOs.Name)
assert.Equal(t, "Linux", host.Instance.Os.Name)
assert.Equal(t, "SN123456", host.SerialNumber)
}

Expand All @@ -31,7 +31,7 @@ func TestGet(t *testing.T) {
require.NoError(t, err)
require.NotNil(t, resp)
assert.Equal(t, defaultInstanceID, resp.Resource.GetInstance().ResourceId)
assert.Equal(t, "Linux", resp.Resource.GetInstance().CurrentOs.Name)
assert.Equal(t, "Linux", resp.Resource.GetInstance().Os.Name)
}

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