mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-10 23:55:34 -06:00
Run go fmt on VMWare vCloud Director provider
This commit is contained in:
parent
c95667ce99
commit
d69abbaeda
@ -8,11 +8,11 @@ import (
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
User string
|
||||
Password string
|
||||
Org string
|
||||
Href string
|
||||
VDC string
|
||||
User string
|
||||
Password string
|
||||
Org string
|
||||
Href string
|
||||
VDC string
|
||||
MaxRetryTimeout int
|
||||
}
|
||||
|
||||
@ -28,8 +28,8 @@ func (c *Config) Client() (*VCDClient, error) {
|
||||
}
|
||||
|
||||
vcdclient := &VCDClient{
|
||||
govcd.NewVCDClient(*u),
|
||||
c.MaxRetryTimeout}
|
||||
govcd.NewVCDClient(*u),
|
||||
c.MaxRetryTimeout}
|
||||
org, vcd, err := vcdclient.Authenticate(c.User, c.Password, c.Org, c.VDC)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Something went wrong: %s", err)
|
||||
|
@ -66,11 +66,11 @@ func Provider() terraform.ResourceProvider {
|
||||
|
||||
func providerConfigure(d *schema.ResourceData) (interface{}, error) {
|
||||
config := Config{
|
||||
User: d.Get("user").(string),
|
||||
Password: d.Get("password").(string),
|
||||
Org: d.Get("org").(string),
|
||||
Href: d.Get("url").(string),
|
||||
VDC: d.Get("vdc").(string),
|
||||
User: d.Get("user").(string),
|
||||
Password: d.Get("password").(string),
|
||||
Org: d.Get("org").(string),
|
||||
Href: d.Get("url").(string),
|
||||
VDC: d.Get("vdc").(string),
|
||||
MaxRetryTimeout: d.Get("maxRetryTimeout").(int),
|
||||
}
|
||||
|
||||
|
@ -72,11 +72,11 @@ func testAccCheckVcdFirewallRulesAttributes(newRules, existingRules *govcd.EdgeG
|
||||
|
||||
func createFirewallRulesConfigs(existingRules *govcd.EdgeGateway) string {
|
||||
config := Config{
|
||||
User: os.Getenv("VCD_USER"),
|
||||
Password: os.Getenv("VCD_PASSWORD"),
|
||||
Org: os.Getenv("VCD_ORG"),
|
||||
Href: os.Getenv("VCD_URL"),
|
||||
VDC: os.Getenv("VCD_VDC"),
|
||||
User: os.Getenv("VCD_USER"),
|
||||
Password: os.Getenv("VCD_PASSWORD"),
|
||||
Org: os.Getenv("VCD_ORG"),
|
||||
Href: os.Getenv("VCD_URL"),
|
||||
VDC: os.Getenv("VCD_VDC"),
|
||||
MaxRetryTimeout: 240,
|
||||
}
|
||||
conn, err := config.Client()
|
||||
|
Loading…
Reference in New Issue
Block a user