Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename fields in ContainerImage object #21182

Merged
merged 1 commit into from
Feb 19, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions api/swagger-spec/v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -14673,17 +14673,17 @@
"id": "v1.ContainerImage",
"description": "Describe a container image",
"required": [
"repoTags"
"names"
],
"properties": {
"repoTags": {
"names": {
"type": "array",
"items": {
"type": "string"
},
"description": "Names by which this image is known. e.g. [\"gcr.io/google_containers/hyperkube:v1.0.7\", \"dockerhub.io/google_containers/hyperkube:v1.0.7\"]"
},
"size": {
"sizeBytes": {
"type": "integer",
"format": "int64",
"description": "The size of the image in bytes."
Expand Down
6 changes: 3 additions & 3 deletions docs/api-reference/v1/definitions.html
Original file line number Diff line number Diff line change
Expand Up @@ -6172,14 +6172,14 @@ <h3 id="_v1_containerimage">v1.ContainerImage</h3>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">repoTags</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">names</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Names by which this image is known. e.g. ["gcr.io/google_containers/hyperkube:v1.0.7", "dockerhub.io/google_containers/hyperkube:v1.0.7"]</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string array</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">size</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">sizeBytes</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The size of the image in bytes.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">integer (int64)</p></td>
Expand Down Expand Up @@ -7477,7 +7477,7 @@ <h3 id="_any">any</h3>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2016-02-14 21:22:51 UTC
Last updated 2016-02-16 23:43:33 UTC
</div>
</div>
</body>
Expand Down
8 changes: 4 additions & 4 deletions pkg/api/deep_copy_generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -494,14 +494,14 @@ func DeepCopy_api_Container(in Container, out *Container, c *conversion.Cloner)
}

func DeepCopy_api_ContainerImage(in ContainerImage, out *ContainerImage, c *conversion.Cloner) error {
if in.RepoTags != nil {
in, out := in.RepoTags, &out.RepoTags
if in.Names != nil {
in, out := in.Names, &out.Names
*out = make([]string, len(in))
copy(*out, in)
} else {
out.RepoTags = nil
out.Names = nil
}
out.Size = in.Size
out.SizeBytes = in.SizeBytes
return nil
}

Expand Down
38 changes: 19 additions & 19 deletions pkg/api/types.generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -33754,7 +33754,7 @@ func (x *ContainerImage) CodecEncodeSelf(e *codec1978.Encoder) {
var yyq2 [2]bool
_, _, _ = yysep2, yyq2, yy2arr2
const yyr2 bool = false
yyq2[1] = x.Size != 0
yyq2[1] = x.SizeBytes != 0
var yynn2 int
if yyr2 || yy2arr2 {
r.EncodeArrayStart(2)
Expand All @@ -33770,28 +33770,28 @@ func (x *ContainerImage) CodecEncodeSelf(e *codec1978.Encoder) {
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if x.RepoTags == nil {
if x.Names == nil {
r.EncodeNil()
} else {
yym4 := z.EncBinary()
_ = yym4
if false {
} else {
z.F.EncSliceStringV(x.RepoTags, false, e)
z.F.EncSliceStringV(x.Names, false, e)
}
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("repoTags"))
r.EncodeString(codecSelferC_UTF81234, string("names"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.RepoTags == nil {
if x.Names == nil {
r.EncodeNil()
} else {
yym5 := z.EncBinary()
_ = yym5
if false {
} else {
z.F.EncSliceStringV(x.RepoTags, false, e)
z.F.EncSliceStringV(x.Names, false, e)
}
}
}
Expand All @@ -33802,21 +33802,21 @@ func (x *ContainerImage) CodecEncodeSelf(e *codec1978.Encoder) {
_ = yym7
if false {
} else {
r.EncodeInt(int64(x.Size))
r.EncodeInt(int64(x.SizeBytes))
}
} else {
r.EncodeInt(0)
}
} else {
if yyq2[1] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("size"))
r.EncodeString(codecSelferC_UTF81234, string("sizeBytes"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym8 := z.EncBinary()
_ = yym8
if false {
} else {
r.EncodeInt(int64(x.Size))
r.EncodeInt(int64(x.SizeBytes))
}
}
}
Expand Down Expand Up @@ -33881,23 +33881,23 @@ func (x *ContainerImage) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
yys3 := string(yys3Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys3 {
case "repoTags":
case "names":
if r.TryDecodeAsNil() {
x.RepoTags = nil
x.Names = nil
} else {
yyv4 := &x.RepoTags
yyv4 := &x.Names
yym5 := z.DecBinary()
_ = yym5
if false {
} else {
z.F.DecSliceStringX(yyv4, false, d)
}
}
case "size":
case "sizeBytes":
if r.TryDecodeAsNil() {
x.Size = 0
x.SizeBytes = 0
} else {
x.Size = int64(r.DecodeInt(64))
x.SizeBytes = int64(r.DecodeInt(64))
}
default:
z.DecStructFieldNotFound(-1, yys3)
Expand Down Expand Up @@ -33925,9 +33925,9 @@ func (x *ContainerImage) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.RepoTags = nil
x.Names = nil
} else {
yyv8 := &x.RepoTags
yyv8 := &x.Names
yym9 := z.DecBinary()
_ = yym9
if false {
Expand All @@ -33947,9 +33947,9 @@ func (x *ContainerImage) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Size = 0
x.SizeBytes = 0
} else {
x.Size = int64(r.DecodeInt(64))
x.SizeBytes = int64(r.DecodeInt(64))
}
for {
yyj7++
Expand Down
4 changes: 2 additions & 2 deletions pkg/api/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -1719,9 +1719,9 @@ type NodeStatus struct {
// Describe a container image
type ContainerImage struct {
// Names by which this image is known.
RepoTags []string `json:"repoTags"`
Names []string `json:"names"`
// The size of the image in bytes.
Size int64 `json:"size,omitempty"`
SizeBytes int64 `json:"sizeBytes,omitempty"`
}

type NodePhase string
Expand Down
24 changes: 12 additions & 12 deletions pkg/api/v1/conversion_generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -403,15 +403,15 @@ func autoConvert_api_ContainerImage_To_v1_ContainerImage(in *api.ContainerImage,
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
defaulting.(func(*api.ContainerImage))(in)
}
if in.RepoTags != nil {
out.RepoTags = make([]string, len(in.RepoTags))
for i := range in.RepoTags {
out.RepoTags[i] = in.RepoTags[i]
if in.Names != nil {
out.Names = make([]string, len(in.Names))
for i := range in.Names {
out.Names[i] = in.Names[i]
}
} else {
out.RepoTags = nil
out.Names = nil
}
out.Size = in.Size
out.SizeBytes = in.SizeBytes
return nil
}

Expand Down Expand Up @@ -3675,15 +3675,15 @@ func autoConvert_v1_ContainerImage_To_api_ContainerImage(in *ContainerImage, out
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
defaulting.(func(*ContainerImage))(in)
}
if in.RepoTags != nil {
out.RepoTags = make([]string, len(in.RepoTags))
for i := range in.RepoTags {
out.RepoTags[i] = in.RepoTags[i]
if in.Names != nil {
out.Names = make([]string, len(in.Names))
for i := range in.Names {
out.Names[i] = in.Names[i]
}
} else {
out.RepoTags = nil
out.Names = nil
}
out.Size = in.Size
out.SizeBytes = in.SizeBytes
return nil
}

Expand Down
12 changes: 6 additions & 6 deletions pkg/api/v1/deep_copy_generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -349,15 +349,15 @@ func deepCopy_v1_Container(in Container, out *Container, c *conversion.Cloner) e
}

func deepCopy_v1_ContainerImage(in ContainerImage, out *ContainerImage, c *conversion.Cloner) error {
if in.RepoTags != nil {
out.RepoTags = make([]string, len(in.RepoTags))
for i := range in.RepoTags {
out.RepoTags[i] = in.RepoTags[i]
if in.Names != nil {
out.Names = make([]string, len(in.Names))
for i := range in.Names {
out.Names[i] = in.Names[i]
}
} else {
out.RepoTags = nil
out.Names = nil
}
out.Size = in.Size
out.SizeBytes = in.SizeBytes
return nil
}

Expand Down
38 changes: 19 additions & 19 deletions pkg/api/v1/types.generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -33636,7 +33636,7 @@ func (x *ContainerImage) CodecEncodeSelf(e *codec1978.Encoder) {
var yyq2 [2]bool
_, _, _ = yysep2, yyq2, yy2arr2
const yyr2 bool = false
yyq2[1] = x.Size != 0
yyq2[1] = x.SizeBytes != 0
var yynn2 int
if yyr2 || yy2arr2 {
r.EncodeArrayStart(2)
Expand All @@ -33652,28 +33652,28 @@ func (x *ContainerImage) CodecEncodeSelf(e *codec1978.Encoder) {
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if x.RepoTags == nil {
if x.Names == nil {
r.EncodeNil()
} else {
yym4 := z.EncBinary()
_ = yym4
if false {
} else {
z.F.EncSliceStringV(x.RepoTags, false, e)
z.F.EncSliceStringV(x.Names, false, e)
}
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("repoTags"))
r.EncodeString(codecSelferC_UTF81234, string("names"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.RepoTags == nil {
if x.Names == nil {
r.EncodeNil()
} else {
yym5 := z.EncBinary()
_ = yym5
if false {
} else {
z.F.EncSliceStringV(x.RepoTags, false, e)
z.F.EncSliceStringV(x.Names, false, e)
}
}
}
Expand All @@ -33684,21 +33684,21 @@ func (x *ContainerImage) CodecEncodeSelf(e *codec1978.Encoder) {
_ = yym7
if false {
} else {
r.EncodeInt(int64(x.Size))
r.EncodeInt(int64(x.SizeBytes))
}
} else {
r.EncodeInt(0)
}
} else {
if yyq2[1] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("size"))
r.EncodeString(codecSelferC_UTF81234, string("sizeBytes"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym8 := z.EncBinary()
_ = yym8
if false {
} else {
r.EncodeInt(int64(x.Size))
r.EncodeInt(int64(x.SizeBytes))
}
}
}
Expand Down Expand Up @@ -33763,23 +33763,23 @@ func (x *ContainerImage) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
yys3 := string(yys3Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys3 {
case "repoTags":
case "names":
if r.TryDecodeAsNil() {
x.RepoTags = nil
x.Names = nil
} else {
yyv4 := &x.RepoTags
yyv4 := &x.Names
yym5 := z.DecBinary()
_ = yym5
if false {
} else {
z.F.DecSliceStringX(yyv4, false, d)
}
}
case "size":
case "sizeBytes":
if r.TryDecodeAsNil() {
x.Size = 0
x.SizeBytes = 0
} else {
x.Size = int64(r.DecodeInt(64))
x.SizeBytes = int64(r.DecodeInt(64))
}
default:
z.DecStructFieldNotFound(-1, yys3)
Expand Down Expand Up @@ -33807,9 +33807,9 @@ func (x *ContainerImage) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.RepoTags = nil
x.Names = nil
} else {
yyv8 := &x.RepoTags
yyv8 := &x.Names
yym9 := z.DecBinary()
_ = yym9
if false {
Expand All @@ -33829,9 +33829,9 @@ func (x *ContainerImage) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Size = 0
x.SizeBytes = 0
} else {
x.Size = int64(r.DecodeInt(64))
x.SizeBytes = int64(r.DecodeInt(64))
}
for {
yyj7++
Expand Down
4 changes: 2 additions & 2 deletions pkg/api/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -2105,9 +2105,9 @@ type NodeStatus struct {
type ContainerImage struct {
// Names by which this image is known.
// e.g. ["gcr.io/google_containers/hyperkube:v1.0.7", "dockerhub.io/google_containers/hyperkube:v1.0.7"]
RepoTags []string `json:"repoTags"`
Names []string `json:"names"`
// The size of the image in bytes.
Size int64 `json:"size,omitempty"`
SizeBytes int64 `json:"sizeBytes,omitempty"`
}

type NodePhase string
Expand Down