This repository has been archived by the owner on Apr 11, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nfvInfo.xsd
192 lines (166 loc) · 6.25 KB
/
nfvInfo.xsd
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!-- Global element declaration -->
<xsd:element name="nfvInfo" type="NFVType">
<!-- Channel's host references -->
<xsd:keyref name="channelHost1Ref" refer="hostKey">
<xsd:selector xpath="network/channels/channel"/>
<xsd:field xpath="@host1"/>
</xsd:keyref>
<xsd:keyref name="channelHost2Ref" refer="hostKey">
<xsd:selector xpath="network/channels/channel"/>
<xsd:field xpath="@host2"/>
</xsd:keyref>
<!-- Node's id key -->
<xsd:key name="nodeKey">
<xsd:selector xpath="nffgs/nffg/nodes/node"/>
<xsd:field xpath="@id"/>
</xsd:key>
<!-- Link's node references -->
<xsd:keyref name="linkSourceNodeRef" refer="nodeKey">
<xsd:selector xpath="nffgs/nffg/links/link"/>
<xsd:field xpath="@sourceNode"/>
</xsd:keyref>
<xsd:keyref name="linkDestinationNodeRef" refer="nodeKey">
<xsd:selector xpath="nffgs/nffg/links/link"/>
<xsd:field xpath="@destinationNode"/>
</xsd:keyref>
<!-- Host's nodes references -->
<xsd:keyref name="hostNodeRef" refer="nodeKey">
<xsd:selector xpath="network/hosts/host/node"/>
<xsd:field xpath="@id"/>
</xsd:keyref>
<!-- Node's functionalType references -->
<xsd:keyref name="NodeFunctionalTypeRef" refer="VNFKey">
<xsd:selector xpath="nffgs/nffg/nodes/node"/>
<xsd:field xpath="@functionalType"/>
</xsd:keyref>
<!-- Node's host reference -->
<xsd:keyref name="nodeHostRef" refer="hostKey">
<xsd:selector xpath="nffgs/nffg/nodes/node"/>
<xsd:field xpath="@host"/>
</xsd:keyref>
</xsd:element>
<!-- Type definitions -->
<xsd:complexType name="NFVType">
<xsd:all>
<xsd:element name="catalog" type="CatalogType">
<!-- VNF's id key -->
<xsd:key name="VNFKey">
<xsd:selector xpath="VNF"/>
<xsd:field xpath="@id"/>
</xsd:key>
</xsd:element>
<xsd:element name="network" type="NetworkType"/>
<xsd:element name="nffgs" minOccurs="0" maxOccurs="1" type="NffgsType">
<!-- Nffg's id uniqueness -->
<xsd:unique name="uniqueNffgId">
<xsd:selector xpath="nffg"/>
<xsd:field xpath="@id"/>
</xsd:unique>
</xsd:element>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="CatalogType">
<xsd:sequence>
<xsd:element name="VNF" maxOccurs="unbounded" type="VNFType"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="VNFType">
<xsd:attribute name="id" type="xsd:token" use="required"/>
<xsd:attribute name="functionalType" type="functionalTypeType" use="required"/>
<xsd:attribute name="requiredMemory" type="xsd:int" use="required"/>
<xsd:attribute name="requiredStorage" type="xsd:int" use="required"/>
</xsd:complexType>
<xsd:simpleType name="functionalTypeType">
<xsd:restriction base="xsd:token">
<xsd:enumeration value="CACHE"/>
<xsd:enumeration value="DPI"/>
<xsd:enumeration value="FW"/>
<xsd:enumeration value="MAIL_CLIENT"/>
<xsd:enumeration value="MAIL_SERVER"/>
<xsd:enumeration value="NAT"/>
<xsd:enumeration value="SPAM"/>
<xsd:enumeration value="VPN"/>
<xsd:enumeration value="WEB_CLIENT"/>
<xsd:enumeration value="WEB_SERVER"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="NetworkType">
<xsd:all>
<xsd:element name="hosts" type="HostsType">
<!-- Host's id key -->
<xsd:key name="hostKey">
<xsd:selector xpath="host"/>
<xsd:field xpath="@id"/>
</xsd:key>
</xsd:element>
<xsd:element name="channels" minOccurs="0" maxOccurs="1" type="ChannelsType"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="HostsType">
<xsd:sequence>
<xsd:element name="host" maxOccurs="unbounded" type="HostType"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="HostType">
<xsd:sequence>
<xsd:element name="node" minOccurs="0" maxOccurs="unbounded" type="NodeRefType"/>
</xsd:sequence>
<xsd:attribute name="id" type="xsd:token" use="required"/>
<xsd:attribute name="availableMemory" type="xsd:int" default="0"/>
<xsd:attribute name="availableStorage" type="xsd:int" default="0"/>
<xsd:attribute name="maxVNFs" type="xsd:int" use="required"/>
</xsd:complexType>
<xsd:complexType name="NodeRefType">
<xsd:attribute name="id" type="xsd:token" use="required"/>
</xsd:complexType>
<xsd:complexType name="ChannelsType">
<xsd:sequence>
<xsd:element name="channel" minOccurs="1" maxOccurs="unbounded" type="ChannelType"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ChannelType">
<xsd:attribute name="host1" type="xsd:token" use="required"/>
<xsd:attribute name="host2" type="xsd:token" use="required"/>
<xsd:attribute name="averageThroughput" type="xsd:float" use="optional"/>
<xsd:attribute name="averageLatency" type="xsd:int" use="optional"/>
</xsd:complexType>
<xsd:complexType name="NffgsType">
<xsd:sequence>
<xsd:element name="nffg" minOccurs="0" maxOccurs="unbounded" type="NffgType">
<!-- Link's id key -->
<xsd:unique name="uniqueLinkId">
<xsd:selector xpath="nodes/node/link"/>
<xsd:field xpath="@id"/>
</xsd:unique>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="NffgType">
<xsd:all>
<xsd:element name="deployTime" type="xsd:dateTime"/>
<xsd:element name="nodes" type="NodesType"/>
</xsd:all>
<xsd:attribute type="xsd:token" name="id" use="required"/>
</xsd:complexType>
<xsd:complexType name="NodesType">
<xsd:sequence>
<xsd:element name="node" minOccurs="1" maxOccurs="unbounded" type="NodeType"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="NodeType">
<xsd:sequence>
<xsd:element name="link" minOccurs="0" maxOccurs="unbounded" type="LinkType"/>
</xsd:sequence>
<xsd:attribute name="id" type="xsd:token" use="required"/>
<xsd:attribute name="functionalType" type="xsd:token" use="required"/>
<xsd:attribute name="host" type="xsd:token" use="optional"/>
</xsd:complexType>
<xsd:complexType name="LinkType">
<xsd:attribute name="id" type="xsd:token" use="required"/>
<xsd:attribute name="sourceNode" type="xsd:token" use="required"/>
<xsd:attribute name="destinationNode" type="xsd:token" use="required"/>
<xsd:attribute name="minimumThroughput" type="xsd:float" use="optional"/>
<xsd:attribute name="maximumLatency" type="xsd:int" use="optional"/>
</xsd:complexType>
</xsd:schema>