This repository has been archived by the owner on Nov 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
mpls_static_cfg.go
2225 lines (1795 loc) · 101 KB
/
mpls_static_cfg.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
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
// This module contains a collection of YANG definitions
// for Cisco IOS-XR mpls-static package configuration.
//
// This module contains definitions
// for the following management objects:
// mpls-static: MPLS Static Configuration Data
//
// Copyright (c) 2013-2018 by Cisco Systems, Inc.
// All rights reserved.
package mpls_static_cfg
import (
"fmt"
"github.com/CiscoDevNet/ydk-go/ydk"
"github.com/CiscoDevNet/ydk-go/ydk/types"
"github.com/CiscoDevNet/ydk-go/ydk/types/yfilter"
"github.com/CiscoDevNet/ydk-go/ydk/models/cisco_ios_xr"
"reflect"
)
func init() {
ydk.YLogDebug(fmt.Sprintf("Registering top level entities for package mpls_static_cfg"))
ydk.RegisterEntity("{http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-static-cfg mpls-static}", reflect.TypeOf(MplsStatic{}))
ydk.RegisterEntity("Cisco-IOS-XR-mpls-static-cfg:mpls-static", reflect.TypeOf(MplsStatic{}))
}
// MplsStaticNhMode represents Mpls static nh mode
type MplsStaticNhMode string
const (
// Explicitly configured next hop path
MplsStaticNhMode_configured MplsStaticNhMode = "configured"
// Resolvable next hop which will result in a path
// set
MplsStaticNhMode_resolve MplsStaticNhMode = "resolve"
)
// MplsStaticNhAddressFamily represents Mpls static nh address family
type MplsStaticNhAddressFamily string
const (
// IPv4 Next Hop
MplsStaticNhAddressFamily_ipv4 MplsStaticNhAddressFamily = "ipv4"
// IPv6 Next Hop
MplsStaticNhAddressFamily_ipv6 MplsStaticNhAddressFamily = "ipv6"
)
// MplsStaticPath represents Mpls static path
type MplsStaticPath string
const (
// Pop and Lookup
MplsStaticPath_pop_and_lookup MplsStaticPath = "pop-and-lookup"
// Crossconnect
MplsStaticPath_cross_connect MplsStaticPath = "cross-connect"
)
// MplsStaticAddressFamily represents Mpls static address family
type MplsStaticAddressFamily string
const (
// IPv4 Unicast
MplsStaticAddressFamily_ipv4_unicast MplsStaticAddressFamily = "ipv4-unicast"
)
// MplsStaticOutLabelTypes represents Mpls static out label types
type MplsStaticOutLabelTypes string
const (
// None
MplsStaticOutLabelTypes_none MplsStaticOutLabelTypes = "none"
// OutLabel
MplsStaticOutLabelTypes_out_label MplsStaticOutLabelTypes = "out-label"
// Pop
MplsStaticOutLabelTypes_pop MplsStaticOutLabelTypes = "pop"
// IPv4 explicit-null
MplsStaticOutLabelTypes_exp_null MplsStaticOutLabelTypes = "exp-null"
// IPv6 explicit-null
MplsStaticOutLabelTypes_ipv6_explicit_null MplsStaticOutLabelTypes = "ipv6-explicit-null"
)
// MplsStaticLabelMode represents Mpls static label mode
type MplsStaticLabelMode string
const (
// Per VRF
MplsStaticLabelMode_per_vrf MplsStaticLabelMode = "per-vrf"
// Per Prefix
MplsStaticLabelMode_per_prefix MplsStaticLabelMode = "per-prefix"
// Cross connect
MplsStaticLabelMode_lsp MplsStaticLabelMode = "lsp"
)
// MplsStaticPathRole represents Mpls static path role
type MplsStaticPathRole string
const (
// Path is only for primary traffic
MplsStaticPathRole_primary MplsStaticPathRole = "primary"
// Path is only for backup traffic
MplsStaticPathRole_backup MplsStaticPathRole = "backup"
// Path is for primary and backup traffic
MplsStaticPathRole_primary_backup MplsStaticPathRole = "primary-backup"
)
// MplsStatic
// MPLS Static Configuration Data
type MplsStatic struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// MPLS Static Apply Enable. The type is interface{}.
Enable interface{}
// VRF table.
Vrfs MplsStatic_Vrfs
// MPLS Static Interface Table.
Interfaces MplsStatic_Interfaces
// Default VRF.
DefaultVrf MplsStatic_DefaultVrf
}
func (mplsStatic *MplsStatic) GetEntityData() *types.CommonEntityData {
mplsStatic.EntityData.YFilter = mplsStatic.YFilter
mplsStatic.EntityData.YangName = "mpls-static"
mplsStatic.EntityData.BundleName = "cisco_ios_xr"
mplsStatic.EntityData.ParentYangName = "Cisco-IOS-XR-mpls-static-cfg"
mplsStatic.EntityData.SegmentPath = "Cisco-IOS-XR-mpls-static-cfg:mpls-static"
mplsStatic.EntityData.AbsolutePath = mplsStatic.EntityData.SegmentPath
mplsStatic.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
mplsStatic.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
mplsStatic.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
mplsStatic.EntityData.Children = types.NewOrderedMap()
mplsStatic.EntityData.Children.Append("vrfs", types.YChild{"Vrfs", &mplsStatic.Vrfs})
mplsStatic.EntityData.Children.Append("interfaces", types.YChild{"Interfaces", &mplsStatic.Interfaces})
mplsStatic.EntityData.Children.Append("default-vrf", types.YChild{"DefaultVrf", &mplsStatic.DefaultVrf})
mplsStatic.EntityData.Leafs = types.NewOrderedMap()
mplsStatic.EntityData.Leafs.Append("enable", types.YLeaf{"Enable", mplsStatic.Enable})
mplsStatic.EntityData.YListKeys = []string {}
return &(mplsStatic.EntityData)
}
// MplsStatic_Vrfs
// VRF table
type MplsStatic_Vrfs struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// VRF Name. The type is slice of MplsStatic_Vrfs_Vrf.
Vrf []*MplsStatic_Vrfs_Vrf
}
func (vrfs *MplsStatic_Vrfs) GetEntityData() *types.CommonEntityData {
vrfs.EntityData.YFilter = vrfs.YFilter
vrfs.EntityData.YangName = "vrfs"
vrfs.EntityData.BundleName = "cisco_ios_xr"
vrfs.EntityData.ParentYangName = "mpls-static"
vrfs.EntityData.SegmentPath = "vrfs"
vrfs.EntityData.AbsolutePath = "Cisco-IOS-XR-mpls-static-cfg:mpls-static/" + vrfs.EntityData.SegmentPath
vrfs.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
vrfs.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
vrfs.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
vrfs.EntityData.Children = types.NewOrderedMap()
vrfs.EntityData.Children.Append("vrf", types.YChild{"Vrf", nil})
for i := range vrfs.Vrf {
vrfs.EntityData.Children.Append(types.GetSegmentPath(vrfs.Vrf[i]), types.YChild{"Vrf", vrfs.Vrf[i]})
}
vrfs.EntityData.Leafs = types.NewOrderedMap()
vrfs.EntityData.YListKeys = []string {}
return &(vrfs.EntityData)
}
// MplsStatic_Vrfs_Vrf
// VRF Name
type MplsStatic_Vrfs_Vrf struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
YListKey string
// This attribute is a key. VRF Name. The type is string with pattern:
// [\w\-\.:,_@#%$\+=\|;]+.
VrfName interface{}
// MPLS Static Apply Enable. The type is interface{}.
Enable interface{}
// Table of the Label Switched Paths.
LabelSwitchedPaths MplsStatic_Vrfs_Vrf_LabelSwitchedPaths
// Address Family Table.
Afs MplsStatic_Vrfs_Vrf_Afs
}
func (vrf *MplsStatic_Vrfs_Vrf) GetEntityData() *types.CommonEntityData {
vrf.EntityData.YFilter = vrf.YFilter
vrf.EntityData.YangName = "vrf"
vrf.EntityData.BundleName = "cisco_ios_xr"
vrf.EntityData.ParentYangName = "vrfs"
vrf.EntityData.SegmentPath = "vrf" + types.AddKeyToken(vrf.VrfName, "vrf-name")
vrf.EntityData.AbsolutePath = "Cisco-IOS-XR-mpls-static-cfg:mpls-static/vrfs/" + vrf.EntityData.SegmentPath
vrf.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
vrf.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
vrf.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
vrf.EntityData.Children = types.NewOrderedMap()
vrf.EntityData.Children.Append("label-switched-paths", types.YChild{"LabelSwitchedPaths", &vrf.LabelSwitchedPaths})
vrf.EntityData.Children.Append("afs", types.YChild{"Afs", &vrf.Afs})
vrf.EntityData.Leafs = types.NewOrderedMap()
vrf.EntityData.Leafs.Append("vrf-name", types.YLeaf{"VrfName", vrf.VrfName})
vrf.EntityData.Leafs.Append("enable", types.YLeaf{"Enable", vrf.Enable})
vrf.EntityData.YListKeys = []string {"VrfName"}
return &(vrf.EntityData)
}
// MplsStatic_Vrfs_Vrf_LabelSwitchedPaths
// Table of the Label Switched Paths
type MplsStatic_Vrfs_Vrf_LabelSwitchedPaths struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// Label Switched Path. The type is slice of
// MplsStatic_Vrfs_Vrf_LabelSwitchedPaths_LabelSwitchedPath.
LabelSwitchedPath []*MplsStatic_Vrfs_Vrf_LabelSwitchedPaths_LabelSwitchedPath
}
func (labelSwitchedPaths *MplsStatic_Vrfs_Vrf_LabelSwitchedPaths) GetEntityData() *types.CommonEntityData {
labelSwitchedPaths.EntityData.YFilter = labelSwitchedPaths.YFilter
labelSwitchedPaths.EntityData.YangName = "label-switched-paths"
labelSwitchedPaths.EntityData.BundleName = "cisco_ios_xr"
labelSwitchedPaths.EntityData.ParentYangName = "vrf"
labelSwitchedPaths.EntityData.SegmentPath = "label-switched-paths"
labelSwitchedPaths.EntityData.AbsolutePath = "Cisco-IOS-XR-mpls-static-cfg:mpls-static/vrfs/vrf/" + labelSwitchedPaths.EntityData.SegmentPath
labelSwitchedPaths.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
labelSwitchedPaths.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
labelSwitchedPaths.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
labelSwitchedPaths.EntityData.Children = types.NewOrderedMap()
labelSwitchedPaths.EntityData.Children.Append("label-switched-path", types.YChild{"LabelSwitchedPath", nil})
for i := range labelSwitchedPaths.LabelSwitchedPath {
labelSwitchedPaths.EntityData.Children.Append(types.GetSegmentPath(labelSwitchedPaths.LabelSwitchedPath[i]), types.YChild{"LabelSwitchedPath", labelSwitchedPaths.LabelSwitchedPath[i]})
}
labelSwitchedPaths.EntityData.Leafs = types.NewOrderedMap()
labelSwitchedPaths.EntityData.YListKeys = []string {}
return &(labelSwitchedPaths.EntityData)
}
// MplsStatic_Vrfs_Vrf_LabelSwitchedPaths_LabelSwitchedPath
// Label Switched Path
type MplsStatic_Vrfs_Vrf_LabelSwitchedPaths_LabelSwitchedPath struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
YListKey string
// This attribute is a key. LSP Name. The type is string with pattern:
// [\w\-\.:,_@#%$\+=\|;]+.
LspName interface{}
// MPLS Static Apply Enable. The type is interface{}.
Enable interface{}
// Backup Path Parameters.
BackupPaths MplsStatic_Vrfs_Vrf_LabelSwitchedPaths_LabelSwitchedPath_BackupPaths
// MPLS Static Local Label Value.
InLabel MplsStatic_Vrfs_Vrf_LabelSwitchedPaths_LabelSwitchedPath_InLabel
// Forward Path Parameters.
Paths MplsStatic_Vrfs_Vrf_LabelSwitchedPaths_LabelSwitchedPath_Paths
}
func (labelSwitchedPath *MplsStatic_Vrfs_Vrf_LabelSwitchedPaths_LabelSwitchedPath) GetEntityData() *types.CommonEntityData {
labelSwitchedPath.EntityData.YFilter = labelSwitchedPath.YFilter
labelSwitchedPath.EntityData.YangName = "label-switched-path"
labelSwitchedPath.EntityData.BundleName = "cisco_ios_xr"
labelSwitchedPath.EntityData.ParentYangName = "label-switched-paths"
labelSwitchedPath.EntityData.SegmentPath = "label-switched-path" + types.AddKeyToken(labelSwitchedPath.LspName, "lsp-name")
labelSwitchedPath.EntityData.AbsolutePath = "Cisco-IOS-XR-mpls-static-cfg:mpls-static/vrfs/vrf/label-switched-paths/" + labelSwitchedPath.EntityData.SegmentPath
labelSwitchedPath.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
labelSwitchedPath.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
labelSwitchedPath.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
labelSwitchedPath.EntityData.Children = types.NewOrderedMap()
labelSwitchedPath.EntityData.Children.Append("backup-paths", types.YChild{"BackupPaths", &labelSwitchedPath.BackupPaths})
labelSwitchedPath.EntityData.Children.Append("in-label", types.YChild{"InLabel", &labelSwitchedPath.InLabel})
labelSwitchedPath.EntityData.Children.Append("paths", types.YChild{"Paths", &labelSwitchedPath.Paths})
labelSwitchedPath.EntityData.Leafs = types.NewOrderedMap()
labelSwitchedPath.EntityData.Leafs.Append("lsp-name", types.YLeaf{"LspName", labelSwitchedPath.LspName})
labelSwitchedPath.EntityData.Leafs.Append("enable", types.YLeaf{"Enable", labelSwitchedPath.Enable})
labelSwitchedPath.EntityData.YListKeys = []string {"LspName"}
return &(labelSwitchedPath.EntityData)
}
// MplsStatic_Vrfs_Vrf_LabelSwitchedPaths_LabelSwitchedPath_BackupPaths
// Backup Path Parameters
type MplsStatic_Vrfs_Vrf_LabelSwitchedPaths_LabelSwitchedPath_BackupPaths struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// Path Information. The type is slice of
// MplsStatic_Vrfs_Vrf_LabelSwitchedPaths_LabelSwitchedPath_BackupPaths_Path.
Path []*MplsStatic_Vrfs_Vrf_LabelSwitchedPaths_LabelSwitchedPath_BackupPaths_Path
}
func (backupPaths *MplsStatic_Vrfs_Vrf_LabelSwitchedPaths_LabelSwitchedPath_BackupPaths) GetEntityData() *types.CommonEntityData {
backupPaths.EntityData.YFilter = backupPaths.YFilter
backupPaths.EntityData.YangName = "backup-paths"
backupPaths.EntityData.BundleName = "cisco_ios_xr"
backupPaths.EntityData.ParentYangName = "label-switched-path"
backupPaths.EntityData.SegmentPath = "backup-paths"
backupPaths.EntityData.AbsolutePath = "Cisco-IOS-XR-mpls-static-cfg:mpls-static/vrfs/vrf/label-switched-paths/label-switched-path/" + backupPaths.EntityData.SegmentPath
backupPaths.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
backupPaths.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
backupPaths.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
backupPaths.EntityData.Children = types.NewOrderedMap()
backupPaths.EntityData.Children.Append("path", types.YChild{"Path", nil})
for i := range backupPaths.Path {
backupPaths.EntityData.Children.Append(types.GetSegmentPath(backupPaths.Path[i]), types.YChild{"Path", backupPaths.Path[i]})
}
backupPaths.EntityData.Leafs = types.NewOrderedMap()
backupPaths.EntityData.YListKeys = []string {}
return &(backupPaths.EntityData)
}
// MplsStatic_Vrfs_Vrf_LabelSwitchedPaths_LabelSwitchedPath_BackupPaths_Path
// Path Information
type MplsStatic_Vrfs_Vrf_LabelSwitchedPaths_LabelSwitchedPath_BackupPaths_Path struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
YListKey string
// This attribute is a key. Number of paths. The type is interface{} with
// range: 1..16.
PathId interface{}
// Type of Path (PopAndLookup, CrossConnect). The type is MplsStaticPath. The
// default value is cross-connect.
PathType interface{}
// Type of label (Outlabel, ExpNull or Pop). The type is
// MplsStaticOutLabelTypes. The default value is none.
LabelType interface{}
// Outgoing/NH Label. The type is interface{} with range: 16..1048575. The
// default value is 16.
NextHopLabel interface{}
// Next Hop IP Address. The type is one of the following types: string with
// pattern:
// (([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\p{N}\p{L}]+)?,
// or string with pattern:
// ((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\p{N}\p{L}]+)?.
NextHopAddress interface{}
// Next hop Interface with form <Interface>R/S/I/P. The type is string with
// pattern: [a-zA-Z0-9._/-]+.
InterfaceName interface{}
// Next hop Address Family. The type is MplsStaticNhAddressFamily. The default
// value is ipv4.
Afi interface{}
// NH Path Metric. The type is interface{} with range: 0..254. The default
// value is 0.
Metric interface{}
// Next hop mode. The type is MplsStaticNhMode. The default value is
// configured.
NhMode interface{}
// Path Role. The type is MplsStaticPathRole. The default value is primary.
PathRole interface{}
// Backup ID. The type is interface{} with range: 0..16. The default value is
// 0.
BackupId interface{}
}
func (path *MplsStatic_Vrfs_Vrf_LabelSwitchedPaths_LabelSwitchedPath_BackupPaths_Path) GetEntityData() *types.CommonEntityData {
path.EntityData.YFilter = path.YFilter
path.EntityData.YangName = "path"
path.EntityData.BundleName = "cisco_ios_xr"
path.EntityData.ParentYangName = "backup-paths"
path.EntityData.SegmentPath = "path" + types.AddKeyToken(path.PathId, "path-id")
path.EntityData.AbsolutePath = "Cisco-IOS-XR-mpls-static-cfg:mpls-static/vrfs/vrf/label-switched-paths/label-switched-path/backup-paths/" + path.EntityData.SegmentPath
path.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
path.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
path.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
path.EntityData.Children = types.NewOrderedMap()
path.EntityData.Leafs = types.NewOrderedMap()
path.EntityData.Leafs.Append("path-id", types.YLeaf{"PathId", path.PathId})
path.EntityData.Leafs.Append("path-type", types.YLeaf{"PathType", path.PathType})
path.EntityData.Leafs.Append("label-type", types.YLeaf{"LabelType", path.LabelType})
path.EntityData.Leafs.Append("next-hop-label", types.YLeaf{"NextHopLabel", path.NextHopLabel})
path.EntityData.Leafs.Append("next-hop-address", types.YLeaf{"NextHopAddress", path.NextHopAddress})
path.EntityData.Leafs.Append("interface-name", types.YLeaf{"InterfaceName", path.InterfaceName})
path.EntityData.Leafs.Append("afi", types.YLeaf{"Afi", path.Afi})
path.EntityData.Leafs.Append("metric", types.YLeaf{"Metric", path.Metric})
path.EntityData.Leafs.Append("nh-mode", types.YLeaf{"NhMode", path.NhMode})
path.EntityData.Leafs.Append("path-role", types.YLeaf{"PathRole", path.PathRole})
path.EntityData.Leafs.Append("backup-id", types.YLeaf{"BackupId", path.BackupId})
path.EntityData.YListKeys = []string {"PathId"}
return &(path.EntityData)
}
// MplsStatic_Vrfs_Vrf_LabelSwitchedPaths_LabelSwitchedPath_InLabel
// MPLS Static Local Label Value
type MplsStatic_Vrfs_Vrf_LabelSwitchedPaths_LabelSwitchedPath_InLabel struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// Local Label. The type is interface{} with range: 16..1048575.
InLabelValue interface{}
// Label Mode (PerVRF, PerPrefix or LSP). The type is MplsStaticLabelMode.
LabelMode interface{}
// Address (IPv4/6 depending on AFI). The type is one of the following types:
// string with pattern:
// (([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\p{N}\p{L}]+)?,
// or string with pattern:
// ((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\p{N}\p{L}]+)?.
Prefix interface{}
// Prefix length. The type is interface{} with range: 0..4294967295.
PrefixLength interface{}
// Top Label Hashing Mode. The type is bool.
TlhMode interface{}
}
func (inLabel *MplsStatic_Vrfs_Vrf_LabelSwitchedPaths_LabelSwitchedPath_InLabel) GetEntityData() *types.CommonEntityData {
inLabel.EntityData.YFilter = inLabel.YFilter
inLabel.EntityData.YangName = "in-label"
inLabel.EntityData.BundleName = "cisco_ios_xr"
inLabel.EntityData.ParentYangName = "label-switched-path"
inLabel.EntityData.SegmentPath = "in-label"
inLabel.EntityData.AbsolutePath = "Cisco-IOS-XR-mpls-static-cfg:mpls-static/vrfs/vrf/label-switched-paths/label-switched-path/" + inLabel.EntityData.SegmentPath
inLabel.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
inLabel.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
inLabel.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
inLabel.EntityData.Children = types.NewOrderedMap()
inLabel.EntityData.Leafs = types.NewOrderedMap()
inLabel.EntityData.Leafs.Append("in-label-value", types.YLeaf{"InLabelValue", inLabel.InLabelValue})
inLabel.EntityData.Leafs.Append("label-mode", types.YLeaf{"LabelMode", inLabel.LabelMode})
inLabel.EntityData.Leafs.Append("prefix", types.YLeaf{"Prefix", inLabel.Prefix})
inLabel.EntityData.Leafs.Append("prefix-length", types.YLeaf{"PrefixLength", inLabel.PrefixLength})
inLabel.EntityData.Leafs.Append("tlh-mode", types.YLeaf{"TlhMode", inLabel.TlhMode})
inLabel.EntityData.YListKeys = []string {}
return &(inLabel.EntityData)
}
// MplsStatic_Vrfs_Vrf_LabelSwitchedPaths_LabelSwitchedPath_Paths
// Forward Path Parameters
type MplsStatic_Vrfs_Vrf_LabelSwitchedPaths_LabelSwitchedPath_Paths struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// Path Information. The type is slice of
// MplsStatic_Vrfs_Vrf_LabelSwitchedPaths_LabelSwitchedPath_Paths_Path.
Path []*MplsStatic_Vrfs_Vrf_LabelSwitchedPaths_LabelSwitchedPath_Paths_Path
}
func (paths *MplsStatic_Vrfs_Vrf_LabelSwitchedPaths_LabelSwitchedPath_Paths) GetEntityData() *types.CommonEntityData {
paths.EntityData.YFilter = paths.YFilter
paths.EntityData.YangName = "paths"
paths.EntityData.BundleName = "cisco_ios_xr"
paths.EntityData.ParentYangName = "label-switched-path"
paths.EntityData.SegmentPath = "paths"
paths.EntityData.AbsolutePath = "Cisco-IOS-XR-mpls-static-cfg:mpls-static/vrfs/vrf/label-switched-paths/label-switched-path/" + paths.EntityData.SegmentPath
paths.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
paths.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
paths.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
paths.EntityData.Children = types.NewOrderedMap()
paths.EntityData.Children.Append("path", types.YChild{"Path", nil})
for i := range paths.Path {
paths.EntityData.Children.Append(types.GetSegmentPath(paths.Path[i]), types.YChild{"Path", paths.Path[i]})
}
paths.EntityData.Leafs = types.NewOrderedMap()
paths.EntityData.YListKeys = []string {}
return &(paths.EntityData)
}
// MplsStatic_Vrfs_Vrf_LabelSwitchedPaths_LabelSwitchedPath_Paths_Path
// Path Information
type MplsStatic_Vrfs_Vrf_LabelSwitchedPaths_LabelSwitchedPath_Paths_Path struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
YListKey string
// This attribute is a key. Number of paths. The type is interface{} with
// range: 1..16.
PathId interface{}
// Type of Path (PopAndLookup, CrossConnect). The type is MplsStaticPath. The
// default value is cross-connect.
PathType interface{}
// Type of label (Outlabel, ExpNull or Pop). The type is
// MplsStaticOutLabelTypes. The default value is none.
LabelType interface{}
// Outgoing/NH Label. The type is interface{} with range: 16..1048575. The
// default value is 16.
NextHopLabel interface{}
// Next Hop IP Address. The type is one of the following types: string with
// pattern:
// (([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\p{N}\p{L}]+)?,
// or string with pattern:
// ((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\p{N}\p{L}]+)?.
NextHopAddress interface{}
// Next hop Interface with form <Interface>R/S/I/P. The type is string with
// pattern: [a-zA-Z0-9._/-]+.
InterfaceName interface{}
// Next hop Address Family. The type is MplsStaticNhAddressFamily. The default
// value is ipv4.
Afi interface{}
// NH Path Metric. The type is interface{} with range: 0..254. The default
// value is 0.
Metric interface{}
// Next hop mode. The type is MplsStaticNhMode. The default value is
// configured.
NhMode interface{}
// Path Role. The type is MplsStaticPathRole. The default value is primary.
PathRole interface{}
// Backup ID. The type is interface{} with range: 0..16. The default value is
// 0.
BackupId interface{}
}
func (path *MplsStatic_Vrfs_Vrf_LabelSwitchedPaths_LabelSwitchedPath_Paths_Path) GetEntityData() *types.CommonEntityData {
path.EntityData.YFilter = path.YFilter
path.EntityData.YangName = "path"
path.EntityData.BundleName = "cisco_ios_xr"
path.EntityData.ParentYangName = "paths"
path.EntityData.SegmentPath = "path" + types.AddKeyToken(path.PathId, "path-id")
path.EntityData.AbsolutePath = "Cisco-IOS-XR-mpls-static-cfg:mpls-static/vrfs/vrf/label-switched-paths/label-switched-path/paths/" + path.EntityData.SegmentPath
path.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
path.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
path.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
path.EntityData.Children = types.NewOrderedMap()
path.EntityData.Leafs = types.NewOrderedMap()
path.EntityData.Leafs.Append("path-id", types.YLeaf{"PathId", path.PathId})
path.EntityData.Leafs.Append("path-type", types.YLeaf{"PathType", path.PathType})
path.EntityData.Leafs.Append("label-type", types.YLeaf{"LabelType", path.LabelType})
path.EntityData.Leafs.Append("next-hop-label", types.YLeaf{"NextHopLabel", path.NextHopLabel})
path.EntityData.Leafs.Append("next-hop-address", types.YLeaf{"NextHopAddress", path.NextHopAddress})
path.EntityData.Leafs.Append("interface-name", types.YLeaf{"InterfaceName", path.InterfaceName})
path.EntityData.Leafs.Append("afi", types.YLeaf{"Afi", path.Afi})
path.EntityData.Leafs.Append("metric", types.YLeaf{"Metric", path.Metric})
path.EntityData.Leafs.Append("nh-mode", types.YLeaf{"NhMode", path.NhMode})
path.EntityData.Leafs.Append("path-role", types.YLeaf{"PathRole", path.PathRole})
path.EntityData.Leafs.Append("backup-id", types.YLeaf{"BackupId", path.BackupId})
path.EntityData.YListKeys = []string {"PathId"}
return &(path.EntityData)
}
// MplsStatic_Vrfs_Vrf_Afs
// Address Family Table
type MplsStatic_Vrfs_Vrf_Afs struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// Address Family. The type is slice of MplsStatic_Vrfs_Vrf_Afs_Af.
Af []*MplsStatic_Vrfs_Vrf_Afs_Af
}
func (afs *MplsStatic_Vrfs_Vrf_Afs) GetEntityData() *types.CommonEntityData {
afs.EntityData.YFilter = afs.YFilter
afs.EntityData.YangName = "afs"
afs.EntityData.BundleName = "cisco_ios_xr"
afs.EntityData.ParentYangName = "vrf"
afs.EntityData.SegmentPath = "afs"
afs.EntityData.AbsolutePath = "Cisco-IOS-XR-mpls-static-cfg:mpls-static/vrfs/vrf/" + afs.EntityData.SegmentPath
afs.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
afs.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
afs.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
afs.EntityData.Children = types.NewOrderedMap()
afs.EntityData.Children.Append("af", types.YChild{"Af", nil})
for i := range afs.Af {
afs.EntityData.Children.Append(types.GetSegmentPath(afs.Af[i]), types.YChild{"Af", afs.Af[i]})
}
afs.EntityData.Leafs = types.NewOrderedMap()
afs.EntityData.YListKeys = []string {}
return &(afs.EntityData)
}
// MplsStatic_Vrfs_Vrf_Afs_Af
// Address Family
type MplsStatic_Vrfs_Vrf_Afs_Af struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
YListKey string
// This attribute is a key. Address Family. The type is
// MplsStaticAddressFamily.
Afi interface{}
// MPLS Static Apply Enable. The type is interface{}.
Enable interface{}
// Top Label Hash.
TopLabelHash MplsStatic_Vrfs_Vrf_Afs_Af_TopLabelHash
// Local Label.
LocalLabels MplsStatic_Vrfs_Vrf_Afs_Af_LocalLabels
}
func (af *MplsStatic_Vrfs_Vrf_Afs_Af) GetEntityData() *types.CommonEntityData {
af.EntityData.YFilter = af.YFilter
af.EntityData.YangName = "af"
af.EntityData.BundleName = "cisco_ios_xr"
af.EntityData.ParentYangName = "afs"
af.EntityData.SegmentPath = "af" + types.AddKeyToken(af.Afi, "afi")
af.EntityData.AbsolutePath = "Cisco-IOS-XR-mpls-static-cfg:mpls-static/vrfs/vrf/afs/" + af.EntityData.SegmentPath
af.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
af.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
af.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
af.EntityData.Children = types.NewOrderedMap()
af.EntityData.Children.Append("top-label-hash", types.YChild{"TopLabelHash", &af.TopLabelHash})
af.EntityData.Children.Append("local-labels", types.YChild{"LocalLabels", &af.LocalLabels})
af.EntityData.Leafs = types.NewOrderedMap()
af.EntityData.Leafs.Append("afi", types.YLeaf{"Afi", af.Afi})
af.EntityData.Leafs.Append("enable", types.YLeaf{"Enable", af.Enable})
af.EntityData.YListKeys = []string {"Afi"}
return &(af.EntityData)
}
// MplsStatic_Vrfs_Vrf_Afs_Af_TopLabelHash
// Top Label Hash
type MplsStatic_Vrfs_Vrf_Afs_Af_TopLabelHash struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// Local Label.
LocalLabels MplsStatic_Vrfs_Vrf_Afs_Af_TopLabelHash_LocalLabels
}
func (topLabelHash *MplsStatic_Vrfs_Vrf_Afs_Af_TopLabelHash) GetEntityData() *types.CommonEntityData {
topLabelHash.EntityData.YFilter = topLabelHash.YFilter
topLabelHash.EntityData.YangName = "top-label-hash"
topLabelHash.EntityData.BundleName = "cisco_ios_xr"
topLabelHash.EntityData.ParentYangName = "af"
topLabelHash.EntityData.SegmentPath = "top-label-hash"
topLabelHash.EntityData.AbsolutePath = "Cisco-IOS-XR-mpls-static-cfg:mpls-static/vrfs/vrf/afs/af/" + topLabelHash.EntityData.SegmentPath
topLabelHash.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
topLabelHash.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
topLabelHash.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
topLabelHash.EntityData.Children = types.NewOrderedMap()
topLabelHash.EntityData.Children.Append("local-labels", types.YChild{"LocalLabels", &topLabelHash.LocalLabels})
topLabelHash.EntityData.Leafs = types.NewOrderedMap()
topLabelHash.EntityData.YListKeys = []string {}
return &(topLabelHash.EntityData)
}
// MplsStatic_Vrfs_Vrf_Afs_Af_TopLabelHash_LocalLabels
// Local Label
type MplsStatic_Vrfs_Vrf_Afs_Af_TopLabelHash_LocalLabels struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// Specify Local Label. The type is slice of
// MplsStatic_Vrfs_Vrf_Afs_Af_TopLabelHash_LocalLabels_LocalLabel.
LocalLabel []*MplsStatic_Vrfs_Vrf_Afs_Af_TopLabelHash_LocalLabels_LocalLabel
}
func (localLabels *MplsStatic_Vrfs_Vrf_Afs_Af_TopLabelHash_LocalLabels) GetEntityData() *types.CommonEntityData {
localLabels.EntityData.YFilter = localLabels.YFilter
localLabels.EntityData.YangName = "local-labels"
localLabels.EntityData.BundleName = "cisco_ios_xr"
localLabels.EntityData.ParentYangName = "top-label-hash"
localLabels.EntityData.SegmentPath = "local-labels"
localLabels.EntityData.AbsolutePath = "Cisco-IOS-XR-mpls-static-cfg:mpls-static/vrfs/vrf/afs/af/top-label-hash/" + localLabels.EntityData.SegmentPath
localLabels.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
localLabels.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
localLabels.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
localLabels.EntityData.Children = types.NewOrderedMap()
localLabels.EntityData.Children.Append("local-label", types.YChild{"LocalLabel", nil})
for i := range localLabels.LocalLabel {
localLabels.EntityData.Children.Append(types.GetSegmentPath(localLabels.LocalLabel[i]), types.YChild{"LocalLabel", localLabels.LocalLabel[i]})
}
localLabels.EntityData.Leafs = types.NewOrderedMap()
localLabels.EntityData.YListKeys = []string {}
return &(localLabels.EntityData)
}
// MplsStatic_Vrfs_Vrf_Afs_Af_TopLabelHash_LocalLabels_LocalLabel
// Specify Local Label
type MplsStatic_Vrfs_Vrf_Afs_Af_TopLabelHash_LocalLabels_LocalLabel struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
YListKey string
// This attribute is a key. Local Label. The type is interface{} with range:
// 16..1048575.
LocalLabelId interface{}
// MPLS Static Local Label Value.
LabelType MplsStatic_Vrfs_Vrf_Afs_Af_TopLabelHash_LocalLabels_LocalLabel_LabelType
// Forward Path Parameters.
Paths MplsStatic_Vrfs_Vrf_Afs_Af_TopLabelHash_LocalLabels_LocalLabel_Paths
}
func (localLabel *MplsStatic_Vrfs_Vrf_Afs_Af_TopLabelHash_LocalLabels_LocalLabel) GetEntityData() *types.CommonEntityData {
localLabel.EntityData.YFilter = localLabel.YFilter
localLabel.EntityData.YangName = "local-label"
localLabel.EntityData.BundleName = "cisco_ios_xr"
localLabel.EntityData.ParentYangName = "local-labels"
localLabel.EntityData.SegmentPath = "local-label" + types.AddKeyToken(localLabel.LocalLabelId, "local-label-id")
localLabel.EntityData.AbsolutePath = "Cisco-IOS-XR-mpls-static-cfg:mpls-static/vrfs/vrf/afs/af/top-label-hash/local-labels/" + localLabel.EntityData.SegmentPath
localLabel.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
localLabel.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
localLabel.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
localLabel.EntityData.Children = types.NewOrderedMap()
localLabel.EntityData.Children.Append("label-type", types.YChild{"LabelType", &localLabel.LabelType})
localLabel.EntityData.Children.Append("paths", types.YChild{"Paths", &localLabel.Paths})
localLabel.EntityData.Leafs = types.NewOrderedMap()
localLabel.EntityData.Leafs.Append("local-label-id", types.YLeaf{"LocalLabelId", localLabel.LocalLabelId})
localLabel.EntityData.YListKeys = []string {"LocalLabelId"}
return &(localLabel.EntityData)
}
// MplsStatic_Vrfs_Vrf_Afs_Af_TopLabelHash_LocalLabels_LocalLabel_LabelType
// MPLS Static Local Label Value
type MplsStatic_Vrfs_Vrf_Afs_Af_TopLabelHash_LocalLabels_LocalLabel_LabelType struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// Label Mode (PerVRF, PerPrefix or LSP). The type is MplsStaticLabelMode.
LabelMode interface{}
// Address (IPv4/6 depending on AFI). The type is one of the following types:
// string with pattern:
// (([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\p{N}\p{L}]+)?,
// or string with pattern:
// ((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\p{N}\p{L}]+)?.
Prefix interface{}
// Prefix length. The type is interface{} with range: 0..4294967295.
PrefixLength interface{}
}
func (labelType *MplsStatic_Vrfs_Vrf_Afs_Af_TopLabelHash_LocalLabels_LocalLabel_LabelType) GetEntityData() *types.CommonEntityData {
labelType.EntityData.YFilter = labelType.YFilter
labelType.EntityData.YangName = "label-type"
labelType.EntityData.BundleName = "cisco_ios_xr"
labelType.EntityData.ParentYangName = "local-label"
labelType.EntityData.SegmentPath = "label-type"
labelType.EntityData.AbsolutePath = "Cisco-IOS-XR-mpls-static-cfg:mpls-static/vrfs/vrf/afs/af/top-label-hash/local-labels/local-label/" + labelType.EntityData.SegmentPath
labelType.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
labelType.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
labelType.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
labelType.EntityData.Children = types.NewOrderedMap()
labelType.EntityData.Leafs = types.NewOrderedMap()
labelType.EntityData.Leafs.Append("label-mode", types.YLeaf{"LabelMode", labelType.LabelMode})
labelType.EntityData.Leafs.Append("prefix", types.YLeaf{"Prefix", labelType.Prefix})
labelType.EntityData.Leafs.Append("prefix-length", types.YLeaf{"PrefixLength", labelType.PrefixLength})
labelType.EntityData.YListKeys = []string {}
return &(labelType.EntityData)
}
// MplsStatic_Vrfs_Vrf_Afs_Af_TopLabelHash_LocalLabels_LocalLabel_Paths
// Forward Path Parameters
type MplsStatic_Vrfs_Vrf_Afs_Af_TopLabelHash_LocalLabels_LocalLabel_Paths struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// Path Information. The type is slice of
// MplsStatic_Vrfs_Vrf_Afs_Af_TopLabelHash_LocalLabels_LocalLabel_Paths_Path.
Path []*MplsStatic_Vrfs_Vrf_Afs_Af_TopLabelHash_LocalLabels_LocalLabel_Paths_Path
}
func (paths *MplsStatic_Vrfs_Vrf_Afs_Af_TopLabelHash_LocalLabels_LocalLabel_Paths) GetEntityData() *types.CommonEntityData {
paths.EntityData.YFilter = paths.YFilter
paths.EntityData.YangName = "paths"
paths.EntityData.BundleName = "cisco_ios_xr"
paths.EntityData.ParentYangName = "local-label"
paths.EntityData.SegmentPath = "paths"
paths.EntityData.AbsolutePath = "Cisco-IOS-XR-mpls-static-cfg:mpls-static/vrfs/vrf/afs/af/top-label-hash/local-labels/local-label/" + paths.EntityData.SegmentPath
paths.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
paths.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
paths.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
paths.EntityData.Children = types.NewOrderedMap()
paths.EntityData.Children.Append("path", types.YChild{"Path", nil})
for i := range paths.Path {
paths.EntityData.Children.Append(types.GetSegmentPath(paths.Path[i]), types.YChild{"Path", paths.Path[i]})
}
paths.EntityData.Leafs = types.NewOrderedMap()
paths.EntityData.YListKeys = []string {}
return &(paths.EntityData)
}
// MplsStatic_Vrfs_Vrf_Afs_Af_TopLabelHash_LocalLabels_LocalLabel_Paths_Path
// Path Information
type MplsStatic_Vrfs_Vrf_Afs_Af_TopLabelHash_LocalLabels_LocalLabel_Paths_Path struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
YListKey string
// This attribute is a key. Number of paths. The type is interface{} with
// range: 1..16.
PathId interface{}
// Type of Path (PopAndLookup, CrossConnect). The type is MplsStaticPath. The
// default value is cross-connect.
PathType interface{}
// Type of label (Outlabel, ExpNull or Pop). The type is
// MplsStaticOutLabelTypes. The default value is none.
LabelType interface{}
// Outgoing/NH Label. The type is interface{} with range: 16..1048575. The
// default value is 16.
NextHopLabel interface{}
// Next Hop IP Address. The type is one of the following types: string with
// pattern:
// (([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\p{N}\p{L}]+)?,
// or string with pattern:
// ((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\p{N}\p{L}]+)?.
NextHopAddress interface{}
// Next hop Interface with form <Interface>R/S/I/P. The type is string with
// pattern: [a-zA-Z0-9._/-]+.
InterfaceName interface{}
// Next hop Address Family. The type is MplsStaticNhAddressFamily. The default
// value is ipv4.
Afi interface{}
// NH Path Metric. The type is interface{} with range: 0..254. The default
// value is 0.
Metric interface{}
// Next hop mode. The type is MplsStaticNhMode. The default value is
// configured.
NhMode interface{}
// Path Role. The type is MplsStaticPathRole. The default value is primary.
PathRole interface{}
// Backup ID. The type is interface{} with range: 0..16. The default value is
// 0.
BackupId interface{}
}
func (path *MplsStatic_Vrfs_Vrf_Afs_Af_TopLabelHash_LocalLabels_LocalLabel_Paths_Path) GetEntityData() *types.CommonEntityData {
path.EntityData.YFilter = path.YFilter
path.EntityData.YangName = "path"
path.EntityData.BundleName = "cisco_ios_xr"
path.EntityData.ParentYangName = "paths"
path.EntityData.SegmentPath = "path" + types.AddKeyToken(path.PathId, "path-id")
path.EntityData.AbsolutePath = "Cisco-IOS-XR-mpls-static-cfg:mpls-static/vrfs/vrf/afs/af/top-label-hash/local-labels/local-label/paths/" + path.EntityData.SegmentPath
path.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
path.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
path.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
path.EntityData.Children = types.NewOrderedMap()
path.EntityData.Leafs = types.NewOrderedMap()
path.EntityData.Leafs.Append("path-id", types.YLeaf{"PathId", path.PathId})
path.EntityData.Leafs.Append("path-type", types.YLeaf{"PathType", path.PathType})
path.EntityData.Leafs.Append("label-type", types.YLeaf{"LabelType", path.LabelType})
path.EntityData.Leafs.Append("next-hop-label", types.YLeaf{"NextHopLabel", path.NextHopLabel})
path.EntityData.Leafs.Append("next-hop-address", types.YLeaf{"NextHopAddress", path.NextHopAddress})
path.EntityData.Leafs.Append("interface-name", types.YLeaf{"InterfaceName", path.InterfaceName})
path.EntityData.Leafs.Append("afi", types.YLeaf{"Afi", path.Afi})
path.EntityData.Leafs.Append("metric", types.YLeaf{"Metric", path.Metric})
path.EntityData.Leafs.Append("nh-mode", types.YLeaf{"NhMode", path.NhMode})
path.EntityData.Leafs.Append("path-role", types.YLeaf{"PathRole", path.PathRole})
path.EntityData.Leafs.Append("backup-id", types.YLeaf{"BackupId", path.BackupId})
path.EntityData.YListKeys = []string {"PathId"}
return &(path.EntityData)
}
// MplsStatic_Vrfs_Vrf_Afs_Af_LocalLabels
// Local Label
type MplsStatic_Vrfs_Vrf_Afs_Af_LocalLabels struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// Specify Local Label. The type is slice of
// MplsStatic_Vrfs_Vrf_Afs_Af_LocalLabels_LocalLabel.
LocalLabel []*MplsStatic_Vrfs_Vrf_Afs_Af_LocalLabels_LocalLabel
}
func (localLabels *MplsStatic_Vrfs_Vrf_Afs_Af_LocalLabels) GetEntityData() *types.CommonEntityData {
localLabels.EntityData.YFilter = localLabels.YFilter
localLabels.EntityData.YangName = "local-labels"
localLabels.EntityData.BundleName = "cisco_ios_xr"
localLabels.EntityData.ParentYangName = "af"
localLabels.EntityData.SegmentPath = "local-labels"
localLabels.EntityData.AbsolutePath = "Cisco-IOS-XR-mpls-static-cfg:mpls-static/vrfs/vrf/afs/af/" + localLabels.EntityData.SegmentPath
localLabels.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
localLabels.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
localLabels.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
localLabels.EntityData.Children = types.NewOrderedMap()
localLabels.EntityData.Children.Append("local-label", types.YChild{"LocalLabel", nil})
for i := range localLabels.LocalLabel {
localLabels.EntityData.Children.Append(types.GetSegmentPath(localLabels.LocalLabel[i]), types.YChild{"LocalLabel", localLabels.LocalLabel[i]})
}
localLabels.EntityData.Leafs = types.NewOrderedMap()
localLabels.EntityData.YListKeys = []string {}
return &(localLabels.EntityData)
}
// MplsStatic_Vrfs_Vrf_Afs_Af_LocalLabels_LocalLabel
// Specify Local Label
type MplsStatic_Vrfs_Vrf_Afs_Af_LocalLabels_LocalLabel struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
YListKey string
// This attribute is a key. Local Label. The type is interface{} with range:
// 16..1048575.
LocalLabelId interface{}
// MPLS Static Local Label Value.
LabelType MplsStatic_Vrfs_Vrf_Afs_Af_LocalLabels_LocalLabel_LabelType
// Forward Path Parameters.
Paths MplsStatic_Vrfs_Vrf_Afs_Af_LocalLabels_LocalLabel_Paths
}
func (localLabel *MplsStatic_Vrfs_Vrf_Afs_Af_LocalLabels_LocalLabel) GetEntityData() *types.CommonEntityData {
localLabel.EntityData.YFilter = localLabel.YFilter
localLabel.EntityData.YangName = "local-label"
localLabel.EntityData.BundleName = "cisco_ios_xr"