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
/
infra_nsr_cfg.go
87 lines (72 loc) · 3.24 KB
/
infra_nsr_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
// This module contains a collection of YANG definitions
// for Cisco IOS-XR infra-nsr package configuration.
//
// This module contains definitions
// for the following management objects:
// nsr: NSR global configuration
//
// Copyright (c) 2013-2018 by Cisco Systems, Inc.
// All rights reserved.
package infra_nsr_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 infra_nsr_cfg"))
ydk.RegisterEntity("{http://cisco.com/ns/yang/Cisco-IOS-XR-infra-nsr-cfg nsr}", reflect.TypeOf(Nsr{}))
ydk.RegisterEntity("Cisco-IOS-XR-infra-nsr-cfg:nsr", reflect.TypeOf(Nsr{}))
}
// Nsr
// NSR global configuration
type Nsr struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// Recovery action for process failures on active RP/DRP.
ProcessFailure Nsr_ProcessFailure
}
func (nsr *Nsr) GetEntityData() *types.CommonEntityData {
nsr.EntityData.YFilter = nsr.YFilter
nsr.EntityData.YangName = "nsr"
nsr.EntityData.BundleName = "cisco_ios_xr"
nsr.EntityData.ParentYangName = "Cisco-IOS-XR-infra-nsr-cfg"
nsr.EntityData.SegmentPath = "Cisco-IOS-XR-infra-nsr-cfg:nsr"
nsr.EntityData.AbsolutePath = nsr.EntityData.SegmentPath
nsr.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
nsr.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
nsr.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
nsr.EntityData.Children = types.NewOrderedMap()
nsr.EntityData.Children.Append("process-failure", types.YChild{"ProcessFailure", &nsr.ProcessFailure})
nsr.EntityData.Leafs = types.NewOrderedMap()
nsr.EntityData.YListKeys = []string {}
return &(nsr.EntityData)
}
// Nsr_ProcessFailure
// Recovery action for process failures on active
// RP/DRP
type Nsr_ProcessFailure struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// Enable RP/DRP switchover on process failures. The type is interface{}.
Switchover interface{}
}
func (processFailure *Nsr_ProcessFailure) GetEntityData() *types.CommonEntityData {
processFailure.EntityData.YFilter = processFailure.YFilter
processFailure.EntityData.YangName = "process-failure"
processFailure.EntityData.BundleName = "cisco_ios_xr"
processFailure.EntityData.ParentYangName = "nsr"
processFailure.EntityData.SegmentPath = "process-failure"
processFailure.EntityData.AbsolutePath = "Cisco-IOS-XR-infra-nsr-cfg:nsr/" + processFailure.EntityData.SegmentPath
processFailure.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
processFailure.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
processFailure.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
processFailure.EntityData.Children = types.NewOrderedMap()
processFailure.EntityData.Leafs = types.NewOrderedMap()
processFailure.EntityData.Leafs.Append("switchover", types.YLeaf{"Switchover", processFailure.Switchover})
processFailure.EntityData.YListKeys = []string {}
return &(processFailure.EntityData)
}