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

[AutoPR kusto] Sync from master #62

Open
wants to merge 2 commits into
base: sdkAutomation/kusto
Choose a base branch
from
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
45 changes: 11 additions & 34 deletions src/kusto/azext_kusto/generated/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@
- name: KustoClustersCreateOrUpdate
text: |-
az kusto cluster create --cluster-name "KustoClusterRPTest4" --identity-type "SystemAssigned" --location\
"westus" --enable-purge true --enable-streaming-ingest true --key-vault-properties key-name="" key-vault-uri="" key-ve\
rsion="" --sku name="Standard_L8s" capacity=2 tier="Standard" --resource-group "kustorptest"
"westus" --enable-purge true --enable-streaming-ingest true --key-vault-properties key-name="keyName" key-vault-uri="h\
ttps://dummy.keyvault.com" key-version="keyVersion" --sku name="Standard_L8s" capacity=2 tier="Standard" --resource-gro\
up "kustorptest"
"""

helps['kusto cluster update'] = """
Expand Down Expand Up @@ -186,8 +187,8 @@
- name: KustoClusterPrincipalAssignmentsCreateOrUpdate
text: |-
az kusto cluster-principal-assignment create --cluster-name "kustoclusterrptest4" --principal-id "876543\
21-1234-1234-1234-123456789123" --principal-type "App" --role "AllDatabasesAdmin" --tenant-id "12345678-1234-1234-1234-\
123456789123" --principal-assignment-name "kustoprincipal1" --resource-group "kustorptest"
21-1234-1234-1234-123456789123" --principal-type "App" --role "Admin" --tenant-id "12345678-1234-1234-1234-123456789123\
" --principal-assignment-name "kustoprincipal1" --resource-group "kustorptest"
"""

helps['kusto cluster-principal-assignment update'] = """
Expand All @@ -197,8 +198,8 @@
- name: KustoClusterPrincipalAssignmentsCreateOrUpdate
text: |-
az kusto cluster-principal-assignment update --cluster-name "kustoclusterrptest4" --principal-id "876543\
21-1234-1234-1234-123456789123" --principal-type "App" --role "AllDatabasesAdmin" --tenant-id "12345678-1234-1234-1234-\
123456789123" --principal-assignment-name "kustoprincipal1" --resource-group "kustorptest"
21-1234-1234-1234-123456789123" --principal-type "App" --role "Admin" --tenant-id "12345678-1234-1234-1234-123456789123\
" --principal-assignment-name "kustoprincipal1" --resource-group "kustorptest"
"""

helps['kusto cluster-principal-assignment delete'] = """
Expand Down Expand Up @@ -284,8 +285,8 @@
examples:
- name: KustoDatabaseListPrincipals
text: |-
az kusto database list-principal --cluster-name "KustoClusterRPTest4" --database-name "Kustodatabase8" -\
-resource-group "kustorptest"
az kusto database list-principal --cluster-name "KustoClusterRPTest4" --database-name "databaseName1" --\
resource-group "kustorptest"
"""

helps['kusto database remove-principal'] = """
Expand Down Expand Up @@ -392,7 +393,7 @@
az kusto attached-database-configuration create --attached-database-configuration-name "attachedDatabase\
Configurations1" --cluster-name "KustoClusterRPTest4" --location "westus" --cluster-resource-id "/subscriptions/1234567\
8-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/KustoClusterLeader" --datab\
ase-name "Kustodatabase8" --default-principals-modification-kind "Union" --resource-group "kustorptest"
ase-name "db1" --default-principals-modification-kind "Union" --resource-group "kustorptest"
"""

helps['kusto attached-database-configuration update'] = """
Expand All @@ -404,7 +405,7 @@
az kusto attached-database-configuration update --attached-database-configuration-name "attachedDatabase\
Configurations1" --cluster-name "KustoClusterRPTest4" --location "westus" --cluster-resource-id "/subscriptions/1234567\
8-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/KustoClusterLeader" --datab\
ase-name "Kustodatabase8" --default-principals-modification-kind "Union" --resource-group "kustorptest"
ase-name "db1" --default-principals-modification-kind "Union" --resource-group "kustorptest"
"""

helps['kusto attached-database-configuration delete'] = """
Expand Down Expand Up @@ -532,27 +533,3 @@
type: command
short-summary: Checks that the data connection parameters are valid.
"""

helps['kusto attached-database-configuration wait'] = """
type: command
short-summary: Wait for a managed Kusto cluster to reach a desired state.
long-summary: If an operation on a cluster was interrupted or was started with `--no-wait`, use this command to wait for it to complete.
"""

helps['kusto cluster-principal-assignment wait'] = """
type: command
short-summary: Wait for a managed Kusto cluster to reach a desired state.
long-summary: If an operation on a cluster was interrupted or was started with `--no-wait`, use this command to wait for it to complete.
"""

helps['kusto data-connection wait'] = """
type: command
short-summary: Wait for a managed Kusto cluster to reach a desired state.
long-summary: If an operation on a cluster was interrupted or was started with `--no-wait`, use this command to wait for it to complete.
"""

helps['kusto database-principal-assignment wait'] = """
type: command
short-summary: Wait for a managed Kusto cluster to reach a desired state.
long-summary: If an operation on a cluster was interrupted or was started with `--no-wait`, use this command to wait for it to complete.
"""
18 changes: 14 additions & 4 deletions src/kusto/azext_kusto/generated/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ def load_arguments(self, _):
c.argument('language_extensions_value', action=AddLanguageExtensionsValue, nargs='+', help='The list of languag'
'e extensions. Expect value: language-extension-name=xx.')
c.argument('identity_type', arg_type=get_enum_type(['None', 'SystemAssigned']), help='The identity type.')
c.argument('identity_user_assigned_identities', arg_type=CLIArgumentType(options_list=['--identity-user-assigned-identities'], help='The list of user identities associated with the Kusto cluster. The user identity dictionary key references will be ARM resource ids in the form: \'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}\'. Expected value: json-string/@json-file.'))
c.argument('identity_user_assigned_identities', arg_type=CLIArgumentType(options_list=['--identity-user-assigne'
'd-identities'], help='The list of user identities associated with the Kusto cluster. The user ident'
'ity dictionary key references will be ARM resource ids in the form: \'/subscriptions/{subscriptionI'
'd}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{i'
'dentityName}\'. Expected value: json-string/@json-file.'))

with self.argument_context('kusto cluster update') as c:
c.argument('resource_group_name', resource_group_name_type)
Expand Down Expand Up @@ -101,7 +105,11 @@ def load_arguments(self, _):
c.argument('language_extensions_value', action=AddLanguageExtensionsValue, nargs='+', help='The list of languag'
'e extensions. Expect value: language-extension-name=xx.')
c.argument('identity_type', arg_type=get_enum_type(['None', 'SystemAssigned']), help='The identity type.')
c.argument('identity_user_assigned_identities', arg_type=CLIArgumentType(options_list=['--identity-user-assigned-identities'], help='The list of user identities associated with the Kusto cluster. The user identity dictionary key references will be ARM resource ids in the form: \'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}\'. Expected value: json-string/@json-file.'))
c.argument('identity_user_assigned_identities', arg_type=CLIArgumentType(options_list=['--identity-user-assigne'
'd-identities'], help='The list of user identities associated with the Kusto cluster. The user ident'
'ity dictionary key references will be ARM resource ids in the form: \'/subscriptions/{subscriptionI'
'd}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{i'
'dentityName}\'. Expected value: json-string/@json-file.'))

with self.argument_context('kusto cluster delete') as c:
c.argument('resource_group_name', resource_group_name_type)
Expand Down Expand Up @@ -302,7 +310,8 @@ def load_arguments(self, _):
' follow all current and future databases.')
c.argument('cluster_resource_id', help='The resource id of the cluster where the databases you would like to at'
'tach reside.')
c.argument('default_principals_modification_kind', arg_type=get_enum_type(['Union', 'Replace', 'None']), help='The default principals modification kind')
c.argument('default_principals_modification_kind', arg_type=get_enum_type(['Union', 'Replace', 'None']), help=
'The default principals modification kind')

with self.argument_context('kusto attached-database-configuration update') as c:
c.argument('resource_group_name', resource_group_name_type)
Expand All @@ -314,7 +323,8 @@ def load_arguments(self, _):
' follow all current and future databases.')
c.argument('cluster_resource_id', help='The resource id of the cluster where the databases you would like to at'
'tach reside.')
c.argument('default_principals_modification_kind', arg_type=get_enum_type(['Union', 'Replace', 'None']), help='The default principals modification kind')
c.argument('default_principals_modification_kind', arg_type=get_enum_type(['Union', 'Replace', 'None']), help=
'The default principals modification kind')

with self.argument_context('kusto attached-database-configuration delete') as c:
c.argument('resource_group_name', resource_group_name_type)
Expand Down
9 changes: 9 additions & 0 deletions src/kusto/azext_kusto/generated/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def __call__(self, parser, namespace, values, option_string=None):
action = self.get_action(values, option_string)
namespace.sku = action


def get_action(self, values, option_string): # pylint: disable=no-self-use
try:
properties = defaultdict(list)
Expand All @@ -45,6 +46,7 @@ def __call__(self, parser, namespace, values, option_string=None):
action = self.get_action(values, option_string)
super(AddTrustedExternalTenants, self).__call__(parser, namespace, action, option_string)


def get_action(self, values, option_string): # pylint: disable=no-self-use
try:
properties = defaultdict(list)
Expand All @@ -67,6 +69,7 @@ def __call__(self, parser, namespace, values, option_string=None):
action = self.get_action(values, option_string)
namespace.optimized_autoscale = action


def get_action(self, values, option_string): # pylint: disable=no-self-use
try:
properties = defaultdict(list)
Expand Down Expand Up @@ -95,6 +98,7 @@ def __call__(self, parser, namespace, values, option_string=None):
action = self.get_action(values, option_string)
namespace.virtual_network_configuration = action


def get_action(self, values, option_string): # pylint: disable=no-self-use
try:
properties = defaultdict(list)
Expand All @@ -121,6 +125,7 @@ def __call__(self, parser, namespace, values, option_string=None):
action = self.get_action(values, option_string)
namespace.key_vault_properties = action


def get_action(self, values, option_string): # pylint: disable=no-self-use
try:
properties = defaultdict(list)
Expand All @@ -147,6 +152,7 @@ def __call__(self, parser, namespace, values, option_string=None):
action = self.get_action(values, option_string)
super(AddLanguageExtensionsValue, self).__call__(parser, namespace, action, option_string)


def get_action(self, values, option_string): # pylint: disable=no-self-use
try:
properties = defaultdict(list)
Expand All @@ -169,6 +175,7 @@ def __call__(self, parser, namespace, values, option_string=None):
action = self.get_action(values, option_string)
namespace.read_write_database = action


def get_action(self, values, option_string): # pylint: disable=no-self-use
try:
properties = defaultdict(list)
Expand Down Expand Up @@ -196,6 +203,7 @@ def __call__(self, parser, namespace, values, option_string=None):
action = self.get_action(values, option_string)
namespace.read_only_following_database = action


def get_action(self, values, option_string): # pylint: disable=no-self-use
try:
properties = defaultdict(list)
Expand All @@ -221,6 +229,7 @@ def __call__(self, parser, namespace, values, option_string=None):
action = self.get_action(values, option_string)
super(AddValue, self).__call__(parser, namespace, action, option_string)


def get_action(self, values, option_string): # pylint: disable=no-self-use
try:
properties = defaultdict(list)
Expand Down
Loading