23
23
24
24
from __future__ import print_function
25
25
26
- import argparse
27
26
import functools
28
27
import re
29
28
import sys
@@ -441,20 +440,12 @@ def _print_dict(dct, dict_property="Property", dict_value='Value'):
441
440
else :
442
441
print (encodeutils .safe_encode (pt .get_string ()).decode ())
443
442
444
- @args ('--version' , metavar = '<version>' , help = argparse .SUPPRESS )
445
443
@args ('--local_cell' , action = 'store_true' ,
446
444
help = 'Only sync db in the local cell: do not attempt to fan-out '
447
445
'to all cells' )
448
- @args ('version2 ' , metavar = 'VERSION' , nargs = '?' , help = 'Database version' )
449
- def sync (self , version = None , local_cell = False , version2 = None ):
446
+ @args ('version ' , metavar = 'VERSION' , nargs = '?' , help = 'Database version' )
447
+ def sync (self , version = None , local_cell = False ):
450
448
"""Sync the database up to the most recent version."""
451
- if version and not version2 :
452
- print (_ ("DEPRECATED: The '--version' parameter was deprecated in "
453
- "the Pike cycle and will not be supported in future "
454
- "versions of nova. Use the 'VERSION' positional argument "
455
- "instead" ))
456
- version2 = version
457
-
458
449
if not local_cell :
459
450
ctxt = context .RequestContext ()
460
451
# NOTE(mdoff): Multiple cells not yet implemented. Currently
@@ -463,7 +454,7 @@ def sync(self, version=None, local_cell=False, version2=None):
463
454
cell_mapping = objects .CellMapping .get_by_uuid (ctxt ,
464
455
objects .CellMapping .CELL0_UUID )
465
456
with context .target_cell (ctxt , cell_mapping ) as cctxt :
466
- migration .db_sync (version2 , context = cctxt )
457
+ migration .db_sync (version , context = cctxt )
467
458
except exception .CellMappingNotFound :
468
459
print (_ ('WARNING: cell0 mapping not found - not'
469
460
' syncing cell0.' ))
@@ -874,18 +865,10 @@ class ApiDbCommands(object):
874
865
def __init__ (self ):
875
866
pass
876
867
877
- @args ('--version' , metavar = '<version>' , help = argparse .SUPPRESS )
878
- @args ('version2' , metavar = 'VERSION' , nargs = '?' , help = 'Database version' )
879
- def sync (self , version = None , version2 = None ):
868
+ @args ('version' , metavar = 'VERSION' , nargs = '?' , help = 'Database version' )
869
+ def sync (self , version = None ):
880
870
"""Sync the database up to the most recent version."""
881
- if version and not version2 :
882
- print (_ ("DEPRECATED: The '--version' parameter was deprecated in "
883
- "the Pike cycle and will not be supported in future "
884
- "versions of nova. Use the 'VERSION' positional argument "
885
- "instead" ))
886
- version2 = version
887
-
888
- return migration .db_sync (version2 , database = 'api' )
871
+ return migration .db_sync (version , database = 'api' )
889
872
890
873
def version (self ):
891
874
"""Print the current database version."""
0 commit comments