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

Issue 82460044: Add network listing by node to test server

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 1 month ago by gz
Modified:
10 years, 1 month ago
Reviewers:
mp+213496, dave, allenap, dimitern
Visibility:
Public.

Description

Add network listing by node to test server Implements some support for networks in the MAAS test server. Only includes the networks/?node=<system_id> api for now as the others are not required by juju-core at present. https://code.launchpad.net/~gz/gomaasapi/maas_list_networks/+merge/213496 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 4

Patch Set 2 : Add network listing by node to test server #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+129 lines, -29 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M testservice.go View 1 9 chunks +101 lines, -27 lines 7 comments Download
M testservice_test.go View 1 2 chunks +26 lines, -2 lines 0 comments Download

Messages

Total messages: 5
gz
Please take a look.
10 years, 1 month ago (2014-03-31 15:23:28 UTC) #1
dimitern
LGTM, but I'd like someone from the MAAS team to take a look as well. ...
10 years, 1 month ago (2014-04-01 11:24:51 UTC) #2
allenap
Looks good to me too. Just a couple of small things to tidy up I ...
10 years, 1 month ago (2014-04-01 11:33:38 UTC) #3
gz
Please take a look. https://codereview.appspot.com/82460044/diff/1/testservice.go File testservice.go (right): https://codereview.appspot.com/82460044/diff/1/testservice.go#newcode81 testservice.go:81: func getNetworksURI(version, name string) string ...
10 years, 1 month ago (2014-04-01 14:48:45 UTC) #4
dave_cheney.net
10 years, 1 month ago (2014-04-01 19:28:25 UTC) #5
https://codereview.appspot.com/82460044/diff/20001/testservice.go
File testservice.go (right):

https://codereview.appspot.com/82460044/diff/20001/testservice.go#newcode246
testservice.go:246: if !hasNode {
if _, hasNode := ... ; !hasNode { ... }

https://codereview.appspot.com/82460044/diff/20001/testservice.go#newcode247
testservice.go:247: panic("no node with given system id")
log the missing system id ?

https://codereview.appspot.com/82460044/diff/20001/testservice.go#newcode251
testservice.go:251: panic("no network with given name")
same

https://codereview.appspot.com/82460044/diff/20001/testservice.go#newcode254
testservice.go:254: server.networksPerNode[systemId] = append(networkNames,
name)
this can be one line,

server.networksPernode[...] = append(server.networks.., name)

https://codereview.appspot.com/82460044/diff/20001/testservice.go#newcode587
testservice.go:587: systemId := values.Get("node")
if systemId := .... ; systemId == "" { panic() }

https://codereview.appspot.com/82460044/diff/20001/testservice.go#newcode589
testservice.go:589: panic("network missing associated node system id")
log missing id

https://codereview.appspot.com/82460044/diff/20001/testservice.go#newcode594
testservice.go:594: panic("no networks exists for the given node system id")
same
Sign in to reply to this message.

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