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 imagebuilder/resource-manager] [Hub Generated] Review request for Microsoft.VirtualMachineImages to add version 2019-02-01-preview #4449

Merged
Merged
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
1 change: 1 addition & 0 deletions azure-mgmt-imagebuilder/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
recursive-include tests *.py *.yaml
include *.rst
include azure/__init__.py
include azure/mgmt/__init__.py
Expand Down
3 changes: 3 additions & 0 deletions azure-mgmt-imagebuilder/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ Provide Feedback
If you encounter any bugs or have suggestions, please file an issue in the
`Issues <https://github.com/Azure/azure-sdk-for-python/issues>`__
section of the project.


.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-imagebuilder%2FREADME.png
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
from .operations.virtual_machine_image_template_operations import VirtualMachineImageTemplateOperations
from .operations.virtual_machine_image_templates_operations import VirtualMachineImageTemplatesOperations
from .operations.operations import Operations
from . import models

Expand All @@ -27,7 +27,7 @@ class ImageBuilderClientConfiguration(AzureConfiguration):
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: Subscription credentials which uniquely identify
Microsoft Azure subscription. The subscription ID forms part of the URI
Microsoft Azure subscription. The subscription Id forms part of the URI
for every service call.
:type subscription_id: str
:param str base_url: Service URL
Expand Down Expand Up @@ -58,16 +58,16 @@ class ImageBuilderClient(SDKClient):
:ivar config: Configuration for client.
:vartype config: ImageBuilderClientConfiguration

:ivar virtual_machine_image_template: VirtualMachineImageTemplate operations
:vartype virtual_machine_image_template: azure.mgmt.imagebuilder.operations.VirtualMachineImageTemplateOperations
:ivar virtual_machine_image_templates: VirtualMachineImageTemplates operations
:vartype virtual_machine_image_templates: azure.mgmt.imagebuilder.operations.VirtualMachineImageTemplatesOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.imagebuilder.operations.Operations

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: Subscription credentials which uniquely identify
Microsoft Azure subscription. The subscription ID forms part of the URI
Microsoft Azure subscription. The subscription Id forms part of the URI
for every service call.
:type subscription_id: str
:param str base_url: Service URL
Expand All @@ -80,11 +80,11 @@ def __init__(
super(ImageBuilderClient, self).__init__(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '2018-02-01-preview'
self.api_version = '2019-02-01-preview'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.virtual_machine_image_template = VirtualMachineImageTemplateOperations(
self.virtual_machine_image_templates = VirtualMachineImageTemplatesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
12 changes: 12 additions & 0 deletions azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,13 @@
from .image_template_py3 import ImageTemplate
from .image_template_iso_source_py3 import ImageTemplateIsoSource
from .image_template_platform_image_source_py3 import ImageTemplatePlatformImageSource
from .image_template_managed_image_source_py3 import ImageTemplateManagedImageSource
from .image_template_shell_customizer_py3 import ImageTemplateShellCustomizer
from .image_template_restart_customizer_py3 import ImageTemplateRestartCustomizer
from .image_template_power_shell_customizer_py3 import ImageTemplatePowerShellCustomizer
from .image_template_managed_image_distributor_py3 import ImageTemplateManagedImageDistributor
from .image_template_shared_image_distributor_py3 import ImageTemplateSharedImageDistributor
from .image_template_vhd_distributor_py3 import ImageTemplateVhdDistributor
from .image_template_update_parameters_py3 import ImageTemplateUpdateParameters
from .run_output_py3 import RunOutput
from .resource_py3 import Resource
Expand All @@ -39,9 +43,13 @@
from .image_template import ImageTemplate
from .image_template_iso_source import ImageTemplateIsoSource
from .image_template_platform_image_source import ImageTemplatePlatformImageSource
from .image_template_managed_image_source import ImageTemplateManagedImageSource
from .image_template_shell_customizer import ImageTemplateShellCustomizer
from .image_template_restart_customizer import ImageTemplateRestartCustomizer
from .image_template_power_shell_customizer import ImageTemplatePowerShellCustomizer
from .image_template_managed_image_distributor import ImageTemplateManagedImageDistributor
from .image_template_shared_image_distributor import ImageTemplateSharedImageDistributor
from .image_template_vhd_distributor import ImageTemplateVhdDistributor
from .image_template_update_parameters import ImageTemplateUpdateParameters
from .run_output import RunOutput
from .resource import Resource
Expand All @@ -64,9 +72,13 @@
'ImageTemplate',
'ImageTemplateIsoSource',
'ImageTemplatePlatformImageSource',
'ImageTemplateManagedImageSource',
'ImageTemplateShellCustomizer',
'ImageTemplateRestartCustomizer',
'ImageTemplatePowerShellCustomizer',
'ImageTemplateManagedImageDistributor',
'ImageTemplateSharedImageDistributor',
'ImageTemplateVhdDistributor',
'ImageTemplateUpdateParameters',
'RunOutput',
'Resource',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ class ApiError(Model):

:param details: The Api error details
:type details: list[~azure.mgmt.imagebuilder.models.ApiErrorBase]
:param innererror: The Api inner error
:type innererror: ~azure.mgmt.imagebuilder.models.InnerError
:param inner_error: The Api inner error
:type inner_error: ~azure.mgmt.imagebuilder.models.InnerError
:param code: The error code.
:type code: str
:param target: The target of the particular error.
Expand All @@ -30,7 +30,7 @@ class ApiError(Model):

_attribute_map = {
'details': {'key': 'details', 'type': '[ApiErrorBase]'},
'innererror': {'key': 'innererror', 'type': 'InnerError'},
'inner_error': {'key': 'innerError', 'type': 'InnerError'},
'code': {'key': 'code', 'type': 'str'},
'target': {'key': 'target', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
Expand All @@ -39,7 +39,7 @@ class ApiError(Model):
def __init__(self, **kwargs):
super(ApiError, self).__init__(**kwargs)
self.details = kwargs.get('details', None)
self.innererror = kwargs.get('innererror', None)
self.inner_error = kwargs.get('inner_error', None)
self.code = kwargs.get('code', None)
self.target = kwargs.get('target', None)
self.message = kwargs.get('message', None)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ class ApiError(Model):

:param details: The Api error details
:type details: list[~azure.mgmt.imagebuilder.models.ApiErrorBase]
:param innererror: The Api inner error
:type innererror: ~azure.mgmt.imagebuilder.models.InnerError
:param inner_error: The Api inner error
:type inner_error: ~azure.mgmt.imagebuilder.models.InnerError
:param code: The error code.
:type code: str
:param target: The target of the particular error.
Expand All @@ -30,16 +30,16 @@ class ApiError(Model):

_attribute_map = {
'details': {'key': 'details', 'type': '[ApiErrorBase]'},
'innererror': {'key': 'innererror', 'type': 'InnerError'},
'inner_error': {'key': 'innerError', 'type': 'InnerError'},
'code': {'key': 'code', 'type': 'str'},
'target': {'key': 'target', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
}

def __init__(self, *, details=None, innererror=None, code: str=None, target: str=None, message: str=None, **kwargs) -> None:
def __init__(self, *, details=None, inner_error=None, code: str=None, target: str=None, message: str=None, **kwargs) -> None:
super(ApiError, self).__init__(**kwargs)
self.details = details
self.innererror = innererror
self.inner_error = inner_error
self.code = code
self.target = target
self.message = message
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ class ImageTemplateCustomizer(Model):
"""ImageTemplateCustomizer.

You probably want to use the sub-classes and not this class directly. Known
sub-classes are: ImageTemplateShellCustomizer
sub-classes are: ImageTemplateShellCustomizer,
ImageTemplateRestartCustomizer, ImageTemplatePowerShellCustomizer

All required parameters must be populated in order to send to Azure.

Expand All @@ -37,7 +38,7 @@ class ImageTemplateCustomizer(Model):
}

_subtype_map = {
'type': {'shell': 'ImageTemplateShellCustomizer'}
'type': {'Shell': 'ImageTemplateShellCustomizer', 'WindowsRestart': 'ImageTemplateRestartCustomizer', 'PowerShell': 'ImageTemplatePowerShellCustomizer'}
}

def __init__(self, **kwargs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ class ImageTemplateCustomizer(Model):
"""ImageTemplateCustomizer.

You probably want to use the sub-classes and not this class directly. Known
sub-classes are: ImageTemplateShellCustomizer
sub-classes are: ImageTemplateShellCustomizer,
ImageTemplateRestartCustomizer, ImageTemplatePowerShellCustomizer

All required parameters must be populated in order to send to Azure.

Expand All @@ -37,7 +38,7 @@ class ImageTemplateCustomizer(Model):
}

_subtype_map = {
'type': {'shell': 'ImageTemplateShellCustomizer'}
'type': {'Shell': 'ImageTemplateShellCustomizer', 'WindowsRestart': 'ImageTemplateRestartCustomizer', 'PowerShell': 'ImageTemplatePowerShellCustomizer'}
}

def __init__(self, *, name: str=None, **kwargs) -> None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ImageTemplateDistributor(Model):

You probably want to use the sub-classes and not this class directly. Known
sub-classes are: ImageTemplateManagedImageDistributor,
ImageTemplateSharedImageDistributor
ImageTemplateSharedImageDistributor, ImageTemplateVhdDistributor

All required parameters must be populated in order to send to Azure.

Expand All @@ -43,7 +43,7 @@ class ImageTemplateDistributor(Model):
}

_subtype_map = {
'type': {'managedImage': 'ImageTemplateManagedImageDistributor', 'sharedImage': 'ImageTemplateSharedImageDistributor'}
'type': {'ManagedImage': 'ImageTemplateManagedImageDistributor', 'SharedImage': 'ImageTemplateSharedImageDistributor', 'VHD': 'ImageTemplateVhdDistributor'}
}

def __init__(self, **kwargs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ImageTemplateDistributor(Model):

You probably want to use the sub-classes and not this class directly. Known
sub-classes are: ImageTemplateManagedImageDistributor,
ImageTemplateSharedImageDistributor
ImageTemplateSharedImageDistributor, ImageTemplateVhdDistributor

All required parameters must be populated in order to send to Azure.

Expand All @@ -43,7 +43,7 @@ class ImageTemplateDistributor(Model):
}

_subtype_map = {
'type': {'managedImage': 'ImageTemplateManagedImageDistributor', 'sharedImage': 'ImageTemplateSharedImageDistributor'}
'type': {'ManagedImage': 'ImageTemplateManagedImageDistributor', 'SharedImage': 'ImageTemplateSharedImageDistributor', 'VHD': 'ImageTemplateVhdDistributor'}
}

def __init__(self, *, run_output_name: str, artifact_tags=None, **kwargs) -> None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ class ImageTemplateIsoSource(ImageTemplateSource):

:param type: Required. Constant filled by server.
:type type: str
:param source_uri: Required. URL to get the ISO image. This URL has to be
accessible to the resource provider at the time of the imageTemplate
:param source_uri: Required. URI to get the ISO image. This URI has to be
accessible to the resource provider at the time of the image template
creation.
:type source_uri: str
:param sha256_checksum: Required. SHA256 Checksum of the ISO image.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ class ImageTemplateIsoSource(ImageTemplateSource):

:param type: Required. Constant filled by server.
:type type: str
:param source_uri: Required. URL to get the ISO image. This URL has to be
accessible to the resource provider at the time of the imageTemplate
:param source_uri: Required. URI to get the ISO image. This URI has to be
accessible to the resource provider at the time of the image template
creation.
:type source_uri: str
:param sha256_checksum: Required. SHA256 Checksum of the ISO image.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ class ImageTemplateLastRunStatus(Model):
:type start_time: datetime
:param end_time: End time of the last run (UTC)
:type end_time: datetime
:param run_state: State of the last run. Possible values include: 'ready',
'running', 'succeeded', 'partiallySucceeded', 'failed'
:param run_state: State of the last run. Possible values include:
'Running', 'Succeeded', 'PartiallySucceeded', 'Failed'
:type run_state: str or ~azure.mgmt.imagebuilder.models.enum
:param run_sub_state: Sub state of the last run. Possible values include:
'queued', 'building', 'customizing', 'distributing'
:param run_sub_state: Sub-state of the last run. Possible values include:
'Queued', 'Building', 'Customizing', 'Distributing'
:type run_sub_state: str or ~azure.mgmt.imagebuilder.models.enum
:param message: Verbose information about the last run state
:type message: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ class ImageTemplateLastRunStatus(Model):
:type start_time: datetime
:param end_time: End time of the last run (UTC)
:type end_time: datetime
:param run_state: State of the last run. Possible values include: 'ready',
'running', 'succeeded', 'partiallySucceeded', 'failed'
:param run_state: State of the last run. Possible values include:
'Running', 'Succeeded', 'PartiallySucceeded', 'Failed'
:type run_state: str or ~azure.mgmt.imagebuilder.models.enum
:param run_sub_state: Sub state of the last run. Possible values include:
'queued', 'building', 'customizing', 'distributing'
:param run_sub_state: Sub-state of the last run. Possible values include:
'Queued', 'Building', 'Customizing', 'Distributing'
:type run_sub_state: str or ~azure.mgmt.imagebuilder.models.enum
:param message: Verbose information about the last run state
:type message: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ def __init__(self, **kwargs):
super(ImageTemplateManagedImageDistributor, self).__init__(**kwargs)
self.image_id = kwargs.get('image_id', None)
self.location = kwargs.get('location', None)
self.type = 'managedImage'
self.type = 'ManagedImage'
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ def __init__(self, *, run_output_name: str, image_id: str, location: str, artifa
super(ImageTemplateManagedImageDistributor, self).__init__(run_output_name=run_output_name, artifact_tags=artifact_tags, **kwargs)
self.image_id = image_id
self.location = location
self.type = 'managedImage'
self.type = 'ManagedImage'
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# coding=utf-8
# --------------------------------------------------------------------------
# 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 .image_template_source import ImageTemplateSource


class ImageTemplateManagedImageSource(ImageTemplateSource):
"""Describes an image source that is a managed image in customer subscription.

All required parameters must be populated in order to send to Azure.

:param type: Required. Constant filled by server.
:type type: str
:param image_id: Required. ARM resource id of the managed image in
customer subscription
:type image_id: str
"""

_validation = {
'type': {'required': True},
'image_id': {'required': True},
}

_attribute_map = {
'type': {'key': 'type', 'type': 'str'},
'image_id': {'key': 'imageId', 'type': 'str'},
}

def __init__(self, **kwargs):
super(ImageTemplateManagedImageSource, self).__init__(**kwargs)
self.image_id = kwargs.get('image_id', None)
self.type = 'ManagedImage'
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# coding=utf-8
# --------------------------------------------------------------------------
# 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 .image_template_source_py3 import ImageTemplateSource


class ImageTemplateManagedImageSource(ImageTemplateSource):
"""Describes an image source that is a managed image in customer subscription.

All required parameters must be populated in order to send to Azure.

:param type: Required. Constant filled by server.
:type type: str
:param image_id: Required. ARM resource id of the managed image in
customer subscription
:type image_id: str
"""

_validation = {
'type': {'required': True},
'image_id': {'required': True},
}

_attribute_map = {
'type': {'key': 'type', 'type': 'str'},
'image_id': {'key': 'imageId', 'type': 'str'},
}

def __init__(self, *, image_id: str, **kwargs) -> None:
super(ImageTemplateManagedImageSource, self).__init__(**kwargs)
self.image_id = image_id
self.type = 'ManagedImage'
Loading