1
0
mirror of https://github.com/rancher/os.git synced 2025-09-23 03:20:07 +00:00

fix the ip/cidr, and call updateNetwork

Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
This commit is contained in:
Sven Dowideit
2017-03-08 22:03:08 +10:00
parent 0779e13d46
commit b5fdd63a85
5 changed files with 38 additions and 11 deletions

View File

@@ -15,6 +15,7 @@
package packet
import (
"bytes"
"fmt"
"net/http"
"strconv"
@@ -129,6 +130,12 @@ func (ms *MetadataService) FetchMetadata() (metadata datasource.Metadata, err er
metadata.NetworkConfig = netCfg
// This is not really the right place - perhaps we should add a call-home function in each datasource to be called after the network is applied
//(see the original in cmd/cloudsave/packet)
if _, err = http.Post(m.PhoneHomeURL, "application/json", bytes.NewReader([]byte{})); err != nil {
log.Errorf("Failed to post to Packet phone home URL: %v", err)
}
return
}