Skip to content

Commit

Permalink
Merge branch 'main' into refactor-go-sdk
Browse files Browse the repository at this point in the history
# Conflicts:
#	requirements.txt
  • Loading branch information
vhowdhur committed Dec 2, 2023
2 parents b0de3bd + 6353c49 commit 4ebdea0
Show file tree
Hide file tree
Showing 11 changed files with 14,049 additions and 13,876 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ jobs:
- name: Publish package
if: github.ref == 'refs/heads/main' && steps.check_tag.outputs.exists == 'false'
run: |
PYPI_USERNAME=${{ secrets.PYPI_USERNAME }} PYPI_PASSWORD=${{ secrets.PYPI_PASSWORD }} python do.py release
PYPI_USERNAME=__token__ PYPI_PASSWORD=${{ secrets.PYPI_API_TOKEN }} python do.py release
- name: Create release and publish artifacts
if: github.ref == 'refs/heads/main' && steps.check_tag.outputs.exists == 'false'
uses: ncipollo/release-action@v1
Expand Down
2 changes: 1 addition & 1 deletion gosnappi/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.16
require (
github.com/Masterminds/semver/v3 v3.2.1
github.com/ghodss/yaml v1.0.0
github.com/gorilla/mux v1.8.0
github.com/gorilla/mux v1.8.1
github.com/stretchr/testify v1.8.4
google.golang.org/grpc v1.59.0
google.golang.org/protobuf v1.31.0
Expand Down
4 changes: 2 additions & 2 deletions gosnappi/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -948,8 +948,8 @@ github.com/googleapis/gax-go/v2 v2.10.0/go.mod h1:4UOEnMCrxsSqQ940WnTiD6qJ63le2e
github.com/googleapis/gax-go/v2 v2.11.0/go.mod h1:DxmR61SGKkGLa2xigwuZIQpkCI2S5iydzRfb3peWZJI=
github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4=
github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g=
github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=
github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w=
Expand Down
96 changes: 82 additions & 14 deletions gosnappi/gosnappi.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Open Traffic Generator API 0.13.0
/* Open Traffic Generator API 0.13.2
* Open Traffic Generator API defines a model-driven, vendor-neutral and standard
* interface for emulating layer 2-7 network devices and generating test traffic.
*
Expand Down Expand Up @@ -250,7 +250,7 @@ type Api interface {

func (api *gosnappiApi) GetLocalVersion() Version {
if api.versionMeta.localVersion == nil {
api.versionMeta.localVersion = NewVersion().SetApiSpecVersion("0.13.0").SetSdkVersion("0.13.0")
api.versionMeta.localVersion = NewVersion().SetApiSpecVersion("0.13.2").SetSdkVersion("0.13.2")
}

return api.versionMeta.localVersion
Expand Down Expand Up @@ -1316,6 +1316,8 @@ func (obj *configLagIter) appendHolderSlice(item Lag) ConfigLagIter {
}

// The layer1 settings that will be configured on the traffic generator.
// Since layer1 settings usually vary across variety of test ports, these
// most likely won't be portable.
// Layer1 returns a []Layer1
func (obj *config) Layer1() ConfigLayer1Iter {
if len(obj.obj.Layer1) == 0 {
Expand Down Expand Up @@ -8870,7 +8872,8 @@ func (obj *layer1) Speed() Layer1SpeedEnum {
return Layer1SpeedEnum(obj.obj.Speed.Enum().String())
}

// Set the speed if supported.
// Set the speed if supported. When no speed is explicitly set, the current
// speed of underlying test interface shall be assumed.
// Speed returns a string
func (obj *layer1) HasSpeed() bool {
return obj.obj.Speed != nil
Expand Down Expand Up @@ -8906,7 +8909,9 @@ func (obj *layer1) Media() Layer1MediaEnum {
return Layer1MediaEnum(obj.obj.Media.Enum().String())
}

// Set the type of media interface if supported.
// Set the type of media for test interface if supported. When no media
// type is explicitly set, the current media type of underlying test
// interface shall be assumed.
// Media returns a string
func (obj *layer1) HasMedia() bool {
return obj.obj.Media != nil
Expand All @@ -8925,50 +8930,63 @@ func (obj *layer1) SetMedia(value Layer1MediaEnum) Layer1 {
return obj
}

// Enable promiscuous mode if supported.
// Enable promiscuous mode on test interface. A warning shall be raised if
// this field is set to `true`, even when it's not supported, ignoring
// the setting altogether.
// Promiscuous returns a bool
func (obj *layer1) Promiscuous() bool {

return *obj.obj.Promiscuous

}

// Enable promiscuous mode if supported.
// Enable promiscuous mode on test interface. A warning shall be raised if
// this field is set to `true`, even when it's not supported, ignoring
// the setting altogether.
// Promiscuous returns a bool
func (obj *layer1) HasPromiscuous() bool {
return obj.obj.Promiscuous != nil
}

// Enable promiscuous mode if supported.
// Enable promiscuous mode on test interface. A warning shall be raised if
// this field is set to `true`, even when it's not supported, ignoring
// the setting altogether.
// SetPromiscuous sets the bool value in the Layer1 object
func (obj *layer1) SetPromiscuous(value bool) Layer1 {

obj.obj.Promiscuous = &value
return obj
}

// Set the maximum transmission unit size if supported.
// Set the maximum transmission unit size. A warning shall be raised if
// the specified value is valid but not supported, ignoring the setting altogether.
// Mtu returns a uint32
func (obj *layer1) Mtu() uint32 {

return *obj.obj.Mtu

}

// Set the maximum transmission unit size if supported.
// Set the maximum transmission unit size. A warning shall be raised if
// the specified value is valid but not supported, ignoring the setting altogether.
// Mtu returns a uint32
func (obj *layer1) HasMtu() bool {
return obj.obj.Mtu != nil
}

// Set the maximum transmission unit size if supported.
// Set the maximum transmission unit size. A warning shall be raised if
// the specified value is valid but not supported, ignoring the setting altogether.
// SetMtu sets the uint32 value in the Layer1 object
func (obj *layer1) SetMtu(value uint32) Layer1 {

obj.obj.Mtu = &value
return obj
}

// Under Review: This field is currently under review for pending exploration on use cases
//
// Under Review: This field is currently under review for pending exploration on use cases
//
// Set to true to override the auto_negotiate, link_training
// and rs_fec settings for gigabit ethernet interfaces.
// IeeeMediaDefaults returns a bool
Expand All @@ -8978,13 +8996,21 @@ func (obj *layer1) IeeeMediaDefaults() bool {

}

// Under Review: This field is currently under review for pending exploration on use cases
//
// Under Review: This field is currently under review for pending exploration on use cases
//
// Set to true to override the auto_negotiate, link_training
// and rs_fec settings for gigabit ethernet interfaces.
// IeeeMediaDefaults returns a bool
func (obj *layer1) HasIeeeMediaDefaults() bool {
return obj.obj.IeeeMediaDefaults != nil
}

// Under Review: This field is currently under review for pending exploration on use cases
//
// Under Review: This field is currently under review for pending exploration on use cases
//
// Set to true to override the auto_negotiate, link_training
// and rs_fec settings for gigabit ethernet interfaces.
// SetIeeeMediaDefaults sets the bool value in the Layer1 object
Expand All @@ -8994,6 +9020,10 @@ func (obj *layer1) SetIeeeMediaDefaults(value bool) Layer1 {
return obj
}

// Under Review: This field is currently under review for pending exploration on use cases, given that a separate configuration called `AutoNegotiation` already exists.
//
// Under Review: This field is currently under review for pending exploration on use cases, given that a separate configuration called `AutoNegotiation` already exists.
//
// Enable/disable auto negotiation.
// AutoNegotiate returns a bool
func (obj *layer1) AutoNegotiate() bool {
Expand All @@ -9002,12 +9032,20 @@ func (obj *layer1) AutoNegotiate() bool {

}

// Under Review: This field is currently under review for pending exploration on use cases, given that a separate configuration called `AutoNegotiation` already exists.
//
// Under Review: This field is currently under review for pending exploration on use cases, given that a separate configuration called `AutoNegotiation` already exists.
//
// Enable/disable auto negotiation.
// AutoNegotiate returns a bool
func (obj *layer1) HasAutoNegotiate() bool {
return obj.obj.AutoNegotiate != nil
}

// Under Review: This field is currently under review for pending exploration on use cases, given that a separate configuration called `AutoNegotiation` already exists.
//
// Under Review: This field is currently under review for pending exploration on use cases, given that a separate configuration called `AutoNegotiation` already exists.
//
// Enable/disable auto negotiation.
// SetAutoNegotiate sets the bool value in the Layer1 object
func (obj *layer1) SetAutoNegotiate(value bool) Layer1 {
Expand Down Expand Up @@ -9120,10 +9158,6 @@ func (obj *layer1) validateObj(vObj *validation, set_default bool) {
}

func (obj *layer1) setDefault() {
if obj.obj.Speed == nil {
obj.SetSpeed(Layer1Speed.SPEED_10_GBPS)

}
if obj.obj.Promiscuous == nil {
obj.SetPromiscuous(true)
}
Expand Down Expand Up @@ -184103,6 +184137,12 @@ type BgpAdvanced interface {
SetMd5Key(value string) BgpAdvanced
// HasMd5Key checks if Md5Key has been set in BgpAdvanced
HasMd5Key() bool
// PassiveMode returns bool, set in BgpAdvanced.
PassiveMode() bool
// SetPassiveMode assigns bool provided by user to BgpAdvanced
SetPassiveMode(value bool) BgpAdvanced
// HasPassiveMode checks if PassiveMode has been set in BgpAdvanced
HasPassiveMode() bool
}

// Number of seconds the sender proposes for the value of the Hold Timer.
Expand Down Expand Up @@ -184215,6 +184255,31 @@ func (obj *bgpAdvanced) SetMd5Key(value string) BgpAdvanced {
return obj
}

// If set to true, the local BGP peer will wait for the remote peer to initiate the BGP session
// by establishing the TCP connection, rather than initiating sessions from the local peer.
// PassiveMode returns a bool
func (obj *bgpAdvanced) PassiveMode() bool {

return *obj.obj.PassiveMode

}

// If set to true, the local BGP peer will wait for the remote peer to initiate the BGP session
// by establishing the TCP connection, rather than initiating sessions from the local peer.
// PassiveMode returns a bool
func (obj *bgpAdvanced) HasPassiveMode() bool {
return obj.obj.PassiveMode != nil
}

// If set to true, the local BGP peer will wait for the remote peer to initiate the BGP session
// by establishing the TCP connection, rather than initiating sessions from the local peer.
// SetPassiveMode sets the bool value in the BgpAdvanced object
func (obj *bgpAdvanced) SetPassiveMode(value bool) BgpAdvanced {

obj.obj.PassiveMode = &value
return obj
}

func (obj *bgpAdvanced) validateObj(vObj *validation, set_default bool) {
if set_default {
obj.setDefault()
Expand Down Expand Up @@ -184245,6 +184310,9 @@ func (obj *bgpAdvanced) setDefault() {
if obj.obj.TimeToLive == nil {
obj.SetTimeToLive(64)
}
if obj.obj.PassiveMode == nil {
obj.SetPassiveMode(false)
}

}

Expand Down
Loading

0 comments on commit 4ebdea0

Please sign in to comment.