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
/
efp_oper.go
110 lines (90 loc) · 4.3 KB
/
efp_oper.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
// This module contains a collection of YANG definitions
// for service instance (efp) stats.
// Copyright (c) 2016-2017 by Cisco Systems, Inc.
// All rights reserved.
package efp_oper
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_xe"
"reflect"
)
func init() {
ydk.YLogDebug(fmt.Sprintf("Registering top level entities for package efp_oper"))
ydk.RegisterEntity("{http://cisco.com/ns/yang/Cisco-IOS-XE-efp-oper efp-stats}", reflect.TypeOf(EfpStats{}))
ydk.RegisterEntity("Cisco-IOS-XE-efp-oper:efp-stats", reflect.TypeOf(EfpStats{}))
}
// EfpStats
// Service instance stats
type EfpStats struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// List of service instance stats. The type is slice of EfpStats_EfpStat.
EfpStat []*EfpStats_EfpStat
}
func (efpStats *EfpStats) GetEntityData() *types.CommonEntityData {
efpStats.EntityData.YFilter = efpStats.YFilter
efpStats.EntityData.YangName = "efp-stats"
efpStats.EntityData.BundleName = "cisco_ios_xe"
efpStats.EntityData.ParentYangName = "Cisco-IOS-XE-efp-oper"
efpStats.EntityData.SegmentPath = "Cisco-IOS-XE-efp-oper:efp-stats"
efpStats.EntityData.AbsolutePath = efpStats.EntityData.SegmentPath
efpStats.EntityData.CapabilitiesTable = cisco_ios_xe.GetCapabilities()
efpStats.EntityData.NamespaceTable = cisco_ios_xe.GetNamespaces()
efpStats.EntityData.BundleYangModelsLocation = cisco_ios_xe.GetModelsPath()
efpStats.EntityData.Children = types.NewOrderedMap()
efpStats.EntityData.Children.Append("efp-stat", types.YChild{"EfpStat", nil})
for i := range efpStats.EfpStat {
efpStats.EntityData.Children.Append(types.GetSegmentPath(efpStats.EfpStat[i]), types.YChild{"EfpStat", efpStats.EfpStat[i]})
}
efpStats.EntityData.Leafs = types.NewOrderedMap()
efpStats.EntityData.YListKeys = []string {}
return &(efpStats.EntityData)
}
// EfpStats_EfpStat
// List of service instance stats
type EfpStats_EfpStat struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
YListKey string
// This attribute is a key. EFP id. The type is interface{} with range:
// 0..4294967295.
Id interface{}
// This attribute is a key. Interface name. The type is string.
Interface interface{}
// Incoming packets. The type is interface{} with range:
// 0..18446744073709551615.
InPkts interface{}
// Incoming bytes. The type is interface{} with range:
// 0..18446744073709551615.
InBytes interface{}
// Outgoing packets. The type is interface{} with range:
// 0..18446744073709551615.
OutPkts interface{}
// Outgoing bytes. The type is interface{} with range:
// 0..18446744073709551615.
OutBytes interface{}
}
func (efpStat *EfpStats_EfpStat) GetEntityData() *types.CommonEntityData {
efpStat.EntityData.YFilter = efpStat.YFilter
efpStat.EntityData.YangName = "efp-stat"
efpStat.EntityData.BundleName = "cisco_ios_xe"
efpStat.EntityData.ParentYangName = "efp-stats"
efpStat.EntityData.SegmentPath = "efp-stat" + types.AddKeyToken(efpStat.Id, "id") + types.AddKeyToken(efpStat.Interface, "interface")
efpStat.EntityData.AbsolutePath = "Cisco-IOS-XE-efp-oper:efp-stats/" + efpStat.EntityData.SegmentPath
efpStat.EntityData.CapabilitiesTable = cisco_ios_xe.GetCapabilities()
efpStat.EntityData.NamespaceTable = cisco_ios_xe.GetNamespaces()
efpStat.EntityData.BundleYangModelsLocation = cisco_ios_xe.GetModelsPath()
efpStat.EntityData.Children = types.NewOrderedMap()
efpStat.EntityData.Leafs = types.NewOrderedMap()
efpStat.EntityData.Leafs.Append("id", types.YLeaf{"Id", efpStat.Id})
efpStat.EntityData.Leafs.Append("interface", types.YLeaf{"Interface", efpStat.Interface})
efpStat.EntityData.Leafs.Append("in-pkts", types.YLeaf{"InPkts", efpStat.InPkts})
efpStat.EntityData.Leafs.Append("in-bytes", types.YLeaf{"InBytes", efpStat.InBytes})
efpStat.EntityData.Leafs.Append("out-pkts", types.YLeaf{"OutPkts", efpStat.OutPkts})
efpStat.EntityData.Leafs.Append("out-bytes", types.YLeaf{"OutBytes", efpStat.OutBytes})
efpStat.EntityData.YListKeys = []string {"Id", "Interface"}
return &(efpStat.EntityData)
}