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 Aug 26, 2024
1 parent 85e1544 commit 2bc6f0b
Show file tree
Hide file tree
Showing 80 changed files with 28,900 additions and 28,727 deletions.
4 changes: 2 additions & 2 deletions gosnappi/action_protocol_bgp.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,10 +287,10 @@ type ActionProtocolBgp interface {
// HasNotification checks if Notification has been set in ActionProtocolBgp
HasNotification() bool
// InitiateGracefulRestart returns ActionProtocolBgpInitiateGracefulRestart, set in ActionProtocolBgp.
// ActionProtocolBgpInitiateGracefulRestart is initiates BGP Graceful Restart process for the selected BGP peers. If no name is specified then Graceful Restart will be sent to all configured BGP peers.
// ActionProtocolBgpInitiateGracefulRestart is initiates BGP Graceful Restart process for the selected BGP peers. If no name is specified then Graceful Restart will be sent to all configured BGP peers. To emulate scenarios where a peer sends a Notification and stops the session, an optional Notification object is included. If the remote peer and the local peer are both configured to perform Graceful Restart for Notification triggered session , this will result in Graceful Restart scenario to be triggered as per RFC8538.
InitiateGracefulRestart() ActionProtocolBgpInitiateGracefulRestart
// SetInitiateGracefulRestart assigns ActionProtocolBgpInitiateGracefulRestart provided by user to ActionProtocolBgp.
// ActionProtocolBgpInitiateGracefulRestart is initiates BGP Graceful Restart process for the selected BGP peers. If no name is specified then Graceful Restart will be sent to all configured BGP peers.
// ActionProtocolBgpInitiateGracefulRestart is initiates BGP Graceful Restart process for the selected BGP peers. If no name is specified then Graceful Restart will be sent to all configured BGP peers. To emulate scenarios where a peer sends a Notification and stops the session, an optional Notification object is included. If the remote peer and the local peer are both configured to perform Graceful Restart for Notification triggered session , this will result in Graceful Restart scenario to be triggered as per RFC8538.
SetInitiateGracefulRestart(value ActionProtocolBgpInitiateGracefulRestart) ActionProtocolBgp
// HasInitiateGracefulRestart checks if InitiateGracefulRestart has been set in ActionProtocolBgp
HasInitiateGracefulRestart() bool
Expand Down
732 changes: 732 additions & 0 deletions gosnappi/action_protocol_bgp_graceful_restart_notification.go

Large diffs are not rendered by default.

75 changes: 61 additions & 14 deletions gosnappi/action_protocol_bgp_initiate_graceful_restart.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ import (
// ***** ActionProtocolBgpInitiateGracefulRestart *****
type actionProtocolBgpInitiateGracefulRestart struct {
validation
obj *otg.ActionProtocolBgpInitiateGracefulRestart
marshaller marshalActionProtocolBgpInitiateGracefulRestart
unMarshaller unMarshalActionProtocolBgpInitiateGracefulRestart
obj *otg.ActionProtocolBgpInitiateGracefulRestart
marshaller marshalActionProtocolBgpInitiateGracefulRestart
unMarshaller unMarshalActionProtocolBgpInitiateGracefulRestart
notificationHolder ActionProtocolBgpGracefulRestartNotification
}

func NewActionProtocolBgpInitiateGracefulRestart() ActionProtocolBgpInitiateGracefulRestart {
Expand All @@ -29,7 +30,7 @@ func (obj *actionProtocolBgpInitiateGracefulRestart) msg() *otg.ActionProtocolBg
}

func (obj *actionProtocolBgpInitiateGracefulRestart) setMsg(msg *otg.ActionProtocolBgpInitiateGracefulRestart) ActionProtocolBgpInitiateGracefulRestart {

obj.setNil()
proto.Merge(obj.obj, msg)
return obj
}
Expand Down Expand Up @@ -112,7 +113,7 @@ func (m *unMarshalactionProtocolBgpInitiateGracefulRestart) FromPbText(value str
if retObj != nil {
return retObj
}

m.obj.setNil()
vErr := m.obj.validateToAndFrom()
if vErr != nil {
return vErr
Expand Down Expand Up @@ -158,7 +159,7 @@ func (m *unMarshalactionProtocolBgpInitiateGracefulRestart) FromYaml(value strin
return fmt.Errorf("unmarshal error %s", strings.Replace(
uError.Error(), "\u00a0", " ", -1)[7:])
}

m.obj.setNil()
vErr := m.obj.validateToAndFrom()
if vErr != nil {
return vErr
Expand Down Expand Up @@ -197,7 +198,7 @@ func (m *unMarshalactionProtocolBgpInitiateGracefulRestart) FromJson(value strin
return fmt.Errorf("unmarshal error %s", strings.Replace(
uError.Error(), "\u00a0", " ", -1)[7:])
}

m.obj.setNil()
err := m.obj.validateToAndFrom()
if err != nil {
return err
Expand Down Expand Up @@ -242,7 +243,14 @@ func (obj *actionProtocolBgpInitiateGracefulRestart) Clone() (ActionProtocolBgpI
return newObj, nil
}

// ActionProtocolBgpInitiateGracefulRestart is initiates BGP Graceful Restart process for the selected BGP peers. If no name is specified then Graceful Restart will be sent to all configured BGP peers.
func (obj *actionProtocolBgpInitiateGracefulRestart) setNil() {
obj.notificationHolder = nil
obj.validationErrors = nil
obj.warnings = nil
obj.constraints = make(map[string]map[string]Constraints)
}

// ActionProtocolBgpInitiateGracefulRestart is initiates BGP Graceful Restart process for the selected BGP peers. If no name is specified then Graceful Restart will be sent to all configured BGP peers. To emulate scenarios where a peer sends a Notification and stops the session, an optional Notification object is included. If the remote peer and the local peer are both configured to perform Graceful Restart for Notification triggered session , this will result in Graceful Restart scenario to be triggered as per RFC8538.
type ActionProtocolBgpInitiateGracefulRestart interface {
Validation
// msg marshals ActionProtocolBgpInitiateGracefulRestart to protobuf object *otg.ActionProtocolBgpInitiateGracefulRestart
Expand Down Expand Up @@ -274,16 +282,22 @@ type ActionProtocolBgpInitiateGracefulRestart interface {
SetRestartDelay(value uint32) ActionProtocolBgpInitiateGracefulRestart
// HasRestartDelay checks if RestartDelay has been set in ActionProtocolBgpInitiateGracefulRestart
HasRestartDelay() bool
// Notification returns ActionProtocolBgpGracefulRestartNotification, set in ActionProtocolBgpInitiateGracefulRestart.
// ActionProtocolBgpGracefulRestartNotification is defines the explicit contents of the NOTIFICATION message to be sent when executing InitiateGracefulRestart trigger. This causes the BGP connection to close.If a user wants to send custom Error Code and Error Subcode the custom object should be configured. A user can send IANA defined BGP NOTIFICATIONs according to https://www.iana.org/assignments/bgp-parameters/bgp-parameters.xhtml.
Notification() ActionProtocolBgpGracefulRestartNotification
// SetNotification assigns ActionProtocolBgpGracefulRestartNotification provided by user to ActionProtocolBgpInitiateGracefulRestart.
// ActionProtocolBgpGracefulRestartNotification is defines the explicit contents of the NOTIFICATION message to be sent when executing InitiateGracefulRestart trigger. This causes the BGP connection to close.If a user wants to send custom Error Code and Error Subcode the custom object should be configured. A user can send IANA defined BGP NOTIFICATIONs according to https://www.iana.org/assignments/bgp-parameters/bgp-parameters.xhtml.
SetNotification(value ActionProtocolBgpGracefulRestartNotification) ActionProtocolBgpInitiateGracefulRestart
// HasNotification checks if Notification has been set in ActionProtocolBgpInitiateGracefulRestart
HasNotification() bool
setNil()
}

// The names of device BGP peers objects to control.
//
// x-constraint:
// - /components/schemas/Device.Bgp/properties/name
//
// x-constraint:
// - /components/schemas/Device.Bgp/properties/name
//
// PeerNames returns a []string
func (obj *actionProtocolBgpInitiateGracefulRestart) PeerNames() []string {
if obj.obj.PeerNames == nil {
Expand All @@ -297,9 +311,6 @@ func (obj *actionProtocolBgpInitiateGracefulRestart) PeerNames() []string {
// x-constraint:
// - /components/schemas/Device.Bgp/properties/name
//
// x-constraint:
// - /components/schemas/Device.Bgp/properties/name
//
// SetPeerNames sets the []string value in the ActionProtocolBgpInitiateGracefulRestart object
func (obj *actionProtocolBgpInitiateGracefulRestart) SetPeerNames(value []string) ActionProtocolBgpInitiateGracefulRestart {

Expand Down Expand Up @@ -336,6 +347,37 @@ func (obj *actionProtocolBgpInitiateGracefulRestart) SetRestartDelay(value uint3
return obj
}

// Send a Notification to the peer as per configured parameters when initially bringing down a session as per
// configured parameters.
// Notification returns a ActionProtocolBgpGracefulRestartNotification
func (obj *actionProtocolBgpInitiateGracefulRestart) Notification() ActionProtocolBgpGracefulRestartNotification {
if obj.obj.Notification == nil {
obj.obj.Notification = NewActionProtocolBgpGracefulRestartNotification().msg()
}
if obj.notificationHolder == nil {
obj.notificationHolder = &actionProtocolBgpGracefulRestartNotification{obj: obj.obj.Notification}
}
return obj.notificationHolder
}

// Send a Notification to the peer as per configured parameters when initially bringing down a session as per
// configured parameters.
// Notification returns a ActionProtocolBgpGracefulRestartNotification
func (obj *actionProtocolBgpInitiateGracefulRestart) HasNotification() bool {
return obj.obj.Notification != nil
}

// Send a Notification to the peer as per configured parameters when initially bringing down a session as per
// configured parameters.
// SetNotification sets the ActionProtocolBgpGracefulRestartNotification value in the ActionProtocolBgpInitiateGracefulRestart object
func (obj *actionProtocolBgpInitiateGracefulRestart) SetNotification(value ActionProtocolBgpGracefulRestartNotification) ActionProtocolBgpInitiateGracefulRestart {

obj.notificationHolder = nil
obj.obj.Notification = value.msg()

return obj
}

func (obj *actionProtocolBgpInitiateGracefulRestart) validateObj(vObj *validation, set_default bool) {
if set_default {
obj.setDefault()
Expand All @@ -351,6 +393,11 @@ func (obj *actionProtocolBgpInitiateGracefulRestart) validateObj(vObj *validatio

}

if obj.obj.Notification != nil {

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

}

func (obj *actionProtocolBgpInitiateGracefulRestart) setDefault() {
Expand Down
10 changes: 2 additions & 8 deletions gosnappi/action_protocol_bgp_notification.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,10 +295,10 @@ type ActionProtocolBgpNotification interface {
// HasChoice checks if Choice has been set in ActionProtocolBgpNotification
HasChoice() bool
// Cease returns DeviceBgpCeaseError, set in ActionProtocolBgpNotification.
// DeviceBgpCeaseError is in the absence of any fatal errors, a BGP peer can close its BGP connection by sending the NOTIFICATION message with the Error Code Cease.
// DeviceBgpCeaseError is in the absence of any fatal errors, a BGP peer can close its BGP connection by sending the NOTIFICATION message with the Error Code Cease. The 'hard_reset_code6_subcode9' subcode for Cease Notification can be used to signal a hard reset that will indicate that Graceful Restart cannot be performed, even when Notification extensions to Graceful Restart procedure is supported.
Cease() DeviceBgpCeaseError
// SetCease assigns DeviceBgpCeaseError provided by user to ActionProtocolBgpNotification.
// DeviceBgpCeaseError is in the absence of any fatal errors, a BGP peer can close its BGP connection by sending the NOTIFICATION message with the Error Code Cease.
// DeviceBgpCeaseError is in the absence of any fatal errors, a BGP peer can close its BGP connection by sending the NOTIFICATION message with the Error Code Cease. The 'hard_reset_code6_subcode9' subcode for Cease Notification can be used to signal a hard reset that will indicate that Graceful Restart cannot be performed, even when Notification extensions to Graceful Restart procedure is supported.
SetCease(value DeviceBgpCeaseError) ActionProtocolBgpNotification
// HasCease checks if Cease has been set in ActionProtocolBgpNotification
HasCease() bool
Expand Down Expand Up @@ -358,9 +358,6 @@ type ActionProtocolBgpNotification interface {
// x-constraint:
// - /components/schemas/Device.Bgp/properties/name
//
// x-constraint:
// - /components/schemas/Device.Bgp/properties/name
//
// Names returns a []string
func (obj *actionProtocolBgpNotification) Names() []string {
if obj.obj.Names == nil {
Expand All @@ -374,9 +371,6 @@ func (obj *actionProtocolBgpNotification) Names() []string {
// x-constraint:
// - /components/schemas/Device.Bgp/properties/name
//
// x-constraint:
// - /components/schemas/Device.Bgp/properties/name
//
// SetNames sets the []string value in the ActionProtocolBgpNotification object
func (obj *actionProtocolBgpNotification) SetNames(value []string) ActionProtocolBgpNotification {

Expand Down
11 changes: 0 additions & 11 deletions gosnappi/action_protocol_ipv4_ping_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,6 @@ func (obj *actionProtocolIpv4PingRequest) Clone() (ActionProtocolIpv4PingRequest

// ActionProtocolIpv4PingRequest is under Review: Most ping request parameters are still TBD.
//
// Under Review: Most ping request parameters are still TBD.
//
// Request for initiating ping between a single source and destination pair.
// For ping request, 1 IPv4 ICMP Echo Request shall be sent and wait for ping response to either succeed or time out. The API wait timeout for each request shall be 300ms.
type ActionProtocolIpv4PingRequest interface {
Expand Down Expand Up @@ -288,9 +286,6 @@ type ActionProtocolIpv4PingRequest interface {
// x-constraint:
// - /components/schemas/Device.Ipv4/properties/name
//
// x-constraint:
// - /components/schemas/Device.Ipv4/properties/name
//
// SrcName returns a string
func (obj *actionProtocolIpv4PingRequest) SrcName() string {

Expand All @@ -303,9 +298,6 @@ func (obj *actionProtocolIpv4PingRequest) SrcName() string {
// x-constraint:
// - /components/schemas/Device.Ipv4/properties/name
//
// x-constraint:
// - /components/schemas/Device.Ipv4/properties/name
//
// SrcName returns a string
func (obj *actionProtocolIpv4PingRequest) HasSrcName() bool {
return obj.obj.SrcName != nil
Expand All @@ -316,9 +308,6 @@ func (obj *actionProtocolIpv4PingRequest) HasSrcName() bool {
// x-constraint:
// - /components/schemas/Device.Ipv4/properties/name
//
// x-constraint:
// - /components/schemas/Device.Ipv4/properties/name
//
// SetSrcName sets the string value in the ActionProtocolIpv4PingRequest object
func (obj *actionProtocolIpv4PingRequest) SetSrcName(value string) ActionProtocolIpv4PingRequest {

Expand Down
11 changes: 0 additions & 11 deletions gosnappi/action_protocol_ipv6_ping_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,6 @@ func (obj *actionProtocolIpv6PingRequest) Clone() (ActionProtocolIpv6PingRequest

// ActionProtocolIpv6PingRequest is under Review: Most ping request parameters are still TBD.
//
// Under Review: Most ping request parameters are still TBD.
//
// Request for initiating ping between a single source and destination pair.
// For ping request, 1 IPv6 ICMP Echo Request shall be sent and wait for ping response to either succeed or time out. The API wait timeout for each request shall be 300ms.
type ActionProtocolIpv6PingRequest interface {
Expand Down Expand Up @@ -288,9 +286,6 @@ type ActionProtocolIpv6PingRequest interface {
// x-constraint:
// - /components/schemas/Device.Ipv6/properties/name
//
// x-constraint:
// - /components/schemas/Device.Ipv6/properties/name
//
// SrcName returns a string
func (obj *actionProtocolIpv6PingRequest) SrcName() string {

Expand All @@ -303,9 +298,6 @@ func (obj *actionProtocolIpv6PingRequest) SrcName() string {
// x-constraint:
// - /components/schemas/Device.Ipv6/properties/name
//
// x-constraint:
// - /components/schemas/Device.Ipv6/properties/name
//
// SrcName returns a string
func (obj *actionProtocolIpv6PingRequest) HasSrcName() bool {
return obj.obj.SrcName != nil
Expand All @@ -316,9 +308,6 @@ func (obj *actionProtocolIpv6PingRequest) HasSrcName() bool {
// x-constraint:
// - /components/schemas/Device.Ipv6/properties/name
//
// x-constraint:
// - /components/schemas/Device.Ipv6/properties/name
//
// SetSrcName sets the string value in the ActionProtocolIpv6PingRequest object
func (obj *actionProtocolIpv6PingRequest) SetSrcName(value string) ActionProtocolIpv6PingRequest {

Expand Down
6 changes: 0 additions & 6 deletions gosnappi/action_response_protocol_ipv4_ping_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,6 @@ type ActionResponseProtocolIpv4PingResponse interface {
// x-constraint:
// - /components/schemas/Device.Ipv4/properties/name
//
// x-constraint:
// - /components/schemas/Device.Ipv4/properties/name
//
// SrcName returns a string
func (obj *actionResponseProtocolIpv4PingResponse) SrcName() string {

Expand All @@ -298,9 +295,6 @@ func (obj *actionResponseProtocolIpv4PingResponse) SrcName() string {
// x-constraint:
// - /components/schemas/Device.Ipv4/properties/name
//
// x-constraint:
// - /components/schemas/Device.Ipv4/properties/name
//
// SetSrcName sets the string value in the ActionResponseProtocolIpv4PingResponse object
func (obj *actionResponseProtocolIpv4PingResponse) SetSrcName(value string) ActionResponseProtocolIpv4PingResponse {

Expand Down
6 changes: 0 additions & 6 deletions gosnappi/action_response_protocol_ipv6_ping_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,6 @@ type ActionResponseProtocolIpv6PingResponse interface {
// x-constraint:
// - /components/schemas/Device.Ipv6/properties/name
//
// x-constraint:
// - /components/schemas/Device.Ipv6/properties/name
//
// SrcName returns a string
func (obj *actionResponseProtocolIpv6PingResponse) SrcName() string {

Expand All @@ -298,9 +295,6 @@ func (obj *actionResponseProtocolIpv6PingResponse) SrcName() string {
// x-constraint:
// - /components/schemas/Device.Ipv6/properties/name
//
// x-constraint:
// - /components/schemas/Device.Ipv6/properties/name
//
// SetSrcName sets the string value in the ActionResponseProtocolIpv6PingResponse object
func (obj *actionResponseProtocolIpv6PingResponse) SetSrcName(value string) ActionResponseProtocolIpv6PingResponse {

Expand Down
34 changes: 17 additions & 17 deletions gosnappi/bgp_attributes_community.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,16 +278,16 @@ type BgpAttributesCommunity interface {
Choice() BgpAttributesCommunityChoiceEnum
// setChoice assigns BgpAttributesCommunityChoiceEnum provided by user to BgpAttributesCommunity
setChoice(value BgpAttributesCommunityChoiceEnum) BgpAttributesCommunity
// getter for NoExportSubconfed to set choice.
NoExportSubconfed()
// getter for LlgrStale to set choice.
LlgrStale()
// getter for NoLlgr to set choice.
NoLlgr()
// getter for NoAdvertised to set choice.
NoAdvertised()
// getter for NoExport to set choice.
NoExport()
// getter for NoExportSubconfed to set choice.
NoExportSubconfed()
// getter for NoAdvertised to set choice.
NoAdvertised()
// getter for NoLlgr to set choice.
NoLlgr()
// 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 @@ -322,29 +322,29 @@ func (obj *bgpAttributesCommunity) Choice() BgpAttributesCommunityChoiceEnum {
return BgpAttributesCommunityChoiceEnum(obj.obj.Choice.Enum().String())
}

// 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)
}

// getter for NoLlgr to set choice
func (obj *bgpAttributesCommunity) NoLlgr() {
obj.setChoice(BgpAttributesCommunityChoice.NO_LLGR)
// getter for NoExport to set choice
func (obj *bgpAttributesCommunity) NoExport() {
obj.setChoice(BgpAttributesCommunityChoice.NO_EXPORT)
}

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

// getter for NoExport to set choice
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)
// getter for NoLlgr to set choice
func (obj *bgpAttributesCommunity) NoLlgr() {
obj.setChoice(BgpAttributesCommunityChoice.NO_LLGR)
}

func (obj *bgpAttributesCommunity) setChoice(value BgpAttributesCommunityChoiceEnum) BgpAttributesCommunity {
Expand Down
Loading

0 comments on commit 2bc6f0b

Please sign in to comment.