Merge lp://staging/~wallyworld/gwacl/prefix-service-match into lp://staging/gwacl

Proposed by Ian Booth
Status: Rejected
Rejected by: Ian Booth
Proposed branch: lp://staging/~wallyworld/gwacl/prefix-service-match
Merge into: lp://staging/gwacl
Diff against target: 119 lines (+52/-17)
2 files modified
management.go (+14/-2)
management_test.go (+38/-15)
To merge this branch: bzr merge lp://staging/~wallyworld/gwacl/prefix-service-match
Reviewer Review Type Date Requested Status
Andrew Wilkins (community) Approve
Review via email: mp+243620@code.staging.launchpad.net

Commit message

When finding services using a prefix match, it was possible to accidentally include additional unwanted services in the result. This branch allows a separator to be specified when invoking the ListPrefixedHostedServices() API. The separator is considered to sit between the prefix and the rest of the service name.
Thus if a separator of "-" is specified with a prefix of "azure", then:

azure-service will match

azure-1-service will not match

Description of the change

When finding services using a prefix match, it was possible to accidentally include additional unwanted services in the result. This branch allows a separator to be specified when invoking the ListPrefixedHostedServices() API. The separator is considered to sit between the prefix and the rest of the service name.
Thus if a separator of "-" is specified with a prefix of "azure", then:

azure-service will match

azure-1-service will not match

To post a comment you must log in.
Revision history for this message
Andrew Wilkins (axwalk) wrote :

Feels like kind of a weird overloading; I kinda think we'd be better off just ditching the use of ListPrefixedHostedServices and use ListHostedServices and regex match in Juju.

But... LGTM, I don't want to hold up the fix.

review: Approve

Unmerged revisions

241. By Ian Booth

Allow prefixed searches to specify a separator

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: