Merge lp:~wallyworld/juju-core/environ-resource-catalogs into lp:~go-bot/juju-core/trunk
Status: | Work in progress |
---|---|
Proposed branch: | lp:~wallyworld/juju-core/environ-resource-catalogs |
Merge into: | lp:~go-bot/juju-core/trunk |
Diff against target: |
383 lines (+351/-0) 4 files modified
state/interface.go (+7/-0) state/storage/interface.go (+16/-0) state/storage/resourcecatalog.go (+158/-0) state/storage/resourcecatalog_test.go (+170/-0) |
To merge this branch: | bzr merge lp:~wallyworld/juju-core/environ-resource-catalogs |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+221484@code.launchpad.net |
Description of the change
New environ ResourceCatalog
A ResourceCatalog is added, which knows how to persist
resource records. A resource record contains a path and
a hash and is used to catalog the data blobs stored in
the recently added ResourceStorage. A category attribute
is also provided and will be used later for defining
resources are tools vs charms etc.
When a resource entry with the same path is saved, a new
record is not created but instead the existing one has
its ref count incremented. The opposite occurs with
removal. Removing the last record deletes it.
The above will be used by a new ManagedResource implemention
which will know how to store data for environs and users and
do things like de-duping using checksums etc.
Reviewers: mp+221484_ code.launchpad. net,
Message:
Please take a look.
Description:
New environ ResourceCatalog
A ResourceCatalog is added, which knows how to persist
resource records. A resource record contains a path and
a hash and is used to catalog the data blobs stored in
the recently added ResourceStorage. A category attribute
is also provided and will be used later for defining
resources are tools vs charms etc.
When a resource entry with the same path is saved, a new
record is not created but instead the existing one has
its ref count incremented. The opposite occurs with
removal. Removing the last record deletes it.
The above will be used by a new ManagedResource implemention
which will know how to store data for environs and users and
do things like de-duping using checksums etc.
https:/ /code.launchpad .net/~wallyworl d/juju- core/environ- resource- catalogs/ +merge/ 221484
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/104720046/
Affected files (+353, -0 lines): interface. go resourcecatalog .go resourcecatalog _test.go
A [revision details]
M state/interface.go
M state/storage/
A state/storage/
A state/storage/