Fix the usage output of the nova-idmapshift command

The usage currently outputs:
usage: User Namespace FS Owner Shift [-h] [-u UID] [-g GID] [-n NOBODY] [-i]
                                     [-c] [-d] [-v]
                                     path
when it should be outputting:
usage: nova-idmapshift .....

Change-Id: Icb4c5cb30561b2dacc78d5fb6dc907089008fceb
Closes-bug: 1475911
This commit is contained in:
Chuck Carmack 2015-08-31 18:10:27 +00:00
parent 19810750b4
commit 74e140faf2
1 changed files with 8 additions and 1 deletions

View File

@ -81,6 +81,7 @@ inaccessible inside the container.
import argparse
from nova.i18n import _
import os
import sys
@ -202,7 +203,13 @@ def id_map_type(val):
def main():
parser = argparse.ArgumentParser('User Namespace FS Owner Shift')
parser = argparse.ArgumentParser(
description=_('nova-idmapshift is a tool that properly '
'sets the ownership of a filesystem for '
'use with linux user namespaces. '
'This tool can only be used with linux '
'lxc containers. See the man page for '
'details.'))
parser.add_argument('path')
parser.add_argument('-u', '--uid', type=id_map_type, default=[])
parser.add_argument('-g', '--gid', type=id_map_type, default=[])