mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 07:57:35 +00:00
support fibre channel volume
Signed-off-by: Huamin Chen <hchen@redhat.com>
This commit is contained in:
@@ -639,6 +639,29 @@ func convert_api_ExecAction_To_v1_ExecAction(in *api.ExecAction, out *ExecAction
|
||||
return nil
|
||||
}
|
||||
|
||||
func convert_api_FCVolumeSource_To_v1_FCVolumeSource(in *api.FCVolumeSource, out *FCVolumeSource, s conversion.Scope) error {
|
||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||
defaulting.(func(*api.FCVolumeSource))(in)
|
||||
}
|
||||
if in.TargetWWNs != nil {
|
||||
out.TargetWWNs = make([]string, len(in.TargetWWNs))
|
||||
for i := range in.TargetWWNs {
|
||||
out.TargetWWNs[i] = in.TargetWWNs[i]
|
||||
}
|
||||
} else {
|
||||
out.TargetWWNs = nil
|
||||
}
|
||||
if in.Lun != nil {
|
||||
out.Lun = new(int)
|
||||
*out.Lun = *in.Lun
|
||||
} else {
|
||||
out.Lun = nil
|
||||
}
|
||||
out.FSType = in.FSType
|
||||
out.ReadOnly = in.ReadOnly
|
||||
return nil
|
||||
}
|
||||
|
||||
func convert_api_GCEPersistentDiskVolumeSource_To_v1_GCEPersistentDiskVolumeSource(in *api.GCEPersistentDiskVolumeSource, out *GCEPersistentDiskVolumeSource, s conversion.Scope) error {
|
||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||
defaulting.(func(*api.GCEPersistentDiskVolumeSource))(in)
|
||||
@@ -1458,6 +1481,14 @@ func convert_api_PersistentVolumeSource_To_v1_PersistentVolumeSource(in *api.Per
|
||||
} else {
|
||||
out.CephFS = nil
|
||||
}
|
||||
if in.FC != nil {
|
||||
out.FC = new(FCVolumeSource)
|
||||
if err := convert_api_FCVolumeSource_To_v1_FCVolumeSource(in.FC, out.FC, s); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.FC = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -2385,6 +2416,14 @@ func convert_api_VolumeSource_To_v1_VolumeSource(in *api.VolumeSource, out *Volu
|
||||
} else {
|
||||
out.DownwardAPI = nil
|
||||
}
|
||||
if in.FC != nil {
|
||||
out.FC = new(FCVolumeSource)
|
||||
if err := convert_api_FCVolumeSource_To_v1_FCVolumeSource(in.FC, out.FC, s); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.FC = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -3001,6 +3040,29 @@ func convert_v1_ExecAction_To_api_ExecAction(in *ExecAction, out *api.ExecAction
|
||||
return nil
|
||||
}
|
||||
|
||||
func convert_v1_FCVolumeSource_To_api_FCVolumeSource(in *FCVolumeSource, out *api.FCVolumeSource, s conversion.Scope) error {
|
||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||
defaulting.(func(*FCVolumeSource))(in)
|
||||
}
|
||||
if in.TargetWWNs != nil {
|
||||
out.TargetWWNs = make([]string, len(in.TargetWWNs))
|
||||
for i := range in.TargetWWNs {
|
||||
out.TargetWWNs[i] = in.TargetWWNs[i]
|
||||
}
|
||||
} else {
|
||||
out.TargetWWNs = nil
|
||||
}
|
||||
if in.Lun != nil {
|
||||
out.Lun = new(int)
|
||||
*out.Lun = *in.Lun
|
||||
} else {
|
||||
out.Lun = nil
|
||||
}
|
||||
out.FSType = in.FSType
|
||||
out.ReadOnly = in.ReadOnly
|
||||
return nil
|
||||
}
|
||||
|
||||
func convert_v1_GCEPersistentDiskVolumeSource_To_api_GCEPersistentDiskVolumeSource(in *GCEPersistentDiskVolumeSource, out *api.GCEPersistentDiskVolumeSource, s conversion.Scope) error {
|
||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||
defaulting.(func(*GCEPersistentDiskVolumeSource))(in)
|
||||
@@ -3820,6 +3882,14 @@ func convert_v1_PersistentVolumeSource_To_api_PersistentVolumeSource(in *Persist
|
||||
} else {
|
||||
out.CephFS = nil
|
||||
}
|
||||
if in.FC != nil {
|
||||
out.FC = new(api.FCVolumeSource)
|
||||
if err := convert_v1_FCVolumeSource_To_api_FCVolumeSource(in.FC, out.FC, s); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.FC = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -4747,6 +4817,14 @@ func convert_v1_VolumeSource_To_api_VolumeSource(in *VolumeSource, out *api.Volu
|
||||
} else {
|
||||
out.DownwardAPI = nil
|
||||
}
|
||||
if in.FC != nil {
|
||||
out.FC = new(api.FCVolumeSource)
|
||||
if err := convert_v1_FCVolumeSource_To_api_FCVolumeSource(in.FC, out.FC, s); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.FC = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -4783,6 +4861,7 @@ func init() {
|
||||
convert_api_EventSource_To_v1_EventSource,
|
||||
convert_api_Event_To_v1_Event,
|
||||
convert_api_ExecAction_To_v1_ExecAction,
|
||||
convert_api_FCVolumeSource_To_v1_FCVolumeSource,
|
||||
convert_api_GCEPersistentDiskVolumeSource_To_v1_GCEPersistentDiskVolumeSource,
|
||||
convert_api_GitRepoVolumeSource_To_v1_GitRepoVolumeSource,
|
||||
convert_api_GlusterfsVolumeSource_To_v1_GlusterfsVolumeSource,
|
||||
@@ -4897,6 +4976,7 @@ func init() {
|
||||
convert_v1_EventSource_To_api_EventSource,
|
||||
convert_v1_Event_To_api_Event,
|
||||
convert_v1_ExecAction_To_api_ExecAction,
|
||||
convert_v1_FCVolumeSource_To_api_FCVolumeSource,
|
||||
convert_v1_GCEPersistentDiskVolumeSource_To_api_GCEPersistentDiskVolumeSource,
|
||||
convert_v1_GitRepoVolumeSource_To_api_GitRepoVolumeSource,
|
||||
convert_v1_GlusterfsVolumeSource_To_api_GlusterfsVolumeSource,
|
||||
|
||||
Reference in New Issue
Block a user