Merge pull request #31 from yunify/spec-update
Spec update add role to vxnet
This commit is contained in:
commit
8e195d1c4d
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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"`
|
||||
|
|
Loading…
Reference in New Issue