On not copy-pasting state and params struct conversions
Andrew Wilkins
andrew.wilkins at canonical.com
Tue Feb 10 09:07:30 UTC 2015
Hi all,
Anastasia raised an issue in http://reviews.vapour.ws/r/885/ about how to
cut down on struct conversions between params, state, and domain packages.
In this case we're talking about storage. The following API server facades
currently participate in storage:
- client
- storage
- provisioner
- diskmanager (to be renamed, this lists block devices on machines)
- diskformatter
- storageworker (to be renamed, this is the dynamic storage provisioner)
Each facade have some overlap in dealing with storage entities, e.g. the
diskformatter and diskmanager each need to deal with block devices. This
leads to much duplication of struct copying/conversion code when toing and
froing between state and clients.
I don't want to go adding conversion code to the params, state or storage
packages, as they really shouldn't have dependencies on each other. Does
anyone have a good idea about where to put this common functionality? Maybe
"api/common/storage", "apiserver/common/storage"? Does not appeal, but I
can't think of a better option.
Cheers,
Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju-dev/attachments/20150210/b7829fe3/attachment-0001.html>
More information about the Juju-dev
mailing list