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

Mapper fixes

This commit is contained in:
Darren Shepherd 2017-12-29 15:20:33 -07:00
parent 37d46e733c
commit c9565e2f53
2 changed files with 3 additions and 2 deletions

View File

@ -24,7 +24,8 @@ func (c *Creator) ToInternal(data map[string]interface{}) {
func (c *Creator) ModifySchema(schema *types.Schema, schemas *types.Schemas) error {
if schema.CanList() && schema.CanCreate() {
schema.ResourceFields["creatorId"] = types.Field{
Type: "reference[user]",
Type: "reference[user]",
CodeName: "CreatorID",
}
c.m = &mapper.AnnotationField{Field: "creatorId"}
return c.m.ModifySchema(schema, schemas)

View File

@ -14,7 +14,7 @@ func (n NodeAddressMapper) FromInternal(data map[string]interface{}) {
t := address["type"]
a := address["address"]
if t == "InternalIP" {
data["IpAddress"] = a
data["ipAddress"] = a
} else if t == "Hostname" {
data["hostname"] = a
}