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:
@@ -81,6 +81,7 @@ inaccessible inside the container.
|
|||||||
|
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
from nova.i18n import _
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
@@ -202,7 +203,13 @@ def id_map_type(val):
|
|||||||
|
|
||||||
|
|
||||||
def main():
|
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('path')
|
||||||
parser.add_argument('-u', '--uid', type=id_map_type, default=[])
|
parser.add_argument('-u', '--uid', type=id_map_type, default=[])
|
||||||
parser.add_argument('-g', '--gid', type=id_map_type, default=[])
|
parser.add_argument('-g', '--gid', type=id_map_type, default=[])
|
||||||
|
|||||||
Reference in New Issue
Block a user