Skip to content

Commit 8ce08ed

Browse files
authored
Generated from 344f1d705ebc1f9424a78a3d78411437322b72bf (#4733)
Fix bug: "artifactLocation" -> "artifactUri"
1 parent d22ed6b commit 8ce08ed

File tree

6 files changed

+41
-17
lines changed

6 files changed

+41
-17
lines changed

azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_power_shell_customizer.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414

1515
class ImageTemplatePowerShellCustomizer(ImageTemplateCustomizer):
1616
"""Runs the specified PowerShell on the VM (Windows). Corresponds to Packer
17-
powershell provisioner.
17+
powershell provisioner. Exactly one of 'script' or 'inline' can be
18+
specified.
1819
1920
All required parameters must be populated in order to send to Azure.
2021
@@ -26,7 +27,10 @@ class ImageTemplatePowerShellCustomizer(ImageTemplateCustomizer):
2627
:param script: The PowerShell script to be run for customizing. It can be
2728
a github link, SAS URI for Azure Storage, etc
2829
:type script: str
29-
:param valid_exit_codes:
30+
:param inline: Array of PowerShell commands to execute
31+
:type inline: list[str]
32+
:param valid_exit_codes: Valid exit codes for the PowerShell script.
33+
[Default: 0]
3034
:type valid_exit_codes: list[int]
3135
"""
3236

@@ -38,11 +42,13 @@ class ImageTemplatePowerShellCustomizer(ImageTemplateCustomizer):
3842
'name': {'key': 'name', 'type': 'str'},
3943
'type': {'key': 'type', 'type': 'str'},
4044
'script': {'key': 'script', 'type': 'str'},
45+
'inline': {'key': 'inline', 'type': '[str]'},
4146
'valid_exit_codes': {'key': 'validExitCodes', 'type': '[int]'},
4247
}
4348

4449
def __init__(self, **kwargs):
4550
super(ImageTemplatePowerShellCustomizer, self).__init__(**kwargs)
4651
self.script = kwargs.get('script', None)
52+
self.inline = kwargs.get('inline', None)
4753
self.valid_exit_codes = kwargs.get('valid_exit_codes', None)
4854
self.type = 'PowerShell'

azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_power_shell_customizer_py3.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414

1515
class ImageTemplatePowerShellCustomizer(ImageTemplateCustomizer):
1616
"""Runs the specified PowerShell on the VM (Windows). Corresponds to Packer
17-
powershell provisioner.
17+
powershell provisioner. Exactly one of 'script' or 'inline' can be
18+
specified.
1819
1920
All required parameters must be populated in order to send to Azure.
2021
@@ -26,7 +27,10 @@ class ImageTemplatePowerShellCustomizer(ImageTemplateCustomizer):
2627
:param script: The PowerShell script to be run for customizing. It can be
2728
a github link, SAS URI for Azure Storage, etc
2829
:type script: str
29-
:param valid_exit_codes:
30+
:param inline: Array of PowerShell commands to execute
31+
:type inline: list[str]
32+
:param valid_exit_codes: Valid exit codes for the PowerShell script.
33+
[Default: 0]
3034
:type valid_exit_codes: list[int]
3135
"""
3236

@@ -38,11 +42,13 @@ class ImageTemplatePowerShellCustomizer(ImageTemplateCustomizer):
3842
'name': {'key': 'name', 'type': 'str'},
3943
'type': {'key': 'type', 'type': 'str'},
4044
'script': {'key': 'script', 'type': 'str'},
45+
'inline': {'key': 'inline', 'type': '[str]'},
4146
'valid_exit_codes': {'key': 'validExitCodes', 'type': '[int]'},
4247
}
4348

44-
def __init__(self, *, name: str=None, script: str=None, valid_exit_codes=None, **kwargs) -> None:
49+
def __init__(self, *, name: str=None, script: str=None, inline=None, valid_exit_codes=None, **kwargs) -> None:
4550
super(ImageTemplatePowerShellCustomizer, self).__init__(name=name, **kwargs)
4651
self.script = script
52+
self.inline = inline
4753
self.valid_exit_codes = valid_exit_codes
4854
self.type = 'PowerShell'

azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_shell_customizer.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313

1414

1515
class ImageTemplateShellCustomizer(ImageTemplateCustomizer):
16-
"""Runs a shell script during the customization phase (Linux).
16+
"""Runs a shell script during the customization phase (Linux). Corresponds to
17+
Packer shell provisioner. Exactly one of 'script' or 'inline' can be
18+
specified.
1719
1820
All required parameters must be populated in order to send to Azure.
1921
@@ -25,6 +27,8 @@ class ImageTemplateShellCustomizer(ImageTemplateCustomizer):
2527
:param script: The shell script to be run for customizing. It can be a
2628
github link, SAS URI for Azure Storage, etc
2729
:type script: str
30+
:param inline: Array of shell commands to execute
31+
:type inline: list[str]
2832
"""
2933

3034
_validation = {
@@ -35,9 +39,11 @@ class ImageTemplateShellCustomizer(ImageTemplateCustomizer):
3539
'name': {'key': 'name', 'type': 'str'},
3640
'type': {'key': 'type', 'type': 'str'},
3741
'script': {'key': 'script', 'type': 'str'},
42+
'inline': {'key': 'inline', 'type': '[str]'},
3843
}
3944

4045
def __init__(self, **kwargs):
4146
super(ImageTemplateShellCustomizer, self).__init__(**kwargs)
4247
self.script = kwargs.get('script', None)
48+
self.inline = kwargs.get('inline', None)
4349
self.type = 'Shell'

azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/image_template_shell_customizer_py3.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313

1414

1515
class ImageTemplateShellCustomizer(ImageTemplateCustomizer):
16-
"""Runs a shell script during the customization phase (Linux).
16+
"""Runs a shell script during the customization phase (Linux). Corresponds to
17+
Packer shell provisioner. Exactly one of 'script' or 'inline' can be
18+
specified.
1719
1820
All required parameters must be populated in order to send to Azure.
1921
@@ -25,6 +27,8 @@ class ImageTemplateShellCustomizer(ImageTemplateCustomizer):
2527
:param script: The shell script to be run for customizing. It can be a
2628
github link, SAS URI for Azure Storage, etc
2729
:type script: str
30+
:param inline: Array of shell commands to execute
31+
:type inline: list[str]
2832
"""
2933

3034
_validation = {
@@ -35,9 +39,11 @@ class ImageTemplateShellCustomizer(ImageTemplateCustomizer):
3539
'name': {'key': 'name', 'type': 'str'},
3640
'type': {'key': 'type', 'type': 'str'},
3741
'script': {'key': 'script', 'type': 'str'},
42+
'inline': {'key': 'inline', 'type': '[str]'},
3843
}
3944

40-
def __init__(self, *, name: str=None, script: str=None, **kwargs) -> None:
45+
def __init__(self, *, name: str=None, script: str=None, inline=None, **kwargs) -> None:
4146
super(ImageTemplateShellCustomizer, self).__init__(name=name, **kwargs)
4247
self.script = script
48+
self.inline = inline
4349
self.type = 'Shell'

azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/run_output.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ class RunOutput(SubResource):
2828
:vartype type: str
2929
:param artifact_id: The resource id of the artifact.
3030
:type artifact_id: str
31-
:param artifact_location: The URL location of the artifact.
32-
:type artifact_location: str
31+
:param artifact_uri: The location URI of the artifact.
32+
:type artifact_uri: str
3333
:ivar provisioning_state: Provisioning state of the resource. Possible
3434
values include: 'Creating', 'Succeeded', 'Failed', 'Deleting'
3535
:vartype provisioning_state: str or ~azure.mgmt.imagebuilder.models.enum
@@ -47,12 +47,12 @@ class RunOutput(SubResource):
4747
'name': {'key': 'name', 'type': 'str'},
4848
'type': {'key': 'type', 'type': 'str'},
4949
'artifact_id': {'key': 'properties.artifactId', 'type': 'str'},
50-
'artifact_location': {'key': 'properties.artifactLocation', 'type': 'str'},
50+
'artifact_uri': {'key': 'properties.artifactUri', 'type': 'str'},
5151
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
5252
}
5353

5454
def __init__(self, **kwargs):
5555
super(RunOutput, self).__init__(**kwargs)
5656
self.artifact_id = kwargs.get('artifact_id', None)
57-
self.artifact_location = kwargs.get('artifact_location', None)
57+
self.artifact_uri = kwargs.get('artifact_uri', None)
5858
self.provisioning_state = None

azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/run_output_py3.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ class RunOutput(SubResource):
2828
:vartype type: str
2929
:param artifact_id: The resource id of the artifact.
3030
:type artifact_id: str
31-
:param artifact_location: The URL location of the artifact.
32-
:type artifact_location: str
31+
:param artifact_uri: The location URI of the artifact.
32+
:type artifact_uri: str
3333
:ivar provisioning_state: Provisioning state of the resource. Possible
3434
values include: 'Creating', 'Succeeded', 'Failed', 'Deleting'
3535
:vartype provisioning_state: str or ~azure.mgmt.imagebuilder.models.enum
@@ -47,12 +47,12 @@ class RunOutput(SubResource):
4747
'name': {'key': 'name', 'type': 'str'},
4848
'type': {'key': 'type', 'type': 'str'},
4949
'artifact_id': {'key': 'properties.artifactId', 'type': 'str'},
50-
'artifact_location': {'key': 'properties.artifactLocation', 'type': 'str'},
50+
'artifact_uri': {'key': 'properties.artifactUri', 'type': 'str'},
5151
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
5252
}
5353

54-
def __init__(self, *, name: str, artifact_id: str=None, artifact_location: str=None, **kwargs) -> None:
54+
def __init__(self, *, name: str, artifact_id: str=None, artifact_uri: str=None, **kwargs) -> None:
5555
super(RunOutput, self).__init__(name=name, **kwargs)
5656
self.artifact_id = artifact_id
57-
self.artifact_location = artifact_location
57+
self.artifact_uri = artifact_uri
5858
self.provisioning_state = None

0 commit comments

Comments
 (0)