Skip to content

Commit

Permalink
Merge branch 'main' into dev-fly-controlstate
Browse files Browse the repository at this point in the history
  • Loading branch information
rudranil-das committed Nov 28, 2023
2 parents 22e2e2e + 6353c49 commit bb098dd
Show file tree
Hide file tree
Showing 8 changed files with 279 additions and 197 deletions.
62 changes: 48 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.1
/* 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 @@ -309,7 +309,7 @@ func (api *gosnappiApi) NewGetVersionResponse() GetVersionResponse {

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

return api.versionMeta.localVersion
Expand Down Expand Up @@ -1341,6 +1341,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 @@ -8271,7 +8273,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 @@ -8307,7 +8310,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 @@ -8326,50 +8331,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 @@ -8379,13 +8397,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 @@ -8395,6 +8421,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 @@ -8403,12 +8433,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 @@ -8521,10 +8559,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
31 changes: 25 additions & 6 deletions gosnappi/otg/otg.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 25 additions & 6 deletions gosnappi/otg/otg.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Open Traffic Generator API 0.13.1
/* 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 @@ -28,6 +28,8 @@ message Config {
repeated Lag lags = 2;

// 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.
repeated Layer1 layer1 = 3;

// The capture settings that will be configured on the traffic generator.
Expand Down Expand Up @@ -509,8 +511,8 @@ message Layer1 {
speed_400_gbps = 12;
}
}
// Set the speed if supported.
// default = Speed.Enum.speed_10_gbps
// Set the speed if supported. When no speed is explicitly set, the current
// speed of underlying test interface shall be assumed.
optional Speed.Enum speed = 2;

message Media {
Expand All @@ -521,21 +523,38 @@ message Layer1 {
sgmii = 3;
}
}
// 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.
optional Media.Enum media = 3;

// 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.
// default = True
optional bool promiscuous = 4;

// 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.
// default = 1500
optional uint32 mtu = 5;

// 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.
optional bool ieee_media_defaults = 6;

// 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.
optional bool auto_negotiate = 7;

Expand Down
10 changes: 5 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
--prefer-binary
grpcio~=1.54.2 ; python_version > '3.6'
grpcio-tools~=1.35.0 ; python_version <= '3.6'
grpcio-tools~=1.54.2 ; python_version > '3.6'
grpcio~=1.35.0 ; python_version <= '3.6'
protobuf~=3.15.0 ; python_version <= '3.6'
protobuf~=4.23.3 ; python_version > '3.6'
PyYAML
grpcio~=1.54.2 ; python_version > '3.6'
requests
semantic_version
PyYAML
protobuf~=4.23.3 ; python_version > '3.6'
protobuf~=3.15.0 ; python_version <= '3.6'
urllib3
semantic_version
Loading

0 comments on commit bb098dd

Please sign in to comment.