Skip to content

Commit

Permalink
Update from master
Browse files Browse the repository at this point in the history
  • Loading branch information
SDK Automation committed Jun 9, 2020
1 parent 14b956c commit 9885bfe
Show file tree
Hide file tree
Showing 50 changed files with 8,566 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/storagecache/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/storagecache/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Microsoft Azure CLI 'storagecache' Extension
==========================================

This package is for the 'storagecache' extension.
i.e. 'az storagecache'
46 changes: 46 additions & 0 deletions src/storagecache/azext_storagecache/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from azure.cli.core import AzCommandsLoader
from azext_storagecache.generated._help import helps # pylint: disable=unused-import


class StorageCacheManagementClientCommandsLoader(AzCommandsLoader):

def __init__(self, cli_ctx=None):
from azure.cli.core.commands import CliCommandType
from azext_storagecache.generated._client_factory import cf_storagecache
storagecache_custom = CliCommandType(
operations_tmpl='azext_storagecache.custom#{}',
client_factory=cf_storagecache)
super(StorageCacheManagementClientCommandsLoader, self).__init__(cli_ctx=cli_ctx,
custom_command_type=storagecache_custom)

def load_command_table(self, args):
from azext_storagecache.generated.commands import load_command_table
load_command_table(self, args)
try:
from azext_storagecache.manual.commands import load_command_table as load_command_table_manual
load_command_table_manual(self, args)
except ImportError:
pass
return self.command_table

def load_arguments(self, command):
from azext_storagecache.generated._params import load_arguments
load_arguments(self, command)
try:
from azext_storagecache.manual._params import load_arguments as load_arguments_manual
load_arguments_manual(self, command)
except ImportError:
pass


COMMAND_LOADER_CLS = StorageCacheManagementClientCommandsLoader
17 changes: 17 additions & 0 deletions src/storagecache/azext_storagecache/action.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
# 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
4 changes: 4 additions & 0 deletions src/storagecache/azext_storagecache/azext_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"azext.isExperimental": true,
"azext.minCliCoreVersion": "2.3.1"
}
17 changes: 17 additions & 0 deletions src/storagecache/azext_storagecache/custom.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
# 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
12 changes: 12 additions & 0 deletions src/storagecache/azext_storagecache/generated/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

__path__ = __import__('pkgutil').extend_path(__path__, __name__)
35 changes: 35 additions & 0 deletions src/storagecache/azext_storagecache/generated/_client_factory.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------


def cf_storagecache(cli_ctx, *_):
from azure.cli.core.commands.client_factory import get_mgmt_service_client
from ..vendored_sdks.storagecache import StorageCacheManagementClient
return get_mgmt_service_client(cli_ctx, StorageCacheManagementClient)


def cf_sku(cli_ctx, *_):
return cf_storagecache(cli_ctx).sku


def cf_usage_model(cli_ctx, *_):
return cf_storagecache(cli_ctx).usage_model


def cf_asc_operation(cli_ctx, *_):
return cf_storagecache(cli_ctx).asc_operation


def cf_cache(cli_ctx, *_):
return cf_storagecache(cli_ctx).cache


def cf_storage_target(cli_ctx, *_):
return cf_storagecache(cli_ctx).storage_target
208 changes: 208 additions & 0 deletions src/storagecache/azext_storagecache/generated/_help.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,208 @@
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
# pylint: disable=too-many-lines

from knack.help_files import helps


helps['storagecache sku'] = """
type: group
short-summary: storagecache sku
"""

helps['storagecache sku list'] = """
type: command
short-summary: Get the list of StorageCache.Cache SKUs available to this subscription.
examples:
- name: Skus_List
text: |-
az storagecache sku list
"""

helps['storagecache usage-model'] = """
type: group
short-summary: storagecache usage-model
"""

helps['storagecache usage-model list'] = """
type: command
short-summary: Get the list of Cache Usage Models available to this subscription.
examples:
- name: UsageModels_List
text: |-
az storagecache usage-model list
"""

helps['storagecache asc-operation'] = """
type: group
short-summary: storagecache asc-operation
"""

helps['storagecache asc-operation show'] = """
type: command
short-summary: Gets the status of an asynchronous operation for the Azure HPC cache
examples:
- name: AscOperations_Get
text: |-
az storagecache asc-operation show --operation-id "testoperationid" --location "West US"
"""

helps['storagecache cache'] = """
type: group
short-summary: storagecache cache
"""

helps['storagecache cache list'] = """
type: command
short-summary: Returns all Caches the user has access to under a subscription.
examples:
- name: Caches_ListByResourceGroup
text: |-
az storagecache cache list --resource-group "scgroup"
"""

helps['storagecache cache show'] = """
type: command
short-summary: Returns a Cache.
examples:
- name: Caches_Get
text: |-
az storagecache cache show --cache-name "sc1" --resource-group "scgroup"
"""

helps['storagecache cache create'] = """
type: command
short-summary: Create or update a Cache.
examples:
- name: Caches_CreateOrUpdate
text: |-
az storagecache cache create --location "westus" --cache-size-gb 3072 --subnet "/subscriptions/00000000-\
0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/sub1" --s\
ku name="Standard_2G" --tags "{\\"Dept\\":\\"Initech\\"}" --cache-name "sc1" --resource-group "scgroup"
"""

helps['storagecache cache update'] = """
type: command
short-summary: Update a Cache instance.
examples:
- name: Caches_Update
text: |-
az storagecache cache update --location "westus" --cache-size-gb 3072 --subnet "/subscriptions/00000000-\
0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/sub1" --s\
ku name="Standard_2G" --tags "{\\"Dept\\":\\"Initech\\"}" --cache-name "sc1" --resource-group "scgroup"
"""

helps['storagecache cache delete'] = """
type: command
short-summary: Schedules a Cache for deletion.
examples:
- name: Caches_Delete
text: |-
az storagecache cache delete --cache-name "sc" --resource-group "scgroup"
"""

helps['storagecache cache flush'] = """
type: command
short-summary: Tells a Cache to write all dirty data to the Storage Target(s). During the flush, clients will see e\
rrors returned until the flush is complete.
examples:
- name: Caches_Flush
text: |-
az storagecache cache flush --cache-name "sc" --resource-group "scgroup"
"""

helps['storagecache cache start'] = """
type: command
short-summary: Tells a Stopped state Cache to transition to Active state.
examples:
- name: Caches_Start
text: |-
az storagecache cache start --cache-name "sc" --resource-group "scgroup"
"""

helps['storagecache cache stop'] = """
type: command
short-summary: Tells an Active Cache to transition to Stopped state.
examples:
- name: Caches_Stop
text: |-
az storagecache cache stop --cache-name "sc" --resource-group "scgroup"
"""

helps['storagecache cache upgrade-firmware'] = """
type: command
short-summary: Upgrade a Cache's firmware if a new version is available. Otherwise, this operation has no effect.
examples:
- name: Caches_UpgradeFirmware
text: |-
az storagecache cache upgrade-firmware --cache-name "sc1" --resource-group "scgroup"
"""

helps['storagecache storage-target'] = """
type: group
short-summary: storagecache storage-target
"""

helps['storagecache storage-target list'] = """
type: command
short-summary: Returns a list of Storage Targets for the specified Cache.
examples:
- name: StorageTargets_List
text: |-
az storagecache storage-target list --cache-name "sc1" --resource-group "scgroup"
"""

helps['storagecache storage-target show'] = """
type: command
short-summary: Returns a Storage Target from a Cache.
examples:
- name: StorageTargets_Get
text: |-
az storagecache storage-target show --cache-name "sc1" --resource-group "scgroup" --storage-target-name \
"st1"
"""

helps['storagecache storage-target create'] = """
type: command
short-summary: Create or update a Storage Target. This operation is allowed at any time, but if the Cache is down o\
r unhealthy, the actual creation/modification of the Storage Target may be delayed until the Cache is healthy again.
examples:
- name: StorageTargets_CreateOrUpdate
text: |-
az storagecache storage-target create --cache-name "sc1" --resource-group "scgroup" --storage-target-nam\
e "st1" --junctions namespace-path="/path/on/cache" nfs-export="exp1" target-path="/path/on/exp1" --junctions namespace\
-path="/path2/on/cache" nfs-export="exp2" target-path="/path2/on/exp2" --nfs3 target="10.0.44.44" usage-model="READ_HEA\
VY_INFREQ" --target-type "nfs3"
"""

helps['storagecache storage-target update'] = """
type: command
short-summary: Create or update a Storage Target. This operation is allowed at any time, but if the Cache is down o\
r unhealthy, the actual creation/modification of the Storage Target may be delayed until the Cache is healthy again.
examples:
- name: StorageTargets_CreateOrUpdate
text: |-
az storagecache storage-target update --cache-name "sc1" --resource-group "scgroup" --storage-target-nam\
e "st1" --junctions namespace-path="/path/on/cache" nfs-export="exp1" target-path="/path/on/exp1" --junctions namespace\
-path="/path2/on/cache" nfs-export="exp2" target-path="/path2/on/exp2" --nfs3 target="10.0.44.44" usage-model="READ_HEA\
VY_INFREQ" --target-type "nfs3"
"""

helps['storagecache storage-target delete'] = """
type: command
short-summary: Removes a Storage Target from a Cache. This operation is allowed at any time, but if the Cache is do\
wn or unhealthy, the actual removal of the Storage Target may be delayed until the Cache is healthy again. Note that if\
the Cache has data to flush to the Storage Target, the data will be flushed before the Storage Target will be deleted.
examples:
- name: StorageTargets_Delete
text: |-
az storagecache storage-target delete --cache-name "sc1" --resource-group "scgroup" --storage-target-nam\
e "st1"
"""
Loading

0 comments on commit 9885bfe

Please sign in to comment.