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

Adding Gallery Service Artifact Extension #7261

Merged
Show file tree
Hide file tree
Changes from 8 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
4 changes: 3 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -322,4 +322,6 @@

/src/k8s-runtime/ @ddadaal @HE-Xinyu

/src/mdp/ @ajaykn
/src/mdp/ @ajaykn

/src/azext_gallery-service-artifact/ @rohitbhoopalam
8 changes: 8 additions & 0 deletions src/gallery-service-artifact/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.. :changelog:

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

1.0.0b1
++++++
* Initial release.
32 changes: 32 additions & 0 deletions src/gallery-service-artifact/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Azure CLI GalleryServiceArtifact Extension #
This is an extension to Azure CLI to manage Gallery Service Artifact resources.

## How to use ##
Remove existing extension (if previously installed)

```az extension remove --name gallery-service-artifact```

Add Gallery Service Artifact extension using the wheel file

```az extension add --name gallery-service-artifact```

## Sample Commands
### List Service Artifacts
Lists all Service Artifacts under a Gallery.

```az gallery service-artifact list --gallery-name <gallery-name> --resource-group <resource-group-name> --subscription <subscription-id>```

### Create Service Artifacts
Creates a new Service Artifact

```az gallery service-artifact create --gallery-name <gallery-name> --resource-group <resource-group-name> --subscription <subscription-id> --service-artifact-name <service-artifact-name> --location <location> --target-locations '@<path-to-target-location-json-file>' --vm-artifacts-profiles '@<path-to-vm-artifact-json-file>' --description "<service-artifact-description>"```

### Get Service Artifact
Retrieves an existing Service Artifact

```az gallery service-artifact get --gallery-name <gallery-name> --resource-group <resource-group-name> --subscription <subscription-id> --service-artifact-name <service-artifact-name>```

### Update Service Artifact
Updates an existing Service Artifact.

```az gallery service-artifact update --gallery-name <gallery-name> --resource-group <resource-group-name> --subscription <subscription-id> --service-artifact-name <service-artifact-name> --location <location> --target-locations '@<path-to-target-location-json-file>' --vm-artifacts-profiles '@<path-to-vm-artifact-json-file>' --description "<service-artifact-description>"```
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_gallery_service_artifact._help import helps # pylint: disable=unused-import


class GalleryServiceArtifactCommandsLoader(AzCommandsLoader):

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

def load_command_table(self, args):
from azext_gallery_service_artifact.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_gallery_service_artifact._params import load_arguments
load_arguments(self, command)


COMMAND_LOADER_CLS = GalleryServiceArtifactCommandsLoader
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
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
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
# --------------------------------------------------------------------------------------------
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

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# --------------------------------------------------------------------------------------------
# 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(
"gallery",
)
class __CMDGroup(AAZCommandGroup):
"""Azure Compute Gallery
"""
pass


__all__ = ["__CMDGroup"]
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,23 @@
# --------------------------------------------------------------------------------------------
# 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(
"gallery service-artifact",
)
class __CMDGroup(AAZCommandGroup):
"""Azure Compute Gallery Service Artifact
"""
pass


__all__ = ["__CMDGroup"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# --------------------------------------------------------------------------------------------
# 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 ._create import *
from ._get import *
from ._list import *
from ._update import *
from ._wait import *
Loading