Search in sources :

Example 1 with GnmiPathBuilder

use of org.onosproject.gnmi.api.GnmiUtils.GnmiPathBuilder in project onos by opennetworkinglab.

the class GnmiTerminalDevicePowerConfig method buildPathWithSubPath.

private Gnmi.Path buildPathWithSubPath(String ocName, String subPath) {
    String[] elems = subPath.split("/");
    GnmiPathBuilder pathBuilder = GnmiPathBuilder.newBuilder().addElem("components").addElem("component").withKeyValue("name", ocName).addElem("optical-channel");
    for (String elem : elems) {
        pathBuilder.addElem(elem);
    }
    return pathBuilder.build();
}
Also used : GnmiPathBuilder(org.onosproject.gnmi.api.GnmiUtils.GnmiPathBuilder)

Aggregations

GnmiPathBuilder (org.onosproject.gnmi.api.GnmiUtils.GnmiPathBuilder)1