Define a mapping between REST resource name and kind/apiVersion

Allows clients to abstractly map user input to generic resource
paths as per docs/api-conventions.md

Extracted from #2000 and supports #1958
Actually that's not the behavior - the client preferred interface is what should be used in most cases, UNLESS the resource you asked for is not supported in an older API.  Since there is no case that can occur without you also telling us where that resource is via config, ComponentPlugin, or additional Cmd line parameters, I don't think that edge case is something to worry about.


> On Oct 29, 2014, at 5:33 PM, Daniel Smith <notifications@github.com> wrote:
> 
> In pkg/api/latest/restmapper.go:
> 
> > +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> > +See the License for the specific language governing permissions and
> > +limitations under the License.
> > +*/
> > +
> > +package latest
> > +
> > +import (
> > +	"fmt"
> > +	"strings"
> > +
> > +	"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
> > +	"github.com/GoogleCloudPlatform/kubernetes/pkg/api/meta"
> > +)
> > +
> > +// DefaultRESTMapper exposes mappings between the types defined in
> (i.e. if I give you "nodes" on the command line, I need to select the preferred API version that matches that, which should be v1beta1 Minions)
> 
> Ugh. Need to think about this. Not sure what behavior should be if both client and server support all the versions involved.
> 
> —
> Reply to this email directly or view it on GitHub.