Skip to content

Commit

Permalink
populate Status.Objects in templateInstance
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim Minter committed Aug 16, 2017
1 parent e2c9b75 commit 20c03cc
Show file tree
Hide file tree
Showing 13 changed files with 493 additions and 99 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 16 additions & 3 deletions api/swagger-spec/openshift-openapi-spec.json
Expand Up @@ -99448,6 +99448,15 @@
}
]
},
"com.github.openshift.origin.pkg.template.apis.template.v1.TemplateInstanceObject": {
"description": "TemplateInstanceObject references an object created by a TemplateInstance.",
"properties": {
"ref": {
"description": "ref is a reference to the created object. When used under .spec, only name and namespace are used; these can contain references to parameters which will be substituted following the usual rules.",
"$ref": "#/definitions/io.k8s.kubernetes.pkg.api.v1.ObjectReference"
}
}
},
"com.github.openshift.origin.pkg.template.apis.template.v1.TemplateInstanceRequester": {
"description": "TemplateInstanceRequester holds the identity of an agent requesting a template instantiation.",
"required": [
Expand Down Expand Up @@ -99483,16 +99492,20 @@
},
"com.github.openshift.origin.pkg.template.apis.template.v1.TemplateInstanceStatus": {
"description": "TemplateInstanceStatus describes the current state of a TemplateInstance.",
"required": [
"conditions"
],
"properties": {
"conditions": {
"description": "conditions represent the latest available observations of a TemplateInstance's current state.",
"type": "array",
"items": {
"$ref": "#/definitions/com.github.openshift.origin.pkg.template.apis.template.v1.TemplateInstanceCondition"
}
},
"objects": {
"description": "Objects references the objects created by the TemplateInstance.",
"type": "array",
"items": {
"$ref": "#/definitions/com.github.openshift.origin.pkg.template.apis.template.v1.TemplateInstanceObject"
}
}
}
},
Expand Down
33 changes: 31 additions & 2 deletions pkg/openapi/zz_generated.openapi.go
Expand Up @@ -9852,6 +9852,23 @@ func GetOpenAPIDefinitions(ref openapi.ReferenceCallback) map[string]openapi.Ope
Dependencies: []string{
"github.com/openshift/origin/pkg/template/apis/template/v1.TemplateInstance", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"},
},
"github.com/openshift/origin/pkg/template/apis/template/v1.TemplateInstanceObject": {
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "TemplateInstanceObject references an object created by a TemplateInstance.",
Properties: map[string]spec.Schema{
"ref": {
SchemaProps: spec.SchemaProps{
Description: "ref is a reference to the created object. When used under .spec, only name and namespace are used; these can contain references to parameters which will be substituted following the usual rules.",
Ref: ref("k8s.io/kubernetes/pkg/api/v1.ObjectReference"),
},
},
},
},
},
Dependencies: []string{
"k8s.io/kubernetes/pkg/api/v1.ObjectReference"},
},
"github.com/openshift/origin/pkg/template/apis/template/v1.TemplateInstanceRequester": {
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Expand Down Expand Up @@ -9918,12 +9935,24 @@ func GetOpenAPIDefinitions(ref openapi.ReferenceCallback) map[string]openapi.Ope
},
},
},
"objects": {
SchemaProps: spec.SchemaProps{
Description: "Objects references the objects created by the TemplateInstance.",
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Ref: ref("github.com/openshift/origin/pkg/template/apis/template/v1.TemplateInstanceObject"),
},
},
},
},
},
},
Required: []string{"conditions"},
},
},
Dependencies: []string{
"github.com/openshift/origin/pkg/template/apis/template/v1.TemplateInstanceCondition"},
"github.com/openshift/origin/pkg/template/apis/template/v1.TemplateInstanceCondition", "github.com/openshift/origin/pkg/template/apis/template/v1.TemplateInstanceObject"},
},
"github.com/openshift/origin/pkg/template/apis/template/v1.TemplateList": {
Schema: spec.Schema{
Expand Down
9 changes: 9 additions & 0 deletions pkg/template/apis/template/types.go
Expand Up @@ -117,6 +117,9 @@ type TemplateInstanceStatus struct {
// Conditions represent the latest available observations of a
// TemplateInstance's current state.
Conditions []TemplateInstanceCondition

// Objects references the objects created by the TemplateInstance.
Objects []TemplateInstanceObject
}

// TemplateInstanceCondition contains condition information for a
Expand Down Expand Up @@ -150,6 +153,12 @@ const (
TemplateInstanceInstantiateFailure TemplateInstanceConditionType = "InstantiateFailure"
)

// TemplateInstanceObject references an object created by a TemplateInstance.
type TemplateInstanceObject struct {
// ref is a reference to the created object.
Ref kapi.ObjectReference
}

// TemplateInstanceList is a list of TemplateInstance objects.
type TemplateInstanceList struct {
metav1.TypeMeta
Expand Down

0 comments on commit 20c03cc

Please sign in to comment.