Extract and publish p4runtime protocol utils in separate artifact
For consumption by third-party apps built via mvn
Change-Id: Ic9c1eccb2519b2952cdb632e1f07ccefbba00396
diff --git a/protocols/p4runtime/BUILD b/protocols/p4runtime/BUILD
index 39f6403..5db0ebe 100644
--- a/protocols/p4runtime/BUILD
+++ b/protocols/p4runtime/BUILD
@@ -3,6 +3,7 @@
"//protocols/p4runtime/ctl:onos-protocols-p4runtime-ctl",
"//protocols/p4runtime/model:onos-protocols-p4runtime-model",
"//protocols/p4runtime/proto:onos-protocols-p4runtime-proto",
+ "//protocols/p4runtime/utils:onos-protocols-p4runtime-utils",
]
onos_app(
diff --git a/protocols/p4runtime/ctl/BUILD b/protocols/p4runtime/ctl/BUILD
index 5fbbd68..dca5f38 100644
--- a/protocols/p4runtime/ctl/BUILD
+++ b/protocols/p4runtime/ctl/BUILD
@@ -4,6 +4,7 @@
"//protocols/grpc/ctl:onos-protocols-grpc-ctl",
"//protocols/p4runtime/api:onos-protocols-p4runtime-api",
"//protocols/p4runtime/proto:onos-protocols-p4runtime-proto",
+ "//protocols/p4runtime/utils:onos-protocols-p4runtime-utils",
"//deps:com_google_protobuf_protobuf_java",
"//deps:io_grpc_grpc_api_context",
"//deps:io_grpc_grpc_netty",
diff --git a/protocols/p4runtime/utils/BUILD b/protocols/p4runtime/utils/BUILD
new file mode 100644
index 0000000..a521bbb
--- /dev/null
+++ b/protocols/p4runtime/utils/BUILD
@@ -0,0 +1,8 @@
+COMPILE_DEPS = CORE_DEPS + [
+ "//protocols/p4runtime/proto:onos-protocols-p4runtime-proto",
+ "//deps:com_google_protobuf_protobuf_java",
+]
+
+osgi_jar_with_tests(
+ deps = COMPILE_DEPS,
+)
diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/AbstractCodec.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/AbstractCodec.java
similarity index 100%
rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/AbstractCodec.java
rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/AbstractCodec.java
diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/AbstractEntityCodec.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/AbstractEntityCodec.java
similarity index 100%
rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/AbstractEntityCodec.java
rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/AbstractEntityCodec.java
diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/ActionCodec.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/ActionCodec.java
similarity index 100%
rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/ActionCodec.java
rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/ActionCodec.java
diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/ActionProfileGroupCodec.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/ActionProfileGroupCodec.java
similarity index 100%
rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/ActionProfileGroupCodec.java
rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/ActionProfileGroupCodec.java
diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/ActionProfileMemberCodec.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/ActionProfileMemberCodec.java
similarity index 100%
rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/ActionProfileMemberCodec.java
rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/ActionProfileMemberCodec.java
diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/CloneSessionEntryCodec.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/CloneSessionEntryCodec.java
similarity index 100%
rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/CloneSessionEntryCodec.java
rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/CloneSessionEntryCodec.java
diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/CodecException.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/CodecException.java
similarity index 100%
rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/CodecException.java
rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/CodecException.java
diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/Codecs.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/Codecs.java
similarity index 100%
rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/Codecs.java
rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/Codecs.java
diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/CounterEntryCodec.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/CounterEntryCodec.java
similarity index 100%
rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/CounterEntryCodec.java
rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/CounterEntryCodec.java
diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/DirectCounterEntryCodec.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/DirectCounterEntryCodec.java
similarity index 100%
rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/DirectCounterEntryCodec.java
rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/DirectCounterEntryCodec.java
diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/DirectMeterEntryCodec.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/DirectMeterEntryCodec.java
similarity index 100%
rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/DirectMeterEntryCodec.java
rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/DirectMeterEntryCodec.java
diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/EntityCodec.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/EntityCodec.java
similarity index 100%
rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/EntityCodec.java
rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/EntityCodec.java
diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/FieldMatchCodec.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/FieldMatchCodec.java
similarity index 100%
rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/FieldMatchCodec.java
rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/FieldMatchCodec.java
diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/HandleCodec.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/HandleCodec.java
similarity index 100%
rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/HandleCodec.java
rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/HandleCodec.java
diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/MeterEntryCodec.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/MeterEntryCodec.java
similarity index 100%
rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/MeterEntryCodec.java
rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/MeterEntryCodec.java
diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/MulticastGroupEntryCodec.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/MulticastGroupEntryCodec.java
similarity index 100%
rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/MulticastGroupEntryCodec.java
rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/MulticastGroupEntryCodec.java
diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/P4DataCodec.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/P4DataCodec.java
similarity index 100%
rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/P4DataCodec.java
rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/P4DataCodec.java
diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/PacketInCodec.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/PacketInCodec.java
similarity index 100%
rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/PacketInCodec.java
rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/PacketInCodec.java
diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/PacketMetadataCodec.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/PacketMetadataCodec.java
similarity index 100%
rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/PacketMetadataCodec.java
rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/PacketMetadataCodec.java
diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/PacketOutCodec.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/PacketOutCodec.java
similarity index 100%
rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/PacketOutCodec.java
rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/PacketOutCodec.java
diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/PreReplicaCodec.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/PreReplicaCodec.java
similarity index 100%
rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/PreReplicaCodec.java
rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/PreReplicaCodec.java
diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/TableEntryCodec.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/TableEntryCodec.java
similarity index 100%
rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/TableEntryCodec.java
rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/TableEntryCodec.java
diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/Utils.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/Utils.java
similarity index 100%
rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/Utils.java
rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/Utils.java
diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/package-info.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/package-info.java
similarity index 100%
rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/package-info.java
rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/package-info.java
diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/utils/P4InfoBrowser.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/utils/P4InfoBrowser.java
similarity index 100%
rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/utils/P4InfoBrowser.java
rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/utils/P4InfoBrowser.java
diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/utils/PipeconfHelper.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/utils/PipeconfHelper.java
similarity index 100%
rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/utils/PipeconfHelper.java
rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/utils/PipeconfHelper.java
diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/utils/package-info.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/utils/package-info.java
similarity index 100%
rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/utils/package-info.java
rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/utils/package-info.java