1
0
mirror of https://github.com/rancher/types.git synced 2025-08-29 09:02:45 +00:00

Update vendor

This commit is contained in:
Darren Shepherd 2017-12-29 19:23:24 -07:00
parent 9ca18c0828
commit cab4c86166
3 changed files with 7 additions and 4 deletions

View File

@ -3,5 +3,5 @@ github.com/rancher/types
k8s.io/kubernetes v1.8.3 transitive=true,staging=true
bitbucket.org/ww/goautoneg a547fc61f48d567d5b4ec6f8aee5573d8efce11d https://github.com/rancher/goautoneg.git
github.com/rancher/norman 16783cf1d364fa9d1e62d0b4ecfd1f919a956da4
github.com/rancher/norman b80039523f49e7bfd335031ac82208f1bbf6bd40
golang.org/x/sync fd80eb99c8f653c847d294a001bdf2a3a6f768f5

View File

@ -74,7 +74,12 @@ func (t *typeMapper) FromInternal(data map[string]interface{}) {
name, _ := data["name"].(string)
namespace, _ := data["namespaceId"].(string)
if _, ok := data["id"]; !ok {
if _, ok := data["id"]; ok {
if namespace != "" {
id, _ := data["id"].(string)
data["id"] = namespace + ":" + id
}
} else {
if name != "" {
if namespace == "" {
data["id"] = name

View File

@ -52,8 +52,6 @@ func (s *Schemas) AddMapperForType(version *APIVersion, obj interface{}, mapper
}
func (s *Schemas) MustImport(version *APIVersion, obj interface{}, externalOverrides ...interface{}) *Schemas {
//TODO: remove
logrus.SetLevel(logrus.DebugLevel)
if _, err := s.Import(version, obj, externalOverrides...); err != nil {
panic(err)
}