Merge lp:~hazmat/pyjuju/security-groups into lp:pyjuju

Proposed by Kapil Thangavelu
Status: Merged
Approved by: Kapil Thangavelu
Approved revision: 287
Merged at revision: 296
Proposed branch: lp:~hazmat/pyjuju/security-groups
Merge into: lp:pyjuju
Prerequisite: lp:~hazmat/pyjuju/security-connection
To merge this branch: bzr merge lp:~hazmat/pyjuju/security-groups
Reviewer Review Type Date Requested Status
William Reade (community) Approve
Gustavo Niemeyer Approve
Review via email: mp+68753@code.launchpad.net

Description of the change

Implements a security group as a stored/persistent principal with membership denoting acl access to utilize the group principal credentials on a connection.

Resubmitting because this is not showing up the kanban board.

To post a comment you must log in.
Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

This looks good. Some minors, and +1.

(note it includes a pre-req branch still in review)

[1]

+ @inlineCallbacks
+ def initialize(self):
+ """Initialize the group.

Would be nice to have that right after __init__.

[2]

+ if self._name is None:
+ raise ValueError("initialize() must be called before usage")

This should be a RuntimeError or similar.

[3]

+ raise StateNotFound("group does not exist at %r" % self._path)

s/group/Group/

[4]

+ raise ValueError(
+ "Principal: %r is already a member of group: %r" % (
(...)
+ if not found:
+ raise ValueError("Principal: %r is not a member of group: %r" % (

As I understand it, this logic is going to be used by code, and the final
state that we get into is the desired one, so it feels like both of these
could just be NOOPs. Even more considering there are race conditions into
play here.

[5]

+ acl.append(
+ make_ace(token, read=True))

This fits in a line.

review: Approve
Revision history for this message
William Reade (fwereade) wrote :

+1 to everything niemeyer said :).

review: Approve
lp:~hazmat/pyjuju/security-groups updated
289. By Kapil Thangavelu

Merged security-connection into security-groups.

290. By Kapil Thangavelu

Merged security-connection into security-groups.

291. By Kapil Thangavelu

Merged security-connection into security-groups.

292. By Kapil Thangavelu

resolve conflict from security-connection merge.

293. By Kapil Thangavelu

Merged trunk-merge into security-groups.

294. By Kapil Thangavelu

address review comments, conflicts are silent (same goal state reached), duplicate state creation errors are runtime-exceptions.

Subscribers

People subscribed via source and target branches

to status/vote changes: