-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnfv.go
59 lines (57 loc) · 1.63 KB
/
nfv.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package main
type NFV struct {
Graphs []Graph `xml:"graphs"`
Constraints Constraints `xml:"Constraints"`
PropertyDefintion []PropertyDefinition `xml:"PropertyDefinition>Property"`
}
type Graph struct {
Id int32 `xml:"id,attr"`
Nodes []Node `xml:"graph>node"`
}
type Node struct {
Name string `xml:"name,attr"`
FunctionalType string `xml:"functional_type,attr"`
Neighbour []Neighbour `xml:"neighbour"`
Configuration Configuration `xml:"configuration"`
}
type Neighbour struct {
Name string `xml:"name,attr"`
}
type Configuration struct {
Name string `xml:"name,attr"`
Description string `xml:"description,attr"`
WebServer WebServer `xml:"webserver"`
Firewall Firewall `xml:"firewall"`
}
type WebServer struct {
Name string `xml:"name"`
}
type Firewall struct {
Elements []Elements `xml:"elements"`
DefaultAction string `xml:"defaultAction,attr"`
}
type Elements struct {
Action string `xml:"action"`
Source string `xml:"source"`
Destination string `xml:"destination"`
Protocol string `xml:"protocol"`
SrcPort string `xml:"src_port"`
DstPort string `xml:"dst_port"`
}
type Constraints struct {
NodeConstraints NodeConstraints `xml:"NodeConstraints"`
}
type NodeConstraints struct {
NodeMetrics []NodeMetric `xml:"NodeMetrics"`
}
type NodeMetric struct {
Node string `xml:"node,attr"`
Options bool `xml:"optional"`
}
type PropertyDefinition struct {
Name string `xml:"name,attr"`
Graph string `xml:"graph,attr"`
Src string `xml:"src,attr"`
Dst string `xml:"dst,attr"`
IsSat bool `xml:"isSat,attr"`
}