From 747ae2b9d5f158bf7826b88c8be1af176c0db0b9 Mon Sep 17 00:00:00 2001 From: Vibaswan Date: Fri, 6 Sep 2024 14:03:31 +0530 Subject: [PATCH] Go upgrade infra for latest 3 go releases (#229) * pointing to dev openapiart branch * Update auto generated go snappi * fix typo * Update auto generated go snappi * update openapiart * Update auto generated go snappi --------- Co-authored-by: Github Actions Bot --- dev-requirements.txt | 2 +- do.py | 3 +- gosnappi/bgp_attributes_community.go | 34 ++++++++--------- ...tributes_sr_policy_explicit_null_policy.go | 34 ++++++++--------- gosnappi/common.go | 28 +++++++------- ...dhcpv6_client_options_duid_uuid_variant.go | 14 +++---- ...dhcpv6_client_options_duid_uuid_version.go | 20 +++++----- .../dhcpv6_client_options_message_type.go | 38 +++++++++---------- .../dhcpv6_client_options_options_request.go | 36 +++++++++--------- .../dhcpv6_server_options_message_type.go | 14 +++---- gosnappi/flow_rsvp_lsp_tunnel_flag.go | 14 +++---- gosnappi/go.mod | 14 +++---- gosnappi/go.sum | 28 +++++++------- gosnappi/metrics_response.go | 28 +++++++------- requirements.txt | 6 +-- 15 files changed, 157 insertions(+), 156 deletions(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index 37288dce..d6a987f1 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,3 +1,3 @@ --prefer-binary requests -openapiart==0.3.20 +openapiart==0.3.21 diff --git a/do.py b/do.py index e088d91e..13bb3890 100644 --- a/do.py +++ b/do.py @@ -10,7 +10,7 @@ BLACK_VERSION = "22.1.0" -GO_VERSION = "1.20" +GO_VERSION = "1.21.0" PROTOC_VERSION = "3.20.3" # this is where go and protoc shall be installed (and expected to be present) @@ -330,6 +330,7 @@ def testgo(): # TODO: not able to run the test from main directory os.chdir("gosnappi") try: + run(["go version"], raise_exception=True, msg="could not fetch go version") run( ["go test ./... -v -coverprofile coverage.txt | tee coverage.out"], raise_exception=True, diff --git a/gosnappi/bgp_attributes_community.go b/gosnappi/bgp_attributes_community.go index a7422cfa..7838417e 100644 --- a/gosnappi/bgp_attributes_community.go +++ b/gosnappi/bgp_attributes_community.go @@ -280,14 +280,14 @@ type BgpAttributesCommunity interface { setChoice(value BgpAttributesCommunityChoiceEnum) BgpAttributesCommunity // getter for NoExportSubconfed to set choice. NoExportSubconfed() - // getter for NoExport to set choice. - NoExport() - // getter for NoAdvertised to set choice. - NoAdvertised() - // getter for NoLlgr to set choice. - NoLlgr() // 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() // 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 @@ -327,14 +327,9 @@ func (obj *bgpAttributesCommunity) NoExportSubconfed() { obj.setChoice(BgpAttributesCommunityChoice.NO_EXPORT_SUBCONFED) } -// 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 LlgrStale to set choice +func (obj *bgpAttributesCommunity) LlgrStale() { + obj.setChoice(BgpAttributesCommunityChoice.LLGR_STALE) } // getter for NoLlgr to set choice @@ -342,9 +337,14 @@ func (obj *bgpAttributesCommunity) NoLlgr() { obj.setChoice(BgpAttributesCommunityChoice.NO_LLGR) } -// getter for LlgrStale to set choice -func (obj *bgpAttributesCommunity) LlgrStale() { - obj.setChoice(BgpAttributesCommunityChoice.LLGR_STALE) +// 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) } func (obj *bgpAttributesCommunity) setChoice(value BgpAttributesCommunityChoiceEnum) BgpAttributesCommunity { diff --git a/gosnappi/bgp_attributes_sr_policy_explicit_null_policy.go b/gosnappi/bgp_attributes_sr_policy_explicit_null_policy.go index 512e2bf9..2c4f31b9 100644 --- a/gosnappi/bgp_attributes_sr_policy_explicit_null_policy.go +++ b/gosnappi/bgp_attributes_sr_policy_explicit_null_policy.go @@ -272,16 +272,16 @@ type BgpAttributesSrPolicyExplicitNullPolicy interface { setChoice(value BgpAttributesSrPolicyExplicitNullPolicyChoiceEnum) BgpAttributesSrPolicyExplicitNullPolicy // HasChoice checks if Choice has been set in BgpAttributesSrPolicyExplicitNullPolicy HasChoice() bool - // getter for PushIpv4AndIpv6 to set choice. - PushIpv4AndIpv6() // getter for PushIpv4 to set choice. PushIpv4() - // getter for PushIpv6 to set choice. - PushIpv6() - // getter for Unknown to set choice. - Unknown() // getter for DonotPush to set choice. DonotPush() + // getter for PushIpv4AndIpv6 to set choice. + PushIpv4AndIpv6() + // getter for Unknown to set choice. + Unknown() + // getter for PushIpv6 to set choice. + PushIpv6() } type BgpAttributesSrPolicyExplicitNullPolicyChoiceEnum string @@ -305,19 +305,19 @@ func (obj *bgpAttributesSrPolicyExplicitNullPolicy) Choice() BgpAttributesSrPoli return BgpAttributesSrPolicyExplicitNullPolicyChoiceEnum(obj.obj.Choice.Enum().String()) } -// 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) } -// getter for PushIpv6 to set choice -func (obj *bgpAttributesSrPolicyExplicitNullPolicy) PushIpv6() { - obj.setChoice(BgpAttributesSrPolicyExplicitNullPolicyChoice.PUSH_IPV6) +// 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 Unknown to set choice @@ -325,9 +325,9 @@ 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 PushIpv6 to set choice +func (obj *bgpAttributesSrPolicyExplicitNullPolicy) PushIpv6() { + obj.setChoice(BgpAttributesSrPolicyExplicitNullPolicyChoice.PUSH_IPV6) } // The Explicit NULL Label policy. diff --git a/gosnappi/common.go b/gosnappi/common.go index 3cfef7ed..d005b9e6 100644 --- a/gosnappi/common.go +++ b/gosnappi/common.go @@ -225,7 +225,7 @@ func (obj *validation) validationResult() error { if len(obj.validationErrors) > 0 { errors := strings.Join(obj.validationErrors, "\n") obj.validationErrors = nil - return fmt.Errorf(errors) + return fmt.Errorf("%s", errors) } return nil } @@ -257,13 +257,13 @@ func (obj *validation) under_review(message string) { func (obj *validation) validateMac(mac string) error { macSlice := strings.Split(mac, ":") if len(macSlice) != 6 { - return fmt.Errorf(fmt.Sprintf("Invalid Mac address %s", mac)) + return fmt.Errorf("Invalid Mac address %s", mac) } octInd := []string{"0th", "1st", "2nd", "3rd", "4th", "5th"} for ind, val := range macSlice { num, err := strconv.ParseUint(val, 16, 32) if err != nil || num > 255 { - return fmt.Errorf(fmt.Sprintf("Invalid Mac address at %s octet in %s mac", octInd[ind], mac)) + return fmt.Errorf("Invalid Mac address at %s octet in %s mac", octInd[ind], mac) } } return nil @@ -272,13 +272,13 @@ func (obj *validation) validateMac(mac string) error { func (obj *validation) validateIpv4(ip string) error { ipSlice := strings.Split(ip, ".") if len(ipSlice) != 4 { - return fmt.Errorf(fmt.Sprintf("Invalid Ipv4 address %s", ip)) + return fmt.Errorf("Invalid Ipv4 address %s", ip) } octInd := []string{"1st", "2nd", "3rd", "4th"} for ind, val := range ipSlice { num, err := strconv.ParseUint(val, 10, 32) if err != nil || num > 255 { - return fmt.Errorf(fmt.Sprintf("Invalid Ipv4 address at %s octet in %s ipv4", octInd[ind], ip)) + return fmt.Errorf("Invalid Ipv4 address at %s octet in %s ipv4", octInd[ind], ip) } } return nil @@ -289,13 +289,13 @@ func (obj *validation) validateIpv6(ip string) error { if strings.Count(ip, " ") > 0 || strings.Count(ip, ":") > 7 || strings.Count(ip, "::") > 1 || strings.Count(ip, ":::") > 0 || strings.Count(ip, ":") == 0 { - return fmt.Errorf(fmt.Sprintf("Invalid ipv6 address %s", ip)) + return fmt.Errorf("Invalid ipv6 address %s", ip) } if (string(ip[0]) == ":" && string(ip[:2]) != "::") || (string(ip[len(ip)-1]) == ":" && string(ip[len(ip)-2:]) != "::") { - return fmt.Errorf(fmt.Sprintf("Invalid ipv6 address %s", ip)) + return fmt.Errorf("Invalid ipv6 address %s", ip) } if strings.Count(ip, "::") == 0 && strings.Count(ip, ":") != 7 { - return fmt.Errorf(fmt.Sprintf("Invalid ipv6 address %s", ip)) + return fmt.Errorf("Invalid ipv6 address %s", ip) } if ip == "::" { return nil @@ -317,7 +317,7 @@ func (obj *validation) validateIpv6(ip string) error { for ind, val := range ipSlice { num, err := strconv.ParseUint(val, 16, 64) if err != nil || num > 65535 { - return fmt.Errorf(fmt.Sprintf("Invalid Ipv6 address at %s octet in %s ipv6", octInd[ind], ip)) + return fmt.Errorf("Invalid Ipv6 address at %s octet in %s ipv6", octInd[ind], ip) } } @@ -327,7 +327,7 @@ func (obj *validation) validateIpv6(ip string) error { func (obj *validation) validateHex(hex string) error { matched, err := regexp.MatchString(`^[0-9a-fA-F]+$|^0[x|X][0-9a-fA-F]+$`, hex) if err != nil || !matched { - return fmt.Errorf(fmt.Sprintf("Invalid hex value %s", hex)) + return fmt.Errorf("Invalid hex value %s", hex) } return nil } @@ -335,13 +335,13 @@ func (obj *validation) validateHex(hex string) error { func (obj *validation) validateOid(oid string) error { segments := strings.Split(oid, ".") if len(segments) < 2 { - return fmt.Errorf(fmt.Sprintf("Invalid oid value %s", oid)) + return fmt.Errorf("Invalid oid value %s", oid) } for _, segment := range segments { _, err := strconv.ParseUint(segment, 10, 32) if err != nil { - return fmt.Errorf(fmt.Sprintf("Invalid oid value %s", oid)) + return fmt.Errorf("Invalid oid value %s", oid) } } return nil @@ -363,7 +363,7 @@ func (obj *validation) validateSlice(valSlice []string, sliceType string) error } else if sliceType == "oid" { err = obj.validateOid(val) } else { - return fmt.Errorf(fmt.Sprintf("Invalid slice type received <%s>", sliceType)) + return fmt.Errorf("Invalid slice type received <%s>", sliceType) } if err != nil { @@ -372,7 +372,7 @@ func (obj *validation) validateSlice(valSlice []string, sliceType string) error } if len(indices) > 0 { return fmt.Errorf( - fmt.Sprintf("Invalid %s addresses at indices %s", sliceType, strings.Join(indices, ",")), + "Invalid %s addresses at indices %s", sliceType, strings.Join(indices, ","), ) } return nil diff --git a/gosnappi/dhcpv6_client_options_duid_uuid_variant.go b/gosnappi/dhcpv6_client_options_duid_uuid_variant.go index a930b296..1e6192c8 100644 --- a/gosnappi/dhcpv6_client_options_duid_uuid_variant.go +++ b/gosnappi/dhcpv6_client_options_duid_uuid_variant.go @@ -270,14 +270,14 @@ type Dhcpv6ClientOptionsDuidUuidVariant interface { setChoice(value Dhcpv6ClientOptionsDuidUuidVariantChoiceEnum) Dhcpv6ClientOptionsDuidUuidVariant // HasChoice checks if Choice has been set in Dhcpv6ClientOptionsDuidUuidVariant HasChoice() bool - // getter for Guid to set choice. - Guid() // getter for Dce to set choice. Dce() // getter for VarReserved to set choice. VarReserved() // getter for Ncs to set choice. Ncs() + // getter for Guid to set choice. + Guid() } type Dhcpv6ClientOptionsDuidUuidVariantChoiceEnum string @@ -299,11 +299,6 @@ func (obj *dhcpv6ClientOptionsDuidUuidVariant) Choice() Dhcpv6ClientOptionsDuidU return Dhcpv6ClientOptionsDuidUuidVariantChoiceEnum(obj.obj.Choice.Enum().String()) } -// getter for Guid to set choice -func (obj *dhcpv6ClientOptionsDuidUuidVariant) Guid() { - obj.setChoice(Dhcpv6ClientOptionsDuidUuidVariantChoice.GUID) -} - // getter for Dce to set choice func (obj *dhcpv6ClientOptionsDuidUuidVariant) Dce() { obj.setChoice(Dhcpv6ClientOptionsDuidUuidVariantChoice.DCE) @@ -319,6 +314,11 @@ func (obj *dhcpv6ClientOptionsDuidUuidVariant) Ncs() { obj.setChoice(Dhcpv6ClientOptionsDuidUuidVariantChoice.NCS) } +// getter for Guid to set choice +func (obj *dhcpv6ClientOptionsDuidUuidVariant) Guid() { + obj.setChoice(Dhcpv6ClientOptionsDuidUuidVariantChoice.GUID) +} + // The current variants are ncs, dce,microsoft guid and reserved. // Choice returns a string func (obj *dhcpv6ClientOptionsDuidUuidVariant) HasChoice() bool { diff --git a/gosnappi/dhcpv6_client_options_duid_uuid_version.go b/gosnappi/dhcpv6_client_options_duid_uuid_version.go index 57436ffc..434066a8 100644 --- a/gosnappi/dhcpv6_client_options_duid_uuid_version.go +++ b/gosnappi/dhcpv6_client_options_duid_uuid_version.go @@ -274,12 +274,12 @@ type Dhcpv6ClientOptionsDuidUuidVersion interface { V_5() // getter for V_4 to set choice. V_4() - // getter for V_1 to set choice. - V_1() - // getter for V_3 to set choice. - V_3() // getter for V_2 to set choice. V_2() + // getter for V_3 to set choice. + V_3() + // getter for V_1 to set choice. + V_1() } type Dhcpv6ClientOptionsDuidUuidVersionChoiceEnum string @@ -313,9 +313,9 @@ func (obj *dhcpv6ClientOptionsDuidUuidVersion) V_4() { obj.setChoice(Dhcpv6ClientOptionsDuidUuidVersionChoice.V_4) } -// getter for V_1 to set choice -func (obj *dhcpv6ClientOptionsDuidUuidVersion) V_1() { - obj.setChoice(Dhcpv6ClientOptionsDuidUuidVersionChoice.V_1) +// getter for V_2 to set choice +func (obj *dhcpv6ClientOptionsDuidUuidVersion) V_2() { + obj.setChoice(Dhcpv6ClientOptionsDuidUuidVersionChoice.V_2) } // getter for V_3 to set choice @@ -323,9 +323,9 @@ func (obj *dhcpv6ClientOptionsDuidUuidVersion) V_3() { obj.setChoice(Dhcpv6ClientOptionsDuidUuidVersionChoice.V_3) } -// getter for V_2 to set choice -func (obj *dhcpv6ClientOptionsDuidUuidVersion) V_2() { - obj.setChoice(Dhcpv6ClientOptionsDuidUuidVersionChoice.V_2) +// getter for V_1 to set choice +func (obj *dhcpv6ClientOptionsDuidUuidVersion) V_1() { + obj.setChoice(Dhcpv6ClientOptionsDuidUuidVersionChoice.V_1) } // The version values are from 1 to 5 in the most significant 4 bits of the timestamp (bits 4 through 7 of the time_hi_and_version field). diff --git a/gosnappi/dhcpv6_client_options_message_type.go b/gosnappi/dhcpv6_client_options_message_type.go index 8517b050..6944bd87 100644 --- a/gosnappi/dhcpv6_client_options_message_type.go +++ b/gosnappi/dhcpv6_client_options_message_type.go @@ -270,18 +270,18 @@ type Dhcpv6ClientOptionsMessageType interface { setChoice(value Dhcpv6ClientOptionsMessageTypeChoiceEnum) Dhcpv6ClientOptionsMessageType // HasChoice checks if Choice has been set in Dhcpv6ClientOptionsMessageType HasChoice() bool + // getter for Request to set choice. + Request() + // getter for Renew to set choice. + Renew() // getter for Solicit to set choice. Solicit() // getter for Rebind to set choice. Rebind() - // getter for Renew to set choice. - Renew() - // getter for InformRequest to set choice. - InformRequest() // getter for Release to set choice. Release() - // getter for Request to set choice. - Request() + // getter for InformRequest to set choice. + InformRequest() } type Dhcpv6ClientOptionsMessageTypeChoiceEnum string @@ -307,6 +307,16 @@ func (obj *dhcpv6ClientOptionsMessageType) Choice() Dhcpv6ClientOptionsMessageTy return Dhcpv6ClientOptionsMessageTypeChoiceEnum(obj.obj.Choice.Enum().String()) } +// getter for Request to set choice +func (obj *dhcpv6ClientOptionsMessageType) Request() { + obj.setChoice(Dhcpv6ClientOptionsMessageTypeChoice.REQUEST) +} + +// getter for Renew to set choice +func (obj *dhcpv6ClientOptionsMessageType) Renew() { + obj.setChoice(Dhcpv6ClientOptionsMessageTypeChoice.RENEW) +} + // getter for Solicit to set choice func (obj *dhcpv6ClientOptionsMessageType) Solicit() { obj.setChoice(Dhcpv6ClientOptionsMessageTypeChoice.SOLICIT) @@ -317,24 +327,14 @@ func (obj *dhcpv6ClientOptionsMessageType) Rebind() { obj.setChoice(Dhcpv6ClientOptionsMessageTypeChoice.REBIND) } -// getter for Renew to set choice -func (obj *dhcpv6ClientOptionsMessageType) Renew() { - obj.setChoice(Dhcpv6ClientOptionsMessageTypeChoice.RENEW) -} - -// getter for InformRequest to set choice -func (obj *dhcpv6ClientOptionsMessageType) InformRequest() { - obj.setChoice(Dhcpv6ClientOptionsMessageTypeChoice.INFORM_REQUEST) -} - // getter for Release to set choice func (obj *dhcpv6ClientOptionsMessageType) Release() { obj.setChoice(Dhcpv6ClientOptionsMessageTypeChoice.RELEASE) } -// getter for Request to set choice -func (obj *dhcpv6ClientOptionsMessageType) Request() { - obj.setChoice(Dhcpv6ClientOptionsMessageTypeChoice.REQUEST) +// getter for InformRequest to set choice +func (obj *dhcpv6ClientOptionsMessageType) InformRequest() { + obj.setChoice(Dhcpv6ClientOptionsMessageTypeChoice.INFORM_REQUEST) } // The client message name where the option is included, by default it is all. diff --git a/gosnappi/dhcpv6_client_options_options_request.go b/gosnappi/dhcpv6_client_options_options_request.go index ba33e41a..28aa0cd7 100644 --- a/gosnappi/dhcpv6_client_options_options_request.go +++ b/gosnappi/dhcpv6_client_options_options_request.go @@ -278,16 +278,16 @@ type Dhcpv6ClientOptionsOptionsRequest interface { setChoice(value Dhcpv6ClientOptionsOptionsRequestChoiceEnum) Dhcpv6ClientOptionsOptionsRequest // HasChoice checks if Choice has been set in Dhcpv6ClientOptionsOptionsRequest HasChoice() bool + // getter for BootfileUrl to set choice. + BootfileUrl() + // getter for Fqdn to set choice. + Fqdn() + // getter for VendorInformation to set choice. + VendorInformation() // getter for NameServers to set choice. NameServers() // getter for Sztp to set choice. Sztp() - // getter for VendorInformation to set choice. - VendorInformation() - // getter for Fqdn to set choice. - Fqdn() - // getter for BootfileUrl to set choice. - BootfileUrl() // Custom returns Dhcpv6ClientOptionsCustom, set in Dhcpv6ClientOptionsOptionsRequest. // Dhcpv6ClientOptionsCustom is the Custom option is used to provide a not so well known option in the message between a client and a server. Custom() Dhcpv6ClientOptionsCustom @@ -322,14 +322,14 @@ func (obj *dhcpv6ClientOptionsOptionsRequest) Choice() Dhcpv6ClientOptionsOption return Dhcpv6ClientOptionsOptionsRequestChoiceEnum(obj.obj.Choice.Enum().String()) } -// getter for NameServers to set choice -func (obj *dhcpv6ClientOptionsOptionsRequest) NameServers() { - obj.setChoice(Dhcpv6ClientOptionsOptionsRequestChoice.NAME_SERVERS) +// getter for BootfileUrl to set choice +func (obj *dhcpv6ClientOptionsOptionsRequest) BootfileUrl() { + obj.setChoice(Dhcpv6ClientOptionsOptionsRequestChoice.BOOTFILE_URL) } -// getter for Sztp to set choice -func (obj *dhcpv6ClientOptionsOptionsRequest) Sztp() { - obj.setChoice(Dhcpv6ClientOptionsOptionsRequestChoice.SZTP) +// getter for Fqdn to set choice +func (obj *dhcpv6ClientOptionsOptionsRequest) Fqdn() { + obj.setChoice(Dhcpv6ClientOptionsOptionsRequestChoice.FQDN) } // getter for VendorInformation to set choice @@ -337,14 +337,14 @@ func (obj *dhcpv6ClientOptionsOptionsRequest) VendorInformation() { obj.setChoice(Dhcpv6ClientOptionsOptionsRequestChoice.VENDOR_INFORMATION) } -// getter for Fqdn to set choice -func (obj *dhcpv6ClientOptionsOptionsRequest) Fqdn() { - obj.setChoice(Dhcpv6ClientOptionsOptionsRequestChoice.FQDN) +// getter for NameServers to set choice +func (obj *dhcpv6ClientOptionsOptionsRequest) NameServers() { + obj.setChoice(Dhcpv6ClientOptionsOptionsRequestChoice.NAME_SERVERS) } -// getter for BootfileUrl to set choice -func (obj *dhcpv6ClientOptionsOptionsRequest) BootfileUrl() { - obj.setChoice(Dhcpv6ClientOptionsOptionsRequestChoice.BOOTFILE_URL) +// getter for Sztp to set choice +func (obj *dhcpv6ClientOptionsOptionsRequest) Sztp() { + obj.setChoice(Dhcpv6ClientOptionsOptionsRequestChoice.SZTP) } // The Option Request option is used to identify a list of options in a message between a client and a server. The option code is 6. - Vendor_specific information option, requested by clients for vendor-specific informations from servers. - DNS Recursive Name Server Option, requested by clients to get the list ofIPv6 addresses of DNS recursive name diff --git a/gosnappi/dhcpv6_server_options_message_type.go b/gosnappi/dhcpv6_server_options_message_type.go index e706b7c6..fbc1b852 100644 --- a/gosnappi/dhcpv6_server_options_message_type.go +++ b/gosnappi/dhcpv6_server_options_message_type.go @@ -272,10 +272,10 @@ type Dhcpv6ServerOptionsMessageType interface { HasChoice() bool // getter for Advertise to set choice. Advertise() - // getter for Reply to set choice. - Reply() // getter for ReConfigure to set choice. ReConfigure() + // getter for Reply to set choice. + Reply() } type Dhcpv6ServerOptionsMessageTypeChoiceEnum string @@ -300,16 +300,16 @@ func (obj *dhcpv6ServerOptionsMessageType) Advertise() { obj.setChoice(Dhcpv6ServerOptionsMessageTypeChoice.ADVERTISE) } -// getter for Reply to set choice -func (obj *dhcpv6ServerOptionsMessageType) Reply() { - obj.setChoice(Dhcpv6ServerOptionsMessageTypeChoice.REPLY) -} - // getter for ReConfigure to set choice func (obj *dhcpv6ServerOptionsMessageType) ReConfigure() { obj.setChoice(Dhcpv6ServerOptionsMessageTypeChoice.RE_CONFIGURE) } +// getter for Reply to set choice +func (obj *dhcpv6ServerOptionsMessageType) Reply() { + obj.setChoice(Dhcpv6ServerOptionsMessageTypeChoice.REPLY) +} + // The server message name where the option is included, by default it is all. // Choice returns a string func (obj *dhcpv6ServerOptionsMessageType) HasChoice() bool { diff --git a/gosnappi/flow_rsvp_lsp_tunnel_flag.go b/gosnappi/flow_rsvp_lsp_tunnel_flag.go index d2ddef91..98f008f7 100644 --- a/gosnappi/flow_rsvp_lsp_tunnel_flag.go +++ b/gosnappi/flow_rsvp_lsp_tunnel_flag.go @@ -270,10 +270,10 @@ type FlowRSVPLspTunnelFlag interface { setChoice(value FlowRSVPLspTunnelFlagChoiceEnum) FlowRSVPLspTunnelFlag // HasChoice checks if Choice has been set in FlowRSVPLspTunnelFlag HasChoice() bool - // getter for LabelRecordingDesired to set choice. - LabelRecordingDesired() // getter for LocalProtectionDesired to set choice. LocalProtectionDesired() + // getter for LabelRecordingDesired to set choice. + LabelRecordingDesired() // getter for SeStyleDesired to set choice. SeStyleDesired() } @@ -295,16 +295,16 @@ func (obj *flowRSVPLspTunnelFlag) Choice() FlowRSVPLspTunnelFlagChoiceEnum { return FlowRSVPLspTunnelFlagChoiceEnum(obj.obj.Choice.Enum().String()) } -// 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) } +// getter for LabelRecordingDesired to set choice +func (obj *flowRSVPLspTunnelFlag) LabelRecordingDesired() { + obj.setChoice(FlowRSVPLspTunnelFlagChoice.LABEL_RECORDING_DESIRED) +} + // getter for SeStyleDesired to set choice func (obj *flowRSVPLspTunnelFlag) SeStyleDesired() { obj.setChoice(FlowRSVPLspTunnelFlagChoice.SE_STYLE_DESIRED) diff --git a/gosnappi/go.mod b/gosnappi/go.mod index c4deeb1d..59f048a6 100644 --- a/gosnappi/go.mod +++ b/gosnappi/go.mod @@ -8,19 +8,19 @@ require ( github.com/Masterminds/semver/v3 v3.3.0 github.com/ghodss/yaml v1.0.0 github.com/gorilla/mux v1.8.1 - github.com/stretchr/testify v1.8.4 - google.golang.org/grpc v1.65.0 - google.golang.org/protobuf v1.34.1 + github.com/stretchr/testify v1.9.0 + google.golang.org/grpc v1.66.0 + google.golang.org/protobuf v1.34.2 ) require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - golang.org/x/net v0.25.0 // indirect - golang.org/x/sys v0.20.0 // indirect - golang.org/x/text v0.15.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect + golang.org/x/net v0.26.0 // indirect + golang.org/x/sys v0.21.0 // indirect + golang.org/x/text v0.16.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v2 v2.2.3 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/gosnappi/go.sum b/gosnappi/go.sum index bb21c7b9..4e3d3891 100644 --- a/gosnappi/go.sum +++ b/gosnappi/go.sum @@ -21,20 +21,20 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= -golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= -golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= -golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= -golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 h1:Zy9XzmMEflZ/MAaA7vNcoebnRAld7FsPW1EeBB7V0m8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= -google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= -google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= +golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= +golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= +golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 h1:1GBuWVLM/KMVUv1t1En5Gs+gFZCNd360GGb4sSxtrhU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/grpc v1.66.0 h1:DibZuoBznOxbDQxRINckZcUvnCEvrW9pcWIE2yF9r1c= +google.golang.org/grpc v1.66.0/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/gosnappi/metrics_response.go b/gosnappi/metrics_response.go index 179b9416..f8b2f5d7 100644 --- a/gosnappi/metrics_response.go +++ b/gosnappi/metrics_response.go @@ -302,14 +302,14 @@ type MetricsResponse interface { setChoice(value MetricsResponseChoiceEnum) MetricsResponse // HasChoice checks if Choice has been set in MetricsResponse HasChoice() bool - // getter for Dhcpv6Client to set choice. - Dhcpv6Client() - // getter for Dhcpv4Server to set choice. - Dhcpv4Server() // getter for Dhcpv4Client to set choice. Dhcpv4Client() // getter for Dhcpv6Server to set choice. Dhcpv6Server() + // getter for Dhcpv6Client to set choice. + Dhcpv6Client() + // getter for Dhcpv4Server to set choice. + Dhcpv4Server() // PortMetrics returns MetricsResponsePortMetricIterIter, set in MetricsResponse PortMetrics() MetricsResponsePortMetricIter // FlowMetrics returns MetricsResponseFlowMetricIterIter, set in MetricsResponse @@ -376,16 +376,6 @@ func (obj *metricsResponse) Choice() MetricsResponseChoiceEnum { return MetricsResponseChoiceEnum(obj.obj.Choice.Enum().String()) } -// getter for Dhcpv6Client to set choice -func (obj *metricsResponse) Dhcpv6Client() { - obj.setChoice(MetricsResponseChoice.DHCPV6_CLIENT) -} - -// getter for Dhcpv4Server to set choice -func (obj *metricsResponse) Dhcpv4Server() { - obj.setChoice(MetricsResponseChoice.DHCPV4_SERVER) -} - // getter for Dhcpv4Client to set choice func (obj *metricsResponse) Dhcpv4Client() { obj.setChoice(MetricsResponseChoice.DHCPV4_CLIENT) @@ -396,6 +386,16 @@ func (obj *metricsResponse) Dhcpv6Server() { obj.setChoice(MetricsResponseChoice.DHCPV6_SERVER) } +// getter for Dhcpv6Client to set choice +func (obj *metricsResponse) Dhcpv6Client() { + obj.setChoice(MetricsResponseChoice.DHCPV6_CLIENT) +} + +// getter for Dhcpv4Server to set choice +func (obj *metricsResponse) Dhcpv4Server() { + obj.setChoice(MetricsResponseChoice.DHCPV4_SERVER) +} + // description is TBD // Choice returns a string func (obj *metricsResponse) HasChoice() bool { diff --git a/requirements.txt b/requirements.txt index 181708c6..fd55e502 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,11 +1,11 @@ --prefer-binary +requests protobuf~=4.24.4 ; python_version > '3.6' protobuf~=3.15.0 ; python_version <= '3.6' -requests +PyYAML +grpcio~=1.44.0 ; python_version <= '3.6' grpcio-tools~=1.44.0 ; python_version <= '3.6' grpcio~=1.59.0 ; python_version > '3.6' -grpcio~=1.44.0 ; python_version <= '3.6' grpcio-tools~=1.59.0 ; python_version > '3.6' -PyYAML urllib3 semantic_version