func (c *Config) Client() (*govcd.VCDClient, error) {
    u, err := url.ParseRequestURI(c.Href)
    if err != nil {
        return nil, fmt.Errorf("Unable to pass url: %s", err)
    }

    vcdclient := govcd.NewVCDClient(*u, c.Insecure)
    org, vcd, err := vcdclient.Authenticate(c.User, c.Password, c.Org, c.VDC)
    if err != nil {
        return nil, fmt.Errorf("Unable to authenticate: %s", err)
    }
    vcdclient.Org = org
    vcdclient.OrgVdc = vcd
    return vcdclient, nil
}
// Client connection using the govcd library
Client connection using the govcd library
// Client connection using the govcd library
func (c *Config) Client() (*govcd.VCDClient, error) {
    u, err := url.ParseRequestURI(c.Href)
    if err != nil {
        return nil, fmt.Errorf("Unable to pass url: %s", err)
    }
    vcdclient := govcd.NewVCDClient(*u, c.Insecure)
    org, vcd, err := vcdclient.Authenticate(c.User, c.Password, c.Org, c.VDC)
    if err != nil {
        return nil, fmt.Errorf("Unable to authenticate: %s", err)
    }
    vcdclient.Org = org
    vcdclient.OrgVdc = vcd
    return vcdclient, nil
}
func ( c * Config ) Client ( ) ( * govcd . VCDClient , error ) { u , err := url . ParseRequestURI ( c . Href ) if err != nil { return nil , fmt . Errorf ( " " , err ) } vcdclient := govcd . NewVCDClient ( * u , c . Insecure ) org , vcd , err := vcdclient . Authenticate ( c . User , c . Password , c . Org , c . VDC ) if err != nil { return nil , fmt . Errorf ( " " , err ) } vcdclient . Org = org vcdclient . OrgVdc = vcd return vcdclient , nil }
Client connection using the govcd library
Client connection using the govcd library