forked from chef-boneyard/resource
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTODO
More file actions
82 lines (74 loc) · 2.84 KB
/
Copy pathTODO
File metadata and controls
82 lines (74 loc) · 2.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
Basic Resource (Modifying A Real Thing) Support
- Make API to change things: converge, if_create, if_change_desired (which is probably where try_change lands)
- Prevent "property" from overwriting non-property methods (even on base classes
or modules)
- Can we prevent people from screwing up and writing both "load" and "load_value"?
Or at least tell them when they do it? It can cause inconsistent results.
- Get rid of keyword arguments anywhere you find optional arguments
Nesting
- Add nested structs
- Add hashes
- Add sets
- Add indexed sets
- Add arrays
- Type specialization: tests, and merging of "properties". Probably best to wait until after resource tree is built.
Specifics
- Provisioning: provisioning.machine, aws.sdk, aws.instance, docker.image, docker.container, docker.image
- Chef API: net.rest, chef.authentication, chef.server, formats.json, chef.node
- Local Mode: entry, file, directory, chef.repository, chef.ruby_format, chef.defaults
- Zero: net.http_server, chef.authentication, core.authorization
- Config
- Command Line tying it all together
- Server that serves resources
Future
- Race condition protection? etcd-content id, by date, by checksum ...
- Reduce stack size and make it even more readable
...
- Think about race condition protection / content id / etc.
# NEXT 2: structs as changesets
# Store "changes" as hash
# "converge" in "update" method
#
# NEXT 3: nested struct changesets
# Make override block work at class level, not just block level
# Struct properties modify the parent "changes" hash on update
# Structproperty
# This should make defaults writeable as well; Structproperty is created
# *on top of* the default.
# name(..., &override_block) - update idiom
#
# NEXT 4: lazy reality (GET+PUT)
# "current_resource" instance method for struct and for properties, called
# instead of default
# Structproperty initializes "current_resource" to "parent_struct.current_resource.name"
#
# NEXT 5: primitive properties
# Symbol
# String/Integer (non-modified types)
#
# NEXT 6: proper inheritance
# Make inheritance bring over parent identity properties
# Make "property :x" specialize parent property :x if there is one
# address(Address.open) create another layer of address vs. ref (value vs. ref)
#
# NEXT 6: events, logging
#
# NEXT 4: struct hierarchy
# RecipeDSL
# ChefResource.global_dsl
#
# NEXT 5: useful primitives
# ruby_block
# execute
# file
#
# NEXT 6: hash
#
# NEXT 7: set
#
# NEXT 8: array
#
# NEXT 9: path, symbol
#
# TODO generic events; content/path; super validation; logfile output; super cool curses output; GUI output
#