Skip to content
Open
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/codesigning/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.. :changelog:

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

0.1.0
++++++
* Initial release.
50 changes: 50 additions & 0 deletions src/codesigning/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Azure CLI codesigning Extension #
This is the extension for codesigning

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

### Included Features ###
#### codesigning ####
##### Create #####
```
az codesigning create --name "MyAccount" --location "eastus" --resource-group "MyResourceGroup"
```
##### Show #####
```
az codesigning show --name "MyAccount" --resource-group "MyResourceGroup"
```
##### List #####
```
az codesigning list --resource-group "MyResourceGroup"
```
##### Update #####
```
az codesigning update --name "MyAccount" --tags key1="value1" --resource-group "MyResourceGroup"
```
##### Delete #####
```
az codesigning delete --name "MyAccount" --resource-group "MyResourceGroup"
```
#### codesigning certificate-profile ####
##### Create #####
```
az codesigning certificate-profile create --account-name "MyAccount" --common-name "Contoso Inc" \
--organization "Contoso Inc" --name "profileA" --resource-group "MyResourceGroup"
```
##### Show #####
```
az codesigning certificate-profile show --account-name "MyAccount" --name "profileA" --resource-group "MyResourceGroup"
```
##### List #####
```
az codesigning certificate-profile list --account-name "MyAccount" --resource-group "MyResourceGroup"
```
##### Delete #####
```
az codesigning certificate-profile delete --account-name "MyAccount" --name "profileA" \
--resource-group "MyResourceGroup"
```
50 changes: 50 additions & 0 deletions src/codesigning/azext_codesigning/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# --------------------------------------------------------------------------
# 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_codesigning.generated._help import helps # pylint: disable=unused-import
try:
from azext_codesigning.manual._help import helps # pylint: disable=reimported
except ImportError:
pass


class CodeSigningManagementClientCommandsLoader(AzCommandsLoader):

def __init__(self, cli_ctx=None):
from azure.cli.core.commands import CliCommandType
from azext_codesigning.generated._client_factory import cf_codesigning_cl
codesigning_custom = CliCommandType(
operations_tmpl='azext_codesigning.custom#{}',
client_factory=cf_codesigning_cl)
parent = super(CodeSigningManagementClientCommandsLoader, self)
parent.__init__(cli_ctx=cli_ctx, custom_command_type=codesigning_custom)

def load_command_table(self, args):
from azext_codesigning.generated.commands import load_command_table
load_command_table(self, args)
try:
from azext_codesigning.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_codesigning.generated._params import load_arguments
load_arguments(self, command)
try:
from azext_codesigning.manual._params import load_arguments as load_arguments_manual
load_arguments_manual(self, command)
except ImportError:
pass


COMMAND_LOADER_CLS = CodeSigningManagementClientCommandsLoader
17 changes: 17 additions & 0 deletions src/codesigning/azext_codesigning/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/codesigning/azext_codesigning/azext_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"azext.isExperimental": true,
"azext.minCliCoreVersion": "2.15.0"
}
17 changes: 17 additions & 0 deletions src/codesigning/azext_codesigning/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/codesigning/azext_codesigning/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__)
24 changes: 24 additions & 0 deletions src/codesigning/azext_codesigning/generated/_client_factory.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# --------------------------------------------------------------------------
# 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_codesigning_cl(cli_ctx, *_):
from azure.cli.core.commands.client_factory import get_mgmt_service_client
from azext_codesigning.vendored_sdks.codesigning import CodeSigningManagementClient
return get_mgmt_service_client(cli_ctx,
CodeSigningManagementClient)


def cf_code_signing_account(cli_ctx, *_):
return cf_codesigning_cl(cli_ctx).code_signing_account


def cf_certificate_profile(cli_ctx, *_):
return cf_codesigning_cl(cli_ctx).certificate_profile
139 changes: 139 additions & 0 deletions src/codesigning/azext_codesigning/generated/_help.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
# --------------------------------------------------------------------------
# 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['codesigning'] = """
type: group
short-summary: Manage code signing account with codesigning
"""

helps['codesigning list'] = """
type: command
short-summary: "List Code Signing Accounts within a resource group And Lists Code Signing Accounts within a \
subscription."
examples:
- name: List Code Signing Accounts by Resource Group
text: |-
az codesigning list --resource-group "MyResourceGroup"
- name: List Code Signing Accounts by Subscription
text: |-
az codesigning list
"""

helps['codesigning show'] = """
type: command
short-summary: "Get a Code Signing Account."
examples:
- name: Get Code Signing Account
text: |-
az codesigning show --name "MyAccount" --resource-group "MyResourceGroup"
"""

helps['codesigning create'] = """
type: command
short-summary: "Create a Code Signing Account."
examples:
- name: Create Code Signing Account
text: |-
az codesigning create --name "MyAccount" --location "eastus" --resource-group "MyResourceGroup"
"""

helps['codesigning update'] = """
type: command
short-summary: "Update a code signing account."
examples:
- name: Update Code Signing Account
text: |-
az codesigning update --name "MyAccount" --tags key1="value1" --resource-group "MyResourceGroup"
"""

helps['codesigning delete'] = """
type: command
short-summary: "Delete Code Signing Account."
examples:
- name: Delete Code Signing Account
text: |-
az codesigning delete --name "MyAccount" --resource-group "MyResourceGroup"
"""

helps['codesigning wait'] = """
type: command
short-summary: Place the CLI in a waiting state until a condition of the codesigning is met.
examples:
- name: Pause executing next line of CLI script until the codesigning is successfully created.
text: |-
az codesigning wait --name "MyAccount" --resource-group "MyResourceGroup" --created
- name: Pause executing next line of CLI script until the codesigning is successfully deleted.
text: |-
az codesigning wait --name "MyAccount" --resource-group "MyResourceGroup" --deleted
"""

helps['codesigning certificate-profile'] = """
type: group
short-summary: Manage certificate profile with codesigning
"""

helps['codesigning certificate-profile list'] = """
type: command
short-summary: "List certificate profiles within a code signing account."
examples:
- name: List Certificate Profiles
text: |-
az codesigning certificate-profile list --account-name "MyAccount" --resource-group "MyResourceGroup"
"""

helps['codesigning certificate-profile show'] = """
type: command
short-summary: "Get details of a certificate profile."
examples:
- name: Get Certificate Profile
text: |-
az codesigning certificate-profile show --account-name "MyAccount" --name "profileA" --resource-group \
"MyResourceGroup"
"""

helps['codesigning certificate-profile create'] = """
type: command
short-summary: "Create a certificate profile."
examples:
- name: Create Certificate Profile
text: |-
az codesigning certificate-profile create --account-name "MyAccount" --common-name "Contoso Inc" \
--organization "Contoso Inc" --name "profileA" --resource-group "MyResourceGroup"
"""

helps['codesigning certificate-profile delete'] = """
type: command
short-summary: "Delete a Certificate Profile."
examples:
- name: Delete Certificate Profile
text: |-
az codesigning certificate-profile delete --account-name "MyAccount" --name "profileA" --resource-group \
"MyResourceGroup"
"""

helps['codesigning certificate-profile wait'] = """
type: command
short-summary: Place the CLI in a waiting state until a condition of the codesigning certificate-profile is met.
examples:
- name: Pause executing next line of CLI script until the codesigning certificate-profile is successfully \
created.
text: |-
az codesigning certificate-profile wait --account-name "MyAccount" --name "profileA" --resource-group \
"MyResourceGroup" --created
- name: Pause executing next line of CLI script until the codesigning certificate-profile is successfully \
deleted.
text: |-
az codesigning certificate-profile wait --account-name "MyAccount" --name "profileA" --resource-group \
"MyResourceGroup" --deleted
"""
Loading