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.' ))
@@ -871,18 +862,10 @@ class ApiDbCommands(object):
871
862
def __init__ (self ):
872
863
pass
873
864
874
- @args ('--version' , metavar = '<version>' , help = argparse .SUPPRESS )
875
- @args ('version2' , metavar = 'VERSION' , nargs = '?' , help = 'Database version' )
876
- def sync (self , version = None , version2 = None ):
865
+ @args ('version' , metavar = 'VERSION' , nargs = '?' , help = 'Database version' )
866
+ def sync (self , version = None ):
877
867
"""Sync the database up to the most recent version."""
878
- if version and not version2 :
879
- print (_ ("DEPRECATED: The '--version' parameter was deprecated in "
880
- "the Pike cycle and will not be supported in future "
881
- "versions of nova. Use the 'VERSION' positional argument "
882
- "instead" ))
883
- version2 = version
884
-
885
- return migration .db_sync (version2 , database = 'api' )
868
+ return migration .db_sync (version , database = 'api' )
886
869
887
870
def version (self ):
888
871
"""Print the current database version."""
0 commit comments