Commit Graph

215 Commits (3215e8535ae8afcf850fbaac9df7ff9abe42f9e0)

Author SHA1 Message Date
Clayton Coleman 52c6c60b15 Use name from server when displaying create/update
Allows generated names from files to be displayed so users can
interact with them.
2015-02-08 21:40:47 -05:00
Yu-Ju Hong 4a72addaeb Factor out API defaulting from validation logic
Currently, the validation logic validates fields in an object and supply default
values wherever applies. This change factors out defaulting to a set of
defaulting callback functions for decoding (see #1502 for more discussion).

 * This change is based on pull request 2587.

 * Most defaulting has been migrated to defaults.go where the defaulting
   functions are added.

 * validation_test.go and converter_test.go have been adapted to not testing the
   default values.

 * Fixed all tests with that create invalid objects with the absence of
   defaulting logic.
2015-02-03 00:55:42 -08:00
derekwaynecarr 0851ca9522 Do not provide a namespace on request url if resource does not require it 2015-02-02 10:26:19 -05:00
derekwaynecarr a8449732e0 Make the FilterNamespace function the last visitor 2015-02-02 10:26:19 -05:00
derekwaynecarr 4c33e36a88 Plumb restmapper properly through apiserver and tests 2015-02-02 10:26:19 -05:00
derekwaynecarr f911784c98 Cherry pick test from #3901 2015-02-02 10:26:19 -05:00
derekwaynecarr 71ec444d63 Make a RESTMapper scope aware 2015-02-02 10:26:19 -05:00
Clayton Coleman 6894d4feed Merge pull request #3460 from mnagy/handle-selector-error
Fix panic if selector uses malformed syntax
2015-01-14 13:49:22 -05:00
Clayton Coleman ccdc20d90c Ignore empty objects from streams and error when nothing passed to create
Passing zero objects to create should be an error
2015-01-14 13:12:33 -05:00
Clayton Coleman 31413c8727 Add more tests around JSON/YAML decoding from the CLI
Switch the ignore stream errors behavior to print a Warningf on
failure to parse, not v(2)
2015-01-14 12:38:36 -05:00
Martin Nagy 9340781d21 Fix panic if selector uses malformed syntax 2015-01-14 17:13:58 +01:00
Clayton Coleman ec803cb809 Allow resource.Builder to stream YAML from the CLI
Add both JSON and YAML STDIN tests in test-cmd
2015-01-14 00:50:13 -05:00
Clayton Coleman d24c5b145e Allow errors to be ignored by the builder 2015-01-09 13:31:24 -05:00
Clayton Coleman d1ab27762b Create should be able to accept multiple resources 2015-01-09 13:30:31 -05:00
Clayton Coleman d75a3d5021 Move Resource functionality to its own package
Create a unified Builder object for working with files, selectors,
types, and items that makes it easier to get multi-object functionality.

Supports all of the behaviors previously in resource.go, but with
additional flexibility to allow multi-type retrieval and access, directories,
URLs, nested objects, and lists.
2015-01-09 11:59:06 -05:00