Update github.com/xenolf/lego to 0.4.1
This commit is contained in:
parent
5042c5bf40
commit
e8d63b2a3b
105 changed files with 4299 additions and 2075 deletions
40
vendor/github.com/exoscale/egoscale/ip.go
generated
vendored
Normal file
40
vendor/github.com/exoscale/egoscale/ip.go
generated
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
package egoscale
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"net/url"
|
||||
)
|
||||
|
||||
func (exo *Client) AddIpToNic(nic_id string, ip_address string) (string, error) {
|
||||
params := url.Values{}
|
||||
params.Set("nicid", nic_id)
|
||||
params.Set("ipaddress", ip_address)
|
||||
|
||||
resp, err := exo.Request("addIpToNic", params)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
var r AddIpToNicResponse
|
||||
if err := json.Unmarshal(resp, &r); err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return r.Id, nil
|
||||
}
|
||||
|
||||
func (exo *Client) RemoveIpFromNic(nic_id string) (string, error) {
|
||||
params := url.Values{}
|
||||
params.Set("id", nic_id)
|
||||
|
||||
resp, err := exo.Request("removeIpFromNic", params)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
var r RemoveIpFromNicResponse
|
||||
if err := json.Unmarshal(resp, &r); err != nil {
|
||||
return "", err
|
||||
}
|
||||
return r.JobID, nil
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue