Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR machinelearningservices] Add readme of cli codegen for ml #6

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/machinelearningservices/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.. :changelog:

Release History
===============

0.1.0
++++++
* Initial release.
5 changes: 5 additions & 0 deletions src/machinelearningservices/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Microsoft Azure CLI 'machinelearningservices' Extension
==========================================

This package is for the 'machinelearningservices' extension.
i.e. 'az machinelearningservices'
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------

from azure.cli.core import AzCommandsLoader
from .generated._help import helps


class AzureMachineLearningWorkspacesCommandsLoader(AzCommandsLoader):

def __init__(self, cli_ctx=None):
from azure.cli.core.commands import CliCommandType
from .generated._client_factory import cf_machinelearningservices
machinelearningservices_custom = CliCommandType(
operations_tmpl='azext_machinelearningservices.custom#{}',
client_factory=cf_machinelearningservices)
super(AzureMachineLearningWorkspacesCommandsLoader, self).__init__(cli_ctx=cli_ctx,
custom_command_type=machinelearningservices_custom)

def load_command_table(self, args):
from .generated.commands import load_command_table
load_command_table(self, args)
return self.command_table

def load_arguments(self, command):
from .generated._params import load_arguments
load_arguments(self, command)


COMMAND_LOADER_CLS = AzureMachineLearningWorkspacesCommandsLoader
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# pylint: disable=wildcard-import
# pylint: disable=unused-wildcard-import

from .generated.action import * # noqa: F403
try:
from .manual.action import * # noqa: F403
except ImportError:
pass
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"azext.isPreview": true,
"azext.minCliCoreVersion": "2.0.67"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# pylint: disable=wildcard-import
# pylint: disable=unused-wildcard-import

from .generated.commands import * # noqa: F403
try:
from .manual.commands import * # noqa: F403
except ImportError:
pass
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# pylint: disable=wildcard-import
# pylint: disable=unused-wildcard-import

from .generated.custom import * # noqa: F403
try:
from .manual.custom import * # noqa: F403
except ImportError:
pass
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------


def cf_machinelearningservices(cli_ctx, *_):
from azure.cli.core.commands.client_factory import get_mgmt_service_client
from ..vendored_sdks.machinelearningservices import AzureMachineLearningWorkspaces
return get_mgmt_service_client(cli_ctx, AzureMachineLearningWorkspaces)


def cf_workspace(cli_ctx, *_):
return cf_machinelearningservices(cli_ctx).workspace


def cf_workspace_feature(cli_ctx, *_):
return cf_machinelearningservices(cli_ctx).workspace_feature


def cf_usage(cli_ctx, *_):
return cf_machinelearningservices(cli_ctx).usage


def cf_virtual_machine_size(cli_ctx, *_):
return cf_machinelearningservices(cli_ctx).virtual_machine_size


def cf_quota(cli_ctx, *_):
return cf_machinelearningservices(cli_ctx).quota


def cf_machine_learning_compute(cli_ctx, *_):
return cf_machinelearningservices(cli_ctx).machine_learning_compute


def cf_private_endpoint_connection(cli_ctx, *_):
return cf_machinelearningservices(cli_ctx).private_endpoint_connection


def cf_private_link_resource(cli_ctx, *_):
return cf_machinelearningservices(cli_ctx).private_link_resource
Loading