Skip to content

Commit c98bf08

Browse files
AutorestCIlmazuel
authored andcommitted
[AutoPR] imagebuilder/resource-manager (#4447)
* [AutoPR imagebuilder/resource-manager] Add private preview API for Azure Image Builder (#4349) * Generated from b43e59c3015873f2487d2ee245040a30355f52a1 Adding readme files for SDK generation * Packaging update of azure-mgmt-imagebuilder * Generated from 9b99e5667a5b536dbe594b7e85d9764c851f5741 PR: rename 'tags' -> 'artifactTags' for distributor * Generated from adcccdbb26740afe3cbc5a4612909221bc245fe1 Add examples, fix minor issues in swagger * [AutoPR imagebuilder/resource-manager] [Hub Generated] Review request for Microsoft.VirtualMachineImages to add version 2019-02-01-preview (#4449) * Generated from 796ebc9f7d0be44caec229a6dccaeafaa80d72e6 Add imagebuilder/2019-02-01-preview * Generated from 42363c2f9c61172f0ebac88d32cb992d26dc73be Merge pull request #1 from feiyushi/feshi-imagebuilder-preview2019 operation_id: plural forms * Packaging update of azure-mgmt-imagebuilder * Generated from 3f182fa74711ff8772671a27d256e73ddef90085 Fix typo * Generated from 344f1d705ebc1f9424a78a3d78411437322b72bf (#4733) Fix bug: "artifactLocation" -> "artifactUri" * Update HISTORY.rst * Update sdk_packaging.toml * Packaging update of azure-mgmt-imagebuilder
1 parent 0d2f14f commit c98bf08

File tree

66 files changed

+3568
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+3568
-0
lines changed

azure-mgmt-imagebuilder/HISTORY.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.. :changelog:
2+
3+
Release History
4+
===============
5+
6+
0.1.0 (2019-04-09)
7+
++++++++++++++++++
8+
9+
* Initial Release

azure-mgmt-imagebuilder/MANIFEST.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
recursive-include tests *.py *.yaml
2+
include *.rst
3+
include azure/__init__.py
4+
include azure/mgmt/__init__.py
5+

azure-mgmt-imagebuilder/README.rst

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
Microsoft Azure SDK for Python
2+
==============================
3+
4+
This is the Microsoft Azure Image Builder Client Library.
5+
6+
Azure Resource Manager (ARM) is the next generation of management APIs that
7+
replace the old Azure Service Management (ASM).
8+
9+
This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7.
10+
11+
For the older Azure Service Management (ASM) libraries, see
12+
`azure-servicemanagement-legacy <https://pypi.python.org/pypi/azure-servicemanagement-legacy>`__ library.
13+
14+
For a more complete set of Azure libraries, see the `azure <https://pypi.python.org/pypi/azure>`__ bundle package.
15+
16+
17+
Usage
18+
=====
19+
20+
For code examples, see `Image Builder
21+
<https://docs.microsoft.com/python/api/overview/azure/>`__
22+
on docs.microsoft.com.
23+
24+
25+
Provide Feedback
26+
================
27+
28+
If you encounter any bugs or have suggestions, please file an issue in the
29+
`Issues <https://github.com/Azure/azure-sdk-for-python/issues>`__
30+
section of the project.
31+
32+
33+
.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-imagebuilder%2FREADME.png
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from .image_builder_client import ImageBuilderClient
13+
from .version import VERSION
14+
15+
__all__ = ['ImageBuilderClient']
16+
17+
__version__ = VERSION
18+
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.service_client import SDKClient
13+
from msrest import Serializer, Deserializer
14+
from msrestazure import AzureConfiguration
15+
from .version import VERSION
16+
from .operations.virtual_machine_image_templates_operations import VirtualMachineImageTemplatesOperations
17+
from .operations.operations import Operations
18+
from . import models
19+
20+
21+
class ImageBuilderClientConfiguration(AzureConfiguration):
22+
"""Configuration for ImageBuilderClient
23+
Note that all parameters used to create this instance are saved as instance
24+
attributes.
25+
26+
:param credentials: Credentials needed for the client to connect to Azure.
27+
:type credentials: :mod:`A msrestazure Credentials
28+
object<msrestazure.azure_active_directory>`
29+
:param subscription_id: Subscription credentials which uniquely identify
30+
Microsoft Azure subscription. The subscription Id forms part of the URI
31+
for every service call.
32+
:type subscription_id: str
33+
:param str base_url: Service URL
34+
"""
35+
36+
def __init__(
37+
self, credentials, subscription_id, base_url=None):
38+
39+
if credentials is None:
40+
raise ValueError("Parameter 'credentials' must not be None.")
41+
if subscription_id is None:
42+
raise ValueError("Parameter 'subscription_id' must not be None.")
43+
if not base_url:
44+
base_url = 'https://management.azure.com'
45+
46+
super(ImageBuilderClientConfiguration, self).__init__(base_url)
47+
48+
self.add_user_agent('azure-mgmt-imagebuilder/{}'.format(VERSION))
49+
self.add_user_agent('Azure-SDK-For-Python')
50+
51+
self.credentials = credentials
52+
self.subscription_id = subscription_id
53+
54+
55+
class ImageBuilderClient(SDKClient):
56+
"""Azure Virtual Machine Image Builder Client
57+
58+
:ivar config: Configuration for client.
59+
:vartype config: ImageBuilderClientConfiguration
60+
61+
:ivar virtual_machine_image_templates: VirtualMachineImageTemplates operations
62+
:vartype virtual_machine_image_templates: azure.mgmt.imagebuilder.operations.VirtualMachineImageTemplatesOperations
63+
:ivar operations: Operations operations
64+
:vartype operations: azure.mgmt.imagebuilder.operations.Operations
65+
66+
:param credentials: Credentials needed for the client to connect to Azure.
67+
:type credentials: :mod:`A msrestazure Credentials
68+
object<msrestazure.azure_active_directory>`
69+
:param subscription_id: Subscription credentials which uniquely identify
70+
Microsoft Azure subscription. The subscription Id forms part of the URI
71+
for every service call.
72+
:type subscription_id: str
73+
:param str base_url: Service URL
74+
"""
75+
76+
def __init__(
77+
self, credentials, subscription_id, base_url=None):
78+
79+
self.config = ImageBuilderClientConfiguration(credentials, subscription_id, base_url)
80+
super(ImageBuilderClient, self).__init__(self.config.credentials, self.config)
81+
82+
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
83+
self.api_version = '2019-02-01-preview'
84+
self._serialize = Serializer(client_models)
85+
self._deserialize = Deserializer(client_models)
86+
87+
self.virtual_machine_image_templates = VirtualMachineImageTemplatesOperations(
88+
self._client, self.config, self._serialize, self._deserialize)
89+
self.operations = Operations(
90+
self._client, self.config, self._serialize, self._deserialize)
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
try:
13+
from .image_template_source_py3 import ImageTemplateSource
14+
from .image_template_customizer_py3 import ImageTemplateCustomizer
15+
from .image_template_distributor_py3 import ImageTemplateDistributor
16+
from .provisioning_error_py3 import ProvisioningError
17+
from .image_template_last_run_status_py3 import ImageTemplateLastRunStatus
18+
from .image_template_py3 import ImageTemplate
19+
from .image_template_iso_source_py3 import ImageTemplateIsoSource
20+
from .image_template_platform_image_source_py3 import ImageTemplatePlatformImageSource
21+
from .image_template_managed_image_source_py3 import ImageTemplateManagedImageSource
22+
from .image_template_shell_customizer_py3 import ImageTemplateShellCustomizer
23+
from .image_template_restart_customizer_py3 import ImageTemplateRestartCustomizer
24+
from .image_template_power_shell_customizer_py3 import ImageTemplatePowerShellCustomizer
25+
from .image_template_managed_image_distributor_py3 import ImageTemplateManagedImageDistributor
26+
from .image_template_shared_image_distributor_py3 import ImageTemplateSharedImageDistributor
27+
from .image_template_vhd_distributor_py3 import ImageTemplateVhdDistributor
28+
from .image_template_update_parameters_py3 import ImageTemplateUpdateParameters
29+
from .run_output_py3 import RunOutput
30+
from .resource_py3 import Resource
31+
from .sub_resource_py3 import SubResource
32+
from .operation_display_py3 import OperationDisplay
33+
from .operation_py3 import Operation
34+
from .api_error_base_py3 import ApiErrorBase
35+
from .inner_error_py3 import InnerError
36+
from .api_error_py3 import ApiError, ApiErrorException
37+
except (SyntaxError, ImportError):
38+
from .image_template_source import ImageTemplateSource
39+
from .image_template_customizer import ImageTemplateCustomizer
40+
from .image_template_distributor import ImageTemplateDistributor
41+
from .provisioning_error import ProvisioningError
42+
from .image_template_last_run_status import ImageTemplateLastRunStatus
43+
from .image_template import ImageTemplate
44+
from .image_template_iso_source import ImageTemplateIsoSource
45+
from .image_template_platform_image_source import ImageTemplatePlatformImageSource
46+
from .image_template_managed_image_source import ImageTemplateManagedImageSource
47+
from .image_template_shell_customizer import ImageTemplateShellCustomizer
48+
from .image_template_restart_customizer import ImageTemplateRestartCustomizer
49+
from .image_template_power_shell_customizer import ImageTemplatePowerShellCustomizer
50+
from .image_template_managed_image_distributor import ImageTemplateManagedImageDistributor
51+
from .image_template_shared_image_distributor import ImageTemplateSharedImageDistributor
52+
from .image_template_vhd_distributor import ImageTemplateVhdDistributor
53+
from .image_template_update_parameters import ImageTemplateUpdateParameters
54+
from .run_output import RunOutput
55+
from .resource import Resource
56+
from .sub_resource import SubResource
57+
from .operation_display import OperationDisplay
58+
from .operation import Operation
59+
from .api_error_base import ApiErrorBase
60+
from .inner_error import InnerError
61+
from .api_error import ApiError, ApiErrorException
62+
from .image_template_paged import ImageTemplatePaged
63+
from .run_output_paged import RunOutputPaged
64+
from .operation_paged import OperationPaged
65+
66+
__all__ = [
67+
'ImageTemplateSource',
68+
'ImageTemplateCustomizer',
69+
'ImageTemplateDistributor',
70+
'ProvisioningError',
71+
'ImageTemplateLastRunStatus',
72+
'ImageTemplate',
73+
'ImageTemplateIsoSource',
74+
'ImageTemplatePlatformImageSource',
75+
'ImageTemplateManagedImageSource',
76+
'ImageTemplateShellCustomizer',
77+
'ImageTemplateRestartCustomizer',
78+
'ImageTemplatePowerShellCustomizer',
79+
'ImageTemplateManagedImageDistributor',
80+
'ImageTemplateSharedImageDistributor',
81+
'ImageTemplateVhdDistributor',
82+
'ImageTemplateUpdateParameters',
83+
'RunOutput',
84+
'Resource',
85+
'SubResource',
86+
'OperationDisplay',
87+
'Operation',
88+
'ApiErrorBase',
89+
'InnerError',
90+
'ApiError', 'ApiErrorException',
91+
'ImageTemplatePaged',
92+
'RunOutputPaged',
93+
'OperationPaged',
94+
]
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.serialization import Model
13+
from msrest.exceptions import HttpOperationError
14+
15+
16+
class ApiError(Model):
17+
"""Api error.
18+
19+
:param details: The Api error details
20+
:type details: list[~azure.mgmt.imagebuilder.models.ApiErrorBase]
21+
:param inner_error: The Api inner error
22+
:type inner_error: ~azure.mgmt.imagebuilder.models.InnerError
23+
:param code: The error code.
24+
:type code: str
25+
:param target: The target of the particular error.
26+
:type target: str
27+
:param message: The error message.
28+
:type message: str
29+
"""
30+
31+
_attribute_map = {
32+
'details': {'key': 'details', 'type': '[ApiErrorBase]'},
33+
'inner_error': {'key': 'innerError', 'type': 'InnerError'},
34+
'code': {'key': 'code', 'type': 'str'},
35+
'target': {'key': 'target', 'type': 'str'},
36+
'message': {'key': 'message', 'type': 'str'},
37+
}
38+
39+
def __init__(self, **kwargs):
40+
super(ApiError, self).__init__(**kwargs)
41+
self.details = kwargs.get('details', None)
42+
self.inner_error = kwargs.get('inner_error', None)
43+
self.code = kwargs.get('code', None)
44+
self.target = kwargs.get('target', None)
45+
self.message = kwargs.get('message', None)
46+
47+
48+
class ApiErrorException(HttpOperationError):
49+
"""Server responsed with exception of type: 'ApiError'.
50+
51+
:param deserialize: A deserializer
52+
:param response: Server response to be deserialized.
53+
"""
54+
55+
def __init__(self, deserialize, response, *args):
56+
57+
super(ApiErrorException, self).__init__(deserialize, response, 'ApiError', *args)
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.serialization import Model
13+
14+
15+
class ApiErrorBase(Model):
16+
"""Api error base.
17+
18+
:param code: The error code.
19+
:type code: str
20+
:param target: The target of the particular error.
21+
:type target: str
22+
:param message: The error message.
23+
:type message: str
24+
"""
25+
26+
_attribute_map = {
27+
'code': {'key': 'code', 'type': 'str'},
28+
'target': {'key': 'target', 'type': 'str'},
29+
'message': {'key': 'message', 'type': 'str'},
30+
}
31+
32+
def __init__(self, **kwargs):
33+
super(ApiErrorBase, self).__init__(**kwargs)
34+
self.code = kwargs.get('code', None)
35+
self.target = kwargs.get('target', None)
36+
self.message = kwargs.get('message', None)
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.serialization import Model
13+
14+
15+
class ApiErrorBase(Model):
16+
"""Api error base.
17+
18+
:param code: The error code.
19+
:type code: str
20+
:param target: The target of the particular error.
21+
:type target: str
22+
:param message: The error message.
23+
:type message: str
24+
"""
25+
26+
_attribute_map = {
27+
'code': {'key': 'code', 'type': 'str'},
28+
'target': {'key': 'target', 'type': 'str'},
29+
'message': {'key': 'message', 'type': 'str'},
30+
}
31+
32+
def __init__(self, *, code: str=None, target: str=None, message: str=None, **kwargs) -> None:
33+
super(ApiErrorBase, self).__init__(**kwargs)
34+
self.code = code
35+
self.target = target
36+
self.message = message

0 commit comments

Comments
 (0)