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

Issue 6713057: charm: tighter restrictions on relations

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 6 months ago by fwereade
Modified:
11 years, 6 months ago
Reviewers:
mp+130248
Visibility:
Public.

Description

charm: tighter restrictions on relations Duplicate relation names are no longer allowed, and the relation names "juju" and "juju-*" have been reserved for use by juju, as have provider interfaces with those names. https://code.launchpad.net/~fwereade/juju-core/charm-relation-restrictions/+merge/130248 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 8

Patch Set 2 : charm: tighter restrictions on relations #

Unified diffs Side-by-side diffs Delta from patch set Stats (+104 lines, -1 line) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M charm/meta.go View 1 3 chunks +37 lines, -0 lines 0 comments Download
M charm/meta_test.go View 1 2 chunks +65 lines, -1 line 0 comments Download

Messages

Total messages: 3
fwereade
Please take a look.
11 years, 6 months ago (2012-10-17 22:26:51 UTC) #1
niemeyer
LGTM https://codereview.appspot.com/6713057/diff/1/charm/meta.go File charm/meta.go (right): https://codereview.appspot.com/6713057/diff/1/charm/meta.go#newcode84 charm/meta.go:84: return fmt.Errorf("%q is a reserved relation name", name) ...
11 years, 6 months ago (2012-10-17 23:33:20 UTC) #2
fwereade
11 years, 6 months ago (2012-10-18 06:15:04 UTC) #3
*** Submitted:

charm: tighter restrictions on relations

Duplicate relation names are no longer allowed, and the relation names
"juju" and "juju-*" have been reserved for use by juju, as have provider
interfaces with those names.

R=niemeyer
CC=
https://codereview.appspot.com/6713057

https://codereview.appspot.com/6713057/diff/1/charm/meta.go
File charm/meta.go (right):

https://codereview.appspot.com/6713057/diff/1/charm/meta.go#newcode84
charm/meta.go:84: return fmt.Errorf("%q is a reserved relation name", name)
On 2012/10/17 23:33:20, niemeyer wrote:
> ("charm %q using a reserved relation name: %q", charm.Name, name)

Done.

https://codereview.appspot.com/6713057/diff/1/charm/meta.go#newcode87
charm/meta.go:87: return fmt.Errorf("%q relation redeclared", name)
On 2012/10/17 23:33:20, niemeyer wrote:
> ("charm %q using a duplicated relation name: %q", charm.Name, name)

Done.

https://codereview.appspot.com/6713057/diff/1/charm/meta.go#newcode97
charm/meta.go:97: return nil, fmt.Errorf("%q relation uses the reserved provider
interface name %q", name, rel.Interface)
On 2012/10/17 23:33:20, niemeyer wrote:
> ("charm %q using a reserved provider interface: %q", charm.Name, name)

Done.

https://codereview.appspot.com/6713057/diff/1/charm/meta.go#newcode132
charm/meta.go:132: func forbidden(name string) bool {
On 2012/10/17 23:33:20, niemeyer wrote:
> s/forbidden/reservedName/

Done.
Sign in to reply to this message.

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