Skip to content

Commit

Permalink
apply boolean mapper to slb
Browse files Browse the repository at this point in the history
  • Loading branch information
ureuzy committed Sep 20, 2022
1 parent 10d3c04 commit d44fbde
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 58 deletions.
18 changes: 9 additions & 9 deletions pkg/axapi/slb/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,20 @@ type Object struct {
AlternateServer *AlternateServer `json:"alternate-server,omitempty"`
ConnLimit int `json:"conn-limit,omitempty"`
ConnResume int `json:"conn-resume,omitempty"`
ExtendedStats int `json:"extended-stats,omitempty"`
ExtendedStats shared.Boolean `json:"extended-stats,omitempty"`
ExternalIP string `json:"external-ip,omitempty"`
FqdnName string `json:"fqdn-name,omitempty"`
HealthCheck string `json:"health-check,omitempty"`
HealthCheckDisable int `json:"health-check-disable,omitempty"`
HealthCheckDisable shared.Boolean `json:"health-check-disable,omitempty"`
Host string `json:"host,omitempty"`
IPv6 string `json:"ipv6,omitempty"`
Name string `json:"name,omitempty"`
NoLogging int `json:"no-logging,omitempty"`
NoLogging shared.Boolean `json:"no-logging,omitempty"`
PortList *PortList `json:"port-list,omitempty"`
SamplingEnable *shared.SamplingEnable `json:"sampling-enable,omitempty"`
ServerIPv6Addr string `json:"server-ipv6-addr,omitempty"`
SlowStart int `json:"slow-start,omitempty"`
SpoofingCache int `json:"spoofing-cache,omitempty"`
SlowStart shared.Boolean `json:"slow-start,omitempty"`
SpoofingCache shared.Boolean `json:"spoofing-cache,omitempty"`
StatsDataAction string `json:"stats-data-action,omitempty"`
TemplateServer string `json:"template-server,omitempty"`
Weight int `json:"weight,omitempty"`
Expand All @@ -65,13 +65,13 @@ type Port struct {
AuthCfg *AuthCfg `json:"auth-cfg,omitempty"`
ConnLimit int `json:"conn-limit,omitempty"`
ConnResume int `json:"conn-resume,omitempty"`
ExtendedStats int `json:"extended-stats,omitempty"`
ExtendedStats shared.Boolean `json:"extended-stats,omitempty"`
FollowPortProtocol string `json:"follow-port-protocol,omitempty"`
HealthCheck string `json:"health-check,omitempty"`
HealthCheckDisable int `json:"health-check-disable,omitempty"`
HealthCheckDisable shared.Boolean `json:"health-check-disable,omitempty"`
HealthCheckFollowPort int `json:"health-check-follow-port,omitempty"`
NoLogging int `json:"no-logging,omitempty"`
NoSSL int `json:"no-ssl,omitempty"`
NoLogging shared.Boolean `json:"no-logging,omitempty"`
NoSSL shared.Boolean `json:"no-ssl,omitempty"`
PortNumber int `json:"port-number,omitempty"`
Protocol string `json:"protocol,omitempty"`
Range int `json:"range,omitempty"`
Expand Down
20 changes: 10 additions & 10 deletions pkg/axapi/slb/virtualserver/virtualserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ type Object struct {
shared.AxaBase `json:",inline"`
ACLID int `json:"acl-id,omitempty"`
ACLName string `json:"acl-name,omitempty"`
ArpDisable int `json:"arp-disable,omitempty"`
ArpDisable shared.Boolean `json:"arp-disable,omitempty"`
Description string `json:"description,omitempty"`
DisableVipAdv int `json:"disable-vip-adv,omitempty"`
DisableVipAdv shared.Boolean `json:"disable-vip-adv,omitempty"`
EnableDisableAction string `json:"enable-disable-action,omitempty"`
Ethernet int `json:"ethernet,omitempty"`
ExtendedStats int `json:"extended-stats,omitempty"`
ExtendedStats shared.Boolean `json:"extended-stats,omitempty"`
HADynamic int `json:"ha-dynamic,omitempty"`
IPAddress string `json:"ip-address"`
IPv6ACL string `json:"ipv6-acl,omitempty"`
Expand All @@ -44,23 +44,23 @@ type Object struct {
Netmask string `json:"netmask,omitempty"`
PortList *virtualserverport.ListObjects `json:"port-list,omitempty"`
RedistributeRouteMap string `json:"redistribute-route-map,omitempty"`
RedistributionFlagged int `json:"redistribution-flagged,omitempty"`
RedistributionFlagged shared.Boolean `json:"redistribution-flagged,omitempty"`
StatsDataAction string `json:"stats-data-action,omitempty"`
TemplateLogging string `json:"template-logging,omitempty"`
TemplatePolicy string `json:"template-policy,omitempty"`
TemplateScaleout string `json:"template-scaleout,omitempty"`
TemplateVirtualServer string `json:"template-virtual-server,omitempty"`
UseIfIP int `json:"use-if-ip,omitempty"`
UseIfIP shared.Boolean `json:"use-if-ip,omitempty"`
VRID int `json:"vrid,omitempty"`
}
type ListObjects []Object

// MigrateVip Docs: https://documentation.a10networks.com/ACOS/414x/ACOS_4_1_4-P1/html/axapiv3/slb_virtual_server.html#migrate-vip
type MigrateVip struct {
shared.AxaBase `json:",inline"`
CancelMigration bool `json:"cancel-migration,omitempty"`
FinishMigration bool `json:"finish-migration,omitempty"`
TargetDataCPU int `json:"target-data-cpu,omitempty"`
TargetFloatingIPv4 string `json:"target-floating-ipv4,omitempty"`
TargetFloatingIPv6 string `json:"target-floating-ipv6,omitempty"`
CancelMigration shared.Boolean `json:"cancel-migration,omitempty"`
FinishMigration shared.Boolean `json:"finish-migration,omitempty"`
TargetDataCPU int `json:"target-data-cpu,omitempty"`
TargetFloatingIPv4 string `json:"target-floating-ipv4,omitempty"`
TargetFloatingIPv6 string `json:"target-floating-ipv6,omitempty"`
}
78 changes: 39 additions & 39 deletions pkg/axapi/slb/virtualserverport/virtualserverport.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,58 +32,58 @@ type Object struct {
AflexScripts *AflexScripts `json:"aflex-scripts,omitempty"`
AltProtocol1 string `json:"alt-protocol1,omitempty"`
AltProtocol2 string `json:"alt-protocol2,omitempty"`
AlternatePort int `json:"alternate-port,omitempty"`
AlternatePort shared.Boolean `json:"alternate-port,omitempty"`
AlternatePortNumber int `json:"alternate-port-number,omitempty"`
AuthCfg *AuthCfg `json:"auth-cfg,omitempty"`
Auto int `json:"auto,omitempty"`
ClientIPStickyNat int `json:"clientip-sticky-nat,omitempty"`
Auto shared.Boolean `json:"auto,omitempty"`
ClientIPStickyNat shared.Boolean `json:"clientip-sticky-nat,omitempty"`
ConnLimit int `json:"conn-limit,omitempty"`
DefSelectionIfPrefFailed string `json:"def-selection-if-pref-failed,omitempty"`
EnablePlayerIDCheck int `json:"enable-playerid-check,omitempty"`
EnablePlayerIDCheck shared.Boolean `json:"enable-playerid-check,omitempty"`
EthFwd int `json:"eth-fwd,omitempty"`
EthRev int `json:"eth-rev,omitempty"`
Expand int `json:"expand,omitempty"`
ExtendedStats int `json:"extended-stats,omitempty"`
ForceRoutingMode int `json:"force-routing-mode,omitempty"`
GslbEnable int `json:"gslb-enable,omitempty"`
HAConnMirror int `json:"ha-conn-mirror,omitempty"`
IPInIP int `json:"ipinip,omitempty"`
L7HardwareAssist int `json:"l7-hardware-assist,omitempty"`
MessageSwitching int `json:"message-switching,omitempty"`
Expand shared.Boolean `json:"expand,omitempty"`
ExtendedStats shared.Boolean `json:"extended-stats,omitempty"`
ForceRoutingMode shared.Boolean `json:"force-routing-mode,omitempty"`
GslbEnable shared.Boolean `json:"gslb-enable,omitempty"`
HAConnMirror shared.Boolean `json:"ha-conn-mirror,omitempty"`
IPInIP shared.Boolean `json:"ipinip,omitempty"`
L7HardwareAssist shared.Boolean `json:"l7-hardware-assist,omitempty"`
MessageSwitching shared.Boolean `json:"message-switching,omitempty"`
Name string `json:"name,omitempty"`
NoAutoUpOnAflex int `json:"no-auto-up-on-aflex,omitempty"`
NoDestNat int `json:"no-dest-nat,omitempty"`
NoLogging int `json:"no-logging,omitempty"`
OnSyn int `json:"on-syn,omitempty"`
NoAutoUpOnAflex shared.Boolean `json:"no-auto-up-on-aflex,omitempty"`
NoDestNat shared.Boolean `json:"no-dest-nat,omitempty"`
NoLogging shared.Boolean `json:"no-logging,omitempty"`
OnSyn shared.Boolean `json:"on-syn,omitempty"`
PersistType string `json:"persist-type,omitempty"`
Pool string `json:"pool,omitempty"`
PortNumber int `json:"port-number,omitempty"`
PortTranslation int `json:"port-translation,omitempty"`
Precedence int `json:"precedence,omitempty"`
PortTranslation shared.Boolean `json:"port-translation,omitempty"`
Precedence shared.Boolean `json:"precedence,omitempty"`
Protocol string `json:"protocol,omitempty"`
Range int `json:"range,omitempty"`
Rate int `json:"rate,omitempty"`
RedirectToHTTPS int `json:"redirect-to-https,omitempty"`
ReqFail int `json:"req-fail,omitempty"`
Reset int `json:"reset,omitempty"`
ResetOnServerSelectionFail int `json:"reset-on-server-selection-fail,omitempty"`
RtpSipCallIDMatch int `json:"rtp-sip-call-id-match,omitempty"`
RedirectToHTTPS shared.Boolean `json:"redirect-to-https,omitempty"`
ReqFail shared.Boolean `json:"req-fail,omitempty"`
Reset shared.Boolean `json:"reset,omitempty"`
ResetOnServerSelectionFail shared.Boolean `json:"reset-on-server-selection-fail,omitempty"`
RtpSipCallIDMatch shared.Boolean `json:"rtp-sip-call-id-match,omitempty"`
SamplingEnable *shared.SamplingEnable `json:"sampling-enable,omitempty"`
ScaleOutBucketCount int `json:"scaleout-bucket-count,omitempty"`
ScaleOutDeviceGroup int `json:"scaleout-device-group,omitempty"`
Secs int `json:"secs,omitempty"`
ServSelFail int `json:"serv-sel-fail,omitempty"`
ServSelFail shared.Boolean `json:"serv-sel-fail,omitempty"`
ServiceGroup string `json:"service-group,omitempty"`
SharedPartitionClientSSLTemplate int `json:"shared-partition-client-ssl-template,omitempty"`
SharedPartitionHTTPTemplate int `json:"shared-partition-http-template,omitempty"`
SharedPartitionServerSSLTemplate int `json:"shared-partition-server-ssl-template,omitempty"`
SharedPartitionTCP int `json:"shared-partition-tcp,omitempty"`
SharedPartitionUDP int `json:"shared-partition-udp,omitempty"`
SkipRevHash int `json:"skip-rev-hash,omitempty"`
SNatOnVip int `json:"snat-on-vip,omitempty"`
SharedPartitionClientSSLTemplate shared.Boolean `json:"shared-partition-client-ssl-template,omitempty"`
SharedPartitionHTTPTemplate shared.Boolean `json:"shared-partition-http-template,omitempty"`
SharedPartitionServerSSLTemplate shared.Boolean `json:"shared-partition-server-ssl-template,omitempty"`
SharedPartitionTCP shared.Boolean `json:"shared-partition-tcp,omitempty"`
SharedPartitionUDP shared.Boolean `json:"shared-partition-udp,omitempty"`
SkipRevHash shared.Boolean `json:"skip-rev-hash,omitempty"`
SNatOnVip shared.Boolean `json:"snat-on-vip,omitempty"`
StatsDataAction string `json:"stats-data-action,omitempty"`
SupportHTTP2 int `json:"support-http2,omitempty"`
SynCookie int `json:"syn-cookie,omitempty"`
SupportHTTP2 shared.Boolean `json:"support-http2,omitempty"`
SynCookie shared.Boolean `json:"syn-cookie,omitempty"`
TemplateCache string `json:"template-cache,omitempty"`
TemplateClientSSL string `json:"template-client-ssl,omitempty"`
TemplateClientSSLShared string `json:"template-client-ssl-shared,omitempty"`
Expand Down Expand Up @@ -124,14 +124,14 @@ type Object struct {
TemplateVirtualPort string `json:"template-virtual-port,omitempty"`
TrunkFwd int `json:"trunk-fwd,omitempty"`
TrunkRev int `json:"trunk-rev,omitempty"`
UseAlternatePort int `json:"use-alternate-port,omitempty"`
UseCgnv6 int `json:"use-cgnv6,omitempty"`
UseDefaultIfNoServer int `json:"use-default-if-no-server,omitempty"`
UseRcvHopForResp int `json:"use-rcv-hop-for-resp,omitempty"`
UseAlternatePort shared.Boolean `json:"use-alternate-port,omitempty"`
UseCgnv6 shared.Boolean `json:"use-cgnv6,omitempty"`
UseDefaultIfNoServer shared.Boolean `json:"use-default-if-no-server,omitempty"`
UseRcvHopForResp shared.Boolean `json:"use-rcv-hop-for-resp,omitempty"`
View int `json:"view,omitempty"`
WafTemplate string `json:"waf-template,omitempty"`
WhenDown int `json:"when-down,omitempty"`
WhenDownProtocol2 int `json:"when-down-protocol2,omitempty"`
WhenDown shared.Boolean `json:"when-down,omitempty"`
WhenDownProtocol2 shared.Boolean `json:"when-down-protocol2,omitempty"`
}
type ListObjects []Object

Expand Down

0 comments on commit d44fbde

Please sign in to comment.