forked from Azure/azure-cli-extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from Azure/master
Synced with the official repo
- Loading branch information
Showing
144 changed files
with
28,522 additions
and
9,763 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.. :changelog: | ||
Release History | ||
=============== | ||
|
||
0.1.0 | ||
++++++ | ||
* Initial release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Azure CLI ad Extension # | ||
This is the extension for ad | ||
|
||
### How to use ### | ||
Install this extension using the below CLI command | ||
``` | ||
az extension add --name ad | ||
``` | ||
|
||
### Included Features ### | ||
#### ad ds #### | ||
##### Create ##### | ||
``` | ||
az ad ds create --domain "TestDomainService.com" --ntlm-v1 "Enabled" --sync-ntlm-passwords "Enabled" \ | ||
--tls-v1 "Disabled" --filtered-sync "Enabled" --external-access "Enabled" --ldaps "Enabled" \ | ||
--pfx-certificate "MIIDPDCCAiSgAwIBAgIQQUI9P6tq2p9OFIJa7DLNvTANBgkqhkiG9w0BAQsFADAgMR4w..." \ | ||
--pfx-certificate-password "<pfxCertificatePassword>" \ | ||
--additional-recipients "jicha@microsoft.com" "caalmont@microsoft.com" --notify-dc-admins "Enabled" \ | ||
--notify-global-admins "Enabled" \ | ||
--replica-sets location="West US" subnet-id="/subscriptions/1639790a-76a2-4ac4-98d9-8562f5dfcb4d/resourceGroups/TestNetworkResourceGroup/providers/Microsoft.Network/virtualNetworks/TestVnetWUS/subnets/TestSubnetWUS" \ | ||
--name "TestDomainService.com" --resource-group "TestResourceGroup" | ||
az ad ds wait --created --name "{myDomainService}" --resource-group "{rg}" | ||
``` | ||
##### Show ##### | ||
``` | ||
az ad ds show --name "TestDomainService.com" --resource-group "TestResourceGroup" | ||
``` | ||
##### List ##### | ||
``` | ||
az ad ds list --resource-group "TestResourceGroup" | ||
``` | ||
##### Update ##### | ||
``` | ||
az ad ds update --ntlm-v1 "Enabled" --sync-ntlm-passwords "Enabled" --tls-v1 "Disabled" --filtered-sync "Enabled" \ | ||
--external-access "Enabled" --ldaps "Enabled" \ | ||
--pfx-certificate "MIIDPDCCAiSgAwIBAgIQQUI9P6tq2p9OFIJa7DLNvTANBgkqhkiG9w0BAQsFADAgMR4w..." \ | ||
--pfx-certificate-password "<pfxCertificatePassword>" \ | ||
--additional-recipients "jicha@microsoft.com" "caalmont@microsoft.com" --notify-dc-admins "Enabled" \ | ||
--notify-global-admins "Enabled" \ | ||
--replica-sets location="West US" subnet-id="/subscriptions/1639790a-76a2-4ac4-98d9-8562f5dfcb4d/resourceGroups/TestNetworkResourceGroup/providers/Microsoft.Network/virtualNetworks/TestVnetWUS/subnets/TestSubnetWUS" \ | ||
--replica-sets location="East US" subnet-id="/subscriptions/1639790a-76a2-4ac4-98d9-8562f5dfcb4d/resourceGroups/TestNetworkResourceGroup/providers/Microsoft.Network/virtualNetworks/TestVnetEUS/subnets/TestSubnetEUS" \ | ||
--name "TestDomainService.com" --resource-group "TestResourceGroup" | ||
``` | ||
##### Delete ##### | ||
``` | ||
az ad ds delete --name "TestDomainService.com" --resource-group "TestResourceGroup" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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_ad.generated._help import helps # pylint: disable=unused-import | ||
try: | ||
from azext_ad.manual._help import helps # pylint: disable=reimported | ||
except ImportError: | ||
pass | ||
|
||
|
||
class DomainServicesResourceProviderCommandsLoader(AzCommandsLoader): | ||
|
||
def __init__(self, cli_ctx=None): | ||
from azure.cli.core.commands import CliCommandType | ||
from azext_ad.generated._client_factory import cf_ad_cl | ||
ad_custom = CliCommandType( | ||
operations_tmpl='azext_ad.custom#{}', | ||
client_factory=cf_ad_cl) | ||
parent = super(DomainServicesResourceProviderCommandsLoader, self) | ||
parent.__init__(cli_ctx=cli_ctx, custom_command_type=ad_custom) | ||
|
||
def load_command_table(self, args): | ||
from azext_ad.generated.commands import load_command_table | ||
load_command_table(self, args) | ||
try: | ||
from azext_ad.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_ad.generated._params import load_arguments | ||
load_arguments(self, command) | ||
try: | ||
from azext_ad.manual._params import load_arguments as load_arguments_manual | ||
load_arguments_manual(self, command) | ||
except ImportError: | ||
pass | ||
|
||
|
||
COMMAND_LOADER_CLS = DomainServicesResourceProviderCommandsLoader |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"azext.minCliCoreVersion": "2.15.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# -------------------------------------------------------------------------- | ||
# 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_ad_cl(cli_ctx, *_): | ||
from azure.cli.core.commands.client_factory import get_mgmt_service_client | ||
from azext_ad.vendored_sdks.domainservices import DomainServicesResourceProvider | ||
return get_mgmt_service_client(cli_ctx, | ||
DomainServicesResourceProvider) | ||
|
||
|
||
def cf_domain_service(cli_ctx, *_): | ||
return cf_ad_cl(cli_ctx).domain_services |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
# -------------------------------------------------------------------------- | ||
# 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['ad ds'] = """ | ||
type: group | ||
short-summary: Manage domain service with ad | ||
""" | ||
|
||
helps['ad ds list'] = """ | ||
type: command | ||
short-summary: "The List Domain Services in Resource Group operation lists all the domain services available under \ | ||
the given resource group. And The List Domain Services in Subscription operation lists all the domain services \ | ||
available under the given subscription (and across all resource groups within that subscription)." | ||
examples: | ||
- name: List Domain Service By Group | ||
text: |- | ||
az ad ds list --resource-group "TestResourceGroup" | ||
- name: List Domain Service By Sub | ||
text: |- | ||
az ad ds list | ||
""" | ||
|
||
helps['ad ds show'] = """ | ||
type: command | ||
short-summary: "The Get Domain Service operation retrieves a json representation of the Domain Service." | ||
examples: | ||
- name: Get Domain Service | ||
text: |- | ||
az ad ds show --name "TestDomainService.com" --resource-group "TestResourceGroup" | ||
""" | ||
|
||
helps['ad ds create'] = """ | ||
type: command | ||
short-summary: "The Create Domain Service operation creates a new domain service with the specified parameters. If \ | ||
the specific service already exists, then any patchable properties will be updated and any immutable properties will \ | ||
remain unchanged." | ||
parameters: | ||
- name: --replica-sets | ||
short-summary: "List of ReplicaSets" | ||
long-summary: | | ||
Usage: --replica-sets location=XX subnet-id=XX | ||
location: Virtual network location | ||
subnet-id: The name of the virtual network that Domain Services will be deployed on. The id of the subnet \ | ||
that Domain Services will be deployed on. /virtualNetwork/vnetName/subnets/subnetName. | ||
Multiple actions can be specified by using more than one --replica-sets argument. | ||
- name: --settings | ||
short-summary: "List of settings for Resource Forest" | ||
long-summary: | | ||
Usage: --settings trusted-domain-fqdn=XX trust-direction=XX friendly-name=XX remote-dns-ips=XX \ | ||
trust-password=XX | ||
trusted-domain-fqdn: Trusted Domain FQDN | ||
trust-direction: Trust Direction | ||
friendly-name: Friendly Name | ||
remote-dns-ips: Remote Dns ips | ||
trust-password: Trust Password | ||
Multiple actions can be specified by using more than one --settings argument. | ||
examples: | ||
- name: Create Domain Service | ||
text: |- | ||
az ad ds create --domain "TestDomainService.com" --ntlm-v1 "Enabled" --sync-ntlm-pwd "Enabled" --tls-v1 \ | ||
"Disabled" --filtered-sync "Enabled" --external-access "Enabled" --ldaps "Enabled" --pfx-cert \ | ||
"MIIDPDCCAiSgAwIBAgIQQUI9P6tq2p9OFIJa7DLNvTANBgkqhkiG9w0BAQsFADAgMR4w..." --pfx-cert-pwd "<pfxCertificatePassword>" \ | ||
--notify-others "jicha@microsoft.com" "caalmont@microsoft.com" --notify-dc-admins "Enabled" --notify-global-admins \ | ||
"Enabled" --replica-sets location="West US" subnet-id="/subscriptions/1639790a-76a2-4ac4-98d9-8562f5dfcb4d/resourceGrou\ | ||
ps/TestNetworkResourceGroup/providers/Microsoft.Network/virtualNetworks/TestVnetWUS/subnets/TestSubnetWUS" --name \ | ||
"TestDomainService.com" --resource-group "TestResourceGroup" | ||
""" | ||
|
||
helps['ad ds update'] = """ | ||
type: command | ||
short-summary: "The Update Domain Service operation can be used to update the existing deployment. The update call \ | ||
only supports the properties listed in the PATCH body." | ||
parameters: | ||
- name: --replica-sets | ||
short-summary: "List of ReplicaSets" | ||
long-summary: | | ||
Usage: --replica-sets location=XX subnet-id=XX | ||
location: Virtual network location | ||
subnet-id: The name of the virtual network that Domain Services will be deployed on. The id of the subnet \ | ||
that Domain Services will be deployed on. /virtualNetwork/vnetName/subnets/subnetName. | ||
Multiple actions can be specified by using more than one --replica-sets argument. | ||
- name: --settings | ||
short-summary: "List of settings for Resource Forest" | ||
long-summary: | | ||
Usage: --settings trusted-domain-fqdn=XX trust-direction=XX friendly-name=XX remote-dns-ips=XX \ | ||
trust-password=XX | ||
trusted-domain-fqdn: Trusted Domain FQDN | ||
trust-direction: Trust Direction | ||
friendly-name: Friendly Name | ||
remote-dns-ips: Remote Dns ips | ||
trust-password: Trust Password | ||
Multiple actions can be specified by using more than one --settings argument. | ||
examples: | ||
- name: Update Domain Service | ||
text: |- | ||
az ad ds update --ntlm-v1 "Enabled" --sync-ntlm-pwd "Enabled" --tls-v1 "Disabled" --filtered-sync \ | ||
"Enabled" --external-access "Enabled" --ldaps "Enabled" --pfx-cert "MIIDPDCCAiSgAwIBAgIQQUI9P6tq2p9OFIJa7DLNvTANBgkqhki\ | ||
G9w0BAQsFADAgMR4w..." --pfx-cert-pwd "<pfxCertificatePassword>" --notify-others "jicha@microsoft.com" \ | ||
"caalmont@microsoft.com" --notify-dc-admins "Enabled" --notify-global-admins "Enabled" --replica-sets location="West \ | ||
US" subnet-id="/subscriptions/1639790a-76a2-4ac4-98d9-8562f5dfcb4d/resourceGroups/TestNetworkResourceGroup/providers/Mi\ | ||
crosoft.Network/virtualNetworks/TestVnetWUS/subnets/TestSubnetWUS" --replica-sets location="East US" \ | ||
subnet-id="/subscriptions/1639790a-76a2-4ac4-98d9-8562f5dfcb4d/resourceGroups/TestNetworkResourceGroup/providers/Micros\ | ||
oft.Network/virtualNetworks/TestVnetEUS/subnets/TestSubnetEUS" --name "TestDomainService.com" --resource-group \ | ||
"TestResourceGroup" | ||
""" | ||
|
||
helps['ad ds delete'] = """ | ||
type: command | ||
short-summary: "The Delete Domain Service operation deletes an existing Domain Service." | ||
examples: | ||
- name: Delete Domain Service | ||
text: |- | ||
az ad ds delete --name "TestDomainService.com" --resource-group "TestResourceGroup" | ||
""" | ||
|
||
helps['ad ds wait'] = """ | ||
type: command | ||
short-summary: Place the CLI in a waiting state until a condition of the ad ds is met. | ||
examples: | ||
- name: Pause executing next line of CLI script until the ad ds is successfully created. | ||
text: |- | ||
az ad ds wait --name "TestDomainService.com" --resource-group "TestResourceGroup" --created | ||
- name: Pause executing next line of CLI script until the ad ds is successfully updated. | ||
text: |- | ||
az ad ds wait --name "TestDomainService.com" --resource-group "TestResourceGroup" --updated | ||
- name: Pause executing next line of CLI script until the ad ds is successfully deleted. | ||
text: |- | ||
az ad ds wait --name "TestDomainService.com" --resource-group "TestResourceGroup" --deleted | ||
""" |
Oops, something went wrong.