~bac/lpsetup/lxc-integration

« back to all changes in this revision

Viewing changes to lpsetup/subcommands/finish_inithost.py

  • Committer: Brad Crittenden
  • Date: 2012-07-19 17:48:40 UTC
  • Revision ID: bac@canonical.com-20120719174840-ug3lkp29018pgwpt
RemovedĀ --code-dirĀ option.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
from lpsetup import argparser
31
31
from lpsetup.handlers import (
 
32
    handle_code_dir,
32
33
    handle_directories,
33
34
    handle_user,
34
35
    )
35
 
from lpsetup.settings import LP_CODE_DIR
 
36
from lpsetup.settings import (
 
37
    LP_CHECKOUT_NAME,
 
38
    LP_REPOSITORY_DIR,
 
39
    )
 
40
 
36
41
from lpsetup.utils import call
37
42
 
38
43
 
75
80
    handlers = (
76
81
        handle_user,
77
82
        handle_directories,
 
83
        handle_code_dir,
78
84
        )
79
85
 
80
 
    @staticmethod
81
 
    def add_common_arguments(parser):
82
 
        parser.add_argument(
83
 
            '-c', '--code-dir', default=LP_CODE_DIR,
84
 
            help='The directory of the Launchpad code checkout.  '
85
 
                 'The directory must reside under the home directory of the '
86
 
                 'given user (see -u argument). '
87
 
                 '[DEFAULT={0}]'.format(LP_CODE_DIR))
88
 
 
89
86
    def add_arguments(self, parser):
90
87
        super(SubCommand, self).add_arguments(parser)
91
 
        self.add_common_arguments(parser)
92
88
        parser.add_argument(
93
89
            '-u', '--user',
94
90
            help='The name of the system user.  '
95
91
                 'The current user is used if this script is not run as '
96
92
                 'root and this argument is omitted.')
 
93
        parser.add_argument(
 
94
            '--checkout-name', default=LP_CHECKOUT_NAME,
 
95
            help='Create a checkout with the given name. '
 
96
                 'Ignored if --no-checkout is specified. '
 
97
                 'Defaults to {0}.'.format(LP_CHECKOUT_NAME))
 
98
        parser.add_argument(
 
99
            '-r', '--repository', default=LP_REPOSITORY_DIR,
 
100
            help='The directory of the Launchpad repository to be created. '
 
101
                 'The directory must reside under the home directory of the '
 
102
                 'given user (see -u argument). '
 
103
                 '[DEFAULT={0}]'.format(LP_REPOSITORY_DIR))