Merge "Add a deprecation message to the bay* commands' help text"
This commit is contained in:
commit
8e70316c21
|
@ -124,7 +124,10 @@ def _show_baymodel(baymodel):
|
||||||
'or not.')
|
'or not.')
|
||||||
@utils.deprecated(DEPRECATION_MESSAGE)
|
@utils.deprecated(DEPRECATION_MESSAGE)
|
||||||
def do_baymodel_create(cs, args):
|
def do_baymodel_create(cs, args):
|
||||||
"""Create a baymodel."""
|
"""Create a baymodel.
|
||||||
|
|
||||||
|
(Deprecated in favor of cluster-template-create.)
|
||||||
|
"""
|
||||||
opts = {}
|
opts = {}
|
||||||
opts['name'] = args.name
|
opts['name'] = args.name
|
||||||
opts['flavor_id'] = args.flavor_id
|
opts['flavor_id'] = args.flavor_id
|
||||||
|
@ -161,7 +164,10 @@ def do_baymodel_create(cs, args):
|
||||||
help='ID or name of the (baymodel)s to delete.')
|
help='ID or name of the (baymodel)s to delete.')
|
||||||
@utils.deprecated(DEPRECATION_MESSAGE)
|
@utils.deprecated(DEPRECATION_MESSAGE)
|
||||||
def do_baymodel_delete(cs, args):
|
def do_baymodel_delete(cs, args):
|
||||||
"""Delete specified baymodel."""
|
"""Delete specified baymodel.
|
||||||
|
|
||||||
|
(Deprecated in favor of cluster-template-delete.)
|
||||||
|
"""
|
||||||
for baymodel in args.baymodels:
|
for baymodel in args.baymodels:
|
||||||
try:
|
try:
|
||||||
cs.baymodels.delete(baymodel)
|
cs.baymodels.delete(baymodel)
|
||||||
|
@ -177,7 +183,10 @@ def do_baymodel_delete(cs, args):
|
||||||
help='ID or name of the baymodel to show.')
|
help='ID or name of the baymodel to show.')
|
||||||
@utils.deprecated(DEPRECATION_MESSAGE)
|
@utils.deprecated(DEPRECATION_MESSAGE)
|
||||||
def do_baymodel_show(cs, args):
|
def do_baymodel_show(cs, args):
|
||||||
"""Show details about the given baymodel."""
|
"""Show details about the given baymodel.
|
||||||
|
|
||||||
|
(Deprecated in favor of cluster-template-show.)
|
||||||
|
"""
|
||||||
baymodel = cs.baymodels.get(args.baymodel)
|
baymodel = cs.baymodels.get(args.baymodel)
|
||||||
_show_baymodel(baymodel)
|
_show_baymodel(baymodel)
|
||||||
|
|
||||||
|
@ -203,7 +212,10 @@ def do_baymodel_show(cs, args):
|
||||||
)
|
)
|
||||||
@utils.deprecated(DEPRECATION_MESSAGE)
|
@utils.deprecated(DEPRECATION_MESSAGE)
|
||||||
def do_baymodel_list(cs, args):
|
def do_baymodel_list(cs, args):
|
||||||
"""Print a list of baymodels."""
|
"""Print a list of baymodels.
|
||||||
|
|
||||||
|
(Deprecated in favor of cluster-template-list.)
|
||||||
|
"""
|
||||||
nodes = cs.baymodels.list(limit=args.limit,
|
nodes = cs.baymodels.list(limit=args.limit,
|
||||||
sort_key=args.sort_key,
|
sort_key=args.sort_key,
|
||||||
sort_dir=args.sort_dir)
|
sort_dir=args.sort_dir)
|
||||||
|
@ -232,7 +244,10 @@ def do_baymodel_list(cs, args):
|
||||||
"(only PATH is necessary on remove)")
|
"(only PATH is necessary on remove)")
|
||||||
@utils.deprecated(DEPRECATION_MESSAGE)
|
@utils.deprecated(DEPRECATION_MESSAGE)
|
||||||
def do_baymodel_update(cs, args):
|
def do_baymodel_update(cs, args):
|
||||||
"""Updates one or more baymodel attributes."""
|
"""Updates one or more baymodel attributes.
|
||||||
|
|
||||||
|
(Deprecated in favor of cluster-template-update.)
|
||||||
|
"""
|
||||||
patch = magnum_utils.args_array_to_patch(args.op, args.attributes[0])
|
patch = magnum_utils.args_array_to_patch(args.op, args.attributes[0])
|
||||||
|
|
||||||
baymodel = cs.baymodels.update(args.baymodel, patch)
|
baymodel = cs.baymodels.update(args.baymodel, patch)
|
||||||
|
|
|
@ -62,7 +62,10 @@ def _show_bay(bay):
|
||||||
)
|
)
|
||||||
@utils.deprecated(DEPRECATION_MESSAGE)
|
@utils.deprecated(DEPRECATION_MESSAGE)
|
||||||
def do_bay_list(cs, args):
|
def do_bay_list(cs, args):
|
||||||
"""Print a list of available bays."""
|
"""Print a list of available bays.
|
||||||
|
|
||||||
|
(Deprecated in favor of cluster-list.)
|
||||||
|
"""
|
||||||
bays = cs.bays.list(marker=args.marker, limit=args.limit,
|
bays = cs.bays.list(marker=args.marker, limit=args.limit,
|
||||||
sort_key=args.sort_key,
|
sort_key=args.sort_key,
|
||||||
sort_dir=args.sort_dir)
|
sort_dir=args.sort_dir)
|
||||||
|
@ -103,7 +106,10 @@ def do_bay_list(cs, args):
|
||||||
help='The timeout for bay creation in minutes. The default '
|
help='The timeout for bay creation in minutes. The default '
|
||||||
'is 60 minutes.')
|
'is 60 minutes.')
|
||||||
def do_bay_create(cs, args):
|
def do_bay_create(cs, args):
|
||||||
"""Create a bay."""
|
"""Create a bay.
|
||||||
|
|
||||||
|
(Deprecated in favor of cluster-create.)
|
||||||
|
"""
|
||||||
baymodel = cs.baymodels.get(args.baymodel)
|
baymodel = cs.baymodels.get(args.baymodel)
|
||||||
|
|
||||||
opts = {}
|
opts = {}
|
||||||
|
@ -132,7 +138,10 @@ def do_bay_create(cs, args):
|
||||||
help='ID or name of the (bay)s to delete.')
|
help='ID or name of the (bay)s to delete.')
|
||||||
@utils.deprecated(DEPRECATION_MESSAGE)
|
@utils.deprecated(DEPRECATION_MESSAGE)
|
||||||
def do_bay_delete(cs, args):
|
def do_bay_delete(cs, args):
|
||||||
"""Delete specified bay."""
|
"""Delete specified bay.
|
||||||
|
|
||||||
|
(Deprecated in favor of cluster-delete.)
|
||||||
|
"""
|
||||||
for id in args.bay:
|
for id in args.bay:
|
||||||
try:
|
try:
|
||||||
cs.bays.delete(id)
|
cs.bays.delete(id)
|
||||||
|
@ -151,7 +160,10 @@ def do_bay_delete(cs, args):
|
||||||
help='Display extra associated Baymodel info.')
|
help='Display extra associated Baymodel info.')
|
||||||
@utils.deprecated(DEPRECATION_MESSAGE)
|
@utils.deprecated(DEPRECATION_MESSAGE)
|
||||||
def do_bay_show(cs, args):
|
def do_bay_show(cs, args):
|
||||||
"""Show details about the given bay."""
|
"""Show details about the given bay.
|
||||||
|
|
||||||
|
(Deprecated in favor of cluster-show.)
|
||||||
|
"""
|
||||||
bay = cs.bays.get(args.bay)
|
bay = cs.bays.get(args.bay)
|
||||||
if args.long:
|
if args.long:
|
||||||
baymodel = cs.baymodels.get(bay.baymodel_id)
|
baymodel = cs.baymodels.get(bay.baymodel_id)
|
||||||
|
@ -179,7 +191,10 @@ def do_bay_show(cs, args):
|
||||||
"(only PATH is necessary on remove)")
|
"(only PATH is necessary on remove)")
|
||||||
@utils.deprecated(DEPRECATION_MESSAGE)
|
@utils.deprecated(DEPRECATION_MESSAGE)
|
||||||
def do_bay_update(cs, args):
|
def do_bay_update(cs, args):
|
||||||
"""Update information about the given bay."""
|
"""Update information about the given bay.
|
||||||
|
|
||||||
|
(Deprecated in favor of cluster-update.)
|
||||||
|
"""
|
||||||
patch = magnum_utils.args_array_to_patch(args.op, args.attributes[0])
|
patch = magnum_utils.args_array_to_patch(args.op, args.attributes[0])
|
||||||
bay = cs.bays.update(args.bay, patch)
|
bay = cs.bays.update(args.bay, patch)
|
||||||
if args.magnum_api_version and args.magnum_api_version == '1.1':
|
if args.magnum_api_version and args.magnum_api_version == '1.1':
|
||||||
|
@ -206,6 +221,8 @@ def do_bay_config(cs, args):
|
||||||
corresponding COE configured to access the bay.
|
corresponding COE configured to access the bay.
|
||||||
|
|
||||||
Example: eval $(magnum bay-config <bay-name>).
|
Example: eval $(magnum bay-config <bay-name>).
|
||||||
|
|
||||||
|
(Deprecated in favor of cluster-config.)
|
||||||
"""
|
"""
|
||||||
args.dir = os.path.abspath(args.dir)
|
args.dir = os.path.abspath(args.dir)
|
||||||
bay = cs.bays.get(args.bay)
|
bay = cs.bays.get(args.bay)
|
||||||
|
|
Loading…
Reference in New Issue