mirror of
https://github.com/rancher/types.git
synced 2025-09-01 05:09:10 +00:00
Update vendor
This commit is contained in:
7
vendor/github.com/rancher/norman/types/mapper.go
generated
vendored
7
vendor/github.com/rancher/norman/types/mapper.go
generated
vendored
@@ -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
|
||||
|
2
vendor/github.com/rancher/norman/types/reflection.go
generated
vendored
2
vendor/github.com/rancher/norman/types/reflection.go
generated
vendored
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user