1
0
mirror of https://github.com/rancher/os.git synced 2025-09-03 15:54:24 +00:00

Refactor the cloud-init metadata to return a netconf.NetworkConfig

Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
This commit is contained in:
Sven Dowideit
2017-03-07 13:21:14 +10:00
parent 5dbb0f2a28
commit 0779e13d46
23 changed files with 459 additions and 287 deletions

View File

@@ -16,6 +16,8 @@ package datasource
import (
"net"
"github.com/rancher/os/netconf"
)
type Datasource interface {
@@ -31,11 +33,17 @@ type Datasource interface {
}
type Metadata struct {
PublicIPv4 net.IP
PublicIPv6 net.IP
PrivateIPv4 net.IP
PrivateIPv6 net.IP
// TODO: move to netconf/types.go ?
// see https://ahmetalpbalkan.com/blog/comparison-of-instance-metadata-services/
Hostname string
SSHPublicKeys map[string]string
NetworkConfig interface{}
NetworkConfig netconf.NetworkConfig
// probably unused, but its in the initialize.env code
// TODO: work out if there's any reason to keep it.
// Lets see if anyone notices when its not set.
PublicIPv4 net.IP
PublicIPv6 net.IP
PrivateIPv4 net.IP
PrivateIPv6 net.IP
}