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

[ReleasePR track2_azure-mgmt-maintenance] maintenance readme t2 config #18161

Closed
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 sdk/maintenance/azure-mgmt-maintenance/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include _meta.json
recursive-include tests *.py *.yaml
include *.md
include azure/__init__.py
Expand Down
8 changes: 8 additions & 0 deletions sdk/maintenance/azure-mgmt-maintenance/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"autorest": "V2",
"use": "@microsoft.azure/autorest.python@~4.0.71",
"commit": "eb6d68be864349a8fd33d261e90bb2756e904e82",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/maintenance/resource-manager/readme.md --keep-version-file --multiapi --no-async --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --use=@microsoft.azure/autorest.python@~4.0.71 --version=V2",
"readme": "specification/maintenance/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
# regenerated.
# --------------------------------------------------------------------------

from ._configuration import MaintenanceManagementClientConfiguration
from ._maintenance_management_client import MaintenanceManagementClient
__all__ = ['MaintenanceManagementClient', 'MaintenanceManagementClientConfiguration']
from ._configuration import MaintenanceClientConfiguration
from ._maintenance_client import MaintenanceClient
__all__ = ['MaintenanceClient', 'MaintenanceClientConfiguration']

from .version import VERSION

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
from .version import VERSION


class MaintenanceManagementClientConfiguration(AzureConfiguration):
"""Configuration for MaintenanceManagementClient
class MaintenanceClientConfiguration(AzureConfiguration):
"""Configuration for MaintenanceClient
Note that all parameters used to create this instance are saved as instance
attributes.

Expand All @@ -38,7 +38,7 @@ def __init__(
if not base_url:
base_url = 'https://management.azure.com'

super(MaintenanceManagementClientConfiguration, self).__init__(base_url)
super(MaintenanceClientConfiguration, self).__init__(base_url)

# Starting Autorest.Python 4.0.64, make connection pool activated by default
self.keep_alive = True
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,39 @@
from msrest.service_client import SDKClient
from msrest import Serializer, Deserializer

from ._configuration import MaintenanceManagementClientConfiguration
from ._configuration import MaintenanceClientConfiguration
from .operations import PublicMaintenanceConfigurationsOperations
from .operations import ApplyUpdatesOperations
from .operations import ConfigurationAssignmentsOperations
from .operations import MaintenanceConfigurationsOperations
from .operations import MaintenanceConfigurationsForResourceGroupOperations
from .operations import ApplyUpdateForResourceGroupOperations
from .operations import ConfigurationAssignmentsWithinSubscriptionOperations
from .operations import Operations
from .operations import UpdatesOperations
from . import models


class MaintenanceManagementClient(SDKClient):
"""Azure Maintenance Management Client
class MaintenanceClient(SDKClient):
"""Maintenance Client

:ivar config: Configuration for client.
:vartype config: MaintenanceManagementClientConfiguration
:vartype config: MaintenanceClientConfiguration

:ivar public_maintenance_configurations: PublicMaintenanceConfigurations operations
:vartype public_maintenance_configurations: azure.mgmt.maintenance.operations.PublicMaintenanceConfigurationsOperations
:ivar apply_updates: ApplyUpdates operations
:vartype apply_updates: azure.mgmt.maintenance.operations.ApplyUpdatesOperations
:ivar configuration_assignments: ConfigurationAssignments operations
:vartype configuration_assignments: azure.mgmt.maintenance.operations.ConfigurationAssignmentsOperations
:ivar maintenance_configurations: MaintenanceConfigurations operations
:vartype maintenance_configurations: azure.mgmt.maintenance.operations.MaintenanceConfigurationsOperations
:ivar maintenance_configurations_for_resource_group: MaintenanceConfigurationsForResourceGroup operations
:vartype maintenance_configurations_for_resource_group: azure.mgmt.maintenance.operations.MaintenanceConfigurationsForResourceGroupOperations
:ivar apply_update_for_resource_group: ApplyUpdateForResourceGroup operations
:vartype apply_update_for_resource_group: azure.mgmt.maintenance.operations.ApplyUpdateForResourceGroupOperations
:ivar configuration_assignments_within_subscription: ConfigurationAssignmentsWithinSubscription operations
:vartype configuration_assignments_within_subscription: azure.mgmt.maintenance.operations.ConfigurationAssignmentsWithinSubscriptionOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.maintenance.operations.Operations
:ivar updates: Updates operations
Expand All @@ -51,20 +63,28 @@ class MaintenanceManagementClient(SDKClient):
def __init__(
self, credentials, subscription_id, base_url=None):

self.config = MaintenanceManagementClientConfiguration(credentials, subscription_id, base_url)
super(MaintenanceManagementClient, self).__init__(self.config.credentials, self.config)
self.config = MaintenanceClientConfiguration(credentials, subscription_id, base_url)
super(MaintenanceClient, 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-06-01-preview'
self.api_version = '2021-04-01-preview'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.public_maintenance_configurations = PublicMaintenanceConfigurationsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.apply_updates = ApplyUpdatesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.configuration_assignments = ConfigurationAssignmentsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.maintenance_configurations = MaintenanceConfigurationsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.maintenance_configurations_for_resource_group = MaintenanceConfigurationsForResourceGroupOperations(
self._client, self.config, self._serialize, self._deserialize)
self.apply_update_for_resource_group = ApplyUpdateForResourceGroupOperations(
self._client, self.config, self._serialize, self._deserialize)
self.configuration_assignments_within_subscription = ConfigurationAssignmentsWithinSubscriptionOperations(
self._client, self.config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
self.updates = UpdatesOperations(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,47 +13,72 @@
from ._models_py3 import ApplyUpdate
from ._models_py3 import ConfigurationAssignment
from ._models_py3 import ErrorDetails
from ._models_py3 import InputLinuxParameters
from ._models_py3 import InputPatchConfiguration
from ._models_py3 import InputWindowsParameters
from ._models_py3 import MaintenanceConfiguration
from ._models_py3 import MaintenanceError, MaintenanceErrorException
from ._models_py3 import Operation
from ._models_py3 import OperationInfo
from ._models_py3 import Resource
from ._models_py3 import SystemData
from ._models_py3 import TaskProperties
from ._models_py3 import Update
except (SyntaxError, ImportError):
from ._models import ApplyUpdate
from ._models import ConfigurationAssignment
from ._models import ErrorDetails
from ._models import InputLinuxParameters
from ._models import InputPatchConfiguration
from ._models import InputWindowsParameters
from ._models import MaintenanceConfiguration
from ._models import MaintenanceError, MaintenanceErrorException
from ._models import Operation
from ._models import OperationInfo
from ._models import Resource
from ._models import SystemData
from ._models import TaskProperties
from ._models import Update
from ._paged_models import ApplyUpdatePaged
from ._paged_models import ConfigurationAssignmentPaged
from ._paged_models import MaintenanceConfigurationPaged
from ._paged_models import OperationPaged
from ._paged_models import UpdatePaged
from ._maintenance_management_client_enums import (
from ._maintenance_client_enums import (
UpdateStatus,
CreatedByType,
MaintenanceScope,
Visibility,
RebootOptions,
TaskScope,
ImpactType,
)

__all__ = [
'ApplyUpdate',
'ConfigurationAssignment',
'ErrorDetails',
'InputLinuxParameters',
'InputPatchConfiguration',
'InputWindowsParameters',
'MaintenanceConfiguration',
'MaintenanceError', 'MaintenanceErrorException',
'Operation',
'OperationInfo',
'Resource',
'SystemData',
'TaskProperties',
'Update',
'ConfigurationAssignmentPaged',
'MaintenanceConfigurationPaged',
'ApplyUpdatePaged',
'ConfigurationAssignmentPaged',
'OperationPaged',
'UpdatePaged',
'UpdateStatus',
'CreatedByType',
'MaintenanceScope',
'Visibility',
'RebootOptions',
'TaskScope',
'ImpactType',
]
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,41 @@ class UpdateStatus(str, Enum):
retry_later = "RetryLater"


class CreatedByType(str, Enum):

user = "User"
application = "Application"
managed_identity = "ManagedIdentity"
key = "Key"


class MaintenanceScope(str, Enum):

all = "All"
host = "Host"
os_image = "OSImage"
extension = "Extension"
in_guest_patch = "InGuestPatch"
sqldb = "SQLDB"
sql_managed_instance = "SQLManagedInstance"


class Visibility(str, Enum):

custom = "Custom"
public = "Public"


class RebootOptions(str, Enum):

never_reboot = "NeverReboot"
reboot_if_required = "RebootIfRequired"
always_reboot = "AlwaysReboot"


class TaskScope(str, Enum):

global_enum = "Global"
resource = "Resource"
in_resource = "InResource"


class ImpactType(str, Enum):
Expand Down
Loading