This repository has been archived by the owner on Oct 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 36
/
x-iosxe-definitions-schema.xsd
1813 lines (1804 loc) · 136 KB
/
x-iosxe-definitions-schema.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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5" xmlns:oval-def="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:x-iosxe-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#iosxe" xmlns:sch="http://purl.oclc.org/dsdl/schematron" targetNamespace="http://oval.mitre.org/XMLSchema/oval-definitions-5#iosxe" elementFormDefault="qualified" version="5.11">
<xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-common-5" schemaLocation="oval-common-schema.xsd"/>
<xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-definitions-5" schemaLocation="oval-definitions-schema.xsd"/>
<xsd:annotation>
<xsd:documentation>The following is a description of the elements, types, and attributes that compose the IOS-XE specific tests found in Open Vulnerability and Assessment Language (OVAL). Each test is an extension of the standard test element defined in the Core Definition Schema. Through extension, each test inherits a set of elements and attributes that are shared amongst all OVAL tests. Each test is described in detail and should provide the information necessary to understand what each element and attribute represents. This document is intended for developers and assumes some familiarity with XML. A high level description of the interaction between the different tests and their relationship to the Core Definition Schema is not outlined here.</xsd:documentation>
<xsd:documentation>The OVAL Schema is maintained by The MITRE Corporation and developed by the public OVAL Community. For more information, including how to get involved in the project and how to submit change requests, please visit the OVAL website at http://oval.mitre.org.</xsd:documentation>
<xsd:documentation>Thanks to Omar Santos and Panos Kampanakis of Cisco for providing this test.</xsd:documentation>
<xsd:appinfo>
<schema>IOS-XE Definition Experimental Schema</schema>
<version>5.11</version>
<date>12/10/2012 12:00 PM</date>
<terms_of_use>Copyright (c) 2002-2012, The MITRE Corporation. All rights reserved. The contents of this file are subject to the terms of the OVAL License located at http://oval.mitre.org/oval/about/termsofuse.html. See the OVAL License for the specific language governing permissions and limitations for use of this schema. When distributing copies of the OVAL Schema, this license header must be included.</terms_of_use>
<sch:ns prefix="oval-def" uri="http://oval.mitre.org/XMLSchema/oval-definitions-5"/>
<sch:ns prefix="x-iosxe-def" uri="http://oval.mitre.org/XMLSchema/oval-definitions-5#iosxe"/>
<sch:ns prefix="xsi" uri="http://www.w3.org/2001/XMLSchema-instance"/>
</xsd:appinfo>
</xsd:annotation>
<!-- =============================================================================== -->
<!-- ============================= GLOBAL TEST =================================== -->
<!-- =============================================================================== -->
<xsd:element name="global_test" substitutionGroup="oval-def:test">
<xsd:annotation>
<xsd:documentation>The global test is used to check for the existence of a particular line in the IOS-XE config file under the global context. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a global_object and the optional state element specifies the data to check.</xsd:documentation>
<xsd:appinfo>
<oval:element_mapping>
<oval:test>global_test</oval:test>
<oval:object>global_object</oval:object>
<oval:state>global_state</oval:state>
<oval:item target_namespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#iosxe">global_item</oval:item>
</oval:element_mapping>
</xsd:appinfo>
<xsd:appinfo>
<sch:pattern id="x-iosxe-def_globaltst">
<sch:rule context="x-iosxe-def:global_test/x-iosxe-def:object">
<sch:assert test="@object_ref=ancestor::oval-def:oval_definitions/oval-def:objects/x-iosxe-def:global_object/@id"><sch:value-of select="../@id"/> - the object child element of a global_test must reference a global_object</sch:assert>
</sch:rule>
<sch:rule context="x-iosxe-def:global_test/x-iosxe-def:state">
<sch:assert test="@state_ref=ancestor::oval-def:oval_definitions/oval-def:states/x-iosxe-def:global_state/@id"><sch:value-of select="../@id"/> - the state child element of a global_test must reference a global_state</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:TestType">
<xsd:sequence>
<xsd:element name="object" type="oval-def:ObjectRefType" />
<xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="global_object" substitutionGroup="oval-def:object">
<xsd:annotation>
<xsd:documentation>The global_object element is used by a global test to define the object to be evaluated. For the most part this object checks for existence and is used without a state comparision. Each object extends the standard ObjectType as defined in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
<xsd:appinfo>
<sch:pattern id="x-iosxe-def_global_object_verify_filter_state">
<sch:rule context="x-iosxe-def:global_object//oval-def:filter">
<sch:let name="parent_object" value="ancestor::x-iosxe-def:global_object"/>
<sch:let name="parent_object_id" value="$parent_object/@id"/>
<sch:let name="state_ref" value="."/>
<sch:let name="reffed_state" value="ancestor::oval-def:oval_definitions/oval-def:states/*[@id=$state_ref]"/>
<sch:let name="state_name" value="local-name($reffed_state)"/>
<sch:let name="state_namespace" value="namespace-uri($reffed_state)"/>
<sch:assert test="(($state_namespace='http://oval.mitre.org/XMLSchema/oval-definitions-5#iosxe') and ($state_name='global_state'))">State referenced in filter for <sch:value-of select="name($parent_object)"/> '<sch:value-of select="$parent_object_id"/>' is of the wrong type. </sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:ObjectType">
<xsd:sequence>
<xsd:choice>
<xsd:element ref="oval-def:set"/>
<xsd:sequence>
<xsd:element name="global_command" type="oval-def:EntityObjectStringType">
<xsd:annotation>
<xsd:documentation>The global_command entity identifies a specific line in the IOS-XE config file under the global context.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element ref="oval-def:filter" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:choice>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="global_state" substitutionGroup="oval-def:state">
<xsd:annotation>
<xsd:documentation>The global_state element defines the different information that can be found in the IOS-XE config file under the global context. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:StateType">
<xsd:sequence>
<xsd:element name="global_command" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The global_command entity identifies a specific line in the IOS-XE config file under the global context.</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<!-- =============================================================================== -->
<!-- ================================= LINE TEST ================================= -->
<!-- =============================================================================== -->
<xsd:element name="line_test" substitutionGroup="oval-def:test">
<xsd:annotation>
<xsd:documentation>The line test is used to check the properties of specific output lines from a SHOW command, such as 'show running-config'. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a line_object and the optional state element specifies the data to check.</xsd:documentation>
<xsd:appinfo>
<oval:element_mapping>
<oval:test>line_test</oval:test>
<oval:object>line_object</oval:object>
<oval:state>line_state</oval:state>
<oval:item target_namespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#iosxe">line_item</oval:item>
</oval:element_mapping>
</xsd:appinfo>
<xsd:appinfo>
<sch:pattern id="x-iosxe-def_linetst">
<sch:rule context="x-iosxe-def:line_test/x-iosxe-def:object">
<sch:assert test="@object_ref=ancestor::oval-def:oval_definitions/oval-def:objects/x-iosxe-def:line_object/@id"><sch:value-of select="../@id"/> - the object child element of a line_test must reference a line_object</sch:assert>
</sch:rule>
<sch:rule context="x-iosxe-def:line_test/x-iosxe-def:state">
<sch:assert test="@state_ref=ancestor::oval-def:oval_definitions/oval-def:states/x-iosxe-def:line_state/@id"><sch:value-of select="../@id"/> - the state child element of a line_test must reference a line_state</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:TestType">
<xsd:sequence>
<xsd:element name="object" type="oval-def:ObjectRefType" />
<xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="line_object" substitutionGroup="oval-def:object">
<xsd:annotation>
<xsd:documentation>The line_object element is used by a line test to define the object to be evaluated. Each object extends the standard ObjectType as defined in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
<xsd:documentation>A line object consists of a show_subcommand entity that is the name of a SHOW sub-command to be tested. The whole show command should be used. For example, 'show running-config'.</xsd:documentation>
<xsd:appinfo>
<sch:pattern id="x-iosxe-def_line_object_verify_filter_state">
<sch:rule context="x-iosxe-def:line_object//oval-def:filter">
<sch:let name="parent_object" value="ancestor::x-iosxe-def:line_object"/>
<sch:let name="parent_object_id" value="$parent_object/@id"/>
<sch:let name="state_ref" value="."/>
<sch:let name="reffed_state" value="ancestor::oval-def:oval_definitions/oval-def:states/*[@id=$state_ref]"/>
<sch:let name="state_name" value="local-name($reffed_state)"/>
<sch:let name="state_namespace" value="namespace-uri($reffed_state)"/>
<sch:assert test="(($state_namespace='http://oval.mitre.org/XMLSchema/oval-definitions-5#iosxe') and ($state_name='line_state'))">State referenced in filter for <sch:value-of select="name($parent_object)"/> '<sch:value-of select="$parent_object_id"/>' is of the wrong type. </sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:ObjectType">
<xsd:sequence>
<xsd:choice>
<xsd:element ref="oval-def:set"/>
<xsd:sequence>
<xsd:element name="show_subcommand" type="oval-def:EntityObjectStringType">
<xsd:annotation>
<xsd:documentation>The name of the SHOW sub-command. The whole show command should be used. For example, 'show running-config'. This element is optional. The line_object usually defines the show sub-command whose output is matched against a line_state.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element ref="oval-def:filter" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:choice>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="line_state" substitutionGroup="oval-def:state">
<xsd:annotation>
<xsd:documentation>The line_state element defines the different information that can be used to evaluate the result of a specific SHOW sub-command. This includes the whole name of the command and the corresponding config line. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:StateType">
<xsd:sequence>
<xsd:element name="show_subcommand" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The name of the SHOW sub-command. The whole show command should be used. For example, 'show running-config'. This element is optional. When used in a line_test the line_object usually defines the show sub-command and the line_state tests against the 'config-line' matched in the show output.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="config_line" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The value returned from by the specified SHOW sub-command.</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<!-- =============================================================================== -->
<!-- ============================== VERSION TEST ================================= -->
<!-- =============================================================================== -->
<xsd:element name="version_test" substitutionGroup="oval-def:test">
<xsd:annotation>
<xsd:documentation>The version_test is used to check the version of the IOS-XE operating system. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a version_object and the optional state element specifies the data to check.</xsd:documentation>
<xsd:appinfo>
<oval:element_mapping>
<oval:test>version_test</oval:test>
<oval:object>version_object</oval:object>
<oval:state>version_state</oval:state>
<oval:item target_namespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#iosxe">version_item</oval:item>
</oval:element_mapping>
</xsd:appinfo>
<xsd:appinfo>
<sch:pattern id="x-iosxe-def_versiontst">
<sch:rule context="x-iosxe-def:version_test/x-iosxe-def:object">
<sch:assert test="@object_ref=ancestor::oval-def:oval_definitions/oval-def:objects/x-iosxe-def:version_object/@id"><sch:value-of select="../@id"/> - the object child element of a version_test must reference a version_object</sch:assert>
</sch:rule>
<sch:rule context="x-iosxe-def:version_test/x-iosxe-def:state">
<sch:assert test="@state_ref=ancestor::oval-def:oval_definitions/oval-def:states/x-iosxe-def:version_state/@id"><sch:value-of select="../@id"/> - the state child element of a version_test must reference a version_state</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:TestType">
<xsd:sequence>
<xsd:element name="object" type="oval-def:ObjectRefType" />
<xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="version_object" substitutionGroup="oval-def:object">
<xsd:annotation>
<xsd:documentation>The version_object element is used by a version_test to define the different version information associated with an IOS-XE system. There is actually only one object relating to version and this is the system as a whole. Therefore, there are no child entities defined. Any OVAL Test written to check version will reference the same version_object which is basically an empty object element.</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:ObjectType"/>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="version_state" substitutionGroup="oval-def:state">
<xsd:annotation>
<xsd:documentation>The version_state element defines the version information held within a Cisco IOS-XE Train. A Cisco IOS-XE train is a vehicle for delivering releases that evolve from a common code base.</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:StateType">
<xsd:sequence>
<xsd:element name="platform" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The platform that is running the IOS-XE software. For example if could be asr1000. </xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="rp" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The routing processor running the IOS-XE software.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="pkg" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The consolidated IOS-XE packages in the image. For example it could be adventservicesk9.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="major_release" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The major version piece of the version string. The value is an integer and in the example ASR1000rp1-ipbasek9.03.04.02.122-33.SR.bin the major_release is '03'.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="release" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The release piece of the version string. The value is an integer and in the example ASR1000rp1-ipbasek9.03.04.02.122-33.SR.bin the release version is '04'</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="rebuild" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The release piece of the version string. The value is an integer and in the example ASR1000rp1-ipbasek9.03.04.02.122-33.SR.bin the rebuild is '02'</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="ios_release" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The IOS release the IOS-XE was derived from. The value is an string and in the example ASR1000rp1-ipbasek9.03.04.02.122-33.SR.bin the ios_release version is '122-33'</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="ios_train" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The IOS release the IOS-XE was derived from. The value is an integer and in the example ASR1000rp1-ipbasek9.03.04.02.122-33.SR.bin the ios_release version is 'SR'</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<!-- =============================================================================== -->
<!-- ============================ INTERFACE TEST ================================= -->
<!-- =============================================================================== -->
<xsd:element name="interface_test" substitutionGroup="oval-def:test">
<xsd:annotation>
<xsd:documentation/>
<xsd:appinfo>
<oval:element_mapping>
<oval:test>interface_test</oval:test>
<oval:object>interface_object</oval:object>
<oval:state>interface_state</oval:state>
<oval:item target_namespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#ios">interface_item</oval:item>
</oval:element_mapping>
</xsd:appinfo>
<xsd:appinfo>
<sch:pattern id="x-iosxe-def_interfacetst">
<sch:rule context="x-iosxe-def:interface_test/ios-def:object">
<sch:assert test="@object_ref=ancestor::oval-def:oval_definitions/oval-def:objects/ios-def:interface_object/@id"><sch:value-of select="../@id"/> - the object child element of an interface_test must reference an interface_object</sch:assert>
</sch:rule>
<sch:rule context="x-iosxe-def:interface_test/ios-def:state">
<sch:assert test="@state_ref=ancestor::oval-def:oval_definitions/oval-def:states/ios-def:interface_state/@id"><sch:value-of select="../@id"/> - the state child element of an interface_test must reference an interface_state</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:TestType">
<xsd:sequence>
<xsd:element name="object" type="oval-def:ObjectRefType" />
<xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="interface_object" substitutionGroup="oval-def:object">
<xsd:annotation>
<xsd:documentation/>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:ObjectType">
<xsd:sequence>
<xsd:choice>
<xsd:element ref="oval-def:set"/>
<xsd:sequence>
<xsd:element name="name" type="oval-def:EntityObjectStringType">
<xsd:annotation>
<xsd:documentation>The interface name.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element ref="oval-def:filter" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:choice>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="interface_state" substitutionGroup="oval-def:state">
<xsd:annotation>
<xsd:documentation/>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:StateType">
<xsd:sequence>
<xsd:element name="name" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The interface name.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="ip_directed_broadcast" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Directed broadcast command enabled on the interface. The default is false.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="proxy_arp" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Proxy arp enabled on the interface. The default is true.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="shutdown" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Interface is shut down.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="hardware_addr" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The interface hardware (MAC) address.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="ipv4_address" type="oval-def:EntityStateIPAddressStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The interface IPv4 address and mask. This element should only allow 'ipv4_address' of the oval:SimpleDatatypeEnumeration.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="ipv6_address" type="oval-def:EntityStateIPAddressStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The interface IPv6 address and mask. This element should only allow 'ipv6_address' of the oval:SimpleDatatypeEnumeration.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="ipv4_access_list" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The ingress or egress IPv4 ACL name applied on the interface.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="ipv6_access_list" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The ingress or egress IPv6 ACL name applied on the interface.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="crypto_map" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The crypto map name applied to the interface.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="urpf_command" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The uRPF command under the interface.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="switchport_trunk_encapsulation" type="x-iosxe-def:EntityStateTrunkEncapType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The switchport trunk encapsulation option configured on the interface (if applicable).</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="switchport_mode" type="x-iosxe-def:EntityStateSwitchportModeType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The switchport mode option configured on the interface (if applicable).</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="switchport_native_vlan" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The trunk native vlan configured on the interface (if applicable).</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="switchport_access_vlan" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The access vlan configured on the interface (if applicable).</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="switchport_trunked_vlans" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The vlans that are trunked configured on the interface (if applicable).</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="switchport_pruned_vlans" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The vlans that are pruned from the trunk (if applicable).</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="switchport_port_security" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The switchport port-security commands configured on the interface (if applicable).</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<!-- =============================================================================== -->
<!-- =============================== SECTION TEST ================================ -->
<!-- =============================================================================== -->
<xsd:element name="section_test" substitutionGroup="oval-def:test">
<xsd:annotation>
<xsd:documentation>The section test is used to check the properties of specific output lines from a configuration section.</xsd:documentation>
<xsd:appinfo>
<oval:element_mapping>
<oval:test>section_test</oval:test>
<oval:object>section_object</oval:object>
<oval:state>section_state</oval:state>
<oval:item target_namespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#x-iosxe-def">section_item</oval:item>
</oval:element_mapping>
</xsd:appinfo>
<xsd:appinfo>
<sch:pattern id="x-iosxe-def_sectiontst">
<sch:rule context="x-iosxe-def:section_test/x-iosxe-def:object">
<sch:assert test="@object_ref=ancestor::oval-def:oval_definitions/oval-def:objects/x-iosxe-def:section_object/@id"><sch:value-of select="../@id"/> - the object child element of a section_test must reference a section_object</sch:assert>
</sch:rule>
<sch:rule context="x-iosxe-def:section_test/x-iosxe-def:state">
<sch:assert test="@state_ref=ancestor::oval-def:oval_definitions/oval-def:states/x-iosxe-def:section_state/@id"><sch:value-of select="../@id"/> - the state child element of a section_test must reference a section_state</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:TestType">
<xsd:sequence>
<xsd:element name="object" type="oval-def:ObjectRefType"/>
<xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="section_object" substitutionGroup="oval-def:object">
<xsd:annotation>
<xsd:documentation>The section_object element is used by a section test to define the object to be evaluated. Each object extends the standard ObjectType as defined in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
<xsd:documentation>A section object consists of a section_command entity that is the name of a section command to be tested.</xsd:documentation>
<xsd:appinfo>
<sch:pattern id="x-iosxe-def_section_object_verify_filter_state">
<sch:rule context="x-iosxe-def:section_object//oval-def:filter">
<sch:let name="parent_object" value="ancestor::x-iosxe-def:section_object"/>
<sch:let name="parent_object_id" value="$parent_object/@id"/>
<sch:let name="state_ref" value="."/>
<sch:let name="reffed_state" value="ancestor::oval-def:oval_definitions/oval-def:states/*[@id=$state_ref]"/>
<sch:let name="state_name" value="local-name($reffed_state)"/>
<sch:let name="state_namespace" value="namespace-uri($reffed_state)"/>
<sch:assert test="(($state_namespace='http://oval.mitre.org/XMLSchema/oval-definitions-5#x-iosxe-def') and ($state_name='section_state'))">State referenced in filter for <sch:value-of select="name($parent_object)"/> '<sch:value-of select="$parent_object_id"/>' is of the wrong type.</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:ObjectType">
<xsd:sequence>
<xsd:choice>
<xsd:element ref="oval-def:set"/>
<xsd:sequence>
<xsd:element name="section_command" type="oval-def:EntityObjectStringType">
<xsd:annotation>
<xsd:documentation>The name of a section command.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element ref="oval-def:filter" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:choice>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="section_state" substitutionGroup="oval-def:state">
<xsd:annotation>
<xsd:documentation>The section_state element defines the different information that can be used to evaluate the result of a specific section command. This includes the name of ths section_command and the corresponding config lines. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:StateType">
<xsd:sequence>
<xsd:element name="section_command" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The name of the section command.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="section_config_lines" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The value returned with all config lines of the section.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="config_line" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The value returned with one config line of the section at a time.</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<!-- =============================================================================== -->
<!-- ========================= ROUTER TEST/OBJECT/STATE =========================== -->
<!-- =============================================================================== -->
<xsd:element name="router_test" substitutionGroup="oval-def:test">
<xsd:annotation>
<xsd:documentation>The router test is used to check the properties of specific output lines from a router configurated instance in IOS.</xsd:documentation>
<xsd:appinfo>
<oval:element_mapping>
<oval:test>router_test</oval:test>
<oval:object>router_object</oval:object>
<oval:state>router_state</oval:state>
<oval:item target_namespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#x-iosxe-def">router_item</oval:item>
</oval:element_mapping>
</xsd:appinfo>
<xsd:appinfo>
<sch:pattern id="x-iosxe-def_routertst">
<sch:rule context="x-iosxe-def:router_test/x-iosxe-def:object">
<sch:assert test="@object_ref=ancestor::oval-def:oval_definitions/oval-def:objects/x-iosxe-def:router_object/@id"><sch:value-of select="../@id"/> - the object child element of a router_test must reference a router_object</sch:assert>
</sch:rule>
<sch:rule context="x-iosxe-def:router_test/x-iosxe-def:state">
<sch:assert test="@state_ref=ancestor::oval-def:oval_definitions/oval-def:states/x-iosxe-def:router_state/@id"><sch:value-of select="../@id"/> - the state child element of a router_test must reference a router_state</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:TestType">
<xsd:sequence>
<xsd:element name="object" type="oval-def:ObjectRefType"/>
<xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="router_object" substitutionGroup="oval-def:object">
<xsd:annotation>
<xsd:documentation>The router_object element is used by a router test to define the object to be evaluated. Each object extends the standard ObjectType as defined in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
<xsd:documentation>A router object consists of a router protocol and router identifier entity.</xsd:documentation>
<xsd:appinfo>
<sch:pattern id="x-iosxe-def_router_object_verify_filter_state">
<sch:rule context="x-iosxe-def:router_object//oval-def:filter">
<sch:let name="parent_object" value="ancestor::x-iosxe-def:router_object"/>
<sch:let name="parent_object_id" value="$parent_object/@id"/>
<sch:let name="state_ref" value="."/>
<sch:let name="reffed_state" value="ancestor::oval-def:oval_definitions/oval-def:states/*[@id=$state_ref]"/>
<sch:let name="state_name" value="local-name($reffed_state)"/>
<sch:let name="state_namespace" value="namespace-uri($reffed_state)"/>
<sch:assert test="(($state_namespace='http://oval.mitre.org/XMLSchema/oval-definitions-5#x-iosxe-def') and ($state_name='router_state'))">State referenced in filter for <sch:value-of select="name($parent_object)"/> '<sch:value-of select="$parent_object_id"/>' is of the wrong type.</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:ObjectType">
<xsd:sequence>
<xsd:choice>
<xsd:element ref="oval-def:set"/>
<xsd:sequence>
<xsd:element name="protocol" type="x-iosxe-def:EntityObjectRoutingProtocolType">
<xsd:annotation>
<xsd:documentation>The routing protocol of the router instance.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="id" type="oval-def:EntityObjectIntType">
<xsd:annotation>
<xsd:documentation>The IOS-XE router id.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element ref="oval-def:filter" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:choice>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="router_state" substitutionGroup="oval-def:state">
<xsd:annotation>
<xsd:documentation>The router_state element defines the different information that can be used to evaluate the result of a specific router command. This includes the protocol of the router instance, the id, the networks, bgp neighbor, ospf authentication area commands and the corresponding config lines. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:StateType">
<xsd:sequence>
<xsd:element name="protocol" type="x-iosxe-def:EntityStateRoutingProtocolType">
<xsd:annotation>
<xsd:documentation>The routing protocol of the router instance. If there are more than one router configurations, for example ospf instances, different objects should be created for each.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="id" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The IOS-XE router id</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="network" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The subnet in the network command of the router instance. The area can be included in the string for OSPF.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="bgp_neighbor" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The BGP neighbors, if applicable.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="ospf_authentication_area" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The OSPF area that is authenticated, if applicable.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="router_config_lines" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The value returned with all config lines of the router instance.</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<!-- =============================================================================== -->
<!-- ===================== END OF ROUTER TEST/OBJECT/STATE ======================== -->
<!-- =============================================================================== -->
<!-- =============================================================================== -->
<!-- ===================== BGP NEIGHBOR TEST/OBJECT/STATE ========================= -->
<!-- =============================================================================== -->
<xsd:element name="bgp_neighbor_test" substitutionGroup="oval-def:test">
<xsd:annotation>
<xsd:documentation>The bgp_neighbor test is used to check the bgp neighbpr properties of bgp instances instances in IOS.</xsd:documentation>
<xsd:appinfo>
<oval:element_mapping>
<oval:test>bgp_neighbor_test</oval:test>
<oval:object>bgp_neighbor_object</oval:object>
<oval:state>bgp_neighbor_state</oval:state>
<oval:item target_namespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#x-iosxe-def">bgp_neighbor_item</oval:item>
</oval:element_mapping>
</xsd:appinfo>
<xsd:appinfo>
<sch:pattern id="x-iosxe-def_bgp_neighbortst">
<sch:rule context="x-iosxe-def:bgp_neighbor_test/x-iosxe-def:object">
<sch:assert test="@object_ref=ancestor::oval-def:oval_definitions/oval-def:objects/x-iosxe-def:bgp_neighbor_object/@id"><sch:value-of select="../@id"/> - the object child element of a bgp_neighbor_test must reference a bgp_neighbor_object</sch:assert>
</sch:rule>
<sch:rule context="x-iosxe-def:bgp_neighbor_test/x-iosxe-def:state">
<sch:assert test="@state_ref=ancestor::oval-def:oval_definitions/oval-def:states/x-iosxe-def:bgp_neighbor_state/@id"><sch:value-of select="../@id"/> - the state child element of a bgp_neighbor_test must reference a bgp_neighbor_state</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:TestType">
<xsd:sequence>
<xsd:element name="object" type="oval-def:ObjectRefType"/>
<xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="bgp_neighbor_object" substitutionGroup="oval-def:object">
<xsd:annotation>
<xsd:documentation>The bgp_neighbor_object element is used by a bgp_neighbor test to define the object to be evaluated. Each object extends the standard ObjectType as defined in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
<xsd:documentation>A bgp_neighbor object consists of a neighbor entity.</xsd:documentation>
<xsd:appinfo>
<sch:pattern id="x-iosxe-def_bgp_neighbor_object_verify_filter_state">
<sch:rule context="x-iosxe-def:bgp_neighbor_object//oval-def:filter">
<sch:let name="parent_object" value="ancestor::x-iosxe-def:bgp_neighbor_object"/>
<sch:let name="parent_object_id" value="$parent_object/@id"/>
<sch:let name="state_ref" value="."/>
<sch:let name="reffed_state" value="ancestor::oval-def:oval_definitions/oval-def:states/*[@id=$state_ref]"/>
<sch:let name="state_name" value="local-name($reffed_state)"/>
<sch:let name="state_namespace" value="namespace-uri($reffed_state)"/>
<sch:assert test="(($state_namespace='http://oval.mitre.org/XMLSchema/oval-definitions-5#x-iosxe-def') and ($state_name='bgp_neighbor_state'))">State referenced in filter for <sch:value-of select="name($parent_object)"/> '<sch:value-of select="$parent_object_id"/>' is of the wrong type.</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:ObjectType">
<xsd:sequence>
<xsd:choice>
<xsd:element ref="oval-def:set"/>
<xsd:sequence>
<xsd:element name="neighbor" type="oval-def:EntityObjectStringType">
<xsd:annotation>
<xsd:documentation>The bgp neighbor.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element ref="oval-def:filter" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:choice>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="bgp_neighbor_state" substitutionGroup="oval-def:state">
<xsd:annotation>
<xsd:documentation>The bgp_neighbor_state element defines the different information that can be used to evaluate the result of a bgp neighbor configuration. This includes the neighbor and the password option, if configured. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:StateType">
<xsd:sequence>
<xsd:element name="neighbor" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The bgp neighbor.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="password" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The bgp authentication password, if configured. If Encryption type is configured it should be included in the password string. For example '0 cisco123'. </xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<!-- =============================================================================== -->
<!-- ==================== END OF BGP NEIGHBOR TEST/OBJECT/STATE =================== -->
<!-- =============================================================================== -->
<!-- =============================================================================== -->
<!-- ========= ROUTING PROTOCOL AUTHENTICATION INTERFACE TEST/OBJECT/STATE ======== -->
<!-- =============================================================================== -->
<xsd:element name="routing_protocol_auth_intf_test" substitutionGroup="oval-def:test">
<xsd:annotation>
<xsd:documentation>The routing protocol authentication interface test is used to check the properties of routing protocol authentication configured under interfaces in IOS.</xsd:documentation>
<xsd:appinfo>
<oval:element_mapping>
<oval:test>routing_protocol_auth_intf_test</oval:test>
<oval:object>routing_protocol_auth_intf_object</oval:object>
<oval:state>routing_protocol_auth_intf_state</oval:state>
<oval:item target_namespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#x-iosxe-def">routing_protocol_auth_intf_item</oval:item>
</oval:element_mapping>
</xsd:appinfo>
<xsd:appinfo>
<sch:pattern id="x-iosxe-def_routing_protocol_auth_intftst">
<sch:rule context="x-iosxe-def:routing_protocol_auth_intf_test/x-iosxe-def:object">
<sch:assert test="@object_ref=ancestor::oval-def:oval_definitions/oval-def:objects/x-iosxe-def:routing_protocol_auth_intf_object/@id"><sch:value-of select="../@id"/> - the object child element of a routing_protocol_auth_intf_test must reference a routing_protocol_auth_intf_object</sch:assert>
</sch:rule>
<sch:rule context="x-iosxe-def:routing_protocol_auth_intf_test/x-iosxe-def:state">
<sch:assert test="@state_ref=ancestor::oval-def:oval_definitions/oval-def:states/x-iosxe-def:routing_protocol_auth_intf_state/@id"><sch:value-of select="../@id"/> - the state child element of a routing_protocol_auth_intf_test must reference a routing_protocol_auth_intf_state</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:TestType">
<xsd:sequence>
<xsd:element name="object" type="oval-def:ObjectRefType"/>
<xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="routing_protocol_auth_intf_object" substitutionGroup="oval-def:object">
<xsd:annotation>
<xsd:documentation>The routing_protocol_auth_intf_object element is used by a routing_protocol_auth_intf test to define the object to be evaluated. Each object extends the standard ObjectType as defined in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
<xsd:documentation>A routing_protocol_auth_intf object consists of an interface and the routing protocol that is authenticated entity.</xsd:documentation>
<xsd:appinfo>
<sch:pattern id="x-iosxe-def_routing_protocol_auth_intf_object_verify_filter_state">
<sch:rule context="x-iosxe-def:routing_protocol_auth_intf_object//oval-def:filter">
<sch:let name="parent_object" value="ancestor::x-iosxe-def:routing_protocol_auth_intf_object"/>
<sch:let name="parent_object_id" value="$parent_object/@id"/>
<sch:let name="state_ref" value="."/>
<sch:let name="reffed_state" value="ancestor::oval-def:oval_definitions/oval-def:states/*[@id=$state_ref]"/>
<sch:let name="state_name" value="local-name($reffed_state)"/>
<sch:let name="state_namespace" value="namespace-uri($reffed_state)"/>
<sch:assert test="(($state_namespace='http://oval.mitre.org/XMLSchema/oval-definitions-5#x-iosxe-def') and ($state_name='routing_protocol_auth_intf_state'))">State referenced in filter for <sch:value-of select="name($parent_object)"/> '<sch:value-of select="$parent_object_id"/>' is of the wrong type.</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:ObjectType">
<xsd:sequence>
<xsd:choice>
<xsd:element ref="oval-def:set"/>
<xsd:sequence>
<xsd:element name="interface" type="oval-def:EntityObjectStringType">
<xsd:annotation>
<xsd:documentation>The interface name.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="protocol" type="x-iosxe-def:EntityObjectRoutingProtocolType">
<xsd:annotation>
<xsd:documentation>The routing protocol.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element ref="oval-def:filter" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:choice>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="routing_protocol_auth_intf_state" substitutionGroup="oval-def:state">
<xsd:annotation>
<xsd:documentation>The routing_protocol_auth_intf_state element defines the different information that can be used to evaluate the result of a specific routing protocol interface authentication configurations. This includes the interface, the protocol, the id, the authentication type, the ospf area, the key chain command and the corresponding config lines. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:StateType">
<xsd:sequence>
<xsd:element name="interface" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The interface name.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="protocol" type="x-iosxe-def:EntityStateRoutingProtocolType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The routing protocol.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="id" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The routing protocol id, if applicable.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="auth_type" type="x-iosxe-def:EntityStateRoutingAuthTypeStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The routing protocol authentication type.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="ospf_area" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The OSPF area that is authenticated, if applicable.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="key_chain" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The name of the key chain, if applicable.</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<!-- =============================================================================== -->
<!-- ===== END OF ROUTING PROTOCOL AUTHENTICATION INTERFACE TEST/OBJECT/STATE ===== -->
<!-- =============================================================================== -->
<!-- =============================================================================== -->
<!-- ================================ IOS-XE ACL TEST ============================= -->
<!-- =============================================================================== -->
<xsd:element name="acl_test" substitutionGroup="oval-def:test">
<xsd:annotation>
<xsd:documentation>The acl test is used to check the properties of specific output lines from an ACL configuration.</xsd:documentation>
<xsd:appinfo>
<oval:element_mapping>
<oval:test>acl_test</oval:test>
<oval:object>acl_object</oval:object>
<oval:state>acl_state</oval:state>
<oval:item target_namespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#x-iosxe-def">acl_item</oval:item>
</oval:element_mapping>
</xsd:appinfo>
<xsd:appinfo>
<sch:pattern id="x-iosxe-def_acltst">
<sch:rule context="x-iosxe-def:acl_test/x-iosxe-def:object">
<sch:assert test="@object_ref=ancestor::oval-def:oval_definitions/oval-def:objects/x-iosxe-def:acl_object/@id"><sch:value-of select="../@id"/> - the object child element of a acl_test must reference a acl_object</sch:assert>
</sch:rule>
<sch:rule context="x-iosxe-def:acl_test/x-iosxe-def:state">
<sch:assert test="@state_ref=ancestor::oval-def:oval_definitions/oval-def:states/x-iosxe-def:acl_state/@id"><sch:value-of select="../@id"/> - the state child element of a acl_test must reference a acl_state</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:TestType">
<xsd:sequence>
<xsd:element name="object" type="oval-def:ObjectRefType"/>
<xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="acl_object" substitutionGroup="oval-def:object">
<xsd:annotation>
<xsd:documentation>The acl_object element is used by an acl test to define the object to be evaluated. Each object extends the standard ObjectType as defined in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
<xsd:documentation>An acl object consists of a an acl name and an IP version entity that is the name and the IP protocol version of the access-list to be tested.</xsd:documentation>
<xsd:appinfo>
<sch:pattern id="x-iosxe-def_acl_object_verify_filter_state">
<sch:rule context="x-iosxe-def:acl_object//oval-def:filter">
<sch:let name="parent_object" value="ancestor::x-iosxe-def:acl_object"/>
<sch:let name="parent_object_id" value="$parent_object/@id"/>
<sch:let name="state_ref" value="."/>
<sch:let name="reffed_state" value="ancestor::oval-def:oval_definitions/oval-def:states/*[@id=$state_ref]"/>
<sch:let name="state_name" value="local-name($reffed_state)"/>
<sch:let name="state_namespace" value="namespace-uri($reffed_state)"/>
<sch:assert test="(($state_namespace='http://oval.mitre.org/XMLSchema/oval-definitions-5#x-iosxe-def') and ($state_name='acl_state'))">State referenced in filter for <sch:value-of select="name($parent_object)"/> '<sch:value-of select="$parent_object_id"/>' is of the wrong type.</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:ObjectType">
<xsd:sequence>
<xsd:choice>
<xsd:element ref="oval-def:set"/>
<xsd:sequence>
<xsd:element name="name" type="oval-def:EntityObjectStringType">
<xsd:annotation>
<xsd:documentation>The name of the ACL.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="ip_version" type="x-iosxe-def:EntityObjectAccessListIPVersionType">
<xsd:annotation>
<xsd:documentation>The IP version of the ACL.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element ref="oval-def:filter" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:choice>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>