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
/
ptp_cfg.go
1809 lines (1457 loc) · 84.1 KB
/
ptp_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 ptp package configuration.
//
// This module contains definitions
// for the following management objects:
// ptp: PTP global configuration
//
// This YANG module augments the
// Cisco-IOS-XR-ifmgr-cfg
// module with configuration data.
//
// Copyright (c) 2013-2018 by Cisco Systems, Inc.
// All rights reserved.
package ptp_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 ptp_cfg"))
ydk.RegisterEntity("{http://cisco.com/ns/yang/Cisco-IOS-XR-ptp-cfg ptp}", reflect.TypeOf(Ptp{}))
ydk.RegisterEntity("Cisco-IOS-XR-ptp-cfg:ptp", reflect.TypeOf(Ptp{}))
}
// Ptp
// PTP global configuration
type Ptp struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// Clock class to be used while acquiring phase-lock to a parent clock. Note
// that this is deprecated and should not be used. The type is interface{}
// with range: 0..255.
UncalibratedClockClass interface{}
// Time-of-day priority. The type is interface{} with range: 1..254. The
// default value is 100.
TimeOfDayPriority interface{}
// Frequency priority. The type is interface{} with range: 1..254. The default
// value is 254.
FrequencyPriority interface{}
// Startup clock class value. The type is interface{} with range: 0..255.
StartupClockClass interface{}
// Enable the precision time protocol. The type is interface{}.
Enable interface{}
// Clocks with a clock-class higher than the minimum clock class will not be
// considered for selection as a parent clock. The type is interface{} with
// range: 0..255.
MinClockClass interface{}
// Disable PTP as a source for frequency as only physical layer frequency
// sources are used. The type is interface{}.
PhysicalLayerFrequency interface{}
// Freerun clock class value. The type is interface{} with range: 0..255.
FreerunClockClass interface{}
// PTP local clock configuration.
Clock Ptp_Clock
// Table for profile configuration.
Profiles Ptp_Profiles
// UTC offset configuration.
UtcOffset Ptp_UtcOffset
// PTP logging configuration.
Logging Ptp_Logging
// Clock class to be used while acquiring phase-lock to a parent clock.
UncalibratedClockClass2 Ptp_UncalibratedClockClass2
// Transparent clock configuration.
TransparentClock Ptp_TransparentClock
// PTP virtual port configuration.
VirtualPort Ptp_VirtualPort
}
func (ptp *Ptp) GetEntityData() *types.CommonEntityData {
ptp.EntityData.YFilter = ptp.YFilter
ptp.EntityData.YangName = "ptp"
ptp.EntityData.BundleName = "cisco_ios_xr"
ptp.EntityData.ParentYangName = "Cisco-IOS-XR-ptp-cfg"
ptp.EntityData.SegmentPath = "Cisco-IOS-XR-ptp-cfg:ptp"
ptp.EntityData.AbsolutePath = ptp.EntityData.SegmentPath
ptp.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
ptp.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
ptp.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
ptp.EntityData.Children = types.NewOrderedMap()
ptp.EntityData.Children.Append("clock", types.YChild{"Clock", &ptp.Clock})
ptp.EntityData.Children.Append("profiles", types.YChild{"Profiles", &ptp.Profiles})
ptp.EntityData.Children.Append("utc-offset", types.YChild{"UtcOffset", &ptp.UtcOffset})
ptp.EntityData.Children.Append("logging", types.YChild{"Logging", &ptp.Logging})
ptp.EntityData.Children.Append("uncalibrated-clock-class2", types.YChild{"UncalibratedClockClass2", &ptp.UncalibratedClockClass2})
ptp.EntityData.Children.Append("transparent-clock", types.YChild{"TransparentClock", &ptp.TransparentClock})
ptp.EntityData.Children.Append("virtual-port", types.YChild{"VirtualPort", &ptp.VirtualPort})
ptp.EntityData.Leafs = types.NewOrderedMap()
ptp.EntityData.Leafs.Append("uncalibrated-clock-class", types.YLeaf{"UncalibratedClockClass", ptp.UncalibratedClockClass})
ptp.EntityData.Leafs.Append("time-of-day-priority", types.YLeaf{"TimeOfDayPriority", ptp.TimeOfDayPriority})
ptp.EntityData.Leafs.Append("frequency-priority", types.YLeaf{"FrequencyPriority", ptp.FrequencyPriority})
ptp.EntityData.Leafs.Append("startup-clock-class", types.YLeaf{"StartupClockClass", ptp.StartupClockClass})
ptp.EntityData.Leafs.Append("enable", types.YLeaf{"Enable", ptp.Enable})
ptp.EntityData.Leafs.Append("min-clock-class", types.YLeaf{"MinClockClass", ptp.MinClockClass})
ptp.EntityData.Leafs.Append("physical-layer-frequency", types.YLeaf{"PhysicalLayerFrequency", ptp.PhysicalLayerFrequency})
ptp.EntityData.Leafs.Append("freerun-clock-class", types.YLeaf{"FreerunClockClass", ptp.FreerunClockClass})
ptp.EntityData.YListKeys = []string {}
return &(ptp.EntityData)
}
// Ptp_Clock
// PTP local clock configuration
type Ptp_Clock struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// Local clock timescale. The type is PtpTimescale.
Timescale interface{}
// Local clock domain. The type is interface{} with range: 0..255. The default
// value is 0.
Domain interface{}
// Local clock priority2. The type is interface{} with range: 0..255. The
// default value is 128.
Priority2 interface{}
// Local clock time source. The type is PtpTimeSource.
TimeSource interface{}
// Local clock priority1. The type is interface{} with range: 0..255. The
// default value is 128.
Priority1 interface{}
// Local clock class. The type is interface{} with range: 0..255. The default
// value is 0.
ClockClass interface{}
// Local clock PTP profile.
Profile Ptp_Clock_Profile
// Local clock identity.
Identity Ptp_Clock_Identity
}
func (clock *Ptp_Clock) GetEntityData() *types.CommonEntityData {
clock.EntityData.YFilter = clock.YFilter
clock.EntityData.YangName = "clock"
clock.EntityData.BundleName = "cisco_ios_xr"
clock.EntityData.ParentYangName = "ptp"
clock.EntityData.SegmentPath = "clock"
clock.EntityData.AbsolutePath = "Cisco-IOS-XR-ptp-cfg:ptp/" + clock.EntityData.SegmentPath
clock.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
clock.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
clock.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
clock.EntityData.Children = types.NewOrderedMap()
clock.EntityData.Children.Append("profile", types.YChild{"Profile", &clock.Profile})
clock.EntityData.Children.Append("identity", types.YChild{"Identity", &clock.Identity})
clock.EntityData.Leafs = types.NewOrderedMap()
clock.EntityData.Leafs.Append("timescale", types.YLeaf{"Timescale", clock.Timescale})
clock.EntityData.Leafs.Append("domain", types.YLeaf{"Domain", clock.Domain})
clock.EntityData.Leafs.Append("priority2", types.YLeaf{"Priority2", clock.Priority2})
clock.EntityData.Leafs.Append("time-source", types.YLeaf{"TimeSource", clock.TimeSource})
clock.EntityData.Leafs.Append("priority1", types.YLeaf{"Priority1", clock.Priority1})
clock.EntityData.Leafs.Append("clock-class", types.YLeaf{"ClockClass", clock.ClockClass})
clock.EntityData.YListKeys = []string {}
return &(clock.EntityData)
}
// Ptp_Clock_Profile
// Local clock PTP profile
type Ptp_Clock_Profile struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// Clock profile. The type is PtpClockProfile. The default value is default.
ClockProfile interface{}
// Telecom clock type. The type is PtpTelecomClock.
TelecomClockType interface{}
}
func (profile *Ptp_Clock_Profile) GetEntityData() *types.CommonEntityData {
profile.EntityData.YFilter = profile.YFilter
profile.EntityData.YangName = "profile"
profile.EntityData.BundleName = "cisco_ios_xr"
profile.EntityData.ParentYangName = "clock"
profile.EntityData.SegmentPath = "profile"
profile.EntityData.AbsolutePath = "Cisco-IOS-XR-ptp-cfg:ptp/clock/" + profile.EntityData.SegmentPath
profile.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
profile.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
profile.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
profile.EntityData.Children = types.NewOrderedMap()
profile.EntityData.Leafs = types.NewOrderedMap()
profile.EntityData.Leafs.Append("clock-profile", types.YLeaf{"ClockProfile", profile.ClockProfile})
profile.EntityData.Leafs.Append("telecom-clock-type", types.YLeaf{"TelecomClockType", profile.TelecomClockType})
profile.EntityData.YListKeys = []string {}
return &(profile.EntityData)
}
// Ptp_Clock_Identity
// Local clock identity
type Ptp_Clock_Identity struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// Clock identity type. The type is PtpClockId. The default value is
// router-mac.
ClockIdType interface{}
// MAC Address. The type is string with pattern:
// [0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}.
MacAddress interface{}
// EUI-64 number. The type is string.
Eui interface{}
}
func (identity *Ptp_Clock_Identity) GetEntityData() *types.CommonEntityData {
identity.EntityData.YFilter = identity.YFilter
identity.EntityData.YangName = "identity"
identity.EntityData.BundleName = "cisco_ios_xr"
identity.EntityData.ParentYangName = "clock"
identity.EntityData.SegmentPath = "identity"
identity.EntityData.AbsolutePath = "Cisco-IOS-XR-ptp-cfg:ptp/clock/" + identity.EntityData.SegmentPath
identity.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
identity.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
identity.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
identity.EntityData.Children = types.NewOrderedMap()
identity.EntityData.Leafs = types.NewOrderedMap()
identity.EntityData.Leafs.Append("clock-id-type", types.YLeaf{"ClockIdType", identity.ClockIdType})
identity.EntityData.Leafs.Append("mac-address", types.YLeaf{"MacAddress", identity.MacAddress})
identity.EntityData.Leafs.Append("eui", types.YLeaf{"Eui", identity.Eui})
identity.EntityData.YListKeys = []string {}
return &(identity.EntityData)
}
// Ptp_Profiles
// Table for profile configuration
type Ptp_Profiles struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// Profile configuration. The type is slice of Ptp_Profiles_Profile.
Profile []*Ptp_Profiles_Profile
}
func (profiles *Ptp_Profiles) GetEntityData() *types.CommonEntityData {
profiles.EntityData.YFilter = profiles.YFilter
profiles.EntityData.YangName = "profiles"
profiles.EntityData.BundleName = "cisco_ios_xr"
profiles.EntityData.ParentYangName = "ptp"
profiles.EntityData.SegmentPath = "profiles"
profiles.EntityData.AbsolutePath = "Cisco-IOS-XR-ptp-cfg:ptp/" + profiles.EntityData.SegmentPath
profiles.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
profiles.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
profiles.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
profiles.EntityData.Children = types.NewOrderedMap()
profiles.EntityData.Children.Append("profile", types.YChild{"Profile", nil})
for i := range profiles.Profile {
profiles.EntityData.Children.Append(types.GetSegmentPath(profiles.Profile[i]), types.YChild{"Profile", profiles.Profile[i]})
}
profiles.EntityData.Leafs = types.NewOrderedMap()
profiles.EntityData.YListKeys = []string {}
return &(profiles.EntityData)
}
// Ptp_Profiles_Profile
// Profile configuration
type Ptp_Profiles_Profile struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
YListKey string
// This attribute is a key. Profile. The type is string with pattern:
// [\w\-\.:,_@#%$\+=\|;]+.
ProfileName interface{}
// Sync unicast grant duration, in seconds. The type is interface{} with
// range: 60..1000. Units are second. The default value is 300.
SyncGrantDuration interface{}
// General COS. The type is interface{} with range: 0..7. The default value is
// 6.
GeneralCos interface{}
// Sync timeout, in milliseconds. The type is interface{} with range:
// 100..100000. Units are millisecond. The default value is 5000.
SyncTimeout interface{}
// Transport. The type is PtpEncap. The default value is ipv4.
Transport interface{}
// Announce Timeout. The type is interface{} with range: 2..10. The default
// value is 3.
AnnounceTimeout interface{}
// COS. The type is interface{} with range: 0..7. The default value is 6.
Cos interface{}
// IPv4 TTL. The type is interface{} with range: 1..255. The default value is
// 255.
Ipv4ttl interface{}
// Port state restriction. The type is PtpPortState. The default value is any.
PortState interface{}
// Delay-Response timeout, in milliseconds. The type is interface{} with
// range: 100..100000. Units are millisecond. The default value is 5000.
DelayResponseTimeout interface{}
// Delay-Response unicast grant duration, in seconds. The type is interface{}
// with range: 60..1000. Units are second. The default value is 300.
DelayResponseGrantDuration interface{}
// Event COS. The type is interface{} with range: 0..7. The default value is
// 6.
EventCos interface{}
// DSCP. The type is interface{} with range: 0..63. The default value is 46.
Dscp interface{}
// IPv6 Hop Limit. The type is interface{} with range: 1..255. The default
// value is 255.
Ipv6HopLimit interface{}
// General DSCP. The type is interface{} with range: 0..63. The default value
// is 46.
GeneralDscp interface{}
// Clock Operation. The type is PtpClockOperation. The default value is
// two-step.
ClockOperation interface{}
// Announce unicast grant duration, in seconds. The type is interface{} with
// range: 60..1000. Units are second. The default value is 300.
AnnounceGrantDuration interface{}
// Invalid unicast grant request response. The type is
// PtpInvalidUnicastGrantRequestResponse. The default value is reduce.
UnicastGrantInvalidRequest interface{}
// Event DSCP. The type is interface{} with range: 0..63. The default value is
// 46.
EventDscp interface{}
// Announce interval.
AnnounceInterval Ptp_Profiles_Profile_AnnounceInterval
// Table for interop configuration.
Interop Ptp_Profiles_Profile_Interop
// Source IPv4 Address.
SourceIpv4Address Ptp_Profiles_Profile_SourceIpv4Address
// Table for slave configuration.
Slaves Ptp_Profiles_Profile_Slaves
// Sync interval.
SyncInterval Ptp_Profiles_Profile_SyncInterval
// Table for master configuration.
Masters Ptp_Profiles_Profile_Masters
// Communication model.
Communication Ptp_Profiles_Profile_Communication
// Minimum delay request interval.
DelayRequestMinimumInterval Ptp_Profiles_Profile_DelayRequestMinimumInterval
// Source IPv6 Address.
SourceIpv6Address Ptp_Profiles_Profile_SourceIpv6Address
}
func (profile *Ptp_Profiles_Profile) GetEntityData() *types.CommonEntityData {
profile.EntityData.YFilter = profile.YFilter
profile.EntityData.YangName = "profile"
profile.EntityData.BundleName = "cisco_ios_xr"
profile.EntityData.ParentYangName = "profiles"
profile.EntityData.SegmentPath = "profile" + types.AddKeyToken(profile.ProfileName, "profile-name")
profile.EntityData.AbsolutePath = "Cisco-IOS-XR-ptp-cfg:ptp/profiles/" + profile.EntityData.SegmentPath
profile.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
profile.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
profile.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
profile.EntityData.Children = types.NewOrderedMap()
profile.EntityData.Children.Append("announce-interval", types.YChild{"AnnounceInterval", &profile.AnnounceInterval})
profile.EntityData.Children.Append("interop", types.YChild{"Interop", &profile.Interop})
profile.EntityData.Children.Append("source-ipv4-address", types.YChild{"SourceIpv4Address", &profile.SourceIpv4Address})
profile.EntityData.Children.Append("slaves", types.YChild{"Slaves", &profile.Slaves})
profile.EntityData.Children.Append("sync-interval", types.YChild{"SyncInterval", &profile.SyncInterval})
profile.EntityData.Children.Append("masters", types.YChild{"Masters", &profile.Masters})
profile.EntityData.Children.Append("communication", types.YChild{"Communication", &profile.Communication})
profile.EntityData.Children.Append("delay-request-minimum-interval", types.YChild{"DelayRequestMinimumInterval", &profile.DelayRequestMinimumInterval})
profile.EntityData.Children.Append("source-ipv6-address", types.YChild{"SourceIpv6Address", &profile.SourceIpv6Address})
profile.EntityData.Leafs = types.NewOrderedMap()
profile.EntityData.Leafs.Append("profile-name", types.YLeaf{"ProfileName", profile.ProfileName})
profile.EntityData.Leafs.Append("sync-grant-duration", types.YLeaf{"SyncGrantDuration", profile.SyncGrantDuration})
profile.EntityData.Leafs.Append("general-cos", types.YLeaf{"GeneralCos", profile.GeneralCos})
profile.EntityData.Leafs.Append("sync-timeout", types.YLeaf{"SyncTimeout", profile.SyncTimeout})
profile.EntityData.Leafs.Append("transport", types.YLeaf{"Transport", profile.Transport})
profile.EntityData.Leafs.Append("announce-timeout", types.YLeaf{"AnnounceTimeout", profile.AnnounceTimeout})
profile.EntityData.Leafs.Append("cos", types.YLeaf{"Cos", profile.Cos})
profile.EntityData.Leafs.Append("ipv4ttl", types.YLeaf{"Ipv4ttl", profile.Ipv4ttl})
profile.EntityData.Leafs.Append("port-state", types.YLeaf{"PortState", profile.PortState})
profile.EntityData.Leafs.Append("delay-response-timeout", types.YLeaf{"DelayResponseTimeout", profile.DelayResponseTimeout})
profile.EntityData.Leafs.Append("delay-response-grant-duration", types.YLeaf{"DelayResponseGrantDuration", profile.DelayResponseGrantDuration})
profile.EntityData.Leafs.Append("event-cos", types.YLeaf{"EventCos", profile.EventCos})
profile.EntityData.Leafs.Append("dscp", types.YLeaf{"Dscp", profile.Dscp})
profile.EntityData.Leafs.Append("ipv6-hop-limit", types.YLeaf{"Ipv6HopLimit", profile.Ipv6HopLimit})
profile.EntityData.Leafs.Append("general-dscp", types.YLeaf{"GeneralDscp", profile.GeneralDscp})
profile.EntityData.Leafs.Append("clock-operation", types.YLeaf{"ClockOperation", profile.ClockOperation})
profile.EntityData.Leafs.Append("announce-grant-duration", types.YLeaf{"AnnounceGrantDuration", profile.AnnounceGrantDuration})
profile.EntityData.Leafs.Append("unicast-grant-invalid-request", types.YLeaf{"UnicastGrantInvalidRequest", profile.UnicastGrantInvalidRequest})
profile.EntityData.Leafs.Append("event-dscp", types.YLeaf{"EventDscp", profile.EventDscp})
profile.EntityData.YListKeys = []string {"ProfileName"}
return &(profile.EntityData)
}
// Ptp_Profiles_Profile_AnnounceInterval
// Announce interval
type Ptp_Profiles_Profile_AnnounceInterval struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// Interval or Frequency. The type is PtpTime. The default value is interval.
TimeType interface{}
// Time Period. The type is PtpTimePeriod. The default value is 2.
TimePeriod interface{}
}
func (announceInterval *Ptp_Profiles_Profile_AnnounceInterval) GetEntityData() *types.CommonEntityData {
announceInterval.EntityData.YFilter = announceInterval.YFilter
announceInterval.EntityData.YangName = "announce-interval"
announceInterval.EntityData.BundleName = "cisco_ios_xr"
announceInterval.EntityData.ParentYangName = "profile"
announceInterval.EntityData.SegmentPath = "announce-interval"
announceInterval.EntityData.AbsolutePath = "Cisco-IOS-XR-ptp-cfg:ptp/profiles/profile/" + announceInterval.EntityData.SegmentPath
announceInterval.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
announceInterval.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
announceInterval.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
announceInterval.EntityData.Children = types.NewOrderedMap()
announceInterval.EntityData.Leafs = types.NewOrderedMap()
announceInterval.EntityData.Leafs.Append("time-type", types.YLeaf{"TimeType", announceInterval.TimeType})
announceInterval.EntityData.Leafs.Append("time-period", types.YLeaf{"TimePeriod", announceInterval.TimePeriod})
announceInterval.EntityData.YListKeys = []string {}
return &(announceInterval.EntityData)
}
// Ptp_Profiles_Profile_Interop
// Table for interop configuration
type Ptp_Profiles_Profile_Interop struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// Profile to interoperate with. The type is PtpClockProfile.
Profile interface{}
// Domain number of the peer clock. The type is interface{} with range:
// 0..255.
Domain interface{}
// Iteroperation configuration to be used on egress.
EgressConversion Ptp_Profiles_Profile_Interop_EgressConversion
// Iteroperation configuration to be used on ingress.
IngressConversion Ptp_Profiles_Profile_Interop_IngressConversion
}
func (interop *Ptp_Profiles_Profile_Interop) GetEntityData() *types.CommonEntityData {
interop.EntityData.YFilter = interop.YFilter
interop.EntityData.YangName = "interop"
interop.EntityData.BundleName = "cisco_ios_xr"
interop.EntityData.ParentYangName = "profile"
interop.EntityData.SegmentPath = "interop"
interop.EntityData.AbsolutePath = "Cisco-IOS-XR-ptp-cfg:ptp/profiles/profile/" + interop.EntityData.SegmentPath
interop.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
interop.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
interop.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
interop.EntityData.Children = types.NewOrderedMap()
interop.EntityData.Children.Append("egress-conversion", types.YChild{"EgressConversion", &interop.EgressConversion})
interop.EntityData.Children.Append("ingress-conversion", types.YChild{"IngressConversion", &interop.IngressConversion})
interop.EntityData.Leafs = types.NewOrderedMap()
interop.EntityData.Leafs.Append("profile", types.YLeaf{"Profile", interop.Profile})
interop.EntityData.Leafs.Append("domain", types.YLeaf{"Domain", interop.Domain})
interop.EntityData.YListKeys = []string {}
return &(interop.EntityData)
}
// Ptp_Profiles_Profile_Interop_EgressConversion
// Iteroperation configuration to be used on
// egress
type Ptp_Profiles_Profile_Interop_EgressConversion struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// Clock Accuracy value to use for the peer clock. The type is interface{}
// with range: 0..254.
ClockAccuracy interface{}
// Priority2 value to use for the peer clock. The type is interface{} with
// range: 0..255.
Priority2 interface{}
// Default clock class to use when a more specific mapping is not available.
// The type is interface{} with range: 0..255.
ClockClassDefault interface{}
// OSLV value to use for the peer clock. The type is interface{} with range:
// 0..65535.
OffsetScaledLogVariance interface{}
// Priority1 value to use for the peer clock. The type is interface{} with
// range: 0..255.
Priority1 interface{}
// Table for specific mappings for given clock class values.
ClockClassMappings Ptp_Profiles_Profile_Interop_EgressConversion_ClockClassMappings
}
func (egressConversion *Ptp_Profiles_Profile_Interop_EgressConversion) GetEntityData() *types.CommonEntityData {
egressConversion.EntityData.YFilter = egressConversion.YFilter
egressConversion.EntityData.YangName = "egress-conversion"
egressConversion.EntityData.BundleName = "cisco_ios_xr"
egressConversion.EntityData.ParentYangName = "interop"
egressConversion.EntityData.SegmentPath = "egress-conversion"
egressConversion.EntityData.AbsolutePath = "Cisco-IOS-XR-ptp-cfg:ptp/profiles/profile/interop/" + egressConversion.EntityData.SegmentPath
egressConversion.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
egressConversion.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
egressConversion.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
egressConversion.EntityData.Children = types.NewOrderedMap()
egressConversion.EntityData.Children.Append("clock-class-mappings", types.YChild{"ClockClassMappings", &egressConversion.ClockClassMappings})
egressConversion.EntityData.Leafs = types.NewOrderedMap()
egressConversion.EntityData.Leafs.Append("clock-accuracy", types.YLeaf{"ClockAccuracy", egressConversion.ClockAccuracy})
egressConversion.EntityData.Leafs.Append("priority2", types.YLeaf{"Priority2", egressConversion.Priority2})
egressConversion.EntityData.Leafs.Append("clock-class-default", types.YLeaf{"ClockClassDefault", egressConversion.ClockClassDefault})
egressConversion.EntityData.Leafs.Append("offset-scaled-log-variance", types.YLeaf{"OffsetScaledLogVariance", egressConversion.OffsetScaledLogVariance})
egressConversion.EntityData.Leafs.Append("priority1", types.YLeaf{"Priority1", egressConversion.Priority1})
egressConversion.EntityData.YListKeys = []string {}
return &(egressConversion.EntityData)
}
// Ptp_Profiles_Profile_Interop_EgressConversion_ClockClassMappings
// Table for specific mappings for given clock
// class values
type Ptp_Profiles_Profile_Interop_EgressConversion_ClockClassMappings struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// Mapping for a given clock class value. The type is slice of
// Ptp_Profiles_Profile_Interop_EgressConversion_ClockClassMappings_ClockClassMapping.
ClockClassMapping []*Ptp_Profiles_Profile_Interop_EgressConversion_ClockClassMappings_ClockClassMapping
}
func (clockClassMappings *Ptp_Profiles_Profile_Interop_EgressConversion_ClockClassMappings) GetEntityData() *types.CommonEntityData {
clockClassMappings.EntityData.YFilter = clockClassMappings.YFilter
clockClassMappings.EntityData.YangName = "clock-class-mappings"
clockClassMappings.EntityData.BundleName = "cisco_ios_xr"
clockClassMappings.EntityData.ParentYangName = "egress-conversion"
clockClassMappings.EntityData.SegmentPath = "clock-class-mappings"
clockClassMappings.EntityData.AbsolutePath = "Cisco-IOS-XR-ptp-cfg:ptp/profiles/profile/interop/egress-conversion/" + clockClassMappings.EntityData.SegmentPath
clockClassMappings.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
clockClassMappings.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
clockClassMappings.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
clockClassMappings.EntityData.Children = types.NewOrderedMap()
clockClassMappings.EntityData.Children.Append("clock-class-mapping", types.YChild{"ClockClassMapping", nil})
for i := range clockClassMappings.ClockClassMapping {
clockClassMappings.EntityData.Children.Append(types.GetSegmentPath(clockClassMappings.ClockClassMapping[i]), types.YChild{"ClockClassMapping", clockClassMappings.ClockClassMapping[i]})
}
clockClassMappings.EntityData.Leafs = types.NewOrderedMap()
clockClassMappings.EntityData.YListKeys = []string {}
return &(clockClassMappings.EntityData)
}
// Ptp_Profiles_Profile_Interop_EgressConversion_ClockClassMappings_ClockClassMapping
// Mapping for a given clock class value
type Ptp_Profiles_Profile_Interop_EgressConversion_ClockClassMappings_ClockClassMapping struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
YListKey string
// This attribute is a key. Clock Class to map from. The type is interface{}
// with range: 0..255.
ClockClassFrom interface{}
// Clock class to map to. The type is interface{} with range: 0..255. This
// attribute is mandatory.
ClockClassTo interface{}
}
func (clockClassMapping *Ptp_Profiles_Profile_Interop_EgressConversion_ClockClassMappings_ClockClassMapping) GetEntityData() *types.CommonEntityData {
clockClassMapping.EntityData.YFilter = clockClassMapping.YFilter
clockClassMapping.EntityData.YangName = "clock-class-mapping"
clockClassMapping.EntityData.BundleName = "cisco_ios_xr"
clockClassMapping.EntityData.ParentYangName = "clock-class-mappings"
clockClassMapping.EntityData.SegmentPath = "clock-class-mapping" + types.AddKeyToken(clockClassMapping.ClockClassFrom, "clock-class-from")
clockClassMapping.EntityData.AbsolutePath = "Cisco-IOS-XR-ptp-cfg:ptp/profiles/profile/interop/egress-conversion/clock-class-mappings/" + clockClassMapping.EntityData.SegmentPath
clockClassMapping.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
clockClassMapping.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
clockClassMapping.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
clockClassMapping.EntityData.Children = types.NewOrderedMap()
clockClassMapping.EntityData.Leafs = types.NewOrderedMap()
clockClassMapping.EntityData.Leafs.Append("clock-class-from", types.YLeaf{"ClockClassFrom", clockClassMapping.ClockClassFrom})
clockClassMapping.EntityData.Leafs.Append("clock-class-to", types.YLeaf{"ClockClassTo", clockClassMapping.ClockClassTo})
clockClassMapping.EntityData.YListKeys = []string {"ClockClassFrom"}
return &(clockClassMapping.EntityData)
}
// Ptp_Profiles_Profile_Interop_IngressConversion
// Iteroperation configuration to be used on
// ingress
type Ptp_Profiles_Profile_Interop_IngressConversion struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// Clock Accuracy value to use for the peer clock. The type is interface{}
// with range: 0..254.
ClockAccuracy interface{}
// Priority2 value to use for the peer clock. The type is interface{} with
// range: 0..255.
Priority2 interface{}
// Default clock class to use when a more specific mapping is not available.
// The type is interface{} with range: 0..255.
ClockClassDefault interface{}
// OSLV value to use for the peer clock. The type is interface{} with range:
// 0..65535.
OffsetScaledLogVariance interface{}
// Priority1 value to use for the peer clock. The type is interface{} with
// range: 0..255.
Priority1 interface{}
// Table for specific mappings for given clock class values.
ClockClassMappings Ptp_Profiles_Profile_Interop_IngressConversion_ClockClassMappings
}
func (ingressConversion *Ptp_Profiles_Profile_Interop_IngressConversion) GetEntityData() *types.CommonEntityData {
ingressConversion.EntityData.YFilter = ingressConversion.YFilter
ingressConversion.EntityData.YangName = "ingress-conversion"
ingressConversion.EntityData.BundleName = "cisco_ios_xr"
ingressConversion.EntityData.ParentYangName = "interop"
ingressConversion.EntityData.SegmentPath = "ingress-conversion"
ingressConversion.EntityData.AbsolutePath = "Cisco-IOS-XR-ptp-cfg:ptp/profiles/profile/interop/" + ingressConversion.EntityData.SegmentPath
ingressConversion.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
ingressConversion.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
ingressConversion.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
ingressConversion.EntityData.Children = types.NewOrderedMap()
ingressConversion.EntityData.Children.Append("clock-class-mappings", types.YChild{"ClockClassMappings", &ingressConversion.ClockClassMappings})
ingressConversion.EntityData.Leafs = types.NewOrderedMap()
ingressConversion.EntityData.Leafs.Append("clock-accuracy", types.YLeaf{"ClockAccuracy", ingressConversion.ClockAccuracy})
ingressConversion.EntityData.Leafs.Append("priority2", types.YLeaf{"Priority2", ingressConversion.Priority2})
ingressConversion.EntityData.Leafs.Append("clock-class-default", types.YLeaf{"ClockClassDefault", ingressConversion.ClockClassDefault})
ingressConversion.EntityData.Leafs.Append("offset-scaled-log-variance", types.YLeaf{"OffsetScaledLogVariance", ingressConversion.OffsetScaledLogVariance})
ingressConversion.EntityData.Leafs.Append("priority1", types.YLeaf{"Priority1", ingressConversion.Priority1})
ingressConversion.EntityData.YListKeys = []string {}
return &(ingressConversion.EntityData)
}
// Ptp_Profiles_Profile_Interop_IngressConversion_ClockClassMappings
// Table for specific mappings for given clock
// class values
type Ptp_Profiles_Profile_Interop_IngressConversion_ClockClassMappings struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// Mapping for a given clock class value. The type is slice of
// Ptp_Profiles_Profile_Interop_IngressConversion_ClockClassMappings_ClockClassMapping.
ClockClassMapping []*Ptp_Profiles_Profile_Interop_IngressConversion_ClockClassMappings_ClockClassMapping
}
func (clockClassMappings *Ptp_Profiles_Profile_Interop_IngressConversion_ClockClassMappings) GetEntityData() *types.CommonEntityData {
clockClassMappings.EntityData.YFilter = clockClassMappings.YFilter
clockClassMappings.EntityData.YangName = "clock-class-mappings"
clockClassMappings.EntityData.BundleName = "cisco_ios_xr"
clockClassMappings.EntityData.ParentYangName = "ingress-conversion"
clockClassMappings.EntityData.SegmentPath = "clock-class-mappings"
clockClassMappings.EntityData.AbsolutePath = "Cisco-IOS-XR-ptp-cfg:ptp/profiles/profile/interop/ingress-conversion/" + clockClassMappings.EntityData.SegmentPath
clockClassMappings.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
clockClassMappings.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
clockClassMappings.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
clockClassMappings.EntityData.Children = types.NewOrderedMap()
clockClassMappings.EntityData.Children.Append("clock-class-mapping", types.YChild{"ClockClassMapping", nil})
for i := range clockClassMappings.ClockClassMapping {
clockClassMappings.EntityData.Children.Append(types.GetSegmentPath(clockClassMappings.ClockClassMapping[i]), types.YChild{"ClockClassMapping", clockClassMappings.ClockClassMapping[i]})
}
clockClassMappings.EntityData.Leafs = types.NewOrderedMap()
clockClassMappings.EntityData.YListKeys = []string {}
return &(clockClassMappings.EntityData)
}
// Ptp_Profiles_Profile_Interop_IngressConversion_ClockClassMappings_ClockClassMapping
// Mapping for a given clock class value
type Ptp_Profiles_Profile_Interop_IngressConversion_ClockClassMappings_ClockClassMapping struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
YListKey string
// This attribute is a key. Clock Class to map from. The type is interface{}
// with range: 0..255.
ClockClassFrom interface{}
// Clock class to map to. The type is interface{} with range: 0..255. This
// attribute is mandatory.
ClockClassTo interface{}
}
func (clockClassMapping *Ptp_Profiles_Profile_Interop_IngressConversion_ClockClassMappings_ClockClassMapping) GetEntityData() *types.CommonEntityData {
clockClassMapping.EntityData.YFilter = clockClassMapping.YFilter
clockClassMapping.EntityData.YangName = "clock-class-mapping"
clockClassMapping.EntityData.BundleName = "cisco_ios_xr"
clockClassMapping.EntityData.ParentYangName = "clock-class-mappings"
clockClassMapping.EntityData.SegmentPath = "clock-class-mapping" + types.AddKeyToken(clockClassMapping.ClockClassFrom, "clock-class-from")
clockClassMapping.EntityData.AbsolutePath = "Cisco-IOS-XR-ptp-cfg:ptp/profiles/profile/interop/ingress-conversion/clock-class-mappings/" + clockClassMapping.EntityData.SegmentPath
clockClassMapping.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
clockClassMapping.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
clockClassMapping.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
clockClassMapping.EntityData.Children = types.NewOrderedMap()
clockClassMapping.EntityData.Leafs = types.NewOrderedMap()
clockClassMapping.EntityData.Leafs.Append("clock-class-from", types.YLeaf{"ClockClassFrom", clockClassMapping.ClockClassFrom})
clockClassMapping.EntityData.Leafs.Append("clock-class-to", types.YLeaf{"ClockClassTo", clockClassMapping.ClockClassTo})
clockClassMapping.EntityData.YListKeys = []string {"ClockClassFrom"}
return &(clockClassMapping.EntityData)
}
// Ptp_Profiles_Profile_SourceIpv4Address
// Source IPv4 Address
type Ptp_Profiles_Profile_SourceIpv4Address struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// Enable source IP address. The type is bool.
Enable interface{}
// Source IP address to use. The type is 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}]+)?.
SourceIp interface{}
}
func (sourceIpv4Address *Ptp_Profiles_Profile_SourceIpv4Address) GetEntityData() *types.CommonEntityData {
sourceIpv4Address.EntityData.YFilter = sourceIpv4Address.YFilter
sourceIpv4Address.EntityData.YangName = "source-ipv4-address"
sourceIpv4Address.EntityData.BundleName = "cisco_ios_xr"
sourceIpv4Address.EntityData.ParentYangName = "profile"
sourceIpv4Address.EntityData.SegmentPath = "source-ipv4-address"
sourceIpv4Address.EntityData.AbsolutePath = "Cisco-IOS-XR-ptp-cfg:ptp/profiles/profile/" + sourceIpv4Address.EntityData.SegmentPath
sourceIpv4Address.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
sourceIpv4Address.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
sourceIpv4Address.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
sourceIpv4Address.EntityData.Children = types.NewOrderedMap()
sourceIpv4Address.EntityData.Leafs = types.NewOrderedMap()
sourceIpv4Address.EntityData.Leafs.Append("enable", types.YLeaf{"Enable", sourceIpv4Address.Enable})
sourceIpv4Address.EntityData.Leafs.Append("source-ip", types.YLeaf{"SourceIp", sourceIpv4Address.SourceIp})
sourceIpv4Address.EntityData.YListKeys = []string {}
return &(sourceIpv4Address.EntityData)
}
// Ptp_Profiles_Profile_Slaves
// Table for slave configuration
type Ptp_Profiles_Profile_Slaves struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// Slave configuration. The type is slice of
// Ptp_Profiles_Profile_Slaves_Slave.
Slave []*Ptp_Profiles_Profile_Slaves_Slave
}
func (slaves *Ptp_Profiles_Profile_Slaves) GetEntityData() *types.CommonEntityData {
slaves.EntityData.YFilter = slaves.YFilter
slaves.EntityData.YangName = "slaves"
slaves.EntityData.BundleName = "cisco_ios_xr"
slaves.EntityData.ParentYangName = "profile"
slaves.EntityData.SegmentPath = "slaves"
slaves.EntityData.AbsolutePath = "Cisco-IOS-XR-ptp-cfg:ptp/profiles/profile/" + slaves.EntityData.SegmentPath
slaves.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
slaves.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
slaves.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
slaves.EntityData.Children = types.NewOrderedMap()
slaves.EntityData.Children.Append("slave", types.YChild{"Slave", nil})
for i := range slaves.Slave {
slaves.EntityData.Children.Append(types.GetSegmentPath(slaves.Slave[i]), types.YChild{"Slave", slaves.Slave[i]})
}
slaves.EntityData.Leafs = types.NewOrderedMap()
slaves.EntityData.YListKeys = []string {}
return &(slaves.EntityData)
}
// Ptp_Profiles_Profile_Slaves_Slave
// Slave configuration
type Ptp_Profiles_Profile_Slaves_Slave struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
YListKey string
// This attribute is a key. Slave Transport Type. The type is PtpEncap.
Transport interface{}
// ethernet. The type is slice of Ptp_Profiles_Profile_Slaves_Slave_Ethernet.
Ethernet []*Ptp_Profiles_Profile_Slaves_Slave_Ethernet
// ipv4 or ipv6. The type is slice of
// Ptp_Profiles_Profile_Slaves_Slave_Ipv4OrIpv6.
Ipv4OrIpv6 []*Ptp_Profiles_Profile_Slaves_Slave_Ipv4OrIpv6
}
func (slave *Ptp_Profiles_Profile_Slaves_Slave) GetEntityData() *types.CommonEntityData {
slave.EntityData.YFilter = slave.YFilter
slave.EntityData.YangName = "slave"
slave.EntityData.BundleName = "cisco_ios_xr"
slave.EntityData.ParentYangName = "slaves"
slave.EntityData.SegmentPath = "slave" + types.AddKeyToken(slave.Transport, "transport")
slave.EntityData.AbsolutePath = "Cisco-IOS-XR-ptp-cfg:ptp/profiles/profile/slaves/" + slave.EntityData.SegmentPath
slave.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
slave.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
slave.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
slave.EntityData.Children = types.NewOrderedMap()
slave.EntityData.Children.Append("ethernet", types.YChild{"Ethernet", nil})
for i := range slave.Ethernet {
slave.EntityData.Children.Append(types.GetSegmentPath(slave.Ethernet[i]), types.YChild{"Ethernet", slave.Ethernet[i]})
}
slave.EntityData.Children.Append("ipv4-or-ipv6", types.YChild{"Ipv4OrIpv6", nil})
for i := range slave.Ipv4OrIpv6 {
slave.EntityData.Children.Append(types.GetSegmentPath(slave.Ipv4OrIpv6[i]), types.YChild{"Ipv4OrIpv6", slave.Ipv4OrIpv6[i]})
}
slave.EntityData.Leafs = types.NewOrderedMap()
slave.EntityData.Leafs.Append("transport", types.YLeaf{"Transport", slave.Transport})
slave.EntityData.YListKeys = []string {"Transport"}
return &(slave.EntityData)
}
// Ptp_Profiles_Profile_Slaves_Slave_Ethernet
// ethernet
type Ptp_Profiles_Profile_Slaves_Slave_Ethernet struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
YListKey string
// This attribute is a key. Slave MAC Address. The type is string with
// pattern: [0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}.
SlaveMacAddress interface{}
// Enable non-negotiated unicast on this interface. The type is bool.
NonNegotiated interface{}
}
func (ethernet *Ptp_Profiles_Profile_Slaves_Slave_Ethernet) GetEntityData() *types.CommonEntityData {
ethernet.EntityData.YFilter = ethernet.YFilter
ethernet.EntityData.YangName = "ethernet"
ethernet.EntityData.BundleName = "cisco_ios_xr"
ethernet.EntityData.ParentYangName = "slave"
ethernet.EntityData.SegmentPath = "ethernet" + types.AddKeyToken(ethernet.SlaveMacAddress, "slave-mac-address")
ethernet.EntityData.AbsolutePath = "Cisco-IOS-XR-ptp-cfg:ptp/profiles/profile/slaves/slave/" + ethernet.EntityData.SegmentPath
ethernet.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
ethernet.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
ethernet.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
ethernet.EntityData.Children = types.NewOrderedMap()
ethernet.EntityData.Leafs = types.NewOrderedMap()
ethernet.EntityData.Leafs.Append("slave-mac-address", types.YLeaf{"SlaveMacAddress", ethernet.SlaveMacAddress})
ethernet.EntityData.Leafs.Append("non-negotiated", types.YLeaf{"NonNegotiated", ethernet.NonNegotiated})
ethernet.EntityData.YListKeys = []string {"SlaveMacAddress"}
return &(ethernet.EntityData)
}
// Ptp_Profiles_Profile_Slaves_Slave_Ipv4OrIpv6
// ipv4 or ipv6
type Ptp_Profiles_Profile_Slaves_Slave_Ipv4OrIpv6 struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
YListKey string
// This attribute is a key. Slave 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}]+)?.
SlaveIpAddress interface{}
// Enable non-negotiated unicast on this interface. The type is bool.
NonNegotiated interface{}
}
func (ipv4OrIpv6 *Ptp_Profiles_Profile_Slaves_Slave_Ipv4OrIpv6) GetEntityData() *types.CommonEntityData {
ipv4OrIpv6.EntityData.YFilter = ipv4OrIpv6.YFilter
ipv4OrIpv6.EntityData.YangName = "ipv4-or-ipv6"
ipv4OrIpv6.EntityData.BundleName = "cisco_ios_xr"
ipv4OrIpv6.EntityData.ParentYangName = "slave"
ipv4OrIpv6.EntityData.SegmentPath = "ipv4-or-ipv6" + types.AddKeyToken(ipv4OrIpv6.SlaveIpAddress, "slave-ip-address")
ipv4OrIpv6.EntityData.AbsolutePath = "Cisco-IOS-XR-ptp-cfg:ptp/profiles/profile/slaves/slave/" + ipv4OrIpv6.EntityData.SegmentPath
ipv4OrIpv6.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
ipv4OrIpv6.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
ipv4OrIpv6.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
ipv4OrIpv6.EntityData.Children = types.NewOrderedMap()
ipv4OrIpv6.EntityData.Leafs = types.NewOrderedMap()
ipv4OrIpv6.EntityData.Leafs.Append("slave-ip-address", types.YLeaf{"SlaveIpAddress", ipv4OrIpv6.SlaveIpAddress})
ipv4OrIpv6.EntityData.Leafs.Append("non-negotiated", types.YLeaf{"NonNegotiated", ipv4OrIpv6.NonNegotiated})
ipv4OrIpv6.EntityData.YListKeys = []string {"SlaveIpAddress"}
return &(ipv4OrIpv6.EntityData)
}
// Ptp_Profiles_Profile_SyncInterval
// Sync interval
type Ptp_Profiles_Profile_SyncInterval struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// Interval or Frequency. The type is PtpTime. The default value is interval.
TimeType interface{}
// Time Period. The type is PtpTimePeriod. The default value is 1.
TimePeriod interface{}
}
func (syncInterval *Ptp_Profiles_Profile_SyncInterval) GetEntityData() *types.CommonEntityData {
syncInterval.EntityData.YFilter = syncInterval.YFilter
syncInterval.EntityData.YangName = "sync-interval"
syncInterval.EntityData.BundleName = "cisco_ios_xr"
syncInterval.EntityData.ParentYangName = "profile"
syncInterval.EntityData.SegmentPath = "sync-interval"
syncInterval.EntityData.AbsolutePath = "Cisco-IOS-XR-ptp-cfg:ptp/profiles/profile/" + syncInterval.EntityData.SegmentPath
syncInterval.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
syncInterval.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
syncInterval.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
syncInterval.EntityData.Children = types.NewOrderedMap()
syncInterval.EntityData.Leafs = types.NewOrderedMap()
syncInterval.EntityData.Leafs.Append("time-type", types.YLeaf{"TimeType", syncInterval.TimeType})
syncInterval.EntityData.Leafs.Append("time-period", types.YLeaf{"TimePeriod", syncInterval.TimePeriod})
syncInterval.EntityData.YListKeys = []string {}