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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v4.1.z] Don't try creating methods for /processedtemplates pseudo-entity #378

Merged
merged 2 commits into from
Dec 17, 2018

Conversation

cben
Copy link
Collaborator

@cben cben commented Dec 17, 2018

Another small followup for #366, only relevant for openshift.
This changes nothing but achieves the desired result deliberates instead of accidentally :-) 馃槄

Openshift discovery lists both templates and processedtemplates paths for same kind "Template": openshift/origin#21668

  • templates is a regular stored api object. We want create_template, watch_templates etc. methods to access this endpoint.
  • processedtemplates endpoint isn't a stored object, its POST is a special input (template + params) -> output function. That functionality is already covered in kubeclient by process_template method. It doesn't need regular create_, get_ etc methods.

Before 4.1.0, processedtemplates was discarded in parse_definition as it didn't match the singular kind.
AFAICT it's still not a problem because first we collect @entities hash keyed by singular name, and all openshift discovery data, templates comes after processedtemplates and replaces it in @entities["template"]. So no processedtemplates methods were defined 馃槅
Anyway, this patch avoids the collision by explicitly skipping processedtemplates.

@masayag @grosser please review

Openshift discovery lists both `templates` and `processedtemplates`
for same kind "Template": openshift/origin#21668

`templates` is a regular stored api object.

`processedtemplates` endpoint isn't a stored object,
its POST is a special input (template + params) -> output function.
That functionality is already covered in kubeclient by `process_template`
method.  It doesn't need regular create_, get_, watch_ etc methods.

This is already so because in all openshift versions, `templates` comes
after `processedtemplates` and replaces it in `@entities["template"]`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants