From 0c8a34787190111bbd8080478b4d61c6d479c784 Mon Sep 17 00:00:00 2001 From: Huamin Chen Date: Wed, 15 Feb 2017 09:50:21 -0500 Subject: [PATCH] make iscsi portals optional Signed-off-by: Huamin Chen --- api/swagger-spec/apps_v1beta1.json | 3 +- api/swagger-spec/batch_v1.json | 3 +- api/swagger-spec/extensions_v1beta1.json | 3 +- api/swagger-spec/v1.json | 3 +- .../apps/v1beta1/definitions.html | 4 +- docs/api-reference/batch/v1/definitions.html | 4 +- .../extensions/v1beta1/definitions.html | 4 +- docs/api-reference/v1/definitions.html | 4 +- pkg/api/v1/types.generated.go | 43 +++++++++++-------- pkg/api/v1/types.go | 2 +- 10 files changed, 38 insertions(+), 35 deletions(-) diff --git a/api/swagger-spec/apps_v1beta1.json b/api/swagger-spec/apps_v1beta1.json index 5f2802591ea..879d6e00524 100644 --- a/api/swagger-spec/apps_v1beta1.json +++ b/api/swagger-spec/apps_v1beta1.json @@ -1660,8 +1660,7 @@ "required": [ "targetPortal", "iqn", - "lun", - "portals" + "lun" ], "properties": { "targetPortal": { diff --git a/api/swagger-spec/batch_v1.json b/api/swagger-spec/batch_v1.json index b02cf0a63d7..6e002470bc9 100644 --- a/api/swagger-spec/batch_v1.json +++ b/api/swagger-spec/batch_v1.json @@ -1665,8 +1665,7 @@ "required": [ "targetPortal", "iqn", - "lun", - "portals" + "lun" ], "properties": { "targetPortal": { diff --git a/api/swagger-spec/extensions_v1beta1.json b/api/swagger-spec/extensions_v1beta1.json index 25756a56906..4548189708e 100644 --- a/api/swagger-spec/extensions_v1beta1.json +++ b/api/swagger-spec/extensions_v1beta1.json @@ -7067,8 +7067,7 @@ "required": [ "targetPortal", "iqn", - "lun", - "portals" + "lun" ], "properties": { "targetPortal": { diff --git a/api/swagger-spec/v1.json b/api/swagger-spec/v1.json index 9fc3e1b92ce..4ea92088cb8 100644 --- a/api/swagger-spec/v1.json +++ b/api/swagger-spec/v1.json @@ -18068,8 +18068,7 @@ "required": [ "targetPortal", "iqn", - "lun", - "portals" + "lun" ], "properties": { "targetPortal": { diff --git a/docs/api-reference/apps/v1beta1/definitions.html b/docs/api-reference/apps/v1beta1/definitions.html index 13335037229..7f36d4d0750 100755 --- a/docs/api-reference/apps/v1beta1/definitions.html +++ b/docs/api-reference/apps/v1beta1/definitions.html @@ -2626,7 +2626,7 @@ Populated by the system when a graceful deletion is requested. Read-only. More i

portals

iSCSI target portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).

-

true

+

false

string array

@@ -5389,7 +5389,7 @@ Examples:
diff --git a/docs/api-reference/batch/v1/definitions.html b/docs/api-reference/batch/v1/definitions.html index b606c541816..5f13323c8e5 100755 --- a/docs/api-reference/batch/v1/definitions.html +++ b/docs/api-reference/batch/v1/definitions.html @@ -2537,7 +2537,7 @@ Populated by the system when a graceful deletion is requested. Read-only. More i

portals

iSCSI target portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).

-

true

+

false

string array

@@ -5321,7 +5321,7 @@ Examples:
diff --git a/docs/api-reference/extensions/v1beta1/definitions.html b/docs/api-reference/extensions/v1beta1/definitions.html index c8f6891b416..968f226477d 100755 --- a/docs/api-reference/extensions/v1beta1/definitions.html +++ b/docs/api-reference/extensions/v1beta1/definitions.html @@ -2317,7 +2317,7 @@ Populated by the system when a graceful deletion is requested. Read-only. More i

portals

iSCSI target portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).

-

true

+

false

string array

@@ -7612,7 +7612,7 @@ Both these may change in the future. Incoming requests are matched against the h diff --git a/docs/api-reference/v1/definitions.html b/docs/api-reference/v1/definitions.html index 17ea7cfdff7..cbc30ec2dd7 100755 --- a/docs/api-reference/v1/definitions.html +++ b/docs/api-reference/v1/definitions.html @@ -2553,7 +2553,7 @@ Populated by the system when a graceful deletion is requested. Read-only. More i

portals

iSCSI target portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).

-

true

+

false

string array

@@ -9638,7 +9638,7 @@ Examples:
diff --git a/pkg/api/v1/types.generated.go b/pkg/api/v1/types.generated.go index 472008018dc..89c540e1100 100644 --- a/pkg/api/v1/types.generated.go +++ b/pkg/api/v1/types.generated.go @@ -15298,11 +15298,12 @@ func (x *ISCSIVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { yyq2[3] = x.ISCSIInterface != "" yyq2[4] = x.FSType != "" yyq2[5] = x.ReadOnly != false + yyq2[6] = len(x.Portals) != 0 var yynn2 int if yyr2 || yy2arr2 { r.EncodeArrayStart(7) } else { - yynn2 = 4 + yynn2 = 3 for _, b := range yyq2 { if b { yynn2++ @@ -15445,28 +15446,34 @@ func (x *ISCSIVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Portals == nil { - r.EncodeNil() - } else { - yym22 := z.EncBinary() - _ = yym22 - if false { + if yyq2[6] { + if x.Portals == nil { + r.EncodeNil() } else { - z.F.EncSliceStringV(x.Portals, false, e) + yym22 := z.EncBinary() + _ = yym22 + if false { + } else { + z.F.EncSliceStringV(x.Portals, false, e) + } } + } else { + r.EncodeNil() } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("portals")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Portals == nil { - r.EncodeNil() - } else { - yym23 := z.EncBinary() - _ = yym23 - if false { + if yyq2[6] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("portals")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Portals == nil { + r.EncodeNil() } else { - z.F.EncSliceStringV(x.Portals, false, e) + yym23 := z.EncBinary() + _ = yym23 + if false { + } else { + z.F.EncSliceStringV(x.Portals, false, e) + } } } } diff --git a/pkg/api/v1/types.go b/pkg/api/v1/types.go index 9304ad40eaf..4688f2f6a0d 100644 --- a/pkg/api/v1/types.go +++ b/pkg/api/v1/types.go @@ -1015,7 +1015,7 @@ type ISCSIVolumeSource struct { // iSCSI target portal List. The portal is either an IP or ip_addr:port if the port // is other than default (typically TCP ports 860 and 3260). // +optional - Portals []string `json:"portals" protobuf:"bytes,7,opt,name=portals"` + Portals []string `json:"portals,omitempty" protobuf:"bytes,7,opt,name=portals"` } // Represents a Fibre Channel volume.