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

Issue 7309045: nova double: regexp filtering by name (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+146647, jameinel, wallyworld, rog
Visibility:
Public.

Description

nova double: regexp filtering by name Filtering by server name in ListServers/Detail() now supports regular expression, as Openstack does. Implemented in the double and added tests. Needed in juju to filter instances by environment (now part of the instance name when started by juju). https://code.launchpad.net/~dimitern/goose/nova-instance-filtering/+merge/146647 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 2

Patch Set 2 : nova double: regexp filtering by name #

Total comments: 20

Patch Set 3 : nova double: regexp filtering by name #

Patch Set 4 : nova double: regexp filtering by name #

Unified diffs Side-by-side diffs Delta from patch set Stats (+234 lines, -93 lines) Patch
A [revision details] View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M nova/live_test.go View 1 2 3 3 chunks +30 lines, -6 lines 0 comments Download
M nova/nova.go View 1 2 3 2 chunks +8 lines, -2 lines 0 comments Download
M testservices/novaservice/service.go View 1 2 3 2 chunks +68 lines, -33 lines 0 comments Download
M testservices/novaservice/service_http.go View 1 2 3 1 chunk +6 lines, -2 lines 0 comments Download
M testservices/novaservice/service_http_test.go View 1 2 4 chunks +7 lines, -17 lines 0 comments Download
M testservices/novaservice/service_test.go View 1 2 chunks +113 lines, -33 lines 0 comments Download

Messages

Total messages: 12
dimitern
Please take a look.
11 years, 3 months ago (2013-02-05 15:10:13 UTC) #1
jameinel
This seems fine, though it really feels like we are missing live tests here. Especially ...
11 years, 3 months ago (2013-02-05 16:46:14 UTC) #2
dimitern
Please take a look. https://codereview.appspot.com/7309045/diff/1/testservices/novaservice/service.go File testservices/novaservice/service.go (right): https://codereview.appspot.com/7309045/diff/1/testservices/novaservice/service.go#newcode252 testservices/novaservice/service.go:252: rex := regexp.MustCompile(val) On 2013/02/05 ...
11 years, 3 months ago (2013-02-07 20:13:27 UTC) #3
wallyworld
LGTM. I wonder if we want to do a live test with multiple filters. It ...
11 years, 3 months ago (2013-02-08 03:49:16 UTC) #4
jameinel
I think LGTM, some tweaks requested. Can we get away with removing Add() entirely, rather ...
11 years, 3 months ago (2013-02-08 04:50:17 UTC) #5
dimitern
On 2013/02/08 03:49:16, wallyworld wrote: > LGTM. > I wonder if we want to do ...
11 years, 3 months ago (2013-02-08 12:33:53 UTC) #6
dimitern
Please take a look. https://codereview.appspot.com/7309045/diff/1004/nova/nova.go File nova/nova.go (right): https://codereview.appspot.com/7309045/diff/1004/nova/nova.go#newcode90 nova/nova.go:90: On 2013/02/08 04:50:17, jameinel wrote: ...
11 years, 3 months ago (2013-02-08 13:00:40 UTC) #7
dimitern
*** Submitted through the bot. I think it's better to have it landed and possibly ...
11 years, 3 months ago (2013-02-08 13:03:52 UTC) #8
dimitern
On 2013/02/08 13:03:52, dimitern wrote: > *** Submitted through the bot. > > I think ...
11 years, 3 months ago (2013-02-08 13:10:01 UTC) #9
dimitern
Please take a look.
11 years, 3 months ago (2013-02-08 13:10:28 UTC) #10
rog
https://codereview.appspot.com/7309045/diff/1004/nova/nova.go File nova/nova.go (right): https://codereview.appspot.com/7309045/diff/1004/nova/nova.go#newcode90 nova/nova.go:90: On 2013/02/08 13:00:40, dimitern wrote: > On 2013/02/08 04:50:17, ...
11 years, 3 months ago (2013-02-08 13:46:34 UTC) #11
dimitern
11 years, 3 months ago (2013-02-08 14:15:21 UTC) #12
Message was sent while issue was closed.
On 2013/02/08 13:46:34, rog wrote:
> https://codereview.appspot.com/7309045/diff/1004/nova/nova.go
> File nova/nova.go (right):
> 
> https://codereview.appspot.com/7309045/diff/1004/nova/nova.go#newcode90
> nova/nova.go:90: 
> On 2013/02/08 13:00:40, dimitern wrote:
> > On 2013/02/08 04:50:17, jameinel wrote:
> > > Why have an Add function if you are changing everything to use Set() ? If
it
> > is
> > > true that only one value is supported, is there a way to get only
> > > ACTIVE+BUILDING nodes (so we don't see SHUTDOWN nodes, etc)?
> > > 
> > > Can we just not implement Add() since it would be confusing to call Add()
> and
> > > not have the values stack as expected?
> > > 
> > > Or is this just a shortcut and the real Openstack supports Add() and we
are
> > just
> > > doing Set() until we decide we need more functionality? If so, we probably
> > want
> > > to add a comment about "For now..."
> > 
> > No, OpenStack does not support multiple value filters, so effectively Add()
> and
> > Set() are equivalent for our purposes.  I could though have Add() panic, so
we
> > don't accidentally call it instead of Set(), but I figured it's better like
> this
> > - it's documented and it behaves consistently.
> 
> if Add doesn't work, why have the method at all?

As discussed, I proposed a follow-up:
https://codereview.appspot.com/7301064
Sign in to reply to this message.

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