Code review comment for lp:~jameinel/juju-core/1.16-remove-service-1261628

Revision history for this message
John A Meinel (jameinel) wrote :

Reviewers: mp+199221_code.launchpad.net,

Message:
Please take a look.

Description:
cmd/juju: alias remove-service and remove-machine

Part of bug #1261628, this lets us document 'remove-*' as the
preferred syntax for operations, since they aren't quite as "scary" as
'destroy-*'.

This is targetting 1.16 so that we can start documenting their use (in
a stable release). In trunk we could then actually rename the command
and have the old name as the alias. (So the command is
'remove-machine' with an alias of 'destroy-machine' for compatibility
purposes.)

https://code.launchpad.net/~jameinel/juju-core/1.16-remove-service-1261628/+merge/199221

(do not edit description out of merge proposal)

Please review this at https://codereview.appspot.com/40650048/

Affected files (+6, -1 lines):
   A [revision details]
   M cmd/juju/destroymachine.go
   M cmd/juju/destroyservice.go
   M cmd/juju/main_test.go

Index: [revision details]
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: tarmac-20131212080047-vjisba431m6q5we8
+New revision: <email address hidden>

Index: cmd/juju/destroymachine.go
=== modified file 'cmd/juju/destroymachine.go'
--- cmd/juju/destroymachine.go 2013-11-27 12:14:31 +0000
+++ cmd/juju/destroymachine.go 2013-12-17 06:10:04 +0000
@@ -37,7 +37,7 @@
    Args: "<machine> ...",
    Purpose: "destroy machines",
    Doc: destroyMachineDoc,
- Aliases: []string{"terminate-machine"},
+ Aliases: []string{"remove-machine", "terminate-machine"},
   }
  }

Index: cmd/juju/destroyservice.go
=== modified file 'cmd/juju/destroyservice.go'
--- cmd/juju/destroyservice.go 2013-08-13 19:07:35 +0000
+++ cmd/juju/destroyservice.go 2013-12-17 06:10:04 +0000
@@ -25,6 +25,7 @@
    Args: "<service>",
    Purpose: "destroy a service",
    Doc: "Destroying a service will destroy all its units and
relations.",
+ Aliases: []string{"remove-service"},
   }
  }

Index: cmd/juju/main_test.go
=== modified file 'cmd/juju/main_test.go'
--- cmd/juju/main_test.go 2013-10-10 15:08:27 +0000
+++ cmd/juju/main_test.go 2013-12-17 06:10:04 +0000
@@ -240,7 +240,9 @@
   "help-tool",
   "init",
   "publish",
+ "remove-machine", // alias for destroy-machine
   "remove-relation", // alias for destroy-relation
+ "remove-service", // alias for destroy-service
   "remove-unit", // alias for destroy-unit
   "resolved",
   "scp",

« Back to merge proposal