openconfig / featureprofiles

Feature Profiles are groups of OpenConfig paths and tests which verify their behavior
Apache License 2.0
52 stars 149 forks source link

gNOI Healthz Path Clarification #965

Closed Hobbydos closed 1 year ago

Hobbydos commented 1 year ago

As per https://github.com/openconfig/gnoi/tree/main/healthz

Use of gNMI paths: Where a gNMI path (gnoi.types.Path) is used in Healthz, the path specified should be the complete path to a specific component - i.e., /components/component[name=FOO].

Is the below path accurate or should it be reflective of components/component[name=chassis] https://github.com/openconfig/featureprofiles/blob/04860e1abb6139d8135a8f46fa46bb7c8553c128/feature/gnoi/system/tests/copying_debug_files_test/copying_debug_files_test.go#L72-L80

Hobbydos commented 1 year ago

My proposed suggestion would be - Please let me know if you agree, I'll raise a PR

    chassisMap := map[string]string{"name": "Chassis"}
    req := &hpb.GetRequest{
        Path: &tpb.Path{
            Elem: []*tpb.PathElem{
                {
                    Name: "components",
                },
                {
                    Name: "component",
                    Key:  chassisMap,
                },
            },
        },
    }
xw-g commented 1 year ago

I think your suggestion is good per https://github.com/openconfig/gnoi/blob/79709cdf28e160f0732ff0086902c06c9c2d74f8/types/types.proto#L51-L54

Hobbydos commented 1 year ago

Closing issue; discussions regarding this topic can be carried on https://github.com/openconfig/featureprofiles/pull/966