From 46a43ef4b869d310c36686f82ac2afe81cc56d05 Mon Sep 17 00:00:00 2001 From: Pushpalatha555 Date: Wed, 5 Oct 2022 19:30:45 +0530 Subject: [PATCH 1/2] removed the unknown fields to fix the LB acceptance test --- pkg/models/load_balancer.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pkg/models/load_balancer.go b/pkg/models/load_balancer.go index e278872..92d9457 100644 --- a/pkg/models/load_balancer.go +++ b/pkg/models/load_balancer.go @@ -666,9 +666,6 @@ type GetLBPoolsResp struct { Status string `json:"status"` DateCreated string `json:"dateCreated"` LastUpdated string `json:"lastUpdated"` - Nodes []string `json:"nodes"` - Monitors []string `json:"monitors"` - Members []string `json:"members"` LoadBalancer LBMonitor `json:"loadBalancer"` LBPoolConfig PoolConfig `json:"config" tf:"config"` Meta MetaInfo `json:"meta"` @@ -700,9 +697,6 @@ type GetSpecificLBPoolResp struct { Status string `json:"status"` DateCreated string `json:"dateCreated"` LastUpdated string `json:"lastUpdated"` - Nodes []string `json:"nodes"` - Monitors []string `json:"monitors"` - Members []string `json:"members"` LoadBalancer LBMonitor `json:"loadBalancer"` LBPoolConfig PoolConfig `json:"config" tf:"config"` } From 7b3cd42c8333d902c043cd10df6fab58ee49b8ad Mon Sep 17 00:00:00 2001 From: Pushpalatha555 Date: Wed, 5 Oct 2022 19:59:57 +0530 Subject: [PATCH 2/2] fix the LB acceptance test --- pkg/models/load_balancer.go | 133 +++++++++++++++++------------------- 1 file changed, 62 insertions(+), 71 deletions(-) diff --git a/pkg/models/load_balancer.go b/pkg/models/load_balancer.go index 92d9457..b069308 100644 --- a/pkg/models/load_balancer.go +++ b/pkg/models/load_balancer.go @@ -612,32 +612,27 @@ type CreateLBPoolResp struct { } type LBPoolResp struct { - ID int `json:"id" tf:"id,computed"` - LbID int `json:"lb_id" tf:"lb_id"` - Name string `json:"name"` - Category string `json:"category"` - Visibility string `json:"visibility"` - Description string `json:"description"` - InternalID string `json:"internalId"` - ExternalID string `json:"externalId"` - Enabled bool `json:"enabled"` - VipBalance string `json:"vipBalance"` - MinActive int `json:"minActive"` - NumberActive int `json:"numberActive"` - NumberInService int `json:"numberInService"` - HealthScore float32 `json:"healthScore"` - PerformanceScore float32 `json:"performanceScore"` - HealthPenalty float32 `json:"healthPenalty"` - SecurityPenalty float32 `json:"securityPenalty"` - ErrorPenalty float32 `json:"errorPenalty"` - Status string `json:"status"` - DateCreated string `json:"dateCreated"` - LastUpdated string `json:"lastUpdated"` - Nodes []string `json:"nodes"` - Monitors []string `json:"monitors"` - Members []string `json:"members"` - LoadBalancer LBMonitor `json:"loadBalancer"` - LBPoolConfig PoolConfig `json:"config" tf:"config"` + ID int `json:"id" tf:"id,computed"` + LbID int `json:"lb_id" tf:"lb_id"` + Name string `json:"name"` + Category string `json:"category"` + Visibility string `json:"visibility"` + Description string `json:"description"` + InternalID string `json:"internalId"` + ExternalID string `json:"externalId"` + Enabled bool `json:"enabled"` + VipBalance string `json:"vipBalance"` + MinActive int `json:"minActive"` + NumberActive int `json:"numberActive"` + NumberInService int `json:"numberInService"` + HealthScore float32 `json:"healthScore"` + PerformanceScore float32 `json:"performanceScore"` + HealthPenalty float32 `json:"healthPenalty"` + SecurityPenalty float32 `json:"securityPenalty"` + ErrorPenalty float32 `json:"errorPenalty"` + Status string `json:"status"` + DateCreated string `json:"dateCreated"` + LastUpdated string `json:"lastUpdated"` } // Get LB Pools @@ -646,29 +641,27 @@ type GetLBPools struct { } type GetLBPoolsResp struct { - ID int `json:"id" tf:"id,computed"` - LbID int `json:"-" tf:"lb_id,computed"` - Name string `json:"name"` - Visibility string `json:"visibility"` - Description string `json:"description"` - InternalID string `json:"internalId"` - ExternalID string `json:"externalId"` - Enabled bool `json:"enabled"` - VipBalance string `json:"vipBalance"` - MinActive int `json:"minActive"` - NumberActive int `json:"numberActive"` - NumberInService int `json:"numberInService"` - HealthScore float32 `json:"healthScore"` - PerformanceScore float32 `json:"performanceScore"` - HealthPenalty float32 `json:"healthPenalty"` - SecurityPenalty float32 `json:"securityPenalty"` - ErrorPenalty float32 `json:"errorPenalty"` - Status string `json:"status"` - DateCreated string `json:"dateCreated"` - LastUpdated string `json:"lastUpdated"` - LoadBalancer LBMonitor `json:"loadBalancer"` - LBPoolConfig PoolConfig `json:"config" tf:"config"` - Meta MetaInfo `json:"meta"` + ID int `json:"id" tf:"id,computed"` + LbID int `json:"-" tf:"lb_id,computed"` + Name string `json:"name"` + Visibility string `json:"visibility"` + Description string `json:"description"` + InternalID string `json:"internalId"` + ExternalID string `json:"externalId"` + Enabled bool `json:"enabled"` + VipBalance string `json:"vipBalance"` + MinActive int `json:"minActive"` + NumberActive int `json:"numberActive"` + NumberInService int `json:"numberInService"` + HealthScore float32 `json:"healthScore"` + PerformanceScore float32 `json:"performanceScore"` + HealthPenalty float32 `json:"healthPenalty"` + SecurityPenalty float32 `json:"securityPenalty"` + ErrorPenalty float32 `json:"errorPenalty"` + Status string `json:"status"` + DateCreated string `json:"dateCreated"` + LastUpdated string `json:"lastUpdated"` + Meta MetaInfo `json:"meta"` } // Get Specific LB Pools @@ -677,28 +670,26 @@ type GetSpecificLBPool struct { } type GetSpecificLBPoolResp struct { - ID int `json:"-" tf:"id,computed"` - LbID int `json:"-" tf:"lb_id,computed"` - Name string `json:"name"` - Visibility string `json:"visibility"` - Description string `json:"description"` - InternalID string `json:"internalId"` - ExternalID string `json:"externalId"` - Enabled bool `json:"enabled"` - VipBalance string `json:"vipBalance"` - MinActive int `json:"minActive"` - NumberActive int `json:"numberActive"` - NumberInService int `json:"numberInService"` - HealthScore float32 `json:"healthScore"` - PerformanceScore float32 `json:"performanceScore"` - HealthPenalty float32 `json:"healthPenalty"` - SecurityPenalty float32 `json:"securityPenalty"` - ErrorPenalty float32 `json:"errorPenalty"` - Status string `json:"status"` - DateCreated string `json:"dateCreated"` - LastUpdated string `json:"lastUpdated"` - LoadBalancer LBMonitor `json:"loadBalancer"` - LBPoolConfig PoolConfig `json:"config" tf:"config"` + ID int `json:"-" tf:"id,computed"` + LbID int `json:"-" tf:"lb_id,computed"` + Name string `json:"name"` + Visibility string `json:"visibility"` + Description string `json:"description"` + InternalID string `json:"internalId"` + ExternalID string `json:"externalId"` + Enabled bool `json:"enabled"` + VipBalance string `json:"vipBalance"` + MinActive int `json:"minActive"` + NumberActive int `json:"numberActive"` + NumberInService int `json:"numberInService"` + HealthScore float32 `json:"healthScore"` + PerformanceScore float32 `json:"performanceScore"` + HealthPenalty float32 `json:"healthPenalty"` + SecurityPenalty float32 `json:"securityPenalty"` + ErrorPenalty float32 `json:"errorPenalty"` + Status string `json:"status"` + DateCreated string `json:"dateCreated"` + LastUpdated string `json:"lastUpdated"` } // CREATE LB Virtual servers