Revert "Add scheduler hint for zunclient"
This reverts commit 7f6efb562b
.
Change-Id: Iea91bcd2a0b58314507ebde181f96967a5397717
Closes-Bug: #1694332
This commit is contained in:
@@ -112,13 +112,6 @@ class CreateContainer(command.ShowOne):
|
||||
metavar='<command>',
|
||||
nargs=argparse.REMAINDER,
|
||||
help='Send command to the container')
|
||||
parser.add_argument(
|
||||
'--hint',
|
||||
metavar='key=value',
|
||||
action='append',
|
||||
default=[],
|
||||
help='Container hint key/value pairs for scheduler to select'
|
||||
' host. May be used multiple times.')
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
@@ -141,9 +134,6 @@ class CreateContainer(command.ShowOne):
|
||||
if parsed_args.interactive:
|
||||
opts['interactive'] = True
|
||||
|
||||
hints = zun_utils.format_args(parsed_args.hint)
|
||||
opts['hint'] = hints
|
||||
|
||||
opts = zun_utils.remove_null_parms(**opts)
|
||||
container = client.containers.create(**opts)
|
||||
columns = _container_columns(container)
|
||||
@@ -586,13 +576,6 @@ class RunContainer(command.ShowOne):
|
||||
metavar='<command>',
|
||||
nargs=argparse.REMAINDER,
|
||||
help='Send command to the container')
|
||||
parser.add_argument(
|
||||
'--hint',
|
||||
metavar='key=value',
|
||||
action='append',
|
||||
default=[],
|
||||
help='Container hint key/value pairs for scheduler to select'
|
||||
' host. May be used multiple times.')
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
@@ -615,9 +598,6 @@ class RunContainer(command.ShowOne):
|
||||
if parsed_args.interactive:
|
||||
opts['interactive'] = True
|
||||
|
||||
hints = zun_utils.format_args(parsed_args.hint)
|
||||
opts['hint'] = hints
|
||||
|
||||
opts = zun_utils.remove_null_parms(**opts)
|
||||
container = client.containers.run(**opts)
|
||||
columns = _container_columns(container)
|
||||
|
@@ -21,8 +21,7 @@ from zunclient import exceptions
|
||||
|
||||
CREATION_ATTRIBUTES = ['name', 'image', 'command', 'cpu', 'memory',
|
||||
'environment', 'workdir', 'labels', 'image_pull_policy',
|
||||
'restart_policy', 'interactive', 'image_driver',
|
||||
'hint']
|
||||
'restart_policy', 'interactive', 'image_driver']
|
||||
|
||||
|
||||
class Container(base.Resource):
|
||||
|
@@ -85,12 +85,6 @@ def _show_container(container):
|
||||
metavar='<command>',
|
||||
nargs=argparse.REMAINDER,
|
||||
help='Send command to the container')
|
||||
@utils.arg('--hint',
|
||||
action='append',
|
||||
default=[],
|
||||
metavar='<key=value>',
|
||||
help='Container hint key/value pairs for scheduler to select'
|
||||
' host. May be used multiple times.')
|
||||
def do_create(cs, args):
|
||||
"""Create a container."""
|
||||
opts = {}
|
||||
@@ -103,10 +97,6 @@ def do_create(cs, args):
|
||||
opts['labels'] = zun_utils.format_args(args.label)
|
||||
opts['image_pull_policy'] = args.image_pull_policy
|
||||
opts['image_driver'] = args.image_driver
|
||||
|
||||
hints = zun_utils.format_args(args.hint)
|
||||
opts['hint'] = hints
|
||||
|
||||
if args.command:
|
||||
opts['command'] = ' '.join(args.command)
|
||||
if args.restart:
|
||||
@@ -425,12 +415,6 @@ def do_kill(cs, args):
|
||||
metavar='<command>',
|
||||
nargs=argparse.REMAINDER,
|
||||
help='Send command to the container')
|
||||
@utils.arg('--hint',
|
||||
action='append',
|
||||
default=[],
|
||||
metavar='<key=value>',
|
||||
help='Container hint key/value pairs for scheduler to select'
|
||||
' host. May be used multiple times.')
|
||||
def do_run(cs, args):
|
||||
"""Run a command in a new container."""
|
||||
opts = {}
|
||||
@@ -443,10 +427,6 @@ def do_run(cs, args):
|
||||
opts['labels'] = zun_utils.format_args(args.label)
|
||||
opts['image_pull_policy'] = args.image_pull_policy
|
||||
opts['image_driver'] = args.image_driver
|
||||
|
||||
hints = zun_utils.format_args(args.hint)
|
||||
opts['hint'] = hints
|
||||
|
||||
if args.command:
|
||||
opts['command'] = ' '.join(args.command)
|
||||
if args.restart:
|
||||
|
Reference in New Issue
Block a user