Skip to content

Commit

Permalink
Build DNS
Browse files Browse the repository at this point in the history
  • Loading branch information
lmazuel committed Jul 22, 2016
1 parent c6d4517 commit 261b165
Show file tree
Hide file tree
Showing 23 changed files with 1,809 additions and 1 deletion.
19 changes: 18 additions & 1 deletion azure-mgmt-dns/azure/mgmt/dns/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
__import__('pkg_resources').declare_namespace(__name__)
# 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 .dns_management_client import DnsManagementClient
from .version import VERSION

__all__ = ['DnsManagementClient']

__version__ = VERSION

125 changes: 125 additions & 0 deletions azure-mgmt-dns/azure/mgmt/dns/dns_management_client.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
# 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 ServiceClient
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
from .operations.record_sets_operations import RecordSetsOperations
from .operations.zones_operations import ZonesOperations
from . import models


class DnsManagementClientConfiguration(AzureConfiguration):
"""Configuration for DnsManagementClient
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: Gets 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 api_version: Client Api Version.
:type api_version: str
:param accept_language: Gets or sets the preferred language for the
response.
:type accept_language: str
:param long_running_operation_retry_timeout: Gets or sets the retry
timeout in seconds for Long Running Operations. Default value is 30.
:type long_running_operation_retry_timeout: int
:param generate_client_request_id: When set to true a unique
x-ms-client-request-id value is generated and included in each request.
Default is true.
:type generate_client_request_id: bool
:param str base_url: Service URL
:param str filepath: Existing config
"""

def __init__(
self, credentials, subscription_id, api_version='2016-04-01', accept_language='en-US', long_running_operation_retry_timeout=30, generate_client_request_id=True, base_url=None, filepath=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 isinstance(subscription_id, str):
raise TypeError("Parameter 'subscription_id' must be str.")
if api_version is not None and not isinstance(api_version, str):
raise TypeError("Optional parameter 'api_version' must be str.")
if accept_language is not None and not isinstance(accept_language, str):
raise TypeError("Optional parameter 'accept_language' must be str.")
if not base_url:
base_url = 'https://management.azure.com'

super(DnsManagementClientConfiguration, self).__init__(base_url, filepath)

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

self.credentials = credentials
self.subscription_id = subscription_id
self.api_version = api_version
self.accept_language = accept_language
self.long_running_operation_retry_timeout = long_running_operation_retry_timeout
self.generate_client_request_id = generate_client_request_id


class DnsManagementClient(object):
"""DnsManagementClient
:ivar config: Configuration for client.
:vartype config: DnsManagementClientConfiguration
:ivar record_sets: RecordSets operations
:vartype record_sets: .operations.RecordSetsOperations
:ivar zones: Zones operations
:vartype zones: .operations.ZonesOperations
: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: Gets 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 api_version: Client Api Version.
:type api_version: str
:param accept_language: Gets or sets the preferred language for the
response.
:type accept_language: str
:param long_running_operation_retry_timeout: Gets or sets the retry
timeout in seconds for Long Running Operations. Default value is 30.
:type long_running_operation_retry_timeout: int
:param generate_client_request_id: When set to true a unique
x-ms-client-request-id value is generated and included in each request.
Default is true.
:type generate_client_request_id: bool
:param str base_url: Service URL
:param str filepath: Existing config
"""

def __init__(
self, credentials, subscription_id, api_version='2016-04-01', accept_language='en-US', long_running_operation_retry_timeout=30, generate_client_request_id=True, base_url=None, filepath=None):

self.config = DnsManagementClientConfiguration(credentials, subscription_id, api_version, accept_language, long_running_operation_retry_timeout, generate_client_request_id, base_url, filepath)
self._client = ServiceClient(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.record_sets = RecordSetsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.zones = ZonesOperations(
self._client, self.config, self._serialize, self._deserialize)
54 changes: 54 additions & 0 deletions azure-mgmt-dns/azure/mgmt/dns/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# 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 .arecord import ARecord
from .aaaa_record import AaaaRecord
from .mx_record import MxRecord
from .ns_record import NsRecord
from .ptr_record import PtrRecord
from .srv_record import SrvRecord
from .txt_record import TxtRecord
from .cname_record import CnameRecord
from .soa_record import SoaRecord
from .record_set import RecordSet
from .record_set_update_parameters import RecordSetUpdateParameters
from .zone import Zone
from .zone_delete_result import ZoneDeleteResult
from .resource import Resource
from .record_set_paged import RecordSetPaged
from .zone_paged import ZonePaged
from .dns_management_client_enums import (
OperationStatus,
HtpStatusCode,
RecordType,
)

__all__ = [
'ARecord',
'AaaaRecord',
'MxRecord',
'NsRecord',
'PtrRecord',
'SrvRecord',
'TxtRecord',
'CnameRecord',
'SoaRecord',
'RecordSet',
'RecordSetUpdateParameters',
'Zone',
'ZoneDeleteResult',
'Resource',
'RecordSetPaged',
'ZonePaged',
'OperationStatus',
'HtpStatusCode',
'RecordType',
]
28 changes: 28 additions & 0 deletions azure-mgmt-dns/azure/mgmt/dns/models/aaaa_record.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 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 AaaaRecord(Model):
"""An AAAA record.
:param ipv6_address: Gets or sets the IPv6 address of this AAAA record in
string notation.
:type ipv6_address: str
"""

_attribute_map = {
'ipv6_address': {'key': 'ipv6Address', 'type': 'str'},
}

def __init__(self, ipv6_address=None):
self.ipv6_address = ipv6_address
28 changes: 28 additions & 0 deletions azure-mgmt-dns/azure/mgmt/dns/models/arecord.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 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 ARecord(Model):
"""An A record.
:param ipv4_address: Gets or sets the IPv4 address of this A record in
string notation.
:type ipv4_address: str
"""

_attribute_map = {
'ipv4_address': {'key': 'ipv4Address', 'type': 'str'},
}

def __init__(self, ipv4_address=None):
self.ipv4_address = ipv4_address
28 changes: 28 additions & 0 deletions azure-mgmt-dns/azure/mgmt/dns/models/cname_record.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 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 CnameRecord(Model):
"""A CNAME record.
:param cname: Gets or sets the canonical name for this record without a
terminating dot.
:type cname: str
"""

_attribute_map = {
'cname': {'key': 'cname', 'type': 'str'},
}

def __init__(self, cname=None):
self.cname = cname
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# 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 enum import Enum


class OperationStatus(Enum):

in_progress = "InProgress"
succeeded = "Succeeded"
failed = "Failed"


class HtpStatusCode(Enum):

continue_enum = "Continue"
switching_protocols = "SwitchingProtocols"
ok = "OK"
created = "Created"
accepted = "Accepted"
non_authoritative_information = "NonAuthoritativeInformation"
no_content = "NoContent"
reset_content = "ResetContent"
partial_content = "PartialContent"
multiple_choices = "MultipleChoices"
ambiguous = "Ambiguous"
moved_permanently = "MovedPermanently"
moved = "Moved"
found = "Found"
redirect = "Redirect"
see_other = "SeeOther"
redirect_method = "RedirectMethod"
not_modified = "NotModified"
use_proxy = "UseProxy"
unused = "Unused"
temporary_redirect = "TemporaryRedirect"
redirect_keep_verb = "RedirectKeepVerb"
bad_request = "BadRequest"
unauthorized = "Unauthorized"
payment_required = "PaymentRequired"
forbidden = "Forbidden"
not_found = "NotFound"
method_not_allowed = "MethodNotAllowed"
not_acceptable = "NotAcceptable"
proxy_authentication_required = "ProxyAuthenticationRequired"
request_timeout = "RequestTimeout"
conflict = "Conflict"
gone = "Gone"
length_required = "LengthRequired"
precondition_failed = "PreconditionFailed"
request_entity_too_large = "RequestEntityTooLarge"
request_uri_too_long = "RequestUriTooLong"
unsupported_media_type = "UnsupportedMediaType"
requested_range_not_satisfiable = "RequestedRangeNotSatisfiable"
expectation_failed = "ExpectationFailed"
upgrade_required = "UpgradeRequired"
internal_server_error = "InternalServerError"
not_implemented = "NotImplemented"
bad_gateway = "BadGateway"
service_unavailable = "ServiceUnavailable"
gateway_timeout = "GatewayTimeout"
http_version_not_supported = "HttpVersionNotSupported"


class RecordType(Enum):

a = "A"
aaaa = "AAAA"
cname = "CNAME"
mx = "MX"
ns = "NS"
ptr = "PTR"
soa = "SOA"
srv = "SRV"
txt = "TXT"
Loading

0 comments on commit 261b165

Please sign in to comment.