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 devtestlabs/resource-manager] Add Devtestlabs/2018-09-15 #3717

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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions azure-mgmt-devtestlabs/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
include *.rst
include azure/__init__.py
include azure/mgmt/__init__.py

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from msrest.service_client import ServiceClient
from msrest.service_client import SDKClient
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
Expand All @@ -33,6 +33,8 @@
from .operations.disks_operations import DisksOperations
from .operations.environments_operations import EnvironmentsOperations
from .operations.secrets_operations import SecretsOperations
from .operations.service_fabrics_operations import ServiceFabricsOperations
from .operations.service_fabric_schedules_operations import ServiceFabricSchedulesOperations
from .operations.virtual_machines_operations import VirtualMachinesOperations
from .operations.virtual_machine_schedules_operations import VirtualMachineSchedulesOperations
from .operations.virtual_networks_operations import VirtualNetworksOperations
Expand Down Expand Up @@ -71,7 +73,7 @@ def __init__(
self.subscription_id = subscription_id


class DevTestLabsClient(object):
class DevTestLabsClient(SDKClient):
"""The DevTest Labs Client.

:ivar config: Configuration for client.
Expand Down Expand Up @@ -117,6 +119,10 @@ class DevTestLabsClient(object):
:vartype environments: azure.mgmt.devtestlabs.operations.EnvironmentsOperations
:ivar secrets: Secrets operations
:vartype secrets: azure.mgmt.devtestlabs.operations.SecretsOperations
:ivar service_fabrics: ServiceFabrics operations
:vartype service_fabrics: azure.mgmt.devtestlabs.operations.ServiceFabricsOperations
:ivar service_fabric_schedules: ServiceFabricSchedules operations
:vartype service_fabric_schedules: azure.mgmt.devtestlabs.operations.ServiceFabricSchedulesOperations
:ivar virtual_machines: VirtualMachines operations
:vartype virtual_machines: azure.mgmt.devtestlabs.operations.VirtualMachinesOperations
:ivar virtual_machine_schedules: VirtualMachineSchedules operations
Expand All @@ -136,10 +142,10 @@ def __init__(
self, credentials, subscription_id, base_url=None):

self.config = DevTestLabsClientConfiguration(credentials, subscription_id, base_url)
self._client = ServiceClient(self.config.credentials, self.config)
super(DevTestLabsClient, 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 = '2016-05-15'
self.api_version = '2018-09-15'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

Expand Down Expand Up @@ -183,6 +189,10 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.secrets = SecretsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.service_fabrics = ServiceFabricsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.service_fabric_schedules = ServiceFabricSchedulesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.virtual_machines = VirtualMachinesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.virtual_machine_schedules = VirtualMachineSchedulesOperations(
Expand Down
457 changes: 336 additions & 121 deletions azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/__init__.py

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class ApplicableSchedule(Resource):
'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'Schedule'},
}

def __init__(self, location=None, tags=None, lab_vms_shutdown=None, lab_vms_startup=None):
super(ApplicableSchedule, self).__init__(location=location, tags=tags)
self.lab_vms_shutdown = lab_vms_shutdown
self.lab_vms_startup = lab_vms_startup
def __init__(self, **kwargs):
super(ApplicableSchedule, self).__init__(**kwargs)
self.lab_vms_shutdown = kwargs.get('lab_vms_shutdown', None)
self.lab_vms_startup = kwargs.get('lab_vms_startup', None)
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,13 @@
# regenerated.
# --------------------------------------------------------------------------

from .resource import Resource
from .update_resource import UpdateResource


class ApplicableScheduleFragment(Resource):
class ApplicableScheduleFragment(UpdateResource):
"""Schedules applicable to a virtual machine. The schedules may have been
defined on a VM or on lab level.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar id: The identifier of the resource.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
:ivar type: The type of the resource.
:vartype type: str
:param location: The location of the resource.
:type location: str
:param tags: The tags of the resource.
:type tags: dict[str, str]
:param lab_vms_shutdown: The auto-shutdown schedule, if one has been set
Expand All @@ -37,23 +26,13 @@ class ApplicableScheduleFragment(Resource):
:type lab_vms_startup: ~azure.mgmt.devtestlabs.models.ScheduleFragment
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'ScheduleFragment'},
'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'ScheduleFragment'},
}

def __init__(self, location=None, tags=None, lab_vms_shutdown=None, lab_vms_startup=None):
super(ApplicableScheduleFragment, self).__init__(location=location, tags=tags)
self.lab_vms_shutdown = lab_vms_shutdown
self.lab_vms_startup = lab_vms_startup
def __init__(self, **kwargs):
super(ApplicableScheduleFragment, self).__init__(**kwargs)
self.lab_vms_shutdown = kwargs.get('lab_vms_shutdown', None)
self.lab_vms_startup = kwargs.get('lab_vms_startup', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# 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 .update_resource_py3 import UpdateResource


class ApplicableScheduleFragment(UpdateResource):
"""Schedules applicable to a virtual machine. The schedules may have been
defined on a VM or on lab level.

:param tags: The tags of the resource.
:type tags: dict[str, str]
:param lab_vms_shutdown: The auto-shutdown schedule, if one has been set
at the lab or lab resource level.
:type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.ScheduleFragment
:param lab_vms_startup: The auto-startup schedule, if one has been set at
the lab or lab resource level.
:type lab_vms_startup: ~azure.mgmt.devtestlabs.models.ScheduleFragment
"""

_attribute_map = {
'tags': {'key': 'tags', 'type': '{str}'},
'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'ScheduleFragment'},
'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'ScheduleFragment'},
}

def __init__(self, *, tags=None, lab_vms_shutdown=None, lab_vms_startup=None, **kwargs) -> None:
super(ApplicableScheduleFragment, self).__init__(tags=tags, **kwargs)
self.lab_vms_shutdown = lab_vms_shutdown
self.lab_vms_startup = lab_vms_startup
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# 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 .resource_py3 import Resource


class ApplicableSchedule(Resource):
"""Schedules applicable to a virtual machine. The schedules may have been
defined on a VM or on lab level.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar id: The identifier of the resource.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
:ivar type: The type of the resource.
:vartype type: str
:param location: The location of the resource.
:type location: str
:param tags: The tags of the resource.
:type tags: dict[str, str]
:param lab_vms_shutdown: The auto-shutdown schedule, if one has been set
at the lab or lab resource level.
:type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.Schedule
:param lab_vms_startup: The auto-startup schedule, if one has been set at
the lab or lab resource level.
:type lab_vms_startup: ~azure.mgmt.devtestlabs.models.Schedule
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'Schedule'},
'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'Schedule'},
}

def __init__(self, *, location: str=None, tags=None, lab_vms_shutdown=None, lab_vms_startup=None, **kwargs) -> None:
super(ApplicableSchedule, self).__init__(location=location, tags=tags, **kwargs)
self.lab_vms_shutdown = lab_vms_shutdown
self.lab_vms_startup = lab_vms_startup
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ class ApplyArtifactsRequest(Model):
'artifacts': {'key': 'artifacts', 'type': '[ArtifactInstallProperties]'},
}

def __init__(self, artifacts=None):
super(ApplyArtifactsRequest, self).__init__()
self.artifacts = artifacts
def __init__(self, **kwargs):
super(ApplyArtifactsRequest, self).__init__(**kwargs)
self.artifacts = kwargs.get('artifacts', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# 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 ApplyArtifactsRequest(Model):
"""Request body for applying artifacts to a virtual machine.

:param artifacts: The list of artifacts to apply.
:type artifacts:
list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties]
"""

_attribute_map = {
'artifacts': {'key': 'artifacts', 'type': '[ArtifactInstallProperties]'},
}

def __init__(self, *, artifacts=None, **kwargs) -> None:
super(ApplyArtifactsRequest, self).__init__(**kwargs)
self.artifacts = artifacts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ class ArmTemplate(Resource):
information from all azuredeploy.*.parameters.json for the ARM template.
:vartype parameters_value_files_info:
list[~azure.mgmt.devtestlabs.models.ParametersValueFileInfo]
:ivar enabled: Whether or not ARM template is enabled for use by lab user.
:vartype enabled: bool
"""

_validation = {
Expand All @@ -57,6 +59,7 @@ class ArmTemplate(Resource):
'contents': {'readonly': True},
'created_date': {'readonly': True},
'parameters_value_files_info': {'readonly': True},
'enabled': {'readonly': True},
}

_attribute_map = {
Expand All @@ -72,14 +75,16 @@ class ArmTemplate(Resource):
'contents': {'key': 'properties.contents', 'type': 'object'},
'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'},
'parameters_value_files_info': {'key': 'properties.parametersValueFilesInfo', 'type': '[ParametersValueFileInfo]'},
'enabled': {'key': 'properties.enabled', 'type': 'bool'},
}

def __init__(self, location=None, tags=None):
super(ArmTemplate, self).__init__(location=location, tags=tags)
def __init__(self, **kwargs):
super(ArmTemplate, self).__init__(**kwargs)
self.display_name = None
self.description = None
self.publisher = None
self.icon = None
self.contents = None
self.created_date = None
self.parameters_value_files_info = None
self.enabled = None
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class ArmTemplateInfo(Model):
'parameters': {'key': 'parameters', 'type': 'object'},
}

def __init__(self, template=None, parameters=None):
super(ArmTemplateInfo, self).__init__()
self.template = template
self.parameters = parameters
def __init__(self, **kwargs):
super(ArmTemplateInfo, self).__init__(**kwargs)
self.template = kwargs.get('template', None)
self.parameters = kwargs.get('parameters', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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 ArmTemplateInfo(Model):
"""Information about a generated ARM template.

:param template: The template's contents.
:type template: object
:param parameters: The parameters of the ARM template.
:type parameters: object
"""

_attribute_map = {
'template': {'key': 'template', 'type': 'object'},
'parameters': {'key': 'parameters', 'type': 'object'},
}

def __init__(self, *, template=None, parameters=None, **kwargs) -> None:
super(ArmTemplateInfo, self).__init__(**kwargs)
self.template = template
self.parameters = parameters
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class ArmTemplateParameterProperties(Model):
'value': {'key': 'value', 'type': 'str'},
}

def __init__(self, name=None, value=None):
super(ArmTemplateParameterProperties, self).__init__()
self.name = name
self.value = value
def __init__(self, **kwargs):
super(ArmTemplateParameterProperties, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
self.value = kwargs.get('value', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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 ArmTemplateParameterPropertiesFragment(Model):
"""Properties of an Azure Resource Manager template parameter.

:param name: The name of the template parameter.
:type name: str
:param value: The value of the template parameter.
:type value: str
"""

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'value': {'key': 'value', 'type': 'str'},
}

def __init__(self, **kwargs):
super(ArmTemplateParameterPropertiesFragment, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
self.value = kwargs.get('value', None)
Loading