@@ -112,15 +112,14 @@ class CreateImage(show.ShowOne):
112112 """Create/upload an image"""
113113
114114 log = logging .getLogger (__name__ + ".CreateImage" )
115- deadopts = ('owner' , ' size' , 'location' , 'copy-from' , 'checksum' , 'store' )
115+ deadopts = ('size' , 'location' , 'copy-from' , 'checksum' , 'store' )
116116
117117 def get_parser (self , prog_name ):
118118 parser = super (CreateImage , self ).get_parser (prog_name )
119119 # TODO(mordred): add --volume and --force parameters and support
120120 # TODO(bunting): There are additional arguments that v1 supported
121121 # that v2 either doesn't support or supports weirdly.
122122 # --checksum - could be faked clientside perhaps?
123- # --owner - could be set as an update after the put?
124123 # --location - maybe location add?
125124 # --size - passing image size is actually broken in python-glanceclient
126125 # --copy-from - does not exist in v2
@@ -149,6 +148,11 @@ def get_parser(self, prog_name):
149148 help = "Image disk format "
150149 "(default: %s)" % DEFAULT_DISK_FORMAT ,
151150 )
151+ parser .add_argument (
152+ "--owner" ,
153+ metavar = "<owner>" ,
154+ help = "Image owner project name or ID" ,
155+ )
152156 parser .add_argument (
153157 "--min-disk" ,
154158 metavar = "<disk-gb>" ,
@@ -229,7 +233,7 @@ def take_action(self, parsed_args):
229233 copy_attrs = ('name' , 'id' ,
230234 'container_format' , 'disk_format' ,
231235 'min_disk' , 'min_ram' ,
232- 'tags' )
236+ 'tags' , 'owner' )
233237 for attr in copy_attrs :
234238 if attr in parsed_args :
235239 val = getattr (parsed_args , attr , None )
0 commit comments