From fd44b433ac9825be6cc654e8a566f9d0bfc70166 Mon Sep 17 00:00:00 2001 From: Piotr Jaszczyk Date: Mon, 1 Oct 2018 07:54:26 +0200 Subject: HV-VES Domain update Change domain name. In this project this yields following changes: * Comment change in VesEvent proto * Updated measurements proto (kept as documentation only, ie. not used in the collector) * Update name in test scenarios for unit and component scope Change-Id: I719077b5fcb642c067d25b7aa174a2e629404689 Issue-ID: DCAEGEN2-847 Signed-off-by: Piotr Jaszczyk --- .../org/onap/dcae/collectors/veshv/tests/utils/messages.kt | 6 +++--- .../onap/dcae/collectors/veshv/tests/utils/vesEvents.kt | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'hv-collector-test-utils/src/main/kotlin') diff --git a/hv-collector-test-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/tests/utils/messages.kt b/hv-collector-test-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/tests/utils/messages.kt index 85bdcab7..72504437 100644 --- a/hv-collector-test-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/tests/utils/messages.kt +++ b/hv-collector-test-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/tests/utils/messages.kt @@ -26,7 +26,7 @@ import io.netty.buffer.PooledByteBufAllocator import org.onap.dcae.collectors.veshv.domain.WireFrameMessage.Companion.MAX_PAYLOAD_SIZE import org.onap.dcae.collectors.veshv.domain.WireFrameMessage.Companion.RESERVED_BYTE_COUNT import org.onap.dcae.collectors.veshv.domain.VesEventDomain -import org.onap.dcae.collectors.veshv.domain.VesEventDomain.HVMEAS +import org.onap.dcae.collectors.veshv.domain.VesEventDomain.PERF3GPP import org.onap.dcae.collectors.veshv.domain.VesEventDomain.OTHER import java.util.UUID.randomUUID @@ -70,13 +70,13 @@ fun invalidWireFrame(): ByteBuf = allocator.buffer().run { writeByte(0x01) // version minor } -fun vesMessageWithTooBigPayload(domain: VesEventDomain = HVMEAS): ByteBuf = +fun vesMessageWithTooBigPayload(domain: VesEventDomain = PERF3GPP): ByteBuf = allocator.buffer().run { writeValidWireFrameHeaders() val gpb = vesEvent( domain = domain, - hvRanMeasFields = ByteString.copyFrom(ByteArray(MAX_PAYLOAD_SIZE)) + eventFields = ByteString.copyFrom(ByteArray(MAX_PAYLOAD_SIZE)) ).toByteString().asReadOnlyByteBuffer() writeInt(gpb.limit()) // ves event size in bytes diff --git a/hv-collector-test-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/tests/utils/vesEvents.kt b/hv-collector-test-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/tests/utils/vesEvents.kt index 57b960af..0cbd6505 100644 --- a/hv-collector-test-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/tests/utils/vesEvents.kt +++ b/hv-collector-test-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/tests/utils/vesEvents.kt @@ -24,25 +24,25 @@ import com.google.protobuf.ByteString import com.google.protobuf.MessageLite import org.onap.dcae.collectors.veshv.domain.ByteData import org.onap.dcae.collectors.veshv.domain.VesEventDomain -import org.onap.dcae.collectors.veshv.domain.VesEventDomain.HVMEAS +import org.onap.dcae.collectors.veshv.domain.VesEventDomain.PERF3GPP import org.onap.ves.VesEventOuterClass import org.onap.ves.VesEventOuterClass.CommonEventHeader import org.onap.ves.VesEventOuterClass.CommonEventHeader.Priority import java.util.UUID.randomUUID -fun vesEvent(domain: VesEventDomain = HVMEAS, +fun vesEvent(domain: VesEventDomain = PERF3GPP, id: String = randomUUID().toString(), - hvRanMeasFields: ByteString = ByteString.EMPTY -): VesEventOuterClass.VesEvent = vesEvent(commonHeader(domain, id), hvRanMeasFields) + eventFields: ByteString = ByteString.EMPTY +): VesEventOuterClass.VesEvent = vesEvent(commonHeader(domain, id), eventFields) fun vesEvent(commonEventHeader: CommonEventHeader, - hvRanMeasFields: ByteString = ByteString.EMPTY): VesEventOuterClass.VesEvent = + eventFields: ByteString = ByteString.EMPTY): VesEventOuterClass.VesEvent = VesEventOuterClass.VesEvent.newBuilder() .setCommonEventHeader(commonEventHeader) - .setEventFields(hvRanMeasFields) + .setEventFields(eventFields) .build() -fun commonHeader(domain: VesEventDomain = HVMEAS, +fun commonHeader(domain: VesEventDomain = PERF3GPP, id: String = randomUUID().toString(), priority: Priority = Priority.NORMAL): CommonEventHeader = CommonEventHeader.newBuilder() -- cgit 1.2.3-korg