Skip to content

Commit

Permalink
Adding new extension edgezones. new resource provider microsoft.edgez…
Browse files Browse the repository at this point in the history
…ones version 2024-04-01-preview (#7445)

* Adding new extension edgezones. new resource provider microsoft.edgezones version 2024-04-01-preview

* Updating service_name.json

* adding scenario tests for extended-zones list, get, register and unregister.

* remove old recording before testcase rename.

* Add command usages

* Update command usage
  • Loading branch information
jasonurban1 authored Apr 17, 2024
1 parent db64ff9 commit 212ab57
Show file tree
Hide file tree
Showing 28 changed files with 1,545 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/edgezones/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.. :changelog:
Release History
===============

1.0.0b1
++++++
* Initial release.
29 changes: 29 additions & 0 deletions src/edgezones/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Azure CLI Edgezones Extension #
This is an extension to Azure CLI to manage Edgezones resources.

## How to use ##
Install this extension using the below CLI command
```
az extension add --name edgezones
```

### Included Features
##### List extended zones
```
az edge-zones extended-zone list
```
##### Show extended zone
```
az edge-zones extended-zone show \
--extended-zone-name "losangeles"
```
##### Register extended zone
```
az edge-zones extended-zone register \
--extended-zone-name "losangeles"
```
##### Unregister extended zone
```
az edge-zones extended-zone unregister \
--extended-zone-name "losangeles"
```
42 changes: 42 additions & 0 deletions src/edgezones/azext_edgezones/__init__.py
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.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

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


class EdgezonesCommandsLoader(AzCommandsLoader):

def __init__(self, cli_ctx=None):
from azure.cli.core.commands import CliCommandType
custom_command_type = CliCommandType(
operations_tmpl='azext_edgezones.custom#{}')
super().__init__(cli_ctx=cli_ctx,
custom_command_type=custom_command_type)

def load_command_table(self, args):
from azext_edgezones.commands import load_command_table
from azure.cli.core.aaz import load_aaz_command_table
try:
from . import aaz
except ImportError:
aaz = None
if aaz:
load_aaz_command_table(
loader=self,
aaz_pkg_name=aaz.__name__,
args=args
)
load_command_table(self, args)
return self.command_table

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


COMMAND_LOADER_CLS = EdgezonesCommandsLoader
11 changes: 11 additions & 0 deletions src/edgezones/azext_edgezones/_help.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# --------------------------------------------------------------------------------------------
# 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 aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: disable=line-too-long
# pylint: disable=too-many-lines

from knack.help_files import helps # pylint: disable=unused-import
13 changes: 13 additions & 0 deletions src/edgezones/azext_edgezones/_params.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# --------------------------------------------------------------------------------------------
# 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 aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: disable=too-many-lines
# pylint: disable=too-many-statements


def load_arguments(self, _): # pylint: disable=unused-argument
pass
6 changes: 6 additions & 0 deletions src/edgezones/azext_edgezones/aaz/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# --------------------------------------------------------------------------------------------
# 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 aaz-dev-tools
# --------------------------------------------------------------------------------------------
10 changes: 10 additions & 0 deletions src/edgezones/azext_edgezones/aaz/latest/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# --------------------------------------------------------------------------------------------
# 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 aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

26 changes: 26 additions & 0 deletions src/edgezones/azext_edgezones/aaz/latest/edge_zones/__cmd_group.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# --------------------------------------------------------------------------------------------
# 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 aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

from azure.cli.core.aaz import *


@register_command_group(
"edge-zones",
is_preview=True,
)
class __CMDGroup(AAZCommandGroup):
"""Manage Edge Zone resources
Provides management for the different EdgeZone resource types
"""
pass


__all__ = ["__CMDGroup"]
11 changes: 11 additions & 0 deletions src/edgezones/azext_edgezones/aaz/latest/edge_zones/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# --------------------------------------------------------------------------------------------
# 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 aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

from .__cmd_group import *
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# --------------------------------------------------------------------------------------------
# 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 aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

from azure.cli.core.aaz import *


@register_command_group(
"edge-zones extended-zone",
is_preview=True,
)
class __CMDGroup(AAZCommandGroup):
"""A small-footprint extension of Azure.
Azure Extended Zones are small-footprint extensions of Azure placed in metros, industry centers, or a specific jurisdiction to serve low latency and/or data residency workloads.
"""
pass


__all__ = ["__CMDGroup"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# --------------------------------------------------------------------------------------------
# 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 aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

from .__cmd_group import *
from ._list import *
from ._register import *
from ._show import *
from ._unregister import *
Loading

0 comments on commit 212ab57

Please sign in to comment.