This commit consists of adding two new northbound APIs to the Core
to be used mostly by the Affinity Router: ListDeviceIds retrieves the
ids of devices present in a Core memory; ReconcileDevices ia an API
the Affinity router can use to push a list of device ids to a Core
for the latter to load and reconcile the devices in memory (used
mostly of a core restart).
Change-Id: I0d292054e09a099ad8be7669fbc3fe3ba15a5579
diff --git a/protos/voltha.proto b/protos/voltha.proto
index e03442a..f2f885f 100644
--- a/protos/voltha.proto
+++ b/protos/voltha.proto
@@ -269,6 +269,23 @@
option (voltha.yang_xml_tag).xml_tag = 'devices';
}
+ // List all physical devices IDs controlled by the Voltha cluster
+ rpc ListDeviceIds(google.protobuf.Empty) returns(IDs) {
+ option (google.api.http) = {
+ get: "/api/v1/deviceids"
+ };
+ option (voltha.yang_xml_tag).xml_tag = 'id';
+ option (voltha.yang_xml_tag).list_items_name = 'items';
+ }
+
+ // Request to a voltha Core to reconcile a set of devices based on their IDs
+ rpc ReconcileDevices(IDs) returns(google.protobuf.Empty) {
+ option (google.api.http) = {
+ post: "/api/v1/deviceids"
+ body: "*"
+ };
+ }
+
// Get more information on a given physical device
rpc GetDevice(ID) returns(Device) {
option (google.api.http) = {