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

[Connectedmachine] Added a property in az connectedmachine extension create/update #4013

Merged
merged 15 commits into from
Oct 28, 2021
Merged
6 changes: 5 additions & 1 deletion src/connectedmachine/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
Release History
===============

0.4.1
+++++
* Added enable-auto-upgrade param

0.4.0
+++++
* Add private link scope and private endpoint connection commands
* Added private link scope and private endpoint connection commands
dorothyhu marked this conversation as resolved.
Show resolved Hide resolved

0.3.0
+++++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ def load_arguments(self, _):
c.argument('type_', options_list=['--type'], type=str, help='Specifies the type of the extension; an example '
'is "CustomScriptExtension".')
c.argument('type_handler_version', type=str, help='Specifies the version of the script handler.')
c.argument('enable_automatic_upgrade', arg_type=get_three_state_flag(), help='Indicates whether the extension '
'should be automatically upgraded by the platform if there is a newer version available.')
dorothyhu marked this conversation as resolved.
Show resolved Hide resolved
c.argument('auto_upgrade_minor', arg_type=get_three_state_flag(), help='Indicate whether the extension should '
'use a newer minor version if one is available at deployment time. Once deployed, however, the '
'extension will not upgrade minor versions unless redeployed, even with this property set to true.')
Expand All @@ -92,6 +94,8 @@ def load_arguments(self, _):
c.argument('type_', options_list=['--type'], type=str, help='Specifies the type of the extension; an example '
'is "CustomScriptExtension".')
c.argument('type_handler_version', type=str, help='Specifies the version of the script handler.')
c.argument('enable_automatic_upgrade', arg_type=get_three_state_flag(), help='Indicates whether the extension '
'should be automatically upgraded by the platform if there is a newer version available.')
dorothyhu marked this conversation as resolved.
Show resolved Hide resolved
c.argument('auto_upgrade_minor', arg_type=get_three_state_flag(), help='Indicate whether the extension should '
'use a newer minor version if one is available at deployment time. Once deployed, however, the '
'extension will not upgrade minor versions unless redeployed, even with this property set to true.')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ def connectedmachine_extension_create(client,
publisher=None,
type_=None,
type_handler_version=None,
enable_automatic_upgrade=None,
auto_upgrade_minor=None,
settings=None,
protected_settings=None,
Expand All @@ -79,6 +80,7 @@ def connectedmachine_extension_create(client,
extension_parameters['properties']['publisher'] = publisher
extension_parameters['properties']['type'] = type_
extension_parameters['properties']['type_handler_version'] = type_handler_version
extension_parameters['properties']['enable_automatic_upgrade'] = enable_automatic_upgrade
extension_parameters['properties']['auto_upgrade_minor_version'] = auto_upgrade_minor
extension_parameters['properties']['settings'] = settings
extension_parameters['properties']['protected_settings'] = protected_settings
Expand All @@ -104,6 +106,7 @@ def connectedmachine_extension_update(client,
publisher=None,
type_=None,
type_handler_version=None,
enable_automatic_upgrade=None,
auto_upgrade_minor=None,
settings=None,
protected_settings=None,
Expand All @@ -115,6 +118,7 @@ def connectedmachine_extension_update(client,
extension_parameters['properties']['publisher'] = publisher
extension_parameters['properties']['type'] = type_
extension_parameters['properties']['type_handler_version'] = type_handler_version
extension_parameters['properties']['enable_automatic_upgrade'] = enable_automatic_upgrade
extension_parameters['properties']['auto_upgrade_minor_version'] = auto_upgrade_minor
extension_parameters['properties']['settings'] = settings
extension_parameters['properties']['protected_settings'] = protected_settings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,9 @@ class MachineExtensionProperties(msrest.serialization.Model):
:type type: str
:param type_handler_version: Specifies the version of the script handler.
:type type_handler_version: str
:param enable_automatic_upgrade: Indicates whether the extension should be automatically
upgraded by the platform if there is a newer version available.
:type enable_automatic_upgrade: bool
:param auto_upgrade_minor_version: Indicates whether the extension should use a newer minor
version if one is available at deployment time. Once deployed, however, the extension will not
upgrade minor versions unless redeployed, even with this property set to true.
Expand All @@ -699,6 +702,7 @@ class MachineExtensionProperties(msrest.serialization.Model):
'publisher': {'key': 'publisher', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'},
'enable_automatic_upgrade': {'key': 'enableAutomaticUpgrade', 'type': 'bool'},
'auto_upgrade_minor_version': {'key': 'autoUpgradeMinorVersion', 'type': 'bool'},
'settings': {'key': 'settings', 'type': 'object'},
'protected_settings': {'key': 'protectedSettings', 'type': 'object'},
Expand All @@ -715,6 +719,7 @@ def __init__(
self.publisher = kwargs.get('publisher', None)
self.type = kwargs.get('type', None)
self.type_handler_version = kwargs.get('type_handler_version', None)
self.enable_automatic_upgrade = kwargs.get('enable_automatic_upgrade', None)
self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None)
self.settings = kwargs.get('settings', None)
self.protected_settings = kwargs.get('protected_settings', None)
Expand Down Expand Up @@ -799,6 +804,9 @@ class MachineExtensionUpdateProperties(msrest.serialization.Model):
:type type: str
:param type_handler_version: Specifies the version of the script handler.
:type type_handler_version: str
:param enable_automatic_upgrade: Indicates whether the extension should be automatically
upgraded by the platform if there is a newer version available.
:type enable_automatic_upgrade: bool
:param auto_upgrade_minor_version: Indicates whether the extension should use a newer minor
version if one is available at deployment time. Once deployed, however, the extension will not
upgrade minor versions unless redeployed, even with this property set to true.
Expand All @@ -815,6 +823,7 @@ class MachineExtensionUpdateProperties(msrest.serialization.Model):
'publisher': {'key': 'publisher', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'},
'enable_automatic_upgrade': {'key': 'enableAutomaticUpgrade', 'type': 'bool'},
'auto_upgrade_minor_version': {'key': 'autoUpgradeMinorVersion', 'type': 'bool'},
'settings': {'key': 'settings', 'type': 'object'},
'protected_settings': {'key': 'protectedSettings', 'type': 'object'},
Expand All @@ -829,6 +838,7 @@ def __init__(
self.publisher = kwargs.get('publisher', None)
self.type = kwargs.get('type', None)
self.type_handler_version = kwargs.get('type_handler_version', None)
self.enable_automatic_upgrade = kwargs.get('enable_automatic_upgrade', None)
self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None)
self.settings = kwargs.get('settings', None)
self.protected_settings = kwargs.get('protected_settings', None)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -724,6 +724,9 @@ class MachineExtensionProperties(msrest.serialization.Model):
:type type: str
:param type_handler_version: Specifies the version of the script handler.
:type type_handler_version: str
:param enable_automatic_upgrade: Indicates whether the extension should be automatically
upgraded by the platform if there is a newer version available.
:type enable_automatic_upgrade: bool
:param auto_upgrade_minor_version: Indicates whether the extension should use a newer minor
version if one is available at deployment time. Once deployed, however, the extension will not
upgrade minor versions unless redeployed, even with this property set to true.
Expand All @@ -748,6 +751,7 @@ class MachineExtensionProperties(msrest.serialization.Model):
'publisher': {'key': 'publisher', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'},
'enable_automatic_upgrade': {'key': 'enableAutomaticUpgrade', 'type': 'bool'},
'auto_upgrade_minor_version': {'key': 'autoUpgradeMinorVersion', 'type': 'bool'},
'settings': {'key': 'settings', 'type': 'object'},
'protected_settings': {'key': 'protectedSettings', 'type': 'object'},
Expand All @@ -762,6 +766,7 @@ def __init__(
publisher: Optional[str] = None,
type: Optional[str] = None,
type_handler_version: Optional[str] = None,
enable_automatic_upgrade: Optional[bool] = None,
auto_upgrade_minor_version: Optional[bool] = None,
settings: Optional[object] = None,
protected_settings: Optional[object] = None,
Expand All @@ -773,6 +778,7 @@ def __init__(
self.publisher = publisher
self.type = type
self.type_handler_version = type_handler_version
self.enable_automatic_upgrade = enable_automatic_upgrade
self.auto_upgrade_minor_version = auto_upgrade_minor_version
self.settings = settings
self.protected_settings = protected_settings
Expand Down Expand Up @@ -865,6 +871,9 @@ class MachineExtensionUpdateProperties(msrest.serialization.Model):
:type type: str
:param type_handler_version: Specifies the version of the script handler.
:type type_handler_version: str
:param enable_automatic_upgrade: Indicates whether the extension should be automatically
upgraded by the platform if there is a newer version available.
:type enable_automatic_upgrade: bool
:param auto_upgrade_minor_version: Indicates whether the extension should use a newer minor
version if one is available at deployment time. Once deployed, however, the extension will not
upgrade minor versions unless redeployed, even with this property set to true.
Expand All @@ -881,6 +890,7 @@ class MachineExtensionUpdateProperties(msrest.serialization.Model):
'publisher': {'key': 'publisher', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'},
'enable_automatic_upgrade': {'key': 'enableAutomaticUpgrade', 'type': 'bool'},
'auto_upgrade_minor_version': {'key': 'autoUpgradeMinorVersion', 'type': 'bool'},
'settings': {'key': 'settings', 'type': 'object'},
'protected_settings': {'key': 'protectedSettings', 'type': 'object'},
Expand All @@ -893,6 +903,7 @@ def __init__(
publisher: Optional[str] = None,
type: Optional[str] = None,
type_handler_version: Optional[str] = None,
enable_automatic_upgrade: Optional[bool] = None,
auto_upgrade_minor_version: Optional[bool] = None,
settings: Optional[object] = None,
protected_settings: Optional[object] = None,
Expand All @@ -903,6 +914,7 @@ def __init__(
self.publisher = publisher
self.type = type
self.type_handler_version = type_handler_version
self.enable_automatic_upgrade = enable_automatic_upgrade
self.auto_upgrade_minor_version = auto_upgrade_minor_version
self.settings = settings
self.protected_settings = protected_settings
Expand Down
1 change: 1 addition & 0 deletions src/connectedmachine/report.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ $_.CPU -lt 100 }\\\\\\"\\"}" --type-handler-version "1.10" --machine-name "myMac
|**--publisher**|string|The name of the extension handler publisher.|publisher|publisher|
|**--type**|string|Specifies the type of the extension; an example is "CustomScriptExtension".|type|type|
|**--type-handler-version**|string|Specifies the version of the script handler.|type_handler_version|typeHandlerVersion|
|**--enable-automatic-upgrade**|boolean|Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available.|enable_automatic_upgrade|enableAutomaticUpgrade|
|**--auto-upgrade-minor**|boolean|Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.|auto_upgrade_minor|autoUpgradeMinorVersion|
|**--settings**|any|Json formatted public settings for the extension.|settings|settings|
|**--protected-settings**|any|The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.|protected_settings|protectedSettings|
Expand Down