|
names: New package
This introduces a new juju-core/names pacakge,
which contains all name and tag related functions
shared between state and API: IsUnitName, UnitTag,
UnitNameFromTag, MachineTag, MachineIdFromTag,
IsServiceName, etc.
Because of the pacakge name, some functions were
renamed: names.IsUnit, IsService, UnitFromTag,
all refer to names.
In addition, a change was made to these two
functions: UnitNameFromTag and MachineIdFromTag.
Both of them now return (string, error), rather
than just string. The error return is used in
case the passed tag string has an invalid format.
Because of this change, some places needed slight
refactoring, otherwise no other changes where made.
https://code.launchpad.net/~dimitern/juju-core/081-common-names/+merge/177416
(do not edit description out of merge proposal)
Total comments: 39
Total comments: 24
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+689 lines, -281 lines) |
Patch |
 |
A |
[revision details]
|
View
|
1
2
3
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
cmd/juju/addmachine.go
|
View
|
|
2 chunks |
+5 lines, -2 lines |
0 comments
|
Download
|
 |
M |
cmd/juju/addunit.go
|
View
|
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
cmd/juju/constraints.go
|
View
|
1
|
3 chunks |
+5 lines, -3 lines |
0 comments
|
Download
|
 |
M |
cmd/juju/deploy.go
|
View
|
1
|
2 chunks |
+5 lines, -3 lines |
0 comments
|
Download
|
 |
M |
cmd/juju/destroymachine.go
|
View
|
1
2
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
cmd/juju/destroyservice.go
|
View
|
1
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
cmd/juju/destroyunit.go
|
View
|
1
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
cmd/juju/resolved.go
|
View
|
1
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
cmd/juju/ssh.go
|
View
|
1
2
|
2 chunks |
+5 lines, -3 lines |
0 comments
|
Download
|
 |
M |
cmd/juju/upgradecharm.go
|
View
|
1
|
2 chunks |
+5 lines, -3 lines |
0 comments
|
Download
|
 |
M |
cmd/jujud/machine.go
|
View
|
1
2
|
3 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
cmd/jujud/machine_test.go
|
View
|
1
2
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
cmd/jujud/unit.go
|
View
|
1
2
|
3 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
cmd/jujud/upgradevalidation.go
|
View
|
1
2
|
2 chunks |
+6 lines, -1 line |
0 comments
|
Download
|
 |
M |
container/lxc/lxc.go
|
View
|
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
environs/azure/customdata_test.go
|
View
|
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
environs/cloudinit/cloudinit.go
|
View
|
1
2
|
5 chunks |
+7 lines, -6 lines |
0 comments
|
Download
|
 |
M |
environs/dummy/environs.go
|
View
|
1
2
|
2 chunks |
+10 lines, -8 lines |
0 comments
|
Download
|
 |
M |
environs/local/environ.go
|
View
|
1
2
|
3 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
environs/openstack/provider.go
|
View
|
1
2
|
3 chunks |
+8 lines, -5 lines |
0 comments
|
Download
|
 |
M |
juju/conn.go
|
View
|
1
2
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
juju/testing/conn.go
|
View
|
|
4 chunks |
+7 lines, -4 lines |
0 comments
|
Download
|
 |
A |
names/environ.go
|
View
|
1
2
|
1 chunk |
+9 lines, -0 lines |
0 comments
|
Download
|
 |
A |
names/machine.go
|
View
|
1
2
3
|
1 chunk |
+52 lines, -0 lines |
0 comments
|
Download
|
 |
A |
names/machine_test.go
|
View
|
1
2
|
1 chunk |
+115 lines, -0 lines |
0 comments
|
Download
|
 |
A |
names/service.go
|
View
|
1
2
|
1 chunk |
+25 lines, -0 lines |
0 comments
|
Download
|
 |
A |
names/service_test.go
|
View
|
1
|
1 chunk |
+37 lines, -0 lines |
0 comments
|
Download
|
 |
A |
names/tagkind.go
|
View
|
1
2
|
1 chunk |
+47 lines, -0 lines |
0 comments
|
Download
|
 |
A |
names/tagkind_test.go
|
View
|
1
2
|
1 chunk |
+42 lines, -0 lines |
0 comments
|
Download
|
 |
A |
names/unit.go
|
View
|
1
2
|
1 chunk |
+37 lines, -0 lines |
0 comments
|
Download
|
 |
A |
names/unit_test.go
|
View
|
1
|
1 chunk |
+55 lines, -0 lines |
0 comments
|
Download
|
 |
M |
state/api/deployer/unit.go
|
View
|
1
|
2 chunks |
+4 lines, -16 lines |
0 comments
|
Download
|
 |
M |
state/apiserver/deployer/deployer.go
|
View
|
1
2
|
5 chunks |
+33 lines, -17 lines |
0 comments
|
Download
|
 |
M |
state/apiserver/deployer/deployer_test.go
|
View
|
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
state/apiserver/machine/agent.go
|
View
|
1
2
|
2 chunks |
+6 lines, -1 line |
0 comments
|
Download
|
 |
M |
state/apiserver/machine/machiner.go
|
View
|
1
2
|
5 chunks |
+38 lines, -21 lines |
0 comments
|
Download
|
 |
M |
state/apiserver/upgrader/upgrader.go
|
View
|
1
2
|
2 chunks |
+6 lines, -1 line |
0 comments
|
Download
|
 |
M |
state/environ.go
|
View
|
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
state/machine.go
|
View
|
|
2 chunks |
+2 lines, -26 lines |
0 comments
|
Download
|
 |
M |
state/machine_test.go
|
View
|
|
1 chunk |
+0 lines, -17 lines |
0 comments
|
Download
|
 |
M |
state/relationunit.go
|
View
|
1
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
state/service.go
|
View
|
1
|
3 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
state/state.go
|
View
|
1
2
|
10 chunks |
+35 lines, -57 lines |
0 comments
|
Download
|
 |
M |
state/state_test.go
|
View
|
1
2
|
5 chunks |
+10 lines, -9 lines |
0 comments
|
Download
|
 |
M |
state/unit.go
|
View
|
|
4 chunks |
+4 lines, -26 lines |
0 comments
|
Download
|
 |
|
state/unit_test.go
|
View
|
|
2 chunks |
+0 lines, -10 lines |
0 comments
|
Download
|
 |
|
state/watcher.go
|
View
|
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
 |
|
worker/deployer/deployer.go
|
View
|
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
worker/deployer/deployer_test.go
|
View
|
|
3 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
worker/deployer/simple.go
|
View
|
1
|
5 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
worker/deployer/simple_test.go
|
View
|
|
3 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
worker/provisioner/provisioner_task.go
|
View
|
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
worker/provisioner/provisioner_test.go
|
View
|
|
2 chunks |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
worker/upgrader/upgrader.go
|
View
|
1
2
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
Total messages: 9
|