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

Issue 5754052: Add cmd/server package to enable hosted Command execution via RPC

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 2 months ago by fwereade
Modified:
12 years, 1 month ago
Reviewers:
mp+96140
Visibility:
Public.

Description

prereq: lp:~fwereade/juju/go-tweak-supercommand This is all new code, and shouldn't impact anything else, so it should be adequately explained by the inline comments (and if it isn't, those should be fixed). Nonetheless, the general idea is as follows: 1) Hook commands need to run the "meat" of their code on the server. 2) The python implementation includes an awful lot of plumbing to support a mechanism whereby each individual command marshals relevant params to a server and gets back results which are then formatted for stdout; in juju.hooks, the cli, commands, and protocol modules all contain a lot of code purely to support this approach. 3) By implementing a single server method that takes a command line, a working directory, and a context ID; and returns an exit code and the command's output: at a stroke, we eliminate the vast majority of the marshalling busywork, and become able to implement each hook tool as a single Command, which can have direct access to the hook context in which it will execute. https://code.launchpad.net/~fwereade/juju/go-cmd-server-package/+merge/96140 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : Add cmd/server package to enable hosted Command execution via RPC #

Patch Set 3 : Add cmd/server package to enable hosted Command execution via RPC #

Patch Set 4 : Add cmd/server package to enable hosted Command execution via RPC #

Unified diffs Side-by-side diffs Delta from patch set Stats (+616 lines, -88 lines) Patch
A [revision details] View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/command.go View 1 2 3 4 chunks +44 lines, -30 lines 0 comments Download
A cmd/context.go View 1 2 3 1 chunk +77 lines, -0 lines 0 comments Download
A cmd/context_test.go View 1 2 3 1 chunk +145 lines, -0 lines 0 comments Download
M cmd/juju/bootstrap.go View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M cmd/juju/main_test.go View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M cmd/jujud/initzk.go View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M cmd/jujud/machine.go View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M cmd/jujud/main_test.go View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M cmd/jujud/provisioning.go View 1 2 3 2 chunks +5 lines, -2 lines 0 comments Download
M cmd/jujud/unit.go View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
A cmd/server/server.go View 1 2 3 1 chunk +144 lines, -0 lines 0 comments Download
A cmd/server/server_test.go View 1 2 3 1 chunk +152 lines, -0 lines 0 comments Download
M cmd/supercommand.go View 1 2 3 7 chunks +25 lines, -46 lines 0 comments Download
M cmd/supercommand_test.go View 1 2 3 5 chunks +14 lines, -4 lines 0 comments Download

Messages

Total messages: 3
fwereade
Please take a look.
12 years, 2 months ago (2012-03-06 14:57:30 UTC) #1
fwereade
Please take a look.
12 years, 2 months ago (2012-03-06 16:20:17 UTC) #2
fwereade
12 years, 2 months ago (2012-03-06 16:25:59 UTC) #3
Please take a look.
Sign in to reply to this message.

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