~daker/pyjuju/small-fix

« back to all changes in this revision

Viewing changes to ensemble/control/shutdown.py

  • Committer: Adnane Belmadiaf
  • Date: 2011-07-21 14:12:56 UTC
  • Revision ID: daker@ubuntu.com-20110721141256-x8ow45sjwdbnl1ee
* Added --yes argument to shutdown command
* Changed dest variable name
* Other fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
        "--environment", "-e",
11
11
        help="Ensemble environment to operate in.")
12
12
    sub_parser.add_argument(
13
 
        "-y", dest='choice',  action='store_true', help="Destroy all machines and services in the environment automatically.")
 
13
        "--yes", "-y", dest='confirmed', action='store_true',
 
14
        help="Destroy all machines and services in the environment\n"
 
15
        "automatically.")
14
16
    return sub_parser
15
17
 
16
18
@inlineCallbacks
20
22
    """
21
23
    environment = get_environment(options)
22
24
    provider = environment.get_machine_provider()
23
 
    choice = options.choice
24
 
    if choice is False :
 
25
    confirmed = options.confirmed
 
26
    if confirmed is False :
25
27
        value = raw_input(
26
28
            "Warning, this will destroy all machines and services in the\n"
27
29
            "environment. Continue [y/N]: ")