aboutsummaryrefslogtreecommitdiffstats
path: root/hv-collector-test-utils
diff options
context:
space:
mode:
authorPiotr Jaszczyk <piotr.jaszczyk@nokia.com>2018-10-01 07:54:26 +0200
committerPiotr Jaszczyk <piotr.jaszczyk@nokia.com>2018-10-01 08:16:05 +0200
commitfd44b433ac9825be6cc654e8a566f9d0bfc70166 (patch)
treef720c9d891bc43ee1abbb4662a72d1b942f31d47 /hv-collector-test-utils
parent069dcc194fd049e1c52e60d03ce2a9c0553289a7 (diff)
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 <piotr.jaszczyk@nokia.com>
Diffstat (limited to 'hv-collector-test-utils')
-rw-r--r--hv-collector-test-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/tests/utils/messages.kt6
-rw-r--r--hv-collector-test-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/tests/utils/vesEvents.kt14
2 files changed, 10 insertions, 10 deletions
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()