Description:
Remove panic for bad arg to add-machine
If add-machine is invoked with a machine id as the
argument, it no longer panics.
The recently refactored IsMachineOrNewContainer
method was moved from the names package to cmd
since it's only used there. Plus there were left
over tests in state which were duplicated in names
and some of the tests were missing so I fix that
as well.
Affected files:
A [revision details]
M cmd/juju/addmachine.go
M cmd/juju/addmachine_test.go
M cmd/juju/addunit.go
A cmd/names.go
A cmd/names_test.go
M names/machine.go
M names/machine_test.go
M names/service_test.go
M state/state_test.go
Reviewers: mp+178185_ code.launchpad. net,
Message:
Please take a look.
Description:
Remove panic for bad arg to add-machine
If add-machine is invoked with a machine id as the
argument, it no longer panics.
The recently refactored IsMachineOrNewC ontainer
method was moved from the names package to cmd
since it's only used there. Plus there were left
over tests in state which were duplicated in names
and some of the tests were missing so I fix that
as well.
https:/ /code.launchpad .net/~wallyworl d/juju- core/add- machine- panic/+ merge/178185
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/12309043/
Affected files: addmachine. go addmachine_ test.go test.go test.go
A [revision details]
M cmd/juju/
M cmd/juju/
M cmd/juju/addunit.go
A cmd/names.go
A cmd/names_test.go
M names/machine.go
M names/machine_
M names/service_
M state/state_test.go