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 containerservice/resource-manager] chore: jsonfmt containerservice #5284

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
  •  
  •  
  •  
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# 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 .container_service_client import ContainerServiceClient
from .version import VERSION

__all__ = ['ContainerServiceClient']

__version__ = VERSION

Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# 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.service_client import SDKClient
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
from .operations.container_services_operations import ContainerServicesOperations
from . import models


class ContainerServiceClientConfiguration(AzureConfiguration):
"""Configuration for ContainerServiceClient
Note that all parameters used to create this instance are saved as instance
attributes.

: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
for every service call.
:type subscription_id: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):

if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
if not base_url:
base_url = 'https://management.azure.com'

super(ContainerServiceClientConfiguration, self).__init__(base_url)

self.add_user_agent('azure-mgmt-containerservice/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')

self.credentials = credentials
self.subscription_id = subscription_id


class ContainerServiceClient(SDKClient):
"""The Container Service Client.

:ivar config: Configuration for client.
:vartype config: ContainerServiceClientConfiguration

:ivar container_services: ContainerServices operations
:vartype container_services: azure.mgmt.containerservice.v2017_07_01.operations.ContainerServicesOperations

: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
for every service call.
:type subscription_id: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):

self.config = ContainerServiceClientConfiguration(credentials, subscription_id, base_url)
super(ContainerServiceClient, self).__init__(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.container_services = ContainerServicesOperations(
self._client, self.config, self._serialize, self._deserialize)
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# 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.
# --------------------------------------------------------------------------

try:
from .resource_py3 import Resource
from .container_service_custom_profile_py3 import ContainerServiceCustomProfile
from .key_vault_secret_ref_py3 import KeyVaultSecretRef
from .container_service_service_principal_profile_py3 import ContainerServiceServicePrincipalProfile
from .container_service_orchestrator_profile_py3 import ContainerServiceOrchestratorProfile
from .container_service_master_profile_py3 import ContainerServiceMasterProfile
from .container_service_agent_pool_profile_py3 import ContainerServiceAgentPoolProfile
from .container_service_windows_profile_py3 import ContainerServiceWindowsProfile
from .container_service_ssh_public_key_py3 import ContainerServiceSshPublicKey
from .container_service_ssh_configuration_py3 import ContainerServiceSshConfiguration
from .container_service_linux_profile_py3 import ContainerServiceLinuxProfile
from .container_service_vm_diagnostics_py3 import ContainerServiceVMDiagnostics
from .container_service_diagnostics_profile_py3 import ContainerServiceDiagnosticsProfile
from .container_service_py3 import ContainerService
from .orchestrator_profile_py3 import OrchestratorProfile
from .orchestrator_version_profile_py3 import OrchestratorVersionProfile
from .orchestrator_version_profile_list_result_py3 import OrchestratorVersionProfileListResult
except (SyntaxError, ImportError):
from .resource import Resource
from .container_service_custom_profile import ContainerServiceCustomProfile
from .key_vault_secret_ref import KeyVaultSecretRef
from .container_service_service_principal_profile import ContainerServiceServicePrincipalProfile
from .container_service_orchestrator_profile import ContainerServiceOrchestratorProfile
from .container_service_master_profile import ContainerServiceMasterProfile
from .container_service_agent_pool_profile import ContainerServiceAgentPoolProfile
from .container_service_windows_profile import ContainerServiceWindowsProfile
from .container_service_ssh_public_key import ContainerServiceSshPublicKey
from .container_service_ssh_configuration import ContainerServiceSshConfiguration
from .container_service_linux_profile import ContainerServiceLinuxProfile
from .container_service_vm_diagnostics import ContainerServiceVMDiagnostics
from .container_service_diagnostics_profile import ContainerServiceDiagnosticsProfile
from .container_service import ContainerService
from .orchestrator_profile import OrchestratorProfile
from .orchestrator_version_profile import OrchestratorVersionProfile
from .orchestrator_version_profile_list_result import OrchestratorVersionProfileListResult
from .container_service_paged import ContainerServicePaged
from .container_service_client_enums import (
ContainerServiceStorageProfileTypes,
ContainerServiceVMSizeTypes,
ContainerServiceOrchestratorTypes,
OSType,
)

__all__ = [
'Resource',
'ContainerServiceCustomProfile',
'KeyVaultSecretRef',
'ContainerServiceServicePrincipalProfile',
'ContainerServiceOrchestratorProfile',
'ContainerServiceMasterProfile',
'ContainerServiceAgentPoolProfile',
'ContainerServiceWindowsProfile',
'ContainerServiceSshPublicKey',
'ContainerServiceSshConfiguration',
'ContainerServiceLinuxProfile',
'ContainerServiceVMDiagnostics',
'ContainerServiceDiagnosticsProfile',
'ContainerService',
'OrchestratorProfile',
'OrchestratorVersionProfile',
'OrchestratorVersionProfileListResult',
'ContainerServicePaged',
'ContainerServiceStorageProfileTypes',
'ContainerServiceVMSizeTypes',
'ContainerServiceOrchestratorTypes',
'OSType',
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# 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 import Resource


class ContainerService(Resource):
"""Container service.

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

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

:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
:param location: Required. Resource location
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
:ivar provisioning_state: The current deployment or provisioning state,
which only appears in the response.
:vartype provisioning_state: str
:param orchestrator_profile: Required. Profile for the container service
orchestrator.
:type orchestrator_profile:
~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceOrchestratorProfile
:param custom_profile: Properties to configure a custom container service
cluster.
:type custom_profile:
~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceCustomProfile
:param service_principal_profile: Information about a service principal
identity for the cluster to use for manipulating Azure APIs. Exact one of
secret or keyVaultSecretRef need to be specified.
:type service_principal_profile:
~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceServicePrincipalProfile
:param master_profile: Required. Profile for the container service master.
:type master_profile:
~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceMasterProfile
:param agent_pool_profiles: Properties of the agent pool.
:type agent_pool_profiles:
list[~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceAgentPoolProfile]
:param windows_profile: Profile for Windows VMs in the container service
cluster.
:type windows_profile:
~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceWindowsProfile
:param linux_profile: Required. Profile for Linux VMs in the container
service cluster.
:type linux_profile:
~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceLinuxProfile
:param diagnostics_profile: Profile for diagnostics in the container
service cluster.
:type diagnostics_profile:
~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceDiagnosticsProfile
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'location': {'required': True},
'provisioning_state': {'readonly': True},
'orchestrator_profile': {'required': True},
'master_profile': {'required': True},
'linux_profile': {'required': 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}'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
'orchestrator_profile': {'key': 'properties.orchestratorProfile', 'type': 'ContainerServiceOrchestratorProfile'},
'custom_profile': {'key': 'properties.customProfile', 'type': 'ContainerServiceCustomProfile'},
'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ContainerServiceServicePrincipalProfile'},
'master_profile': {'key': 'properties.masterProfile', 'type': 'ContainerServiceMasterProfile'},
'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ContainerServiceAgentPoolProfile]'},
'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ContainerServiceWindowsProfile'},
'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'},
'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'ContainerServiceDiagnosticsProfile'},
}

def __init__(self, **kwargs):
super(ContainerService, self).__init__(**kwargs)
self.provisioning_state = None
self.orchestrator_profile = kwargs.get('orchestrator_profile', None)
self.custom_profile = kwargs.get('custom_profile', None)
self.service_principal_profile = kwargs.get('service_principal_profile', None)
self.master_profile = kwargs.get('master_profile', None)
self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None)
self.windows_profile = kwargs.get('windows_profile', None)
self.linux_profile = kwargs.get('linux_profile', None)
self.diagnostics_profile = kwargs.get('diagnostics_profile', None)
Loading