Merge pull request #31 from yunify/spec-update

Spec update add role to vxnet
This commit is contained in:
jolestar 2017-08-11 14:37:06 +08:00 committed by GitHub
commit 8e195d1c4d
2 changed files with 8 additions and 7 deletions

View File

@ -24,8 +24,8 @@ import (
"github.com/yunify/qingcloud-sdk-go/logger"
"github.com/yunify/qingcloud-sdk-go/utils"
"time"
"net"
"time"
)
// A Config stores a configuration of this sdk.
@ -72,12 +72,12 @@ func NewDefault() (*Config, error) {
timeout := time.Duration(config.ConnectionTimeout) * time.Second
transport := &http.Transport{
Dial: func (network, addr string) (net.Conn, error) {
return net.DialTimeout(network, addr, timeout)
Dial: func(network, addr string) (net.Conn, error) {
return net.DialTimeout(network, addr, timeout)
},
}
config.Connection = &http.Client{
Transport:transport,
Transport: transport,
}
return config, nil
@ -140,13 +140,13 @@ func (c *Config) LoadConfigFromContent(content []byte) error {
timeout := time.Duration(c.ConnectionTimeout) * time.Second
transport := &http.Transport{
Dial: func (network, addr string) (net.Conn, error) {
Dial: func(network, addr string) (net.Conn, error) {
return net.DialTimeout(network, addr, timeout)
},
}
c.Connection = &http.Client{
Transport:transport,
Transport: transport,
}
return nil
}
}

View File

@ -2668,6 +2668,7 @@ type VxNet struct {
NICID *string `json:"nic_id" name:"nic_id"`
Owner *string `json:"owner" name:"owner"`
PrivateIP *string `json:"private_ip" name:"private_ip"`
Role *int `json:"role" name:"role"`
Router *Router `json:"router" name:"router"`
Tags []*Tag `json:"tags" name:"tags"`
VpcRouterID *string `json:"vpc_router_id" name:"vpc_router_id"`