Skip to content

Commit

Permalink
Update auto generated go snappi
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Oct 22, 2024
1 parent a289d96 commit e4a0859
Show file tree
Hide file tree
Showing 60 changed files with 76,781 additions and 45,799 deletions.
14 changes: 7 additions & 7 deletions gosnappi/bgp_attributes_community.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,12 +282,12 @@ type BgpAttributesCommunity interface {
NoLlgr()
// getter for NoAdvertised to set choice.
NoAdvertised()
// getter for NoExportSubconfed to set choice.
NoExportSubconfed()
// getter for LlgrStale to set choice.
LlgrStale()
// getter for NoExport to set choice.
NoExport()
// getter for NoExportSubconfed to set choice.
NoExportSubconfed()
// CustomCommunity returns BgpAttributesCustomCommunity, set in BgpAttributesCommunity.
// BgpAttributesCustomCommunity is user defined COMMUNITY attribute containing 2 byte AS and custom 2 byte value defined by the administrator of the domain.
CustomCommunity() BgpAttributesCustomCommunity
Expand Down Expand Up @@ -332,11 +332,6 @@ func (obj *bgpAttributesCommunity) NoAdvertised() {
obj.setChoice(BgpAttributesCommunityChoice.NO_ADVERTISED)
}

// getter for NoExportSubconfed to set choice
func (obj *bgpAttributesCommunity) NoExportSubconfed() {
obj.setChoice(BgpAttributesCommunityChoice.NO_EXPORT_SUBCONFED)
}

// getter for LlgrStale to set choice
func (obj *bgpAttributesCommunity) LlgrStale() {
obj.setChoice(BgpAttributesCommunityChoice.LLGR_STALE)
Expand All @@ -347,6 +342,11 @@ func (obj *bgpAttributesCommunity) NoExport() {
obj.setChoice(BgpAttributesCommunityChoice.NO_EXPORT)
}

// getter for NoExportSubconfed to set choice
func (obj *bgpAttributesCommunity) NoExportSubconfed() {
obj.setChoice(BgpAttributesCommunityChoice.NO_EXPORT_SUBCONFED)
}

func (obj *bgpAttributesCommunity) setChoice(value BgpAttributesCommunityChoiceEnum) BgpAttributesCommunity {
intValue, ok := otg.BgpAttributesCommunity_Choice_Enum_value[string(value)]
if !ok {
Expand Down
34 changes: 17 additions & 17 deletions gosnappi/bgp_attributes_sr_policy_explicit_null_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,14 +274,14 @@ type BgpAttributesSrPolicyExplicitNullPolicy interface {
HasChoice() bool
// getter for PushIpv6 to set choice.
PushIpv6()
// getter for PushIpv4 to set choice.
PushIpv4()
// getter for PushIpv4AndIpv6 to set choice.
PushIpv4AndIpv6()
// getter for Unknown to set choice.
Unknown()
// getter for DonotPush to set choice.
DonotPush()
// getter for Unknown to set choice.
Unknown()
// getter for PushIpv4AndIpv6 to set choice.
PushIpv4AndIpv6()
// getter for PushIpv4 to set choice.
PushIpv4()
}

type BgpAttributesSrPolicyExplicitNullPolicyChoiceEnum string
Expand Down Expand Up @@ -310,24 +310,24 @@ func (obj *bgpAttributesSrPolicyExplicitNullPolicy) PushIpv6() {
obj.setChoice(BgpAttributesSrPolicyExplicitNullPolicyChoice.PUSH_IPV6)
}

// getter for PushIpv4 to set choice
func (obj *bgpAttributesSrPolicyExplicitNullPolicy) PushIpv4() {
obj.setChoice(BgpAttributesSrPolicyExplicitNullPolicyChoice.PUSH_IPV4)
}

// getter for PushIpv4AndIpv6 to set choice
func (obj *bgpAttributesSrPolicyExplicitNullPolicy) PushIpv4AndIpv6() {
obj.setChoice(BgpAttributesSrPolicyExplicitNullPolicyChoice.PUSH_IPV4_AND_IPV6)
// getter for DonotPush to set choice
func (obj *bgpAttributesSrPolicyExplicitNullPolicy) DonotPush() {
obj.setChoice(BgpAttributesSrPolicyExplicitNullPolicyChoice.DONOT_PUSH)
}

// getter for Unknown to set choice
func (obj *bgpAttributesSrPolicyExplicitNullPolicy) Unknown() {
obj.setChoice(BgpAttributesSrPolicyExplicitNullPolicyChoice.UNKNOWN)
}

// getter for DonotPush to set choice
func (obj *bgpAttributesSrPolicyExplicitNullPolicy) DonotPush() {
obj.setChoice(BgpAttributesSrPolicyExplicitNullPolicyChoice.DONOT_PUSH)
// getter for PushIpv4AndIpv6 to set choice
func (obj *bgpAttributesSrPolicyExplicitNullPolicy) PushIpv4AndIpv6() {
obj.setChoice(BgpAttributesSrPolicyExplicitNullPolicyChoice.PUSH_IPV4_AND_IPV6)
}

// getter for PushIpv4 to set choice
func (obj *bgpAttributesSrPolicyExplicitNullPolicy) PushIpv4() {
obj.setChoice(BgpAttributesSrPolicyExplicitNullPolicyChoice.PUSH_IPV4)
}

// The Explicit NULL Label policy.
Expand Down
51 changes: 51 additions & 0 deletions gosnappi/device.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ type device struct {
vxlanHolder DeviceVxlan
rsvpHolder DeviceRsvp
dhcpServerHolder DeviceDhcpServer
ospfv2Holder DeviceOspfv2Router
}

func NewDevice() Device {
Expand Down Expand Up @@ -259,6 +260,7 @@ func (obj *device) setNil() {
obj.vxlanHolder = nil
obj.rsvpHolder = nil
obj.dhcpServerHolder = nil
obj.ospfv2Holder = nil
obj.validationErrors = nil
obj.warnings = nil
obj.constraints = make(map[string]map[string]Constraints)
Expand Down Expand Up @@ -336,6 +338,22 @@ type Device interface {
SetDhcpServer(value DeviceDhcpServer) Device
// HasDhcpServer checks if DhcpServer has been set in Device
HasDhcpServer() bool
// Ospfv2 returns DeviceOspfv2Router, set in Device.
// DeviceOspfv2Router is under Review: OSPFv2 is currently under review for pending exploration on use cases.
//
// Under Review: OSPFv2 is currently under review for pending exploration on use cases.
//
// A container of properties for an OSPFv2 router and its interfaces & Route Ranges.
Ospfv2() DeviceOspfv2Router
// SetOspfv2 assigns DeviceOspfv2Router provided by user to Device.
// DeviceOspfv2Router is under Review: OSPFv2 is currently under review for pending exploration on use cases.
//
// Under Review: OSPFv2 is currently under review for pending exploration on use cases.
//
// A container of properties for an OSPFv2 router and its interfaces & Route Ranges.
SetOspfv2(value DeviceOspfv2Router) Device
// HasOspfv2 checks if Ospfv2 has been set in Device
HasOspfv2() bool
setNil()
}

Expand Down Expand Up @@ -756,6 +774,34 @@ func (obj *device) SetDhcpServer(value DeviceDhcpServer) Device {
return obj
}

// Configuration for OSPFv2 router.
// Ospfv2 returns a DeviceOspfv2Router
func (obj *device) Ospfv2() DeviceOspfv2Router {
if obj.obj.Ospfv2 == nil {
obj.obj.Ospfv2 = NewDeviceOspfv2Router().msg()
}
if obj.ospfv2Holder == nil {
obj.ospfv2Holder = &deviceOspfv2Router{obj: obj.obj.Ospfv2}
}
return obj.ospfv2Holder
}

// Configuration for OSPFv2 router.
// Ospfv2 returns a DeviceOspfv2Router
func (obj *device) HasOspfv2() bool {
return obj.obj.Ospfv2 != nil
}

// Configuration for OSPFv2 router.
// SetOspfv2 sets the DeviceOspfv2Router value in the Device object
func (obj *device) SetOspfv2(value DeviceOspfv2Router) Device {

obj.ospfv2Holder = nil
obj.obj.Ospfv2 = value.msg()

return obj
}

func (obj *device) validateObj(vObj *validation, set_default bool) {
if set_default {
obj.setDefault()
Expand Down Expand Up @@ -833,6 +879,11 @@ func (obj *device) validateObj(vObj *validation, set_default bool) {
obj.DhcpServer().validateObj(vObj, set_default)
}

if obj.obj.Ospfv2 != nil {

obj.Ospfv2().validateObj(vObj, set_default)
}

}

func (obj *device) setDefault() {
Expand Down
Loading

0 comments on commit e4a0859

Please sign in to comment.