From 263e5ecabdb86ea0d6ea01b1c9e9129ee0ded206 Mon Sep 17 00:00:00 2001 From: Anna Khmelnitsky Date: Mon, 26 Feb 2024 21:22:01 +0000 Subject: [PATCH] Fix linter errors --- nsxt/lb_utils.go | 4 ++-- nsxt/policy_common.go | 9 --------- nsxt/provider.go | 4 ---- nsxt/resource_nsxt_upgrade_run.go | 2 +- nsxt/utils_test.go | 6 ------ 5 files changed, 3 insertions(+), 22 deletions(-) diff --git a/nsxt/lb_utils.go b/nsxt/lb_utils.go index cf495a652..5b3da2f31 100644 --- a/nsxt/lb_utils.go +++ b/nsxt/lb_utils.go @@ -251,7 +251,7 @@ func resourceNsxtPolicyLBAppProfileExists(id string, connector client.Connector, if isNotFoundError(err) { return false, nil } - msg := fmt.Sprintf("Error retrieving resource LBAppProfile") + msg := "Error retrieving resource LBAppProfile" return false, logAPIError(msg, err) } @@ -281,7 +281,7 @@ func resourceNsxtPolicyLBMonitorProfileExistsWrapper(id string, connector client if isNotFoundError(err) { return false, nil } - msg := fmt.Sprintf("Error retrieving resource LBMonitorProfile") + msg := "Error retrieving resource LBMonitorProfile" return false, logAPIError(msg, err) } diff --git a/nsxt/policy_common.go b/nsxt/policy_common.go index 961c802bb..46caa646e 100644 --- a/nsxt/policy_common.go +++ b/nsxt/policy_common.go @@ -36,15 +36,6 @@ func getNsxIDSchema() *schema.Schema { } } -func getNestedNsxIDSchema() *schema.Schema { - return &schema.Schema{ - Type: schema.TypeString, - Description: "NSX ID for this resource", - Optional: true, - ForceNew: true, - } -} - func getFlexNsxIDSchema(readOnly bool) *schema.Schema { return &schema.Schema{ Type: schema.TypeString, diff --git a/nsxt/provider.go b/nsxt/provider.go index f6ceaf0a4..4cb1ea3b9 100644 --- a/nsxt/provider.go +++ b/nsxt/provider.go @@ -1067,10 +1067,6 @@ func getPolicyConnector(clients interface{}) client.Connector { return getPolicyConnectorWithHeaders(clients, nil, false, true) } -func getPolicyConnectorWithoutRetry(clients interface{}) client.Connector { - return getPolicyConnectorWithHeaders(clients, nil, false, false) -} - // Standalone policy connector, possibly for different endpoint, // for the purpose of special tasks (such as joining manager cluster node) // Does not initialize global connection settings diff --git a/nsxt/resource_nsxt_upgrade_run.go b/nsxt/resource_nsxt_upgrade_run.go index b4ec6bf6a..68da107a1 100644 --- a/nsxt/resource_nsxt_upgrade_run.go +++ b/nsxt/resource_nsxt_upgrade_run.go @@ -625,7 +625,7 @@ func runUpgrade(upgradeClientSet *upgradeClientSet, partialUpgradeMap map[string if err != nil { return err } - log.Printf(completeLog) + log.Print(completeLog) } return nil } diff --git a/nsxt/utils_test.go b/nsxt/utils_test.go index e3f6977eb..8d1e4ea78 100644 --- a/nsxt/utils_test.go +++ b/nsxt/utils_test.go @@ -195,12 +195,6 @@ func getTestAnotherSiteName() string { return os.Getenv("NSXT_TEST_ANOTHER_SITE_NAME") } -func getTestAdvancedTopology() string { - // Non-basic testing topology available - // For now this is used by tests that have minimum 2 edge nodes per cluster - return os.Getenv("NSXT_TEST_ADVANCED_TOPOLOGY") -} - func getTestCertificateName(isClient bool) string { if isClient { return os.Getenv("NSXT_TEST_CLIENT_CERTIFICATE_NAME")