Skip to content

Commit

Permalink
NFSAAS-2316 update to R4 RP standard (#30) (#9744)
Browse files Browse the repository at this point in the history
* NFSAAS-2316 update to R4 RP standard (#30)

* NFSAAS-2316 update to R4 RP standard (#31)

* NFSAAS-2316 update to R4 RP standard

* NFSAAS-2316 update to R4 RP standard

* NFSAAS 2316 R4 update path correction (#32)

* NFSAAS-2316 update to R4 RP standard

* NFSAAS-2316 update to R4 RP standard

* NFSAAS-2316 correction to path in R4 update

* NFSAAS-2316 R4 update and structure change (#33)

* NFSAAS-2316 update to R4 RP standard

* NFSAAS-2316 update to R4 RP standard

* NFSAAS-2316 correction to path in R4 update

* NFSAAS-2316 R4 update and structure change

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* NFSAAS 2316 R4 update remove wheel (#34)

* NFSAAS-2316 update to R4 RP standard

* NFSAAS-2316 update to R4 RP standard

* NFSAAS-2316 correction to path in R4 update

* NFSAAS-2316 R4 update and structure change

* NFSAAS-2316 update to R4 remove wheel

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* This file should have been removed in the PR #33

* NFSAAS-2316 R4 update packaging fixes (#35)

* NFSAAS 2316 R4 update review comments (#36)

* NFSAAS-2316 R4 update packaging fixes

* NFSAAS-2316 update R4 review comments
Use enum for service level

* NFSAAS 2316 R4 corrections to booleans (#37)

* NFSAAS-2316 R4 update packaging fixes

* NFSAAS-2316 update R4 review comments
Use enum for service level

* NFSAAS-2316 correction to boolean usage

* NFSAAS-2316 update history (#38)

* NFSAAS-2316 R4 update packaging fixes

* NFSAAS-2316 update R4 review comments
Use enum for service level

* NFSAAS-2316 correction to boolean usage

* NFSAAS-2316 update history

* NFSAAS-2316 R4 fixes (#39)

* NFSAAS-2316 R4 update packaging fixes

* NFSAAS-2316 update R4 review comments
Use enum for service level

* NFSAAS-2316 correction to boolean usage

* NFSAAS-2316 update history

* NFSAAS-2316 further fixes to R4 commands

* NFSAAS-2316 R4 Fixes (#40)

* NFSAAS-2316 R4 update packaging fixes

* NFSAAS-2316 update R4 review comments
Use enum for service level

* NFSAAS-2316 correction to boolean usage

* NFSAAS-2316 update history

* NFSAAS-2316 further fixes to R4 commands

* NFSAAS-2316 R4 fixes
  • Loading branch information
leonardbf authored and tjprescott committed Jul 9, 2019
1 parent be2c1d1 commit f6108b1
Show file tree
Hide file tree
Showing 38 changed files with 25,349 additions and 5 deletions.
5 changes: 3 additions & 2 deletions doc/sphinx/azhelpgen/doc_source_map.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"acr": "src/azure-cli/azure/cli/command_modules/acr/_help.py",
"acs": "src/azure-cli/azure/cli/command_modules/acs/_help.py",
"advisor": "src/azure-cli/azure/cli/command_modules/advisor/_help.py",
"ams": "src/azure-cli/azure/cli/command_modules/ams/_help.py",
"ams": "src/azure-cli/azure/cli/command_modules/ams/_help.py",
"appservice": "src/azure-cli/azure/cli/command_modules/appservice/_help.py",
"batch": "src/azure-cli/azure/cli/command_modules/batch/_help.py",
"batchai": "src/azure-cli/azure/cli/command_modules/batchai/_help.py",
Expand All @@ -35,7 +35,7 @@
"iot": "src/azure-cli/azure/cli/command_modules/iot/_help.py",
"iotcentral": "src/azure-cli/azure/cli/command_modules/iotcentral/_help.py",
"keyvault": "src/azure-cli/azure/cli/command_modules/keyvault/_help.py",
"kusto": "src/azure-cli/azure/cli/command_modules/kusto/_help.py",
"kusto": "src/azure-cli/azure/cli/command_modules/kusto/_help.py",
"lab": "src/azure-cli/azure/cli/command_modules/lab/_help.py",
"maps": "src/azure-cli/azure/cli/command_modules/maps/_help.py",
"monitor": "src/azure-cli/azure/cli/command_modules/monitor/_help.py",
Expand Down Expand Up @@ -68,5 +68,6 @@
"deployment": "src/azure-cli/azure/cli/command_modules/resource/_help.py",
"functionapp": "src/azure-cli/azure/cli/command_modules/appservice/_help.py",
"lock": "src/azure-cli/azure/cli/command_modules/resource/_help.py",
"netappfiles": "src/azure-cli/azure/cli/command_modules/netappfiles/_help.py",
"managedservices": "src/azure-cli/azure/cli/command_modules/managedservices/_help.py"
}
1 change: 1 addition & 0 deletions src/azure-cli-core/azure/cli/core/profiles/_shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ class ResourceType(Enum): # pylint: disable=too-few-public-methods
MGMT_SQL = ('azure.mgmt.sql', None)
MGMT_SQLVM = ('azure.mgmt.sqlvirtualmachine', None)
MGMT_MANAGEDSERVICES = ('azure.mgmt.managedservices', None)
MGMT_NETAPPFILES = ('azure.mgmt.netappfiles', None)

def __init__(self, import_prefix, client_name):
"""Constructor.
Expand Down
10 changes: 7 additions & 3 deletions src/azure-cli/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ Release History
**HDInsight**

* BREAKING CHANGE: Changed "oms" command group name to "monitor"
* BREAKING CHANGE: Made "--http-password/-p" a required parameter
* Added completers for "--cluster-admin-account" and "cluster-users-group-dns" parameters completer
* BREAKING CHANGE: Made "--http-password/-p" a required parameter
* Added completers for "--cluster-admin-account" and "cluster-users-group-dns" parameters completer
* "cluster-users-group-dns" parameter is now required when "—esp" is present
* Added a timeout for all existing argument auto-completers
* Added a timeout for transforming resource name to resource id
Expand All @@ -69,6 +69,10 @@ Release History

* Introducing managed service command module in preview.

**NetAppFiles**

* Initial version relating to the R4 version of the RP.

**Profile**
* Suppress `--subscription` argument for logout command.

Expand All @@ -78,7 +82,7 @@ Release History
* role assignment: expose --assignee-principal-type from create command to avoid intermittent
failures caused by AAD graph server replication latency
* ad signed-in-user: fix a crash on listing owned objects
* ad sp: use the right approach to find the application from a service principal
* ad sp: use the right approach to find the application from a service principal

**RDBMS**

Expand Down
32 changes: 32 additions & 0 deletions src/azure-cli/azure/cli/command_modules/netappfiles/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# --------------------------------------------------------------------------------------------
# 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 azure.cli.core.profiles import ResourceType
from azure.cli.command_modules.netappfiles._help import helps # pylint: disable=unused-import


class NetAppFilesCommandsLoader(AzCommandsLoader):

def __init__(self, cli_ctx=None):
from azure.cli.core.commands import CliCommandType
netappfiles_custom = CliCommandType(operations_tmpl='azure.cli.command_modules.netappfiles.custom#{}')
super(NetAppFilesCommandsLoader, self).__init__(cli_ctx=cli_ctx,
resource_type=ResourceType.MGMT_NETAPPFILES,
custom_command_type=netappfiles_custom)

def load_command_table(self, args):
super(NetAppFilesCommandsLoader, self).load_command_table(args)
from azure.cli.command_modules.netappfiles.commands import load_command_table
load_command_table(self, args)
return self.command_table

def load_arguments(self, command):
super(NetAppFilesCommandsLoader, self).load_arguments(command)
from azure.cli.command_modules.netappfiles._params import load_arguments
load_arguments(self, command)


COMMAND_LOADER_CLS = NetAppFilesCommandsLoader
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------

# pylint: disable=unused-argument


def cf_netappfiles(cli_ctx, *kwargs):
from azure.cli.core.commands.client_factory import get_mgmt_service_client
from azure.mgmt.netapp import AzureNetAppFilesManagementClient
return get_mgmt_service_client(cli_ctx, AzureNetAppFilesManagementClient)


def accounts_mgmt_client_factory(cli_ctx, _):
return cf_netappfiles(cli_ctx).accounts


def pools_mgmt_client_factory(cli_ctx, _):
return cf_netappfiles(cli_ctx).pools


def volumes_mgmt_client_factory(cli_ctx, _):
return cf_netappfiles(cli_ctx).volumes


def mount_targets_mgmt_client_factory(cli_ctx, _):
return cf_netappfiles(cli_ctx).mount_targets


def snapshots_mgmt_client_factory(cli_ctx, _):
return cf_netappfiles(cli_ctx).snapshots
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------

from knack.util import CLIError
from msrest.exceptions import ValidationError # pylint: disable=import-error
from msrestazure.azure_exceptions import CloudError


def netappfiles_exception_handler(ex):
if isinstance(ex, (CloudError, ValidationError, ValueError)):
message = ex
raise CLIError(message)

import sys

from six import reraise
reraise(*sys.exc_info())
Loading

0 comments on commit f6108b1

Please sign in to comment.