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();
}
Aggregations