Skip to content

Commit

Permalink
Merge main in the dev-fcs-2
Browse files Browse the repository at this point in the history
  • Loading branch information
indraniBh committed May 29, 2024
2 parents 3cd112b + e177fe7 commit 9c5e529
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 18 deletions.
2 changes: 1 addition & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
--prefer-binary
requests
openapiart==0.3.12
openapiart==0.3.13
13 changes: 7 additions & 6 deletions gosnappi/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"
"net"
"net/http"
"os"
"regexp"
"strconv"
"strings"
Expand Down Expand Up @@ -175,18 +176,18 @@ func (api *apiSt) getWarnings() string {
}

func (api *apiSt) addWarnings(message string) {
fmt.Printf("[WARNING]: %s\n", message)
fmt.Fprintf(os.Stderr, "[WARNING]: %s\n", message)
api.warnings = message
}

func (api *apiSt) deprecated(message string) {
api.warnings = message
fmt.Printf("warning: %s\n", message)
fmt.Fprintf(os.Stderr, "warning: %s\n", message)
}

func (api *apiSt) under_review(message string) {
api.warnings = message
fmt.Printf("warning: %s\n", message)
fmt.Fprintf(os.Stderr, "warning: %s\n", message)
}

// HttpRequestDoer will return True for HTTP transport
Expand Down Expand Up @@ -239,17 +240,17 @@ func (obj *validation) Warnings() []string {
}

func (obj *validation) addWarnings(message string) {
fmt.Printf("[WARNING]: %s\n", message)
fmt.Fprintf(os.Stderr, "[WARNING]: %s\n", message)
obj.warnings = append(obj.warnings, message)
}

func (obj *validation) deprecated(message string) {
fmt.Printf("warning: %s\n", message)
fmt.Fprintf(os.Stderr, "warning: %s\n", message)
obj.warnings = append(obj.warnings, message)
}

func (obj *validation) under_review(message string) {
fmt.Printf("warning: %s\n", message)
fmt.Fprintf(os.Stderr, "warning: %s\n", message)
obj.warnings = append(obj.warnings, message)
}

Expand Down
56 changes: 56 additions & 0 deletions gosnappi/gosnappi.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,11 @@ type Api interface {

func (api *gosnappiApi) GetLocalVersion() Version {
if api.versionMeta.localVersion == nil {
<<<<<<< HEAD
api.versionMeta.localVersion = NewVersion().SetApiSpecVersion("1.5.1").SetSdkVersion("1.5.0")
=======
api.versionMeta.localVersion = NewVersion().SetApiSpecVersion("1.5.1").SetSdkVersion("1.5.1")
>>>>>>> main
}

return api.versionMeta.localVersion
Expand Down Expand Up @@ -400511,16 +400515,23 @@ type BgpAttributesCommunity interface {
Choice() BgpAttributesCommunityChoiceEnum
// setChoice assigns BgpAttributesCommunityChoiceEnum provided by user to BgpAttributesCommunity
setChoice(value BgpAttributesCommunityChoiceEnum) BgpAttributesCommunity
<<<<<<< HEAD
// getter for NoLlgr to set choice.
NoLlgr()
// getter for LlgrStale to set choice.
LlgrStale()
=======
>>>>>>> main
// getter for NoAdvertised to set choice.
NoAdvertised()
// getter for NoExport to set choice.
NoExport()
// getter for NoExportSubconfed to set choice.
NoExportSubconfed()
// getter for LlgrStale to set choice.
LlgrStale()
// 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 @@ -400555,6 +400566,7 @@ func (obj *bgpAttributesCommunity) Choice() BgpAttributesCommunityChoiceEnum {
return BgpAttributesCommunityChoiceEnum(obj.obj.Choice.Enum().String())
}

<<<<<<< HEAD
// getter for NoLlgr to set choice
func (obj *bgpAttributesCommunity) NoLlgr() {
obj.setChoice(BgpAttributesCommunityChoice.NO_LLGR)
Expand All @@ -400565,6 +400577,8 @@ func (obj *bgpAttributesCommunity) LlgrStale() {
obj.setChoice(BgpAttributesCommunityChoice.LLGR_STALE)
}

=======
>>>>>>> main
// getter for NoAdvertised to set choice
func (obj *bgpAttributesCommunity) NoAdvertised() {
obj.setChoice(BgpAttributesCommunityChoice.NO_ADVERTISED)
Expand All @@ -400580,6 +400594,16 @@ 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)
}

func (obj *bgpAttributesCommunity) setChoice(value BgpAttributesCommunityChoiceEnum) BgpAttributesCommunity {
intValue, ok := otg.BgpAttributesCommunity_Choice_Enum_value[string(value)]
if !ok {
Expand Down Expand Up @@ -422865,6 +422889,11 @@ type BgpAttributesSrPolicyExplicitNullPolicy interface {
PushIpv4()
// getter for Unknown to set choice.
Unknown()
<<<<<<< HEAD
=======
// getter for PushIpv4 to set choice.
PushIpv4()
>>>>>>> main
// getter for PushIpv6 to set choice.
PushIpv6()
}
Expand Down Expand Up @@ -422910,6 +422939,14 @@ func (obj *bgpAttributesSrPolicyExplicitNullPolicy) Unknown() {
obj.setChoice(BgpAttributesSrPolicyExplicitNullPolicyChoice.UNKNOWN)
}

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

>>>>>>> main
// getter for PushIpv6 to set choice
func (obj *bgpAttributesSrPolicyExplicitNullPolicy) PushIpv6() {
obj.setChoice(BgpAttributesSrPolicyExplicitNullPolicyChoice.PUSH_IPV6)
Expand Down Expand Up @@ -428724,12 +428761,20 @@ type FlowRSVPLspTunnelFlag interface {
setChoice(value FlowRSVPLspTunnelFlagChoiceEnum) FlowRSVPLspTunnelFlag
// HasChoice checks if Choice has been set in FlowRSVPLspTunnelFlag
HasChoice() bool
<<<<<<< HEAD
=======
// getter for LabelRecordingDesired to set choice.
LabelRecordingDesired()
>>>>>>> main
// getter for LocalProtectionDesired to set choice.
LocalProtectionDesired()
// getter for SeStyleDesired to set choice.
SeStyleDesired()
<<<<<<< HEAD
// getter for LabelRecordingDesired to set choice.
LabelRecordingDesired()
=======
>>>>>>> main
}

type FlowRSVPLspTunnelFlagChoiceEnum string
Expand All @@ -428754,6 +428799,7 @@ func (obj *flowRSVPLspTunnelFlag) LocalProtectionDesired() {
obj.setChoice(FlowRSVPLspTunnelFlagChoice.LOCAL_PROTECTION_DESIRED)
}

<<<<<<< HEAD
// getter for SeStyleDesired to set choice
func (obj *flowRSVPLspTunnelFlag) SeStyleDesired() {
obj.setChoice(FlowRSVPLspTunnelFlagChoice.SE_STYLE_DESIRED)
Expand All @@ -428762,6 +428808,16 @@ func (obj *flowRSVPLspTunnelFlag) SeStyleDesired() {
// getter for LabelRecordingDesired to set choice
func (obj *flowRSVPLspTunnelFlag) LabelRecordingDesired() {
obj.setChoice(FlowRSVPLspTunnelFlagChoice.LABEL_RECORDING_DESIRED)
=======
// getter for LocalProtectionDesired to set choice
func (obj *flowRSVPLspTunnelFlag) LocalProtectionDesired() {
obj.setChoice(FlowRSVPLspTunnelFlagChoice.LOCAL_PROTECTION_DESIRED)
>>>>>>> main
}

// getter for SeStyleDesired to set choice
func (obj *flowRSVPLspTunnelFlag) SeStyleDesired() {
obj.setChoice(FlowRSVPLspTunnelFlagChoice.SE_STYLE_DESIRED)
}

// description is TBD
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.35.0 ; python_version <= '3.6'
grpcio-tools~=1.59.0 ; python_version > '3.6'
grpcio-tools~=1.35.0 ; python_version <= '3.6'
grpcio~=1.59.0 ; python_version > '3.6'
PyYAML
protobuf~=3.15.0 ; python_version <= '3.6'
protobuf~=4.24.4 ; python_version > '3.6'
grpcio~=1.59.0 ; python_version > '3.6'
grpcio-tools~=1.35.0 ; python_version <= '3.6'
grpcio-tools~=1.59.0 ; python_version > '3.6'
grpcio~=1.35.0 ; python_version <= '3.6'
requests
semantic_version
urllib3
semantic_version
15 changes: 11 additions & 4 deletions snappi/snappi.py
Original file line number Diff line number Diff line change
Expand Up @@ -979,15 +979,18 @@ def _raise_status_warnings(self, property_name, property_value):

if isinstance(property_name, OpenApiObject):
if "self" in self._STATUS and property_value is None:
print("[WARNING]: %s" % self._STATUS["self"])
print("[WARNING]: %s" % self._STATUS["self"], file=sys.stderr)

return

enum_key = "%s.%s" % (property_name, property_value)
if property_name in self._STATUS:
print("[WARNING]: %s" % self._STATUS[property_name])
print(
"[WARNING]: %s" % self._STATUS[property_name],
file=sys.stderr,
)
elif enum_key in self._STATUS:
print("[WARNING]: %s" % self._STATUS[enum_key])
print("[WARNING]: %s" % self._STATUS[enum_key], file=sys.stderr)


class OpenApiIter(OpenApiBase):
Expand Down Expand Up @@ -141613,14 +141616,18 @@ class Api(object):
def __init__(self, **kwargs):
self._version_meta = self.version()
self._version_meta.api_spec_version = "1.5.1"
<<<<<<< HEAD
self._version_meta.sdk_version = "1.5.0"
=======
self._version_meta.sdk_version = "1.5.1"
>>>>>>> main
self._version_check = kwargs.get("version_check")
if self._version_check is None:
self._version_check = False
self._version_check_err = None

def add_warnings(self, msg):
print("[WARNING]: %s" % msg)
print("[WARNING]: %s" % msg, file=sys.stderr)
self.__warnings__.append(msg)

def _deserialize_error(self, err_string):
Expand Down
4 changes: 2 additions & 2 deletions version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@


class Version:
models_version = "1.5.0"
version = "1.5.0"
models_version = "1.5.1"
version = "1.5.1"
package_name = "snappi"
protobuf_name = "otg"
go_package_name = "gosnappi"

0 comments on commit 9c5e529

Please sign in to comment.