Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(620)

Issue 8728043: Support setting constraints for the go backend.

Can't Edit
Can't Publish+Mail
Start Review
Created:
8 years, 7 months ago by benji
Modified:
8 years, 7 months ago
Reviewers:
mp+158711, jeff.pihach, gary.poster
Visibility:
Public.

Description

Support setting constraints for the go backend. Fixes bug 1167311. https://code.launchpad.net/~benji/juju-gui/bug-1167311-2/+merge/158711 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 9

Patch Set 2 : Support setting constraints for the go backend. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+124 lines, -37 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M app/app.js View 1 chunk +1 line, -1 line 0 comments Download
M app/store/env/go.js View 1 2 chunks +61 lines, -1 line 0 comments Download
M app/store/env/python.js View 1 1 chunk +12 lines, -2 lines 0 comments Download
M app/views/service.js View 3 chunks +5 lines, -15 lines 0 comments Download
M test/test_env_go.js View 3 chunks +43 lines, -18 lines 0 comments Download

Messages

Total messages: 4
benji
Please take a look.
8 years, 7 months ago (2013-04-12 20:54:24 UTC) #1
gary.poster
LGTM. Very nice. Thank you. Gary https://codereview.appspot.com/8728043/diff/1/app/store/env/go.js File app/store/env/go.js (right): https://codereview.appspot.com/8728043/diff/1/app/store/env/go.js#newcode789 app/store/env/go.js:789: genericConstraints: ['cpu-power', 'cpu-cores', ...
8 years, 7 months ago (2013-04-12 21:19:51 UTC) #2
jeff.pihach
LGTM Thanks, I like the technique for testing if an object is undefined. Curious about ...
8 years, 7 months ago (2013-04-13 16:24:18 UTC) #3
benji
8 years, 7 months ago (2013-04-15 12:28:43 UTC) #4
*** Submitted:

Support setting constraints for the go backend.

Fixes bug 1167311.

R=gary.poster, jeff.pihach
CC=
https://codereview.appspot.com/8728043

https://codereview.appspot.com/8728043/diff/1/app/store/env/go.js
File app/store/env/go.js (right):

https://codereview.appspot.com/8728043/diff/1/app/store/env/go.js#newcode789
app/store/env/go.js:789: genericConstraints: ['cpu-power', 'cpu-cores', 'mem',
'arch'],
On 2013/04/12 21:19:51, gary.poster wrote:
> What uses this?  Nothing in this file.
> 
> Ah!  I see.  Maybe include a comment here and in Python about usage?

Done.

https://codereview.appspot.com/8728043/diff/1/app/store/env/go.js#newcode809
app/store/env/go.js:809: Y.Object.each(['cpu-cores', 'cpu-power', 'mem'],
function(key) {
On 2013/04/13 16:24:18, jeff.pihach wrote:
> Using Y.Object.each on an array is a little odd, any reason you didn't use
> Y.Array.each?

The reason I used Y.Object.each is that the bit of code I cribbed from used it.
:)  I've changed it to Array.

https://codereview.appspot.com/8728043/diff/1/app/store/env/go.js#newcode827
app/store/env/go.js:827: @method handleSetConfig
On 2013/04/12 21:19:51, gary.poster wrote:
> @static
> <shrug>

Done.

https://codereview.appspot.com/8728043/diff/1/app/store/env/python.js
File app/store/env/python.js (right):

https://codereview.appspot.com/8728043/diff/1/app/store/env/python.js#newcode367
app/store/env/python.js:367: * @param {Object} constraints The charm
constraints.
On 2013/04/12 21:19:51, gary.poster wrote:
> "A hash of charm constraints"?
> 
> I guess this was an array before?

Yeah, it was an array of "KEY=VALUE" strings.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b