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

Issue 7301064: nova: Refactor Filter (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 3 months ago by dimitern
Modified:
11 years, 3 months ago
Reviewers:
mp+147371, rog
Visibility:
Public.

Description

nova: Refactor Filter Now nova client and test double use separate filter types for better isolation and simple code: nova.Filter (by the client), having only Set() as it's write-only; and novaservice.filter (by the double), being a thin wrapper over map[string]string. As discussed, this relays the intent better and makes code cleaner. Also removed a now redundant test to compare Add() and Set() on nova.Filter and updated all tests as needed. https://code.launchpad.net/~dimitern/goose/nova-filter-refactoring/+merge/147371 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 8

Patch Set 2 : nova: Refactor Filter #

Patch Set 3 : nova: Refactor Filter #

Total comments: 5

Patch Set 4 : nova: Refactor Filter #

Patch Set 5 : nova: Refactor Filter #

Patch Set 6 : nova: Refactor Filter #

Unified diffs Side-by-side diffs Delta from patch set Stats (+87 lines, -86 lines) Patch
A [revision details] View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M nova/nova.go View 1 2 3 4 chunks +5 lines, -7 lines 0 comments Download
M testservices/novaservice/service.go View 1 2 3 4 4 chunks +19 lines, -16 lines 0 comments Download
M testservices/novaservice/service_http.go View 1 2 3 4 5 2 chunks +10 lines, -6 lines 0 comments Download
M testservices/novaservice/service_http_test.go View 1 chunk +1 line, -1 line 0 comments Download
M testservices/novaservice/service_test.go View 1 2 3 4 4 chunks +50 lines, -56 lines 0 comments Download

Messages

Total messages: 10
dimitern
Please take a look.
11 years, 3 months ago (2013-02-08 14:11:43 UTC) #1
rog
looks reasonable, but i think we make things simpler. https://codereview.appspot.com/7301064/diff/1/nova/nova.go File nova/nova.go (right): https://codereview.appspot.com/7301064/diff/1/nova/nova.go#newcode90 nova/nova.go:90: ...
11 years, 3 months ago (2013-02-08 14:45:45 UTC) #2
rog
On 2013/02/08 14:45:45, rog wrote: > looks reasonable, but i think we make things simpler. ...
11 years, 3 months ago (2013-02-08 14:46:13 UTC) #3
dimitern
Please take a look. https://codereview.appspot.com/7301064/diff/1/nova/nova.go File nova/nova.go (right): https://codereview.appspot.com/7301064/diff/1/nova/nova.go#newcode90 nova/nova.go:90: func (f *Filter) Get(filter string) ...
11 years, 3 months ago (2013-02-08 15:09:48 UTC) #4
dimitern
Please take a look.
11 years, 3 months ago (2013-02-08 16:53:57 UTC) #5
dimitern
Please take a look.
11 years, 3 months ago (2013-02-08 16:57:22 UTC) #6
rog
one final suggestion. https://codereview.appspot.com/7301064/diff/8001/testservices/novaservice/service.go File testservices/novaservice/service.go (right): https://codereview.appspot.com/7301064/diff/8001/testservices/novaservice/service.go#newcode243 testservices/novaservice/service.go:243: func newFilter() *filter { why bother ...
11 years, 3 months ago (2013-02-08 17:02:18 UTC) #7
dimitern
Please take a look. https://codereview.appspot.com/7301064/diff/8001/testservices/novaservice/service.go File testservices/novaservice/service.go (right): https://codereview.appspot.com/7301064/diff/8001/testservices/novaservice/service.go#newcode267 testservices/novaservice/service.go:267: // f := newFilter() On ...
11 years, 3 months ago (2013-02-08 17:23:50 UTC) #8
rog
LGTM
11 years, 3 months ago (2013-02-08 17:28:43 UTC) #9
dimitern
11 years, 3 months ago (2013-02-08 17:36:46 UTC) #10
**** Submitted through the bot
Sign in to reply to this message.

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