Kubernetes core API changes for vSphere

This commit is contained in:
System Administrator 2017-05-22 15:11:58 -07:00
parent 23ee1745d3
commit 83520a7470
15 changed files with 1924 additions and 1481 deletions

View File

@ -1038,6 +1038,12 @@ type VsphereVirtualDiskVolumeSource struct {
// Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
// +optional
FSType string
// Storage Policy Based Management (SPBM) profile name.
// +optional
StoragePolicyName string
// Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.
// +optional
StoragePolicyID string
}
// Represents a Photon Controller persistent disk resource.

File diff suppressed because it is too large Load Diff

View File

@ -4012,6 +4012,14 @@ message VsphereVirtualDiskVolumeSource {
// Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
// +optional
optional string fsType = 2;
// Storage Policy Based Management (SPBM) profile name.
// +optional
optional string storagePolicyName = 3;
// Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.
// +optional
optional string storagePolicyID = 4;
}
// The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)

View File

@ -17534,13 +17534,15 @@ func (x *VsphereVirtualDiskVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
} else {
yysep2 := !z.EncBinary()
yy2arr2 := z.EncBasicHandle().StructToArray
var yyq2 [2]bool
var yyq2 [4]bool
_, _, _ = yysep2, yyq2, yy2arr2
const yyr2 bool = false
yyq2[1] = x.FSType != ""
yyq2[2] = x.StoragePolicyName != ""
yyq2[3] = x.StoragePolicyID != ""
var yynn2 int
if yyr2 || yy2arr2 {
r.EncodeArrayStart(2)
r.EncodeArrayStart(4)
} else {
yynn2 = 1
for _, b := range yyq2 {
@ -17595,6 +17597,56 @@ func (x *VsphereVirtualDiskVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[2] {
yym10 := z.EncBinary()
_ = yym10
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.StoragePolicyName))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq2[2] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("storagePolicyName"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym11 := z.EncBinary()
_ = yym11
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.StoragePolicyName))
}
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[3] {
yym13 := z.EncBinary()
_ = yym13
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.StoragePolicyID))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq2[3] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("storagePolicyID"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym14 := z.EncBinary()
_ = yym14
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.StoragePolicyID))
}
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
@ -17680,6 +17732,30 @@ func (x *VsphereVirtualDiskVolumeSource) codecDecodeSelfFromMap(l int, d *codec1
*((*string)(yyv6)) = r.DecodeString()
}
}
case "storagePolicyName":
if r.TryDecodeAsNil() {
x.StoragePolicyName = ""
} else {
yyv8 := &x.StoragePolicyName
yym9 := z.DecBinary()
_ = yym9
if false {
} else {
*((*string)(yyv8)) = r.DecodeString()
}
}
case "storagePolicyID":
if r.TryDecodeAsNil() {
x.StoragePolicyID = ""
} else {
yyv10 := &x.StoragePolicyID
yym11 := z.DecBinary()
_ = yym11
if false {
} else {
*((*string)(yyv10)) = r.DecodeString()
}
}
default:
z.DecStructFieldNotFound(-1, yys3)
} // end switch yys3
@ -17691,16 +17767,16 @@ func (x *VsphereVirtualDiskVolumeSource) codecDecodeSelfFromArray(l int, d *code
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj8 int
var yyb8 bool
var yyhl8 bool = l >= 0
yyj8++
if yyhl8 {
yyb8 = yyj8 > l
var yyj12 int
var yyb12 bool
var yyhl12 bool = l >= 0
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb8 = r.CheckBreak()
yyb12 = r.CheckBreak()
}
if yyb8 {
if yyb12 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
@ -17708,21 +17784,21 @@ func (x *VsphereVirtualDiskVolumeSource) codecDecodeSelfFromArray(l int, d *code
if r.TryDecodeAsNil() {
x.VolumePath = ""
} else {
yyv9 := &x.VolumePath
yym10 := z.DecBinary()
_ = yym10
yyv13 := &x.VolumePath
yym14 := z.DecBinary()
_ = yym14
if false {
} else {
*((*string)(yyv9)) = r.DecodeString()
*((*string)(yyv13)) = r.DecodeString()
}
}
yyj8++
if yyhl8 {
yyb8 = yyj8 > l
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb8 = r.CheckBreak()
yyb12 = r.CheckBreak()
}
if yyb8 {
if yyb12 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
@ -17730,26 +17806,70 @@ func (x *VsphereVirtualDiskVolumeSource) codecDecodeSelfFromArray(l int, d *code
if r.TryDecodeAsNil() {
x.FSType = ""
} else {
yyv11 := &x.FSType
yym12 := z.DecBinary()
_ = yym12
yyv15 := &x.FSType
yym16 := z.DecBinary()
_ = yym16
if false {
} else {
*((*string)(yyv11)) = r.DecodeString()
*((*string)(yyv15)) = r.DecodeString()
}
}
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb12 = r.CheckBreak()
}
if yyb12 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.StoragePolicyName = ""
} else {
yyv17 := &x.StoragePolicyName
yym18 := z.DecBinary()
_ = yym18
if false {
} else {
*((*string)(yyv17)) = r.DecodeString()
}
}
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb12 = r.CheckBreak()
}
if yyb12 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.StoragePolicyID = ""
} else {
yyv19 := &x.StoragePolicyID
yym20 := z.DecBinary()
_ = yym20
if false {
} else {
*((*string)(yyv19)) = r.DecodeString()
}
}
for {
yyj8++
if yyhl8 {
yyb8 = yyj8 > l
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb8 = r.CheckBreak()
yyb12 = r.CheckBreak()
}
if yyb8 {
if yyb12 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj8-1, "")
z.DecStructFieldNotFound(yyj12-1, "")
}
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}

View File

@ -1118,6 +1118,12 @@ type VsphereVirtualDiskVolumeSource struct {
// Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
// +optional
FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"`
// Storage Policy Based Management (SPBM) profile name.
// +optional
StoragePolicyName string `json:"storagePolicyName,omitempty" protobuf:"bytes,3,opt,name=storagePolicyName"`
// Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.
// +optional
StoragePolicyID string `json:"storagePolicyID,omitempty" protobuf:"bytes,4,opt,name=storagePolicyID"`
}
// Represents a Photon Controller persistent disk resource.

View File

@ -1986,9 +1986,11 @@ func (VolumeSource) SwaggerDoc() map[string]string {
}
var map_VsphereVirtualDiskVolumeSource = map[string]string{
"": "Represents a vSphere volume resource.",
"volumePath": "Path that identifies vSphere volume vmdk",
"fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.",
"": "Represents a vSphere volume resource.",
"volumePath": "Path that identifies vSphere volume vmdk",
"fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.",
"storagePolicyName": "Storage Policy Based Management (SPBM) profile name.",
"storagePolicyID": "Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.",
}
func (VsphereVirtualDiskVolumeSource) SwaggerDoc() map[string]string {

View File

@ -5052,6 +5052,8 @@ func Convert_api_VolumeSource_To_v1_VolumeSource(in *api.VolumeSource, out *Volu
func autoConvert_v1_VsphereVirtualDiskVolumeSource_To_api_VsphereVirtualDiskVolumeSource(in *VsphereVirtualDiskVolumeSource, out *api.VsphereVirtualDiskVolumeSource, s conversion.Scope) error {
out.VolumePath = in.VolumePath
out.FSType = in.FSType
out.StoragePolicyName = in.StoragePolicyName
out.StoragePolicyID = in.StoragePolicyID
return nil
}
@ -5063,6 +5065,8 @@ func Convert_v1_VsphereVirtualDiskVolumeSource_To_api_VsphereVirtualDiskVolumeSo
func autoConvert_api_VsphereVirtualDiskVolumeSource_To_v1_VsphereVirtualDiskVolumeSource(in *api.VsphereVirtualDiskVolumeSource, out *VsphereVirtualDiskVolumeSource, s conversion.Scope) error {
out.VolumePath = in.VolumePath
out.FSType = in.FSType
out.StoragePolicyName = in.StoragePolicyName
out.StoragePolicyID = in.StoragePolicyID
return nil
}

View File

@ -881,7 +881,8 @@ func printVsphereVolumeSource(vsphere *api.VsphereVirtualDiskVolumeSource, w Pre
w.Write(LEVEL_2, "Type:\tvSphereVolume (a Persistent Disk resource in vSphere)\n"+
" VolumePath:\t%v\n"+
" FSType:\t%v\n",
vsphere.VolumePath, vsphere.FSType)
" StoragePolicyName:\t%v\n",
vsphere.VolumePath, vsphere.FSType, vsphere.StoragePolicyName)
}
func printPhotonPersistentDiskVolumeSource(photon *api.PhotonPersistentDiskVolumeSource, w PrefixWriter) {

View File

@ -1038,6 +1038,12 @@ type VsphereVirtualDiskVolumeSource struct {
// Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
// +optional
FSType string
// Storage Policy Based Management (SPBM) profile name.
// +optional
StoragePolicyName string
// Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.
// +optional
StoragePolicyID string
}
// Represents a Photon Controller persistent disk resource.

File diff suppressed because it is too large Load Diff

View File

@ -4012,6 +4012,14 @@ message VsphereVirtualDiskVolumeSource {
// Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
// +optional
optional string fsType = 2;
// Storage Policy Based Management (SPBM) profile name.
// +optional
optional string storagePolicyName = 3;
// Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.
// +optional
optional string storagePolicyID = 4;
}
// The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)

View File

@ -17534,13 +17534,15 @@ func (x *VsphereVirtualDiskVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
} else {
yysep2 := !z.EncBinary()
yy2arr2 := z.EncBasicHandle().StructToArray
var yyq2 [2]bool
var yyq2 [4]bool
_, _, _ = yysep2, yyq2, yy2arr2
const yyr2 bool = false
yyq2[1] = x.FSType != ""
yyq2[2] = x.StoragePolicyName != ""
yyq2[3] = x.StoragePolicyID != ""
var yynn2 int
if yyr2 || yy2arr2 {
r.EncodeArrayStart(2)
r.EncodeArrayStart(4)
} else {
yynn2 = 1
for _, b := range yyq2 {
@ -17595,6 +17597,56 @@ func (x *VsphereVirtualDiskVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[2] {
yym10 := z.EncBinary()
_ = yym10
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.StoragePolicyName))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq2[2] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("storagePolicyName"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym11 := z.EncBinary()
_ = yym11
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.StoragePolicyName))
}
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[3] {
yym13 := z.EncBinary()
_ = yym13
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.StoragePolicyID))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq2[3] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("storagePolicyID"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym14 := z.EncBinary()
_ = yym14
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.StoragePolicyID))
}
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
@ -17680,6 +17732,30 @@ func (x *VsphereVirtualDiskVolumeSource) codecDecodeSelfFromMap(l int, d *codec1
*((*string)(yyv6)) = r.DecodeString()
}
}
case "storagePolicyName":
if r.TryDecodeAsNil() {
x.StoragePolicyName = ""
} else {
yyv8 := &x.StoragePolicyName
yym9 := z.DecBinary()
_ = yym9
if false {
} else {
*((*string)(yyv8)) = r.DecodeString()
}
}
case "storagePolicyID":
if r.TryDecodeAsNil() {
x.StoragePolicyID = ""
} else {
yyv10 := &x.StoragePolicyID
yym11 := z.DecBinary()
_ = yym11
if false {
} else {
*((*string)(yyv10)) = r.DecodeString()
}
}
default:
z.DecStructFieldNotFound(-1, yys3)
} // end switch yys3
@ -17691,16 +17767,16 @@ func (x *VsphereVirtualDiskVolumeSource) codecDecodeSelfFromArray(l int, d *code
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj8 int
var yyb8 bool
var yyhl8 bool = l >= 0
yyj8++
if yyhl8 {
yyb8 = yyj8 > l
var yyj12 int
var yyb12 bool
var yyhl12 bool = l >= 0
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb8 = r.CheckBreak()
yyb12 = r.CheckBreak()
}
if yyb8 {
if yyb12 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
@ -17708,21 +17784,21 @@ func (x *VsphereVirtualDiskVolumeSource) codecDecodeSelfFromArray(l int, d *code
if r.TryDecodeAsNil() {
x.VolumePath = ""
} else {
yyv9 := &x.VolumePath
yym10 := z.DecBinary()
_ = yym10
yyv13 := &x.VolumePath
yym14 := z.DecBinary()
_ = yym14
if false {
} else {
*((*string)(yyv9)) = r.DecodeString()
*((*string)(yyv13)) = r.DecodeString()
}
}
yyj8++
if yyhl8 {
yyb8 = yyj8 > l
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb8 = r.CheckBreak()
yyb12 = r.CheckBreak()
}
if yyb8 {
if yyb12 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
@ -17730,26 +17806,70 @@ func (x *VsphereVirtualDiskVolumeSource) codecDecodeSelfFromArray(l int, d *code
if r.TryDecodeAsNil() {
x.FSType = ""
} else {
yyv11 := &x.FSType
yym12 := z.DecBinary()
_ = yym12
yyv15 := &x.FSType
yym16 := z.DecBinary()
_ = yym16
if false {
} else {
*((*string)(yyv11)) = r.DecodeString()
*((*string)(yyv15)) = r.DecodeString()
}
}
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb12 = r.CheckBreak()
}
if yyb12 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.StoragePolicyName = ""
} else {
yyv17 := &x.StoragePolicyName
yym18 := z.DecBinary()
_ = yym18
if false {
} else {
*((*string)(yyv17)) = r.DecodeString()
}
}
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb12 = r.CheckBreak()
}
if yyb12 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.StoragePolicyID = ""
} else {
yyv19 := &x.StoragePolicyID
yym20 := z.DecBinary()
_ = yym20
if false {
} else {
*((*string)(yyv19)) = r.DecodeString()
}
}
for {
yyj8++
if yyhl8 {
yyb8 = yyj8 > l
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb8 = r.CheckBreak()
yyb12 = r.CheckBreak()
}
if yyb8 {
if yyb12 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj8-1, "")
z.DecStructFieldNotFound(yyj12-1, "")
}
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}

View File

@ -1118,6 +1118,12 @@ type VsphereVirtualDiskVolumeSource struct {
// Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
// +optional
FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"`
// Storage Policy Based Management (SPBM) profile name.
// +optional
StoragePolicyName string `json:"storagePolicyName,omitempty" protobuf:"bytes,3,opt,name=storagePolicyName"`
// Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.
// +optional
StoragePolicyID string `json:"storagePolicyID,omitempty" protobuf:"bytes,4,opt,name=storagePolicyID"`
}
// Represents a Photon Controller persistent disk resource.

View File

@ -1986,9 +1986,11 @@ func (VolumeSource) SwaggerDoc() map[string]string {
}
var map_VsphereVirtualDiskVolumeSource = map[string]string{
"": "Represents a vSphere volume resource.",
"volumePath": "Path that identifies vSphere volume vmdk",
"fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.",
"": "Represents a vSphere volume resource.",
"volumePath": "Path that identifies vSphere volume vmdk",
"fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.",
"storagePolicyName": "Storage Policy Based Management (SPBM) profile name.",
"storagePolicyID": "Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.",
}
func (VsphereVirtualDiskVolumeSource) SwaggerDoc() map[string]string {

View File

@ -5052,6 +5052,8 @@ func Convert_api_VolumeSource_To_v1_VolumeSource(in *api.VolumeSource, out *Volu
func autoConvert_v1_VsphereVirtualDiskVolumeSource_To_api_VsphereVirtualDiskVolumeSource(in *VsphereVirtualDiskVolumeSource, out *api.VsphereVirtualDiskVolumeSource, s conversion.Scope) error {
out.VolumePath = in.VolumePath
out.FSType = in.FSType
out.StoragePolicyName = in.StoragePolicyName
out.StoragePolicyID = in.StoragePolicyID
return nil
}
@ -5063,6 +5065,8 @@ func Convert_v1_VsphereVirtualDiskVolumeSource_To_api_VsphereVirtualDiskVolumeSo
func autoConvert_api_VsphereVirtualDiskVolumeSource_To_v1_VsphereVirtualDiskVolumeSource(in *api.VsphereVirtualDiskVolumeSource, out *VsphereVirtualDiskVolumeSource, s conversion.Scope) error {
out.VolumePath = in.VolumePath
out.FSType = in.FSType
out.StoragePolicyName = in.StoragePolicyName
out.StoragePolicyID = in.StoragePolicyID
return nil
}