Skip to content
Closed
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: 0 additions & 8 deletions src/connectedmachine/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,6 @@
Release History
===============

0.2.0
+++++
* machineextensions support

0.1.1
+++++
* Remove the limitation of max compatible cli core version

0.1.0
++++++
* Initial release.
16 changes: 8 additions & 8 deletions src/connectedmachine/azext_connectedmachine/generated/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
examples:
- name: Get Machine Extension
text: |-
az connectedmachine machine-extension show --machine-name "myMachine" --name "CustomScriptExtension" \
az connectedmachine machine-extension show --machine-name "myMachine" --n "CustomScriptExtension" \
--resource-group "myResourceGroup"
"""

Expand All @@ -75,7 +75,7 @@
examples:
- name: Create or Update a Machine Extension
text: |-
az connectedmachine machine-extension create --machine-name "myMachine" --name "CustomScriptExtension" \
az connectedmachine machine-extension create --machine-name "myMachine" --n "CustomScriptExtension" \
--location "eastus2euap" --type "CustomScriptExtension" --publisher "Microsoft.Compute" --settings \
"{\\"commandToExecute\\":\\"powershell.exe -c \\\\\\"Get-Process | Where-Object { $_.CPU -gt 10000 }\\\\\\"\\"}" \
--type-handler-version "1.10" --resource-group "myResourceGroup"
Expand All @@ -85,9 +85,9 @@
type: command
short-summary: "The operation to update the extension."
examples:
- name: Update a Machine Extension
- name: Create or Update a Machine Extension
text: |-
az connectedmachine machine-extension update --machine-name "myMachine" --name "CustomScriptExtension" \
az connectedmachine machine-extension update --machine-name "myMachine" --n "CustomScriptExtension" \
--type "CustomScriptExtension" --publisher "Microsoft.Compute" --settings "{\\"commandToExecute\\":\\"powershell.exe \
-c \\\\\\"Get-Process | Where-Object { $_.CPU -lt 100 }\\\\\\"\\"}" --type-handler-version "1.10" --resource-group \
"myResourceGroup"
Expand All @@ -99,7 +99,7 @@
examples:
- name: Delete a Machine Extension
text: |-
az connectedmachine machine-extension delete --machine-name "myMachine" --name "MMA" --resource-group \
az connectedmachine machine-extension delete --machine-name "myMachine" --n "MMA" --resource-group \
"myResourceGroup"
"""

Expand All @@ -111,16 +111,16 @@
- name: Pause executing next line of CLI script until the connectedmachine machine-extension is successfully \
created.
text: |-
az connectedmachine machine-extension wait --machine-name "myMachine" --name "CustomScriptExtension" \
az connectedmachine machine-extension wait --machine-name "myMachine" --n "CustomScriptExtension" \
--resource-group "myResourceGroup" --created
- name: Pause executing next line of CLI script until the connectedmachine machine-extension is successfully \
updated.
text: |-
az connectedmachine machine-extension wait --machine-name "myMachine" --name "CustomScriptExtension" \
az connectedmachine machine-extension wait --machine-name "myMachine" --n "CustomScriptExtension" \
--resource-group "myResourceGroup" --updated
- name: Pause executing next line of CLI script until the connectedmachine machine-extension is successfully \
deleted.
text: |-
az connectedmachine machine-extension wait --machine-name "myMachine" --name "CustomScriptExtension" \
az connectedmachine machine-extension wait --machine-name "myMachine" --n "CustomScriptExtension" \
--resource-group "myResourceGroup" --deleted
"""
15 changes: 10 additions & 5 deletions src/connectedmachine/azext_connectedmachine/generated/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,15 @@ def load_arguments(self, _):
with self.argument_context('connectedmachine machine-extension show') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('machine_name', type=str, help='The name of the machine containing the extension.', id_part='name')
c.argument('name', options_list=['--name', '-n', '--extension-name'], type=str, help='The name of the machine extension.', id_part='child_name_1')
c.argument('name', options_list=['-n', '--extension-name', '--name'], type=str, help='The name of the machine '
'extension.', id_part='child_name_1')

with self.argument_context('connectedmachine machine-extension create') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('machine_name', type=str, help='The name of the machine where the extension should be created or '
'updated.')
c.argument('name', options_list=['--name', '-n', '--extension-name'], type=str, help='The name of the machine extension.')
c.argument('name', options_list=['-n', '--extension-name', '--name'], type=str, help='The name of the machine '
'extension.')
c.argument('tags', tags_type)
c.argument('location', arg_type=get_location_type(self.cli_ctx),
validator=get_default_location_from_resource_group)
Expand All @@ -75,7 +77,8 @@ def load_arguments(self, _):
c.argument('resource_group_name', resource_group_name_type)
c.argument('machine_name', type=str, help='The name of the machine where the extension should be created or '
'updated.', id_part='name')
c.argument('name', options_list=['--name', '-n', '--extension-name'], type=str, help='The name of the machine extension.', id_part='child_name_1')
c.argument('name', options_list=['-n', '--extension-name', '--name'], type=str, help='The name of the machine '
'extension.', id_part='child_name_1')
c.argument('tags', tags_type)
c.argument('force_update_tag', type=str, help='How the extension handler should be forced to update even if '
'the extension configuration has not changed.')
Expand All @@ -97,9 +100,11 @@ def load_arguments(self, _):
c.argument('resource_group_name', resource_group_name_type)
c.argument('machine_name', type=str, help='The name of the machine where the extension should be deleted.',
id_part='name')
c.argument('name', options_list=['--name', '-n', '--extension-name'], type=str, help='The name of the machine extension.', id_part='child_name_1')
c.argument('name', options_list=['-n', '--extension-name', '--name'], type=str, help='The name of the machine '
'extension.', id_part='child_name_1')

with self.argument_context('connectedmachine machine-extension wait') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('machine_name', type=str, help='The name of the machine containing the extension.', id_part='name')
c.argument('name', options_list=['--name', '-n', '--extension-name'], type=str, help='The name of the machine extension.', id_part='child_name_1')
c.argument('name', options_list=['-n', '--extension-name', '--name'], type=str, help='The name of the machine '
'extension.', id_part='child_name_1')
Loading