Commit Graph

11 Commits (e9165d3d467157dcc72c0876617658c1015c8706)

Author SHA1 Message Date
deads2k 6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
p0lyn0mial ad688d7761 ShortcutExpander has been extended in a way that it will examine a hardcoded list of tuples anticipated from the server when
searching for an alternative name for the resource. Note that the list is ordered and the first match will yield the extended resource's name.

One important thing to highlight is that the ShortcutExpander will fall back to PriorityRestMaper to determine the group for
the resource. Also this PR introduces a new shortcut namely sc which will resolve to storageclasses within storage.k8s.io group

In addition the type of kubectl.ShortForms has been changed to ResourceShortcuts struct. It has got a brand new name,
it was also extended and ordered by group.
2016-12-22 17:29:52 +01:00
Maciej Szulik 9f064c57ce Remove extensions/v1beta1 Job 2016-12-17 00:07:24 +01:00
Kubernetes Submit Queue 653fd97ba0 Merge pull request #37966 from p0lyn0mial/unify_restmapping_and_restmappings
Automatic merge from submit-queue (batch tested with PRs 38185, 37966)

decided to extract common logic for RESTMapping and RESTMappings to a…

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

**What this PR does / why we need it**: the changes introduced in this PR extract common logic of RESTMapping and RESTMappings to one common method. 

**Special notes for your reviewer**: this is my first PR - be polite.



The only change in logic to what was before is when calling commonRESTMappings from RESTMapping
we search all defaultGroupVersion as opposed to just one when no mapping was found for provided versions.
2016-12-06 06:49:25 -08:00
p0lyn0mial 5f8e774517 extended RESTMappings method by a version parameter.
RESTMapping method can now rely on RESTMappings by passing versions parameter and taking the first match found by RESTMappings method. In addition
a UT that test the new method has been added.

The only change in logic to what was before is when calling RESTMapping
we search all defaultGroupVersion as opposed to just one when no mapping was found for provided versions.
2016-12-05 20:09:36 +01:00
Dr. Stefan Schimanski 458d2b2fe4 Add verb support for discovery client 2016-12-05 12:36:05 +01:00
Clayton Coleman 35a6bfbcee
generated: refactor 2016-11-23 22:30:47 -06:00
Dr. Stefan Schimanski 14ce6f6065 Add caching for discovery info 2016-11-04 21:17:12 +01:00
Janet Kuo 10aee82ae3 Rename PetSet API to StatefulSet 2016-10-27 17:25:10 -07:00
Davanum Srinivas e1373cf516 Extend all to more resources
Added more things from the list here:
https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/cmd.go#L159

Update the devel/kubectl-conventions.md with the rules mentioned by
a few folks on which resources could be added to the special 'all' alias
2016-09-19 13:01:59 -04:00
deads2k 771915c6c4 make shortcut expanding restmapper handle all 2016-09-15 11:03:51 -04:00