Skip to content
This repository was archived by the owner on Aug 8, 2025. It is now read-only.

Commit a6a68ec

Browse files
committed
makfile, website lint changes
1 parent ed40be1 commit a6a68ec

16 files changed

+19
-26
lines changed

GNUmakefile

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ default: build
88
tools:
99
GO111MODULE=on go install -mod=mod github.com/client9/misspell/cmd/misspell
1010
GO111MODULE=on go install -mod=mod github.com/golangci/golangci-lint/cmd/golangci-lint
11-
GO111MODULE=on go install -mod=mod github.com/katbyte/terrafmt
1211

1312
build: fmtcheck
1413
go install -ldflags "-X github.com/vmware/terraform-provider-for-vmware-nsxt-virtual-private-cloud/nsxt.GitCommit=$(GIT_COMMIT)"
@@ -54,16 +53,10 @@ website-lint:
5453
echo "Unexpected mispelling found in website files."; \
5554
echo "To automatically fix the misspelling, run 'make website-lint-fix' and commit the changes."; \
5655
exit 1)
57-
@terrafmt diff ./website --check --pattern '*.markdown' --quiet || (echo; \
58-
echo "Unexpected differences in website HCL formatting."; \
59-
echo "To see the full differences, run: terrafmt diff ./website --pattern '*.markdown'"; \
60-
echo "To automatically fix the formatting, run 'make website-lint-fix' and commit the changes."; \
61-
exit 1)
6256

6357
website-lint-fix:
6458
@echo "==> Applying automatic website linter fixes..."
6559
@misspell -w -source=text website/
66-
@terrafmt fmt ./website --pattern '*.markdown'
6760

6861
.PHONY: build test testacc vet fmt fmtcheck errcheck test-compile website-lint website-lint-fix tools
6962

nsxt/custom_provider_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ func testAccPreCheck(t *testing.T) {
109109
}
110110

111111
_, err := nsxtclient.NewNsxtClient(config.NsxManagerHost, config.Username, config.OrgId, config.ProjectId, config.VpcId,
112-
"", "", "", "", "", "", true, nsxtsession.SetInsecure(false),
112+
"", "", "", "", "", "", true, nsxtsession.SetPassword(config.Password), nsxtsession.SetInsecure(false),
113113
nsxtsession.SetMaxAPIRetries(5), nsxtsession.SetTimeout(time.Duration(90*int(time.Second))))
114114

115115
if err != nil {

nsxt/session/custom_nsxtsession.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ func (nsxtsess *NsxtSession) initiateSession() error {
220220
var res interface{}
221221

222222
// now login to get session_id, csrfToken
223-
cred := make(map[string]string)
223+
cred := make(map[string]interface{})
224224
cred["username"] = nsxtsess.username
225225
cred["password"] = nsxtsess.password
226226

@@ -611,7 +611,7 @@ func (nsxtsess *NsxtSession) restRequestInterfaceResponse(verb string, url strin
611611
return err
612612
}
613613

614-
if len(res) != 0 {
614+
if len(res) != 0 && url != "login" {
615615
return json.Unmarshal(res, &response)
616616
}
617617
return nil

website/docs/r/custom_nsxt_vpc_vm_tags.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ An existing VpcVmTags collection can be [imported][docs-import] into this resour
5858

5959
[docs-import]: https://www.terraform.io/cli/import
6060

61-
```hcl
61+
```
6262
terraform import nsxt_vpc_vm_tags.test-vpc-vm-tags ID
6363
```
6464

website/docs/r/nsxt_dhcp_v4_static_binding_config.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ An existing DhcpV4StaticBindingConfig can be [imported][docs-import] into this r
122122

123123
[docs-import]: https://www.terraform.io/cli/import
124124

125-
```hcl
125+
```
126126
terraform import nsxt_vpc_dhcp_v4_static_binding_config.test-dhcpv4staticbindingconfig ID
127127
```
128128

website/docs/r/nsxt_gateway_policy.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ An existing GatewayPolicy can be [imported][docs-import] into this resource, via
120120

121121
[docs-import]: https://www.terraform.io/cli/import
122122

123-
```hcl
123+
```
124124
terraform import nsxt_vpc_gateway_policy.test-gatewaypolicy ID
125125
```
126126

website/docs/r/nsxt_gateway_policy_rule.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ An existing GatewayPolicyRule can be [imported][docs-import] into this resource,
140140

141141
[docs-import]: https://www.terraform.io/cli/import
142142

143-
```hcl
143+
```
144144
terraform import nsxt_vpc_gateway_policy_rule.test-gatewaypolicyrule ID
145145
```
146146

website/docs/r/nsxt_group.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ An existing Group can be [imported][docs-import] into this resource, via the fol
114114

115115
[docs-import]: https://www.terraform.io/cli/import
116116

117-
```hcl
117+
```
118118
terraform import nsxt_vpc_group.test-group ID
119119
```
120120

website/docs/r/nsxt_policy_vpc_nat_rule.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ An existing PolicyVpcNatRule can be [imported][docs-import] into this resource,
136136

137137
[docs-import]: https://www.terraform.io/cli/import
138138

139-
```hcl
139+
```
140140
terraform import nsxt_policy_vpc_nat_rule.test-policyvpcnatrule ID
141141
```
142142

website/docs/r/nsxt_security_policy.html.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ the lock, other users can update this security policy.
8585
* `display_name` - (Optional) Defaults to ID if not set
8686
* `description` - (Optional) Description of this resource
8787
* `connectivity_preference` - (Optional) This field indicates the default connectivity policy for the security
88-
policy. Based on the connectivitiy preference, a default rule for this
88+
policy. Based on the connectivity preference, a default rule for this
8989
security policy will be created. An appropriate action will be set on
9090
the rule based on the value of the connectivity preference. If NONE is
9191
selected or no connectivity preference is specified, then no default
@@ -179,7 +179,7 @@ An existing SecurityPolicy can be [imported][docs-import] into this resource, vi
179179

180180
[docs-import]: https://www.terraform.io/cli/import
181181

182-
```hcl
182+
```
183183
terraform import nsxt_vpc_security_policy.test-securitypolicy ID
184184
```
185185

0 commit comments

Comments
 (0)