Correct the comments
Change-Id: I24353beb8e9291184e1e866f3f2ca156549a399b
This commit is contained in:
parent
28d62a38d4
commit
20a6274d58
@ -407,7 +407,7 @@ def _construct_http_client(*args, **kwargs):
|
||||
auth = kwargs.pop('auth', None)
|
||||
|
||||
if session:
|
||||
service_type = kwargs.pop('service_type', 'container')
|
||||
service_type = kwargs.pop('service_type', 'ml')
|
||||
interface = kwargs.pop('endpoint_type', None)
|
||||
region_name = kwargs.pop('region_name', None)
|
||||
return SessionClient(session=session,
|
||||
|
@ -25,22 +25,13 @@ from gyanclient.common import cliutils as utils
|
||||
from gyanclient import exceptions as exc
|
||||
from gyanclient.i18n import _
|
||||
|
||||
VALID_UNITS = (
|
||||
K,
|
||||
M,
|
||||
G,
|
||||
) = (
|
||||
1024,
|
||||
1024 * 1024,
|
||||
1024 * 1024 * 1024,
|
||||
)
|
||||
|
||||
|
||||
def common_filters(marker=None, limit=None, sort_key=None,
|
||||
sort_dir=None, all_projects=False):
|
||||
"""Generate common filters for any list request.
|
||||
|
||||
:param all_projects: list containers in all projects or not
|
||||
:param all_projects: list models in all projects or not
|
||||
:param marker: entity ID from which to start returning entities.
|
||||
:param limit: maximum number of entities to return.
|
||||
:param sort_key: field to use for sorting.
|
||||
|
@ -307,7 +307,7 @@ class OpenStackGyanShell(object):
|
||||
|
||||
parser.add_argument('--service-type',
|
||||
metavar='<service-type>',
|
||||
help='Defaults to container for all '
|
||||
help='Defaults to ml for all '
|
||||
'actions.')
|
||||
parser.add_argument('--service_type',
|
||||
help=argparse.SUPPRESS)
|
||||
|
@ -27,7 +27,7 @@ class Client(object):
|
||||
interface='public', insecure=False, password=None,
|
||||
project_domain_id=None, project_domain_name=None,
|
||||
project_id=None, project_name=None, region_name=None,
|
||||
service_name=None, service_type='container', session=None,
|
||||
service_name=None, service_type='ml', session=None,
|
||||
user_domain_id=None, user_domain_name=None,
|
||||
username=None, cacert=None, **kwargs):
|
||||
"""Initialization of Client object.
|
||||
@ -116,8 +116,8 @@ class Client(object):
|
||||
session=session,
|
||||
api_version=api_version,
|
||||
**client_kwargs)
|
||||
self.containers = nodes.NodeManager(self.http_client)
|
||||
self.images = models.ModelManager(self.http_client)
|
||||
self.nodes = nodes.NodeManager(self.http_client)
|
||||
self.models = models.ModelManager(self.http_client)
|
||||
self.versions = versions.VersionManager(self.http_client)
|
||||
|
||||
@property
|
||||
|
@ -50,7 +50,7 @@ def do_model_delete(cs, args):
|
||||
metavar='<model-id>',
|
||||
help='ID or name of the model to show.')
|
||||
def do_model_show(cs, args):
|
||||
"""Show details of a container."""
|
||||
"""Show details of a models."""
|
||||
opts = {}
|
||||
opts['model_id'] = args.model_id
|
||||
opts = gyan_utils.remove_null_parms(**opts)
|
||||
@ -103,7 +103,7 @@ def do_model_list(cs, args):
|
||||
metavar='<ml_file>',
|
||||
help='The ML model file to be trained')
|
||||
def do_train_model(cs, args):
|
||||
"""Remove security group for specified container."""
|
||||
"""Remove security group for specified model."""
|
||||
opts = {}
|
||||
opts['name'] = args.name
|
||||
opts = gyan_utils.remove_null_parms(**opts)
|
||||
|
@ -32,7 +32,7 @@ def _show_node(node):
|
||||
metavar='<node-id>',
|
||||
help='ID or name of the node to show.')
|
||||
def do_node_show(cs, args):
|
||||
"""Show details of a container."""
|
||||
"""Show details of a Node."""
|
||||
opts = {}
|
||||
opts['node_id'] = args.node_id
|
||||
opts = gyan_utils.remove_null_parms(**opts)
|
||||
@ -43,4 +43,4 @@ def do_node_show(cs, args):
|
||||
def do_node_list(cs, args):
|
||||
"""List Nodes"""
|
||||
nodes = cs.nodes.list_nodes()
|
||||
gyan_utils.list_nodes(nodes)
|
||||
gyan_utils.list_nodes(nodes)
|
||||
|
Loading…
x
Reference in New Issue
Block a user