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

268 Commits

Author SHA1 Message Date
Prachi Damle
d70f95a3d6 Changes to Mapper embed to insert nil value if applicable for a schema field 2018-06-11 10:53:23 -07:00
Daishan Peng
59c4a298e8 add yaml support 2018-06-04 16:44:48 -07:00
zionwu
79b91ea33c Add hostname tag and fix dnsLabel validation issue 2018-05-18 08:27:25 -07:00
Nathan Jenan
6a363d8e93 Adding error if not a pointer
This change adds an early panic if the type of the obj supplied to the
`MustImport` func is a pointer.  This is to prevent a later, cryptic,
error that is not as clear to diagnose.
2018-05-16 10:15:49 -07:00
Nathan Jenan
7fed8b17a8 Filter resources on default fields
This change gives norman the ability to filter api requests based on the
default value of fields.  Before, it would filter on the actual data in
the resource, and then apply default values to the resource before
returning.

Issue:
https://github.com/rancher/rancher/issues/13418
2018-05-16 10:15:34 -07:00
Darren Shepherd
3499440178 Revert "Make leader election have leader callback"
This reverts commit 807103dc58.
2018-05-16 10:13:40 -07:00
Darren Shepherd
d6865df52b Revert "Use a getID function instead of using hostname"
This reverts commit b480586cfc.
2018-05-16 10:09:49 -07:00
Yuxing
b480586cfc Use a getID function instead of using hostname 2018-05-12 11:46:57 -07:00
Darren Shepherd
807103dc58 Make leader election have leader callback 2018-05-10 23:35:18 +02:00
Darren Shepherd
8d5d75c7b8 Check namespace for clusterName 2018-04-30 14:36:00 -07:00
Dan Ramich
98500d10f5 Update doAction to not expect a response
Problem:
doAction assumes that an action would have a response body which causes
JSON unmarshal errors

Solution:
Only attempt to Unmarshal when a response is expected
2018-04-27 15:27:40 -07:00
Dan Ramich
e6973cb055 Update action generation code
Problem:
Action generation code does not account for a resource action that does not
have an output

Solution:
Update template to output all actions
2018-04-27 09:26:01 -07:00
Craig Jellick
719d3af64f Fix logic for setting annotation based fields
- Do not drop a field-to-annotation conversion if the value of the field is
nil. The user is excplicitly trying to set it to nil
- Never delete field annotations, even if they are not in the new map of
annotations sent by the user.
- Prevent the modification of the creatorId field, which is a special case
field that should be considered protected
2018-04-27 09:25:25 -07:00
Darren Shepherd
e501f1f3c5 Move watch sharing to norman 2018-04-27 09:25:11 -07:00
Craig Jellick
d85dfb2d48 make url error logging prettier 2018-04-27 09:25:04 -07:00
Craig Jellick
bde68141b6 Add CanDo function to AccessControl interface
Enables us to authorize actions and links
2018-04-25 20:14:41 -07:00
Darren Shepherd
063fbdfa71 Don't consider nil values when merging 2018-04-24 01:18:55 -07:00
Darren Shepherd
ff84949977 Allow changing annotation and label fields 2018-04-23 11:52:35 -07:00
Darren Shepherd
db37c4223d Fix deleting keys in maps 2018-04-23 08:43:36 -07:00
Darren Shepherd
0611d5f7a1 Add copy mapper 2018-04-21 21:50:09 -07:00
Darren Shepherd
0e1438b372 Add Create to access 2018-04-19 21:57:01 -07:00
Darren Shepherd
e2757753e1 Drop number prefix in IDs 2018-04-16 22:15:57 -07:00
Darren Shepherd
02e996f144 Update vendor 2018-04-14 23:40:25 -07:00
Darren Shepherd
3a8649c703 Add function to generate names 2018-04-14 23:40:25 -07:00
Darren Shepherd
c5c5ff280d Allow filtering of dnsLabel fields 2018-04-13 10:01:56 -07:00
Alena Prokharchyk
7a9c998498 Namespace/name presence validation 2018-04-12 13:51:59 -07:00
Alena Prokharchyk
794ace6b05
Merge pull request #138 from alena1108/apr111
Do not embed map if empty
2018-04-12 09:36:09 -07:00
Alena Prokharchyk
1d27d67ff3 do not embed map if empty 2018-04-11 17:33:53 -07:00
Darren Shepherd
7218407a4e Fix 204 on DELETE 2018-04-10 22:49:39 -07:00
Dan Ramich
9846d7349c Add interface for APIBaseClient
Problem:
There are three clients based off the APIBaseClient so three code paths
are needed to make the same type of call in each client

Solution:
Add an interface so any client that satisfies it can be used to make
these calls
2018-04-10 22:48:58 -07:00
kinarashah
93bfc4ea3a Check for cluster name in annotations 2018-04-06 10:21:13 -07:00
Darren Shepherd
4d46cbab5b Add more debug logging 2018-04-04 03:08:15 -07:00
Darren Shepherd
50ffce9804 Add namespace indexer to controllers 2018-04-04 03:08:15 -07:00
Darren Shepherd
ff60298f31 Move ObjectClient to different package 2018-04-03 14:09:16 -07:00
Darren Shepherd
ebb7ecc23f Use custom self URL for links 2018-04-03 14:09:16 -07:00
Dan Ramich
17c297e703 Add CollectionAction and update template to use collections 2018-04-03 12:55:33 -07:00
Darren Shepherd
510ed570d2 Add timeouts to rest clients 2018-04-02 15:46:10 -07:00
Dan Ramich
9f2b71df50 Update generator to handle collection as an output 2018-04-02 11:35:50 -07:00
Darren Shepherd
5c92744615 Try three times to remove finalizer 2018-04-02 04:27:50 -07:00
Darren Shepherd
d20a37adbe Update CanList API 2018-03-31 03:25:04 -07:00
Darren Shepherd
4cf9f645cd Refactor access control to return error not bool 2018-03-31 03:13:22 -07:00
Dan Ramich
7edec77619 Add ability to generate collection actions
Problem:
Collections have actions but are not accessable through the types
clients

Solution:
Update template and generator to output actions living on collections
2018-03-31 03:13:13 -07:00
Darren Shepherd
e9373e3511 Preserve selfLink in data 2018-03-29 15:58:51 -07:00
Alena Prokharchyk
2a236600f2
Merge pull request #116 from kinarashah/uproll
actionLinkByID
2018-03-28 10:22:07 -07:00
Darren Shepherd
cff992b3b4 Ignore for nullable enums 2018-03-26 19:06:15 -07:00
Darren Shepherd
41c044bb25 Make ints not nullable by default 2018-03-26 18:07:03 -07:00
kinarashah
b2e8d86797 actionLinkByID 2018-03-25 11:37:45 -07:00
Darren Shepherd
35fb4dfb92 Add Required mapper 2018-03-23 16:26:05 -07:00
Darren Shepherd
fcf2b88855 Add some debug logging to see churn 2018-03-23 09:44:24 -07:00
Darren Shepherd
34fad5e159 Add schema to Transformer funcs 2018-03-23 08:42:53 -07:00