diff --git a/gyanclient/common/httpclient.py b/gyanclient/common/httpclient.py index 46c4f39..a759fa5 100644 --- a/gyanclient/common/httpclient.py +++ b/gyanclient/common/httpclient.py @@ -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, diff --git a/gyanclient/common/utils.py b/gyanclient/common/utils.py index c8f9eda..4cab183 100644 --- a/gyanclient/common/utils.py +++ b/gyanclient/common/utils.py @@ -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. diff --git a/gyanclient/shell.py b/gyanclient/shell.py index ef5e945..458dfeb 100644 --- a/gyanclient/shell.py +++ b/gyanclient/shell.py @@ -307,7 +307,7 @@ class OpenStackGyanShell(object): parser.add_argument('--service-type', metavar='', - help='Defaults to container for all ' + help='Defaults to ml for all ' 'actions.') parser.add_argument('--service_type', help=argparse.SUPPRESS) diff --git a/gyanclient/v1/client.py b/gyanclient/v1/client.py index 9ceb463..0dc415a 100644 --- a/gyanclient/v1/client.py +++ b/gyanclient/v1/client.py @@ -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 diff --git a/gyanclient/v1/models_shell.py b/gyanclient/v1/models_shell.py index 2b3ad9f..c24f97b 100644 --- a/gyanclient/v1/models_shell.py +++ b/gyanclient/v1/models_shell.py @@ -50,7 +50,7 @@ def do_model_delete(cs, args): metavar='', 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='', 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) diff --git a/gyanclient/v1/nodes_shell.py b/gyanclient/v1/nodes_shell.py index a676874..0c52c4a 100644 --- a/gyanclient/v1/nodes_shell.py +++ b/gyanclient/v1/nodes_shell.py @@ -32,7 +32,7 @@ def _show_node(node): metavar='', 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) \ No newline at end of file + gyan_utils.list_nodes(nodes)