Merge pull request #2686 from bennerv/remove-systemdata-from-admin-api

Remove systemdata from admin API
This commit is contained in:
Christoph Blecker 2023-02-07 16:47:20 -08:00 коммит произвёл GitHub
Родитель 06f7b8bc57 ee13e2d16f
Коммит 78d47aacdc
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 0 добавлений и 17 удалений

Просмотреть файл

@ -127,14 +127,6 @@ func (c openShiftClusterConverter) ToExternal(oc *api.OpenShiftCluster) interfac
Namespace: oc.Properties.HiveProfile.Namespace,
CreatedByHive: oc.Properties.HiveProfile.CreatedByHive,
}
out.SystemData = SystemData{
CreatedBy: oc.SystemData.CreatedBy,
CreatedAt: oc.SystemData.CreatedAt,
CreatedByType: CreatedByType(oc.SystemData.CreatedByType),
LastModifiedBy: oc.SystemData.LastModifiedBy,
LastModifiedAt: oc.SystemData.LastModifiedAt,
LastModifiedByType: CreatedByType(oc.SystemData.LastModifiedByType),
}
return out
}
@ -242,15 +234,6 @@ func (c openShiftClusterConverter) ToInternal(_oc interface{}, out *api.OpenShif
}
}
out.SystemData = api.SystemData{
CreatedBy: oc.SystemData.CreatedBy,
CreatedAt: oc.SystemData.CreatedAt,
CreatedByType: api.CreatedByType(oc.SystemData.CreatedByType),
LastModifiedBy: oc.SystemData.LastModifiedBy,
LastModifiedAt: oc.SystemData.LastModifiedAt,
LastModifiedByType: api.CreatedByType(oc.SystemData.CreatedByType),
}
// out.Properties.RegistryProfiles is not converted. The field is immutable and does not have to be converted.
// Other fields are converted and this breaks the pattern, however this converting this field creates an issue
// with filling the out.Properties.RegistryProfiles[i].Password as default is "" which erases the original value.