1
0
mirror of https://github.com/rancher/norman.git synced 2025-08-24 01:48:31 +00:00
Commit Graph

766 Commits

Author SHA1 Message Date
Daishan Peng
dce4917fc2 fix list link for cluster type 2018-03-19 12:33:23 -04:00
Nathan Jenan
0ada2dfa79 Add IsConflict to httperror
Add an IsConflict function to httperror package.  The purpose of this
change is to allow the testing of APIErrors in a controlled and
centralized way.

Supports functionality in issue:
https://github.com/rancher/rancher/issues/11378
2018-03-15 09:29:34 -07:00
Craig Jellick
723fdccf80 Add function for parsing and validating an action 2018-03-15 09:10:03 -07:00
Craig Jellick
ba0bb125c9 Use request.PostForm instead of request.Form when
PostForm will ignore URL query parameters and will only look at the
body. This is much more useful for actions, which have a query param
that is the action name, but the a json body.  WIthout this change,
the only "field" found when parsing an action body is the name of the
action.
2018-03-15 09:10:03 -07:00
Craig Jellick
cd5dee7857 User proper type field when converting array
Previously we were passing the name of the field, not the type
2018-03-15 09:10:03 -07:00
Darren Shepherd
e0efa84d62 Forgot to assign value 2018-03-04 22:41:12 -07:00
Darren Shepherd
1f0f16a832 Change defaulting logic 2018-03-04 22:06:50 -07:00
Darren Shepherd
1e9982bd45 Change NewErrors signature 2018-03-03 21:53:38 -07:00
Darren Shepherd
de91ccaa71 Add ByID param so transformer to known 2018-03-03 20:07:29 -07:00
Darren Shepherd
410b3efe86 Pass in schema to Filter/FilterList 2018-03-02 23:12:42 -07:00
Craig Jellick
d9307fc2f7 Fix url escaping
When parsing URL paths, unescape them so that characters that needed escaped
in order to be placed in the a path segment are returned to their original
form.
2018-03-01 21:44:19 -07:00
Craig Jellick
4bcfb14aba Use escaped path for url parsing 2018-03-01 16:29:49 -07:00
Darren Shepherd
f59a6072cf Default empty strings 2018-03-01 14:29:27 -07:00
Alena Prokharchyk
65e6d1cc46 Index out of range fix in batchMove 2018-02-27 18:35:08 -07:00
Daishan Peng
a978cad0e8 add insecure flag, fix collection link, add yaml tags 2018-02-27 15:50:24 -07:00
Darren Shepherd
ee25c89cfd More mappers 2018-02-27 15:20:09 -07:00
Alena Prokharchyk
ef95950ff9 Transfrom fix 2018-02-27 10:16:20 -07:00
Darren Shepherd
47b787887b Delete unused code 2018-02-26 16:14:39 -07:00
Darren Shepherd
2a6c821309 Add subContext data to validation 2018-02-26 16:14:39 -07:00
Alena Prokharchyk
5bce948e06
Merge pull request #100 from alena1108/feb26
Translate field to annotation only when not nil
2018-02-26 12:02:31 -08:00
Alena Prokharchyk
50be08fe26 Translate field to annotation only when not nil 2018-02-26 11:29:35 -08:00
Darren Shepherd
2399924e8c Marshal default to correct type 2018-02-22 08:23:39 -07:00
Darren Shepherd
ad73d37172 Update vendor 2018-02-20 12:51:55 -07:00
Darren Shepherd
3985a73858 Add leader election wrapper 2018-02-20 12:51:55 -07:00
Craig Jellick
193c79e3fb
Merge pull request #97 from cjellick/api-errors
API error improvements
2018-02-15 17:04:48 -07:00
Craig Jellick
daaccc2c2c API error improvements
Log underlying causes of APIErrors (if it is available).
Also, some general cleanup.
2018-02-15 17:01:31 -07:00
Alena Prokharchyk
6753a90143 Options to transformer 2018-02-15 09:58:09 -07:00
Darren Shepherd
e39bcf5ee4 If map, don't encode 2018-02-14 16:40:03 -07:00
Darren Shepherd
94b274ab75 add get to schemas that CanGet 2018-02-14 15:51:17 -07:00
Darren Shepherd
69f36e04a9 404 on schema not found 2018-02-14 15:51:17 -07:00
Darren Shepherd
bfea703723 Transform helper method 2018-02-14 10:59:23 -07:00
Darren Shepherd
27b53dd2b6 If you hit /v3/projects/{ID}/schemas make sure schemas have correct URLs 2018-02-14 10:59:23 -07:00
Darren Shepherd
45214c311d Return 404 when no store is configured (not 200) 2018-02-14 10:59:23 -07:00
Darren Shepherd
c814e62e43 Fix a series of url parsing issues 2018-02-13 16:44:25 -07:00
Darren Shepherd
0f7c2968c9 Make controller and client more generic 2018-02-13 08:57:47 -07:00
Darren Shepherd
63f413add2 Drop password fields from response 2018-02-09 18:04:03 -07:00
Darren Shepherd
722cedfe01 Major refactor of subcontexts 2018-02-09 13:45:22 -07:00
Daishan Peng
b62e043067 only update when obj is not nil 2018-02-07 13:48:17 -08:00
Raul Sanchez
aa9c66a519 Feat: Added token suport to clientbase auth 2018-02-07 13:48:11 -08:00
Darren Shepherd
83916ae78f Add helper functions in norman 2018-02-07 13:48:02 -08:00
Darren Shepherd
d95fc9147f MetadataMapper cleanup 2018-02-07 13:48:02 -08:00
Darren Shepherd
339468f119 Only record forgetError if there is no message at all 2018-02-06 05:03:25 +00:00
Darren Shepherd
70200ed19c Disable event logging for the moment 2018-02-06 05:03:25 +00:00
Darren Shepherd
d63581239c Fix non-updating condition 2018-02-03 06:44:14 +00:00
Craig Jellick
151aa66e3e
Merge pull request #82 from cjellick/auth-config2
Better support for subtyping
2018-02-01 08:15:36 -07:00
Craig Jellick
65807e9372 Distinguish between listing and getting
We now have resources (subtypes of authConfig) that can be retrieved
by ID but their collections are not viewable. This change is needed
to suppport that.
2018-01-31 19:30:51 -07:00
Craig Jellick
536d36c706 Fixes for subtypes
Change key method (used to find CRD that backs the schema) to use
baseType of the schema when it differs from the schema ID. This
will allow subtypes to use their base type's CRD store.

When creating CRD stores, do not create one for a schema if it is
a baseType.
2018-01-31 19:28:26 -07:00
Dan Ramich
d2d5892f3f Add option to pass in CAcert for verification
Problem:
Running a server with a self signed cert will cause tls errors

Solution:
Add abillity to pass in a cert file to use for tls verification
2018-01-31 20:57:39 +00:00
Darren Shepherd
87d5ab06b9 Change RequestHandler signature 2018-01-30 23:56:30 +00:00
Darren Shepherd
fe053853bb Add notnullable attribute 2018-01-28 05:19:39 +00:00