1
0
mirror of https://github.com/rancher/types.git synced 2025-07-05 09:46:13 +00:00

ExternalIP to node

This commit is contained in:
Alena Prokharchyk 2018-04-03 14:00:43 -07:00 committed by Darren Shepherd
parent 0efe60ff1a
commit a1a28ef8e8
2 changed files with 6 additions and 3 deletions

View File

@ -103,9 +103,10 @@ func nativeNodeTypes(schemas *types.Schemas) *types.Schemas {
schema.CodeName = "InternalNodeStatus"
schema.CodeNamePlural = "InternalNodeStatuses"
}, struct {
IPAddress string
Hostname string
Info NodeInfo
IPAddress string
ExternalIPAddress string `json:"externalIpAddress,omitempty"`
Hostname string
Info NodeInfo
}{})
}

View File

@ -15,6 +15,8 @@ func (n NodeAddressMapper) FromInternal(data map[string]interface{}) {
a := address["address"]
if t == "InternalIP" {
data["ipAddress"] = a
} else if t == "ExternalIP" {
data["externalIpAddress"] = a
} else if t == "Hostname" {
data["hostname"] = a
}