improved sdnpublisher schema
This commit is contained in:
@@ -103,9 +103,14 @@ package schema
|
|||||||
...
|
...
|
||||||
}
|
}
|
||||||
SDNSubscriber: {
|
SDNSubscriber: {
|
||||||
Address: string
|
ExecutionMode?: *"IndependentThread" | "RealTimeThread"
|
||||||
Port: int
|
Topic!: string
|
||||||
Interface?: string
|
Address?: string
|
||||||
|
Interface!: string
|
||||||
|
CPUs?: uint32
|
||||||
|
InternalTimeout?: uint32
|
||||||
|
Timeout?: uint32
|
||||||
|
IgnoreTimeoutError?: 0 | 1
|
||||||
#meta: multithreaded: bool | *false
|
#meta: multithreaded: bool | *false
|
||||||
#meta: direction: "IN"
|
#meta: direction: "IN"
|
||||||
...
|
...
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ func TestSDNSubscriberValidation(t *testing.T) {
|
|||||||
+MySDN = {
|
+MySDN = {
|
||||||
Class = SDNSubscriber
|
Class = SDNSubscriber
|
||||||
Address = "239.0.0.1"
|
Address = "239.0.0.1"
|
||||||
// Missing Port
|
// Missing Interface
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
p := parser.NewParser(content)
|
p := parser.NewParser(content)
|
||||||
@@ -32,7 +32,7 @@ func TestSDNSubscriberValidation(t *testing.T) {
|
|||||||
|
|
||||||
found := false
|
found := false
|
||||||
for _, d := range v.Diagnostics {
|
for _, d := range v.Diagnostics {
|
||||||
if strings.Contains(d.Message, "Port: incomplete value") {
|
if strings.Contains(d.Message, "Interface: field is required but not present") {
|
||||||
found = true
|
found = true
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user