Skip to content

Commit

Permalink
[AutoPR compute/resource-manager] RunCommands 2018-06-01 (#2935)
Browse files Browse the repository at this point in the history
* Generated from 8d08b9c279f07fa5a919205934fd785e329dad64

RunCommands 2018-06-01

* Generated from 9c64257f21823a1d72ec25cd640375f0100638e2

Take examples from 2018-04-01
  • Loading branch information
AutorestCI authored Jul 19, 2018
1 parent 8175b81 commit 2a6625e
Show file tree
Hide file tree
Showing 20 changed files with 985 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,7 @@ def virtual_machine_run_commands(self):
* 2017-03-30: :class:`VirtualMachineRunCommandsOperations<azure.mgmt.compute.v2017_03_30.operations.VirtualMachineRunCommandsOperations>`
* 2017-12-01: :class:`VirtualMachineRunCommandsOperations<azure.mgmt.compute.v2017_12_01.operations.VirtualMachineRunCommandsOperations>`
* 2018-04-01: :class:`VirtualMachineRunCommandsOperations<azure.mgmt.compute.v2018_04_01.operations.VirtualMachineRunCommandsOperations>`
* 2018-06-01: :class:`VirtualMachineRunCommandsOperations<azure.mgmt.compute.v2018_06_01.operations.VirtualMachineRunCommandsOperations>`
"""
api_version = self._get_api_version('virtual_machine_run_commands')
if api_version == '2017-03-30':
Expand All @@ -475,6 +476,8 @@ def virtual_machine_run_commands(self):
from .v2017_12_01.operations import VirtualMachineRunCommandsOperations as OperationClass
elif api_version == '2018-04-01':
from .v2018_04_01.operations import VirtualMachineRunCommandsOperations as OperationClass
elif api_version == '2018-06-01':
from .v2018_06_01.operations import VirtualMachineRunCommandsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
from .operations.virtual_machine_scale_set_rolling_upgrades_operations import VirtualMachineScaleSetRollingUpgradesOperations
from .operations.virtual_machine_scale_set_vms_operations import VirtualMachineScaleSetVMsOperations
from .operations.log_analytics_operations import LogAnalyticsOperations
from .operations.virtual_machine_run_commands_operations import VirtualMachineRunCommandsOperations
from .operations.galleries_operations import GalleriesOperations
from .operations.gallery_images_operations import GalleryImagesOperations
from .operations.gallery_image_versions_operations import GalleryImageVersionsOperations
Expand Down Expand Up @@ -101,6 +102,8 @@ class ComputeManagementClient(SDKClient):
:vartype virtual_machine_scale_set_vms: azure.mgmt.compute.v2018_06_01.operations.VirtualMachineScaleSetVMsOperations
:ivar log_analytics: LogAnalytics operations
:vartype log_analytics: azure.mgmt.compute.v2018_06_01.operations.LogAnalyticsOperations
:ivar virtual_machine_run_commands: VirtualMachineRunCommands operations
:vartype virtual_machine_run_commands: azure.mgmt.compute.v2018_06_01.operations.VirtualMachineRunCommandsOperations
:ivar galleries: Galleries operations
:vartype galleries: azure.mgmt.compute.v2018_06_01.operations.GalleriesOperations
:ivar gallery_images: GalleryImages operations
Expand Down Expand Up @@ -157,6 +160,8 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.log_analytics = LogAnalyticsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.virtual_machine_run_commands = VirtualMachineRunCommandsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.galleries = GalleriesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.gallery_images = GalleryImagesOperations(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,12 @@
from .log_analytics_input_base_py3 import LogAnalyticsInputBase
from .log_analytics_output_py3 import LogAnalyticsOutput
from .log_analytics_operation_result_py3 import LogAnalyticsOperationResult
from .run_command_input_parameter_py3 import RunCommandInputParameter
from .run_command_input_py3 import RunCommandInput
from .run_command_parameter_definition_py3 import RunCommandParameterDefinition
from .run_command_document_base_py3 import RunCommandDocumentBase
from .run_command_document_py3 import RunCommandDocument
from .run_command_result_py3 import RunCommandResult
from .gallery_identifier_py3 import GalleryIdentifier
from .gallery_py3 import Gallery
from .gallery_image_identifier_py3 import GalleryImageIdentifier
Expand Down Expand Up @@ -274,6 +280,12 @@
from .log_analytics_input_base import LogAnalyticsInputBase
from .log_analytics_output import LogAnalyticsOutput
from .log_analytics_operation_result import LogAnalyticsOperationResult
from .run_command_input_parameter import RunCommandInputParameter
from .run_command_input import RunCommandInput
from .run_command_parameter_definition import RunCommandParameterDefinition
from .run_command_document_base import RunCommandDocumentBase
from .run_command_document import RunCommandDocument
from .run_command_result import RunCommandResult
from .gallery_identifier import GalleryIdentifier
from .gallery import Gallery
from .gallery_image_identifier import GalleryImageIdentifier
Expand Down Expand Up @@ -304,6 +316,7 @@
from .upgrade_operation_historical_status_info_paged import UpgradeOperationHistoricalStatusInfoPaged
from .virtual_machine_scale_set_extension_paged import VirtualMachineScaleSetExtensionPaged
from .virtual_machine_scale_set_vm_paged import VirtualMachineScaleSetVMPaged
from .run_command_document_base_paged import RunCommandDocumentBasePaged
from .gallery_paged import GalleryPaged
from .gallery_image_paged import GalleryImagePaged
from .gallery_image_version_paged import GalleryImageVersionPaged
Expand Down Expand Up @@ -462,6 +475,12 @@
'LogAnalyticsInputBase',
'LogAnalyticsOutput',
'LogAnalyticsOperationResult',
'RunCommandInputParameter',
'RunCommandInput',
'RunCommandParameterDefinition',
'RunCommandDocumentBase',
'RunCommandDocument',
'RunCommandResult',
'GalleryIdentifier',
'Gallery',
'GalleryImageIdentifier',
Expand Down Expand Up @@ -492,6 +511,7 @@
'UpgradeOperationHistoricalStatusInfoPaged',
'VirtualMachineScaleSetExtensionPaged',
'VirtualMachineScaleSetVMPaged',
'RunCommandDocumentBasePaged',
'GalleryPaged',
'GalleryImagePaged',
'GalleryImageVersionPaged',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# 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 .run_command_document_base import RunCommandDocumentBase


class RunCommandDocument(RunCommandDocumentBase):
"""Describes the properties of a Run Command.
All required parameters must be populated in order to send to Azure.
:param schema: Required. The VM run command schema.
:type schema: str
:param id: Required. The VM run command id.
:type id: str
:param os_type: Required. The Operating System type. Possible values
include: 'Windows', 'Linux'
:type os_type: str or
~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes
:param label: Required. The VM run command label.
:type label: str
:param description: Required. The VM run command description.
:type description: str
:param script: Required. The script to be executed.
:type script: list[str]
:param parameters: The parameters used by the script.
:type parameters:
list[~azure.mgmt.compute.v2018_06_01.models.RunCommandParameterDefinition]
"""

_validation = {
'schema': {'required': True},
'id': {'required': True},
'os_type': {'required': True},
'label': {'required': True},
'description': {'required': True},
'script': {'required': True},
}

_attribute_map = {
'schema': {'key': '$schema', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'},
'label': {'key': 'label', 'type': 'str'},
'description': {'key': 'description', 'type': 'str'},
'script': {'key': 'script', 'type': '[str]'},
'parameters': {'key': 'parameters', 'type': '[RunCommandParameterDefinition]'},
}

def __init__(self, **kwargs):
super(RunCommandDocument, self).__init__(**kwargs)
self.script = kwargs.get('script', None)
self.parameters = kwargs.get('parameters', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# 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 msrest.serialization import Model


class RunCommandDocumentBase(Model):
"""Describes the properties of a Run Command metadata.
All required parameters must be populated in order to send to Azure.
:param schema: Required. The VM run command schema.
:type schema: str
:param id: Required. The VM run command id.
:type id: str
:param os_type: Required. The Operating System type. Possible values
include: 'Windows', 'Linux'
:type os_type: str or
~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes
:param label: Required. The VM run command label.
:type label: str
:param description: Required. The VM run command description.
:type description: str
"""

_validation = {
'schema': {'required': True},
'id': {'required': True},
'os_type': {'required': True},
'label': {'required': True},
'description': {'required': True},
}

_attribute_map = {
'schema': {'key': '$schema', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'},
'label': {'key': 'label', 'type': 'str'},
'description': {'key': 'description', 'type': 'str'},
}

def __init__(self, **kwargs):
super(RunCommandDocumentBase, self).__init__(**kwargs)
self.schema = kwargs.get('schema', None)
self.id = kwargs.get('id', None)
self.os_type = kwargs.get('os_type', None)
self.label = kwargs.get('label', None)
self.description = kwargs.get('description', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 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 msrest.paging import Paged


class RunCommandDocumentBasePaged(Paged):
"""
A paging container for iterating over a list of :class:`RunCommandDocumentBase <azure.mgmt.compute.v2018_06_01.models.RunCommandDocumentBase>` object
"""

_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[RunCommandDocumentBase]'}
}

def __init__(self, *args, **kwargs):

super(RunCommandDocumentBasePaged, self).__init__(*args, **kwargs)
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# 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 msrest.serialization import Model


class RunCommandDocumentBase(Model):
"""Describes the properties of a Run Command metadata.
All required parameters must be populated in order to send to Azure.
:param schema: Required. The VM run command schema.
:type schema: str
:param id: Required. The VM run command id.
:type id: str
:param os_type: Required. The Operating System type. Possible values
include: 'Windows', 'Linux'
:type os_type: str or
~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes
:param label: Required. The VM run command label.
:type label: str
:param description: Required. The VM run command description.
:type description: str
"""

_validation = {
'schema': {'required': True},
'id': {'required': True},
'os_type': {'required': True},
'label': {'required': True},
'description': {'required': True},
}

_attribute_map = {
'schema': {'key': '$schema', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'},
'label': {'key': 'label', 'type': 'str'},
'description': {'key': 'description', 'type': 'str'},
}

def __init__(self, *, schema: str, id: str, os_type, label: str, description: str, **kwargs) -> None:
super(RunCommandDocumentBase, self).__init__(**kwargs)
self.schema = schema
self.id = id
self.os_type = os_type
self.label = label
self.description = description
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# 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 .run_command_document_base_py3 import RunCommandDocumentBase


class RunCommandDocument(RunCommandDocumentBase):
"""Describes the properties of a Run Command.
All required parameters must be populated in order to send to Azure.
:param schema: Required. The VM run command schema.
:type schema: str
:param id: Required. The VM run command id.
:type id: str
:param os_type: Required. The Operating System type. Possible values
include: 'Windows', 'Linux'
:type os_type: str or
~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes
:param label: Required. The VM run command label.
:type label: str
:param description: Required. The VM run command description.
:type description: str
:param script: Required. The script to be executed.
:type script: list[str]
:param parameters: The parameters used by the script.
:type parameters:
list[~azure.mgmt.compute.v2018_06_01.models.RunCommandParameterDefinition]
"""

_validation = {
'schema': {'required': True},
'id': {'required': True},
'os_type': {'required': True},
'label': {'required': True},
'description': {'required': True},
'script': {'required': True},
}

_attribute_map = {
'schema': {'key': '$schema', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'},
'label': {'key': 'label', 'type': 'str'},
'description': {'key': 'description', 'type': 'str'},
'script': {'key': 'script', 'type': '[str]'},
'parameters': {'key': 'parameters', 'type': '[RunCommandParameterDefinition]'},
}

def __init__(self, *, schema: str, id: str, os_type, label: str, description: str, script, parameters=None, **kwargs) -> None:
super(RunCommandDocument, self).__init__(schema=schema, id=id, os_type=os_type, label=label, description=description, **kwargs)
self.script = script
self.parameters = parameters
Loading

0 comments on commit 2a6625e

Please sign in to comment.