diff --git a/azure-cli.pyproj b/azure-cli.pyproj
index d611d4e57a9..c2d917ed342 100644
--- a/azure-cli.pyproj
+++ b/azure-cli.pyproj
@@ -204,6 +204,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -615,6 +634,9 @@
+
+
+
@@ -627,6 +649,7 @@
+
@@ -748,6 +771,8 @@
+
+
diff --git a/requirements.txt b/requirements.txt
index 3daa4695ddd..9df67c4fdb8 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -2,6 +2,7 @@ adal==0.4.0
applicationinsights==0.10.0
argcomplete==1.3.0
azure==2.0.0rc5
+azure-mgmt-trafficmanager==0.30.0rc5
colorama==0.3.7
jmespath
mock==1.3.0
diff --git a/setup.py b/setup.py
index 1eac18b9a11..3d654930e4e 100644
--- a/setup.py
+++ b/setup.py
@@ -57,6 +57,7 @@
'applicationinsights',
'argcomplete>=1.3.0',
'azure==2.0.0rc5',
+ 'azure-mgmt-trafficmanager==0.30.0rc5',
'colorama',
'jmespath',
'msrest>=0.4.0',
diff --git a/src/azure/cli/commands/parameters.py b/src/azure/cli/commands/parameters.py
index 32b2d24376c..3f74ffbde1c 100644
--- a/src/azure/cli/commands/parameters.py
+++ b/src/azure/cli/commands/parameters.py
@@ -65,6 +65,11 @@ def completer(prefix, action, parsed_args, **kwargs): # pylint: disable=unused-a
return list(enum_type.__dict__[ENUM_MAPPING_KEY].keys())
return completer
+def get_generic_completion_list(generic_list):
+ def completer(prefix, action, parsed_args, **kwargs): # pylint: disable=unused-argument
+ return generic_list
+ return completer
+
def get_enum_choices(enum_type):
return [x.value for x in enum_type]
diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/_params.py b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/_params.py
index 2d53c22cbe7..899066a3527 100644
--- a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/_params.py
+++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/_params.py
@@ -15,7 +15,8 @@
from azure.cli.commands import CliArgumentType, register_cli_argument, register_extra_cli_argument
from azure.cli.commands.parameters import (location_type, get_resource_name_completion_list,
- get_enum_type_completion_list, tags_type, get_enum_choices)
+ get_enum_type_completion_list, tags_type, get_enum_choices,
+ get_generic_completion_list)
from azure.cli.commands.validators import MarkSpecifiedAction
from azure.cli.commands.template_create import register_folded_cli_argument
from azure.cli.command_modules.network._factory import _network_client_factory
@@ -32,6 +33,9 @@
from azure.cli.command_modules.network.mgmt_nic.lib.models.nic_creation_client_enums import privateIpAddressVersion
from azure.cli.command_modules.network.mgmt_vnet_gateway.lib.models.vnet_gateway_creation_client_enums import \
(gatewayType, sku, vpnType)
+from azure.cli.command_modules.network.mgmt_traffic_manager_profile.lib.models.traffic_manager_profile_creation_client_enums \
+ import routingMethod
+from azure.cli.command_modules.network.custom import list_traffic_manager_endpoints
# COMPLETERS
@@ -87,6 +91,13 @@ def completer(prefix, action, parsed_args, **kwargs): # pylint: disable=unused-a
return [r.name for r in url_map.path_rules]
return completer
+def get_tm_endpoint_completion_list():
+ def completer(prefix, action, parsed_args, **kwargs): # pylint: disable=unused-argument
+ return list_traffic_manager_endpoints(parsed_args.resource_group_name, parsed_args.profile_name) \
+ if parsed_args.resource_group_name and parsed_args.profile_name \
+ else []
+ return completer
+
# BASIC PARAMETER CONFIGURATION
name_arg_type = CliArgumentType(options_list=('--name', '-n'), metavar='NAME')
@@ -351,6 +362,8 @@ def completer(prefix, action, parsed_args, **kwargs): # pylint: disable=unused-a
register_cli_argument('network vpn-gateway root-cert create', 'public_cert_data', help='Base64 contents of the root certificate file or file path.', validator=load_cert_file('public_cert_data'))
register_cli_argument('network vpn-gateway revoked-cert create', 'thumbprint', help='Certificate thumbprint.')
register_extra_cli_argument('network vpn-gateway update', 'address_prefixes', options_list=('--address-prefixes',), help='List of address prefixes for the VPN gateway. Prerequisite for uploading certificates.', nargs='+')
+register_cli_argument('network vpn-gateway root-cert create', 'cert_name', help='Root certificate name', options_list=('--name', '-n'))
+register_cli_argument('network vpn-gateway root-cert create', 'gateway_name', help='Virtual network gateway name')
# VPN connection
register_cli_argument('network vpn-connection', 'virtual_network_gateway_connection_name', CliArgumentType(options_list=('--name', '-n'), metavar='NAME', id_part='name'))
@@ -360,3 +373,16 @@ def completer(prefix, action, parsed_args, **kwargs): # pylint: disable=unused-a
# VPN connection shared key
register_cli_argument('network vpn-connection shared-key', 'connection_shared_key_name', CliArgumentType(options_list=('--name', '-n')), id_part='name')
register_cli_argument('network vpn-connection shared-key', 'virtual_network_gateway_connection_name', CliArgumentType(options_list=('--connection-name',), metavar='NAME'), id_part='name')
+
+# Traffic manager profiles
+register_cli_argument('network traffic-manager profile', 'traffic_manager_profile_name', name_arg_type, id_part='name', completer=get_resource_name_completion_list('Microsoft.Network/trafficManagerProfiles'))
+register_cli_argument('network traffic-manager profile', 'profile_name', name_arg_type, id_part='name', completer=get_resource_name_completion_list('Microsoft.Network/trafficManagerProfiles'))
+register_cli_argument('network traffic-manager profile create', 'routing_method', choices=get_enum_choices(routingMethod), completer=get_enum_type_completion_list(routingMethod))
+register_cli_argument('network traffic-manager profile check-dns', 'name', name_arg_type, help='DNS prefix to verify availability for.', required=True)
+register_cli_argument('network traffic-manager profile check-dns', 'type', help=argparse.SUPPRESS, default='Microsoft.Network/trafficManagerProfiles')
+
+# Traffic manager endpoints
+register_cli_argument('network traffic-manager endpoint', 'endpoint_name', name_arg_type, id_part='name', help='Endpoint name.', completer=get_tm_endpoint_completion_list())
+endpoint_types = ['azureEndpoints', 'externalEndpoints', 'nestedEndpoints']
+register_cli_argument('network traffic-manager endpoint', 'endpoint_type', options_list=('--type',), help='Endpoint type. Values include: {}.'.format(', '.join(endpoint_types)), completer=get_generic_completion_list(endpoint_types))
+register_cli_argument('network traffic-manager endpoint', 'profile_name', help='Name of parent profile.', completer=get_resource_name_completion_list('Microsoft.Network/trafficManagerProfiles'))
diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/custom.py b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/custom.py
index fb3c341da1d..de9ba1d3360 100644
--- a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/custom.py
+++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/custom.py
@@ -15,8 +15,11 @@
from azure.cli.command_modules.network.mgmt_app_gateway.lib.operations.app_gateway_operations \
import AppGatewayOperations
+from azure.cli.commands.client_factory import get_mgmt_service_client
from ._factory import _network_client_factory
from azure.cli.command_modules.network.mgmt_nic.lib.operations.nic_operations import NicOperations
+from azure.mgmt.trafficmanager import TrafficManagerManagementClient
+from azure.mgmt.trafficmanager.models import Endpoint
#region Network subresource factory methods
@@ -98,6 +101,7 @@ def list_route_tables(resource_group_name=None):
def list_application_gateways(resource_group_name=None):
return _generic_list('application_gateways', resource_group_name)
+
#endregion
#region Application Gateway subresource commands
@@ -721,22 +725,6 @@ def update_subnet(resource_group_name, virtual_network_name, subnet_name,
update_nsg_rule.__doc__ = SecurityRule.__doc__
-def create_route(resource_group_name, route_table_name, route_name, next_hop_type, address_prefix,
- next_hop_ip_address=None):
- route = Route(next_hop_type, None, address_prefix, next_hop_ip_address, None, route_name)
- ncf = _network_client_factory()
- return ncf.routes.create_or_update(resource_group_name, route_table_name, route_name, route)
-
-create_route.__doc__ = Route.__doc__
-
-def create_vpn_gateway_root_cert(resource_group_name, gateway_name, public_cert_data, cert_name):
- config, gateway, ncf = _prep_cert_create(gateway_name, resource_group_name)
-
- cert = VpnClientRootCertificate(name=cert_name, public_cert_data=public_cert_data)
- config.vpn_client_root_certificates.append(cert)
-
- return ncf.create_or_update(resource_group_name, gateway_name, gateway)
-
def delete_vpn_gateway_root_cert(resource_group_name, gateway_name, cert_name):
ncf = _network_client_factory().virtual_network_gateways
gateway = ncf.get(resource_group_name, gateway_name)
@@ -807,4 +795,59 @@ def create_express_route_auth(resource_group_name, circuit_name, authorization_n
ncf = _network_client_factory().express_route_circuit_authorizations
auth = ExpressRouteCircuitAuthorization(authorization_key=authorization_key)
return ncf.create_or_update(resource_group_name, circuit_name, authorization_name, auth)
+
+def create_route(resource_group_name, route_table_name, route_name, next_hop_type, address_prefix,
+ next_hop_ip_address=None):
+ route = Route(next_hop_type, None, address_prefix, next_hop_ip_address, None, route_name)
+ ncf = _network_client_factory()
+ return ncf.routes.create_or_update(resource_group_name, route_table_name, route_name, route)
+
+create_route.__doc__ = Route.__doc__
+
+def create_vpn_gateway_root_cert(resource_group_name, gateway_name, public_cert_data, cert_name):
+ ncf = _network_client_factory().virtual_network_gateways
+ gateway = ncf.get(resource_group_name, gateway_name)
+ if not gateway.vpn_client_configuration:
+ gateway.vpn_client_configuration = VpnClientConfiguration()
+ config = gateway.vpn_client_configuration
+
+ if config.vpn_client_root_certificates is None:
+ config.vpn_client_root_certificates = []
+
+ cert = VpnClientRootCertificate(name=cert_name, public_cert_data=public_cert_data)
+ config.vpn_client_root_certificates.append(cert)
+
+ return ncf.create_or_update(resource_group_name, gateway_name, gateway)
+#endregion
+
+#region Traffic Manager Commands
+def list_traffic_manager_profiles(resource_group_name=None):
+ ncf = get_mgmt_service_client(TrafficManagerManagementClient).profiles
+ if resource_group_name:
+ return ncf.list_all_in_resource_group(resource_group_name)
+ else:
+ return ncf.list_all()
+
+def create_traffic_manager_endpoint(resource_group_name, profile_name, endpoint_type, endpoint_name,
+ target_resource_id=None, target=None,
+ endpoint_status=None, weight=None, priority=None,
+ endpoint_location=None, endpoint_monitor_status=None,
+ min_child_endpoints=None):
+ ncf = get_mgmt_service_client(TrafficManagerManagementClient).endpoints
+
+ endpoint = Endpoint(target_resource_id=target_resource_id, target=target,
+ endpoint_status=endpoint_status, weight=weight, priority=priority,
+ endpoint_location=endpoint_location,
+ endpoint_monitor_status=endpoint_monitor_status,
+ min_child_endpoints=min_child_endpoints)
+
+ return ncf.create_or_update(resource_group_name, profile_name, endpoint_type, endpoint_name,
+ endpoint)
+
+create_traffic_manager_endpoint.__doc__ = Endpoint.__doc__
+
+def list_traffic_manager_endpoints(resource_group_name, profile_name, endpoint_type=None):
+ ncf = get_mgmt_service_client(TrafficManagerManagementClient).profiles
+ profile = ncf.get(resource_group_name, profile_name)
+ return [e for e in profile.endpoints if not endpoint_type or e.type.endswith(endpoint_type)]
#endregion
diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/generated.py b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/generated.py
index 41eb26df884..fb8aab82cbc 100644
--- a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/generated.py
+++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/generated.py
@@ -23,6 +23,9 @@
VirtualNetworkGatewaysOperations,
VirtualNetworksOperations)
+from azure.mgmt.trafficmanager.operations import EndpointsOperations, ProfilesOperations
+from azure.mgmt.trafficmanager import TrafficManagerManagementClient
+
from azure.cli.commands.client_factory import get_mgmt_service_client
from azure.cli.commands.arm import register_generic_update
from azure.cli.command_modules.network.mgmt_app_gateway.lib.operations import AppGatewayOperations
@@ -63,6 +66,10 @@
import ExpressRoutePeeringOperations
from azure.cli.command_modules.network.mgmt_express_route_peering.lib \
import ExpressRoutePeeringCreationClient as ExpressRoutePeeringClient
+from azure.cli.command_modules.network.mgmt_traffic_manager_profile.lib.operations \
+ import TrafficManagerProfileOperations
+from azure.cli.command_modules.network.mgmt_traffic_manager_profile.lib \
+ import TrafficManagerProfileCreationClient as TrafficManagerProfileClient
from azure.cli.commands import DeploymentOutputLongRunningOperation, cli_command
@@ -95,7 +102,8 @@
list_application_gateways, list_express_route_circuits, list_lbs, list_nics, list_nsgs,
list_public_ips, list_route_tables, list_vnet, create_route,
handle_address_prefixes, create_vpn_gateway_root_cert, delete_vpn_gateway_root_cert,
- create_vpn_gateway_revoked_cert, delete_vpn_gateway_revoked_cert, create_express_route_auth)
+ create_vpn_gateway_revoked_cert, delete_vpn_gateway_revoked_cert, create_express_route_auth,
+ list_traffic_manager_profiles, create_traffic_manager_endpoint, list_traffic_manager_endpoints)
from ._factory import _network_client_factory
# pylint: disable=line-too-long
@@ -342,3 +350,23 @@
factory = lambda _: get_mgmt_service_client(VNetClient).vnet
cli_command('network vnet create', VnetOperations.create_or_update, factory, transform=DeploymentOutputLongRunningOperation('Starting network vnet create'))
+
+# Traffic Manager ProfileOperations
+factory = lambda _: get_mgmt_service_client(TrafficManagerManagementClient).profiles
+cli_command('network traffic-manager profile check-dns', ProfilesOperations.check_traffic_manager_relative_dns_name_availability, factory)
+cli_command('network traffic-manager profile show', ProfilesOperations.get, factory)
+cli_command('network traffic-manager profile delete', ProfilesOperations.delete, factory)
+cli_command('network traffic-manager profile list', list_traffic_manager_profiles)
+register_generic_update('network traffic-manager profile update', ProfilesOperations.get, ProfilesOperations.create_or_update, factory)
+
+factory = lambda _: get_mgmt_service_client(TrafficManagerProfileClient).traffic_manager_profile
+cli_command('network traffic-manager profile create', TrafficManagerProfileOperations.create_or_update, factory, transform=DeploymentOutputLongRunningOperation('Starting network traffic-manager profile create'))
+
+# Traffic Manager EndpointOperations
+factory = lambda _: get_mgmt_service_client(TrafficManagerManagementClient).endpoints
+cli_command('network traffic-manager endpoint show', EndpointsOperations.get, factory)
+cli_command('network traffic-manager endpoint delete', EndpointsOperations.delete, factory)
+cli_command('network traffic-manager endpoint create', create_traffic_manager_endpoint)
+cli_command('network traffic-manager endpoint list', list_traffic_manager_endpoints)
+register_generic_update('network traffic-manager endpoint update', EndpointsOperations.get, EndpointsOperations.create_or_update, factory)
+
diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/__init__.py b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/__init__.py
new file mode 100644
index 00000000000..d6c0be38b25
--- /dev/null
+++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/__init__.py
@@ -0,0 +1,8 @@
+#---------------------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+#---------------------------------------------------------------------------------------------
+#pylint: skip-file
+import pkg_resources
+pkg_resources.declare_namespace(__name__)
+
diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/azuredeploy.json b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/azuredeploy.json
new file mode 100644
index 00000000000..48004a38f98
--- /dev/null
+++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/azuredeploy.json
@@ -0,0 +1,111 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "location": {
+ "type": "string",
+ "defaultValue": "global",
+ "metadata": {
+ "description": "Location for traffic manager or 'global'."
+ }
+ },
+ "monitorPath": {
+ "type": "string",
+ "defaultValue": "/",
+ "metadata": {
+ "description": "Path to monitor."
+ }
+ },
+ "monitorPort": {
+ "type": "int",
+ "defaultValue": 80,
+ "metadata": {
+ "description": "Port to monitor."
+ }
+ },
+ "monitorProtocol": {
+ "type": "string",
+ "allowedValues": [
+ "http",
+ "https"
+ ],
+ "defaultValue": "http",
+ "metadata": {
+ "description": "Monitor protocol."
+ }
+ },
+ "routingMethod": {
+ "type": "string",
+ "allowedValues": [
+ "priority",
+ "performance",
+ "weighted"
+ ],
+ "metadata": {
+ "description": "Routing method."
+ }
+ },
+ "status": {
+ "type": "string",
+ "defaultValue": "enabled",
+ "allowedValues": [
+ "enabled",
+ "disabled"
+ ],
+ "metadata": {
+ "description": "Create an enabled or disabled profile."
+ }
+ },
+ "trafficManagerProfileName": {
+ "type": "string",
+ "metadata": {
+ "description": "Name of resource."
+ }
+ },
+ "ttl": {
+ "type": "int",
+ "defaultValue": 30,
+ "metadata": {
+ "description": "DNS Config time-to-live in seconds."
+ }
+ },
+ "uniqueDnsName": {
+ "type": "string",
+ "metadata": {
+ "description": "Relative DNS name for the traffic manager profile, resulting FQDN will be .trafficmanager.net, must be globally unique."
+ }
+ }
+ },
+ "variables": {
+
+ },
+ "resources": [
+ {
+ "apiVersion": "2015-11-01",
+ "type": "Microsoft.Network/trafficManagerProfiles",
+ "name": "[parameters('trafficManagerProfileName')]",
+ "location": "[parameters('location')]",
+ "properties": {
+ "profileStatus": "[parameters('status')]",
+ "trafficRoutingMethod": "[parameters('routingMethod')]",
+ "dnsConfig": {
+ "relativeName": "[parameters('uniqueDnsName')]",
+ "ttl": "[parameters('ttl')]"
+ },
+ "monitorConfig": {
+ "protocol": "[parameters('monitorProtocol')]",
+ "port": "[parameters('monitorPort')]",
+ "path": "[parameters('monitorPath')]"
+ },
+ "endpoints": [
+ ]
+ }
+ }
+ ],
+ "outputs": {
+ "TrafficManagerProfile": {
+ "type": "object",
+ "value": "[reference(parameters('trafficManagerProfileName'))]"
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/__init__.py b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/__init__.py
new file mode 100644
index 00000000000..0eff12b609b
--- /dev/null
+++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/__init__.py
@@ -0,0 +1,20 @@
+#---------------------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+#---------------------------------------------------------------------------------------------
+#pylint: skip-file
+
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from .traffic_manager_profile_creation_client import TrafficManagerProfileCreationClient
+from .version import VERSION
+
+__all__ = ['TrafficManagerProfileCreationClient']
+
+__version__ = VERSION
+
diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/credentials.py b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/credentials.py
new file mode 100644
index 00000000000..a1be1d163ac
--- /dev/null
+++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/credentials.py
@@ -0,0 +1,22 @@
+#---------------------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+#---------------------------------------------------------------------------------------------
+#pylint: skip-file
+
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.authentication import (
+ BasicAuthentication,
+ BasicTokenAuthentication,
+ OAuthTokenAuthentication)
+
+from msrestazure.azure_active_directory import (
+ InteractiveCredentials,
+ ServicePrincipalCredentials,
+ UserPassCredentials)
diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/exceptions.py b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/exceptions.py
new file mode 100644
index 00000000000..ccc3539950c
--- /dev/null
+++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/exceptions.py
@@ -0,0 +1,25 @@
+#---------------------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+#---------------------------------------------------------------------------------------------
+#pylint: skip-file
+
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.exceptions import (
+ ClientException,
+ SerializationError,
+ DeserializationError,
+ TokenExpiredError,
+ ClientRequestError,
+ AuthenticationError,
+ HttpOperationError,
+ ValidationError,
+)
+
+from msrestazure.azure_exceptions import CloudError
diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/models/__init__.py b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/models/__init__.py
new file mode 100644
index 00000000000..381214884af
--- /dev/null
+++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/models/__init__.py
@@ -0,0 +1,44 @@
+#---------------------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+#---------------------------------------------------------------------------------------------
+#pylint: skip-file
+
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from .deployment_traffic_manager_profile import DeploymentTrafficManagerProfile
+from .template_link import TemplateLink
+from .parameters_link import ParametersLink
+from .provider_resource_type import ProviderResourceType
+from .provider import Provider
+from .basic_dependency import BasicDependency
+from .dependency import Dependency
+from .deployment_properties_extended import DeploymentPropertiesExtended
+from .deployment_extended import DeploymentExtended
+from .traffic_manager_profile_creation_client_enums import (
+ monitorProtocol,
+ routingMethod,
+ status,
+ DeploymentMode,
+)
+
+__all__ = [
+ 'DeploymentTrafficManagerProfile',
+ 'TemplateLink',
+ 'ParametersLink',
+ 'ProviderResourceType',
+ 'Provider',
+ 'BasicDependency',
+ 'Dependency',
+ 'DeploymentPropertiesExtended',
+ 'DeploymentExtended',
+ 'monitorProtocol',
+ 'routingMethod',
+ 'status',
+ 'DeploymentMode',
+]
diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/models/basic_dependency.py b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/models/basic_dependency.py
new file mode 100644
index 00000000000..58e54d1d7b6
--- /dev/null
+++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/models/basic_dependency.py
@@ -0,0 +1,38 @@
+#---------------------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+#---------------------------------------------------------------------------------------------
+#pylint: skip-file
+
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.serialization import Model
+
+
+class BasicDependency(Model):
+ """
+ Deployment dependency information.
+
+ :param id: Gets or sets the ID of the dependency.
+ :type id: str
+ :param resource_type: Gets or sets the dependency resource type.
+ :type resource_type: str
+ :param resource_name: Gets or sets the dependency resource name.
+ :type resource_name: str
+ """
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'resource_type': {'key': 'resourceType', 'type': 'str'},
+ 'resource_name': {'key': 'resourceName', 'type': 'str'},
+ }
+
+ def __init__(self, id=None, resource_type=None, resource_name=None):
+ self.id = id
+ self.resource_type = resource_type
+ self.resource_name = resource_name
diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/models/dependency.py b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/models/dependency.py
new file mode 100644
index 00000000000..9d01bb69753
--- /dev/null
+++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/models/dependency.py
@@ -0,0 +1,43 @@
+#---------------------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+#---------------------------------------------------------------------------------------------
+#pylint: skip-file
+
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.serialization import Model
+
+
+class Dependency(Model):
+ """
+ Deployment dependency information.
+
+ :param depends_on: Gets the list of dependencies.
+ :type depends_on: list of :class:`BasicDependency
+ `
+ :param id: Gets or sets the ID of the dependency.
+ :type id: str
+ :param resource_type: Gets or sets the dependency resource type.
+ :type resource_type: str
+ :param resource_name: Gets or sets the dependency resource name.
+ :type resource_name: str
+ """
+
+ _attribute_map = {
+ 'depends_on': {'key': 'dependsOn', 'type': '[BasicDependency]'},
+ 'id': {'key': 'id', 'type': 'str'},
+ 'resource_type': {'key': 'resourceType', 'type': 'str'},
+ 'resource_name': {'key': 'resourceName', 'type': 'str'},
+ }
+
+ def __init__(self, depends_on=None, id=None, resource_type=None, resource_name=None):
+ self.depends_on = depends_on
+ self.id = id
+ self.resource_type = resource_type
+ self.resource_name = resource_name
diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/models/deployment_extended.py b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/models/deployment_extended.py
new file mode 100644
index 00000000000..9503b595348
--- /dev/null
+++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/models/deployment_extended.py
@@ -0,0 +1,43 @@
+#---------------------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+#---------------------------------------------------------------------------------------------
+#pylint: skip-file
+
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.serialization import Model
+
+
+class DeploymentExtended(Model):
+ """
+ Deployment information.
+
+ :param id: Gets or sets the ID of the deployment.
+ :type id: str
+ :param name: Gets or sets the name of the deployment.
+ :type name: str
+ :param properties: Gets or sets deployment properties.
+ :type properties: :class:`DeploymentPropertiesExtended
+ `
+ """
+
+ _validation = {
+ 'name': {'required': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'properties': {'key': 'properties', 'type': 'DeploymentPropertiesExtended'},
+ }
+
+ def __init__(self, name, id=None, properties=None):
+ self.id = id
+ self.name = name
+ self.properties = properties
diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/models/deployment_properties_extended.py b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/models/deployment_properties_extended.py
new file mode 100644
index 00000000000..b78642b17c7
--- /dev/null
+++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/models/deployment_properties_extended.py
@@ -0,0 +1,80 @@
+#---------------------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+#---------------------------------------------------------------------------------------------
+#pylint: skip-file
+
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.serialization import Model
+
+
+class DeploymentPropertiesExtended(Model):
+ """
+ Deployment properties with additional details.
+
+ :param provisioning_state: Gets or sets the state of the provisioning.
+ :type provisioning_state: str
+ :param correlation_id: Gets or sets the correlation ID of the deployment.
+ :type correlation_id: str
+ :param timestamp: Gets or sets the timestamp of the template deployment.
+ :type timestamp: datetime
+ :param outputs: Gets or sets key/value pairs that represent
+ deploymentoutput.
+ :type outputs: object
+ :param providers: Gets the list of resource providers needed for the
+ deployment.
+ :type providers: list of :class:`Provider `
+ :param dependencies: Gets the list of deployment dependencies.
+ :type dependencies: list of :class:`Dependency
+ `
+ :param template: Gets or sets the template content. Use only one of
+ Template or TemplateLink.
+ :type template: object
+ :param template_link: Gets or sets the URI referencing the template. Use
+ only one of Template or TemplateLink.
+ :type template_link: :class:`TemplateLink `
+ :param parameters: Deployment parameters. Use only one of Parameters or
+ ParametersLink.
+ :type parameters: object
+ :param parameters_link: Gets or sets the URI referencing the parameters.
+ Use only one of Parameters or ParametersLink.
+ :type parameters_link: :class:`ParametersLink
+ `
+ :param mode: Gets or sets the deployment mode. Possible values include:
+ 'Incremental', 'Complete'
+ :type mode: str or :class:`DeploymentMode
+ `
+ """
+
+ _attribute_map = {
+ 'provisioning_state': {'key': 'provisioningState', 'type': 'str'},
+ 'correlation_id': {'key': 'correlationId', 'type': 'str'},
+ 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'},
+ 'outputs': {'key': 'outputs', 'type': 'object'},
+ 'providers': {'key': 'providers', 'type': '[Provider]'},
+ 'dependencies': {'key': 'dependencies', 'type': '[Dependency]'},
+ 'template': {'key': 'template', 'type': 'object'},
+ 'template_link': {'key': 'TemplateLink', 'type': 'TemplateLink'},
+ 'parameters': {'key': 'parameters', 'type': 'object'},
+ 'parameters_link': {'key': 'parametersLink', 'type': 'ParametersLink'},
+ 'mode': {'key': 'mode', 'type': 'DeploymentMode'},
+ }
+
+ def __init__(self, provisioning_state=None, correlation_id=None, timestamp=None, outputs=None, providers=None, dependencies=None, template=None, template_link=None, parameters=None, parameters_link=None, mode=None):
+ self.provisioning_state = provisioning_state
+ self.correlation_id = correlation_id
+ self.timestamp = timestamp
+ self.outputs = outputs
+ self.providers = providers
+ self.dependencies = dependencies
+ self.template = template
+ self.template_link = template_link
+ self.parameters = parameters
+ self.parameters_link = parameters_link
+ self.mode = mode
diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/models/deployment_traffic_manager_profile.py b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/models/deployment_traffic_manager_profile.py
new file mode 100644
index 00000000000..780bf78046c
--- /dev/null
+++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/models/deployment_traffic_manager_profile.py
@@ -0,0 +1,100 @@
+#---------------------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+#---------------------------------------------------------------------------------------------
+#pylint: skip-file
+
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.serialization import Model
+
+
+class DeploymentTrafficManagerProfile(Model):
+ """
+ Deployment operation parameters.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar uri: URI referencing the template. Default value:
+ "https://azuresdkci.blob.core.windows.net/templatehost/CreateTrafficManagerProfile_2016-08-08/azuredeploy.json"
+ .
+ :vartype uri: str
+ :param content_version: If included it must match the ContentVersion in
+ the template.
+ :type content_version: str
+ :param location: Location for traffic manager or 'global'. Default value:
+ "global" .
+ :type location: str
+ :param monitor_path: Path to monitor. Default value: "/" .
+ :type monitor_path: str
+ :param monitor_port: Port to monitor. Default value: 80 .
+ :type monitor_port: int
+ :param monitor_protocol: Monitor protocol. Possible values include:
+ 'http', 'https'. Default value: "http" .
+ :type monitor_protocol: str or :class:`monitorProtocol
+ `
+ :param routing_method: Routing method. Possible values include:
+ 'priority', 'performance', 'weighted'
+ :type routing_method: str or :class:`routingMethod
+ `
+ :param status: Create an enabled or disabled profile. Possible values
+ include: 'enabled', 'disabled'. Default value: "enabled" .
+ :type status: str or :class:`status
+ `
+ :param traffic_manager_profile_name: Name of resource.
+ :type traffic_manager_profile_name: str
+ :param ttl: DNS Config time-to-live in seconds. Default value: 30 .
+ :type ttl: int
+ :param unique_dns_name: Relative DNS name for the traffic manager
+ profile, resulting FQDN will be .trafficmanager.net, must
+ be globally unique.
+ :type unique_dns_name: str
+ :ivar mode: Gets or sets the deployment mode. Default value:
+ "Incremental" .
+ :vartype mode: str
+ """
+
+ _validation = {
+ 'uri': {'required': True, 'constant': True},
+ 'routing_method': {'required': True},
+ 'traffic_manager_profile_name': {'required': True},
+ 'unique_dns_name': {'required': True},
+ 'mode': {'required': True, 'constant': True},
+ }
+
+ _attribute_map = {
+ 'uri': {'key': 'properties.templateLink.uri', 'type': 'str'},
+ 'content_version': {'key': 'properties.templateLink.contentVersion', 'type': 'str'},
+ 'location': {'key': 'properties.parameters.location.value', 'type': 'str'},
+ 'monitor_path': {'key': 'properties.parameters.monitorPath.value', 'type': 'str'},
+ 'monitor_port': {'key': 'properties.parameters.monitorPort.value', 'type': 'int'},
+ 'monitor_protocol': {'key': 'properties.parameters.monitorProtocol.value', 'type': 'monitorProtocol'},
+ 'routing_method': {'key': 'properties.parameters.routingMethod.value', 'type': 'routingMethod'},
+ 'status': {'key': 'properties.parameters.status.value', 'type': 'status'},
+ 'traffic_manager_profile_name': {'key': 'properties.parameters.trafficManagerProfileName.value', 'type': 'str'},
+ 'ttl': {'key': 'properties.parameters.ttl.value', 'type': 'int'},
+ 'unique_dns_name': {'key': 'properties.parameters.uniqueDnsName.value', 'type': 'str'},
+ 'mode': {'key': 'properties.mode', 'type': 'str'},
+ }
+
+ uri = "https://azuresdkci.blob.core.windows.net/templatehost/CreateTrafficManagerProfile_2016-08-08/azuredeploy.json"
+
+ mode = "Incremental"
+
+ def __init__(self, routing_method, traffic_manager_profile_name, unique_dns_name, content_version=None, location="global", monitor_path="/", monitor_port=80, monitor_protocol="http", status="enabled", ttl=30):
+ self.content_version = content_version
+ self.location = location
+ self.monitor_path = monitor_path
+ self.monitor_port = monitor_port
+ self.monitor_protocol = monitor_protocol
+ self.routing_method = routing_method
+ self.status = status
+ self.traffic_manager_profile_name = traffic_manager_profile_name
+ self.ttl = ttl
+ self.unique_dns_name = unique_dns_name
diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/models/parameters_link.py b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/models/parameters_link.py
new file mode 100644
index 00000000000..8f3bcf59587
--- /dev/null
+++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/models/parameters_link.py
@@ -0,0 +1,39 @@
+#---------------------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+#---------------------------------------------------------------------------------------------
+#pylint: skip-file
+
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.serialization import Model
+
+
+class ParametersLink(Model):
+ """
+ Entity representing the reference to the deployment paramaters.
+
+ :param uri: URI referencing the template.
+ :type uri: str
+ :param content_version: If included it must match the ContentVersion in
+ the template.
+ :type content_version: str
+ """
+
+ _validation = {
+ 'uri': {'required': True},
+ }
+
+ _attribute_map = {
+ 'uri': {'key': 'uri', 'type': 'str'},
+ 'content_version': {'key': 'contentVersion', 'type': 'str'},
+ }
+
+ def __init__(self, uri, content_version=None):
+ self.uri = uri
+ self.content_version = content_version
diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/models/provider.py b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/models/provider.py
new file mode 100644
index 00000000000..0263c32764c
--- /dev/null
+++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/models/provider.py
@@ -0,0 +1,45 @@
+#---------------------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+#---------------------------------------------------------------------------------------------
+#pylint: skip-file
+
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.serialization import Model
+
+
+class Provider(Model):
+ """
+ Resource provider information.
+
+ :param id: Gets or sets the provider id.
+ :type id: str
+ :param namespace: Gets or sets the namespace of the provider.
+ :type namespace: str
+ :param registration_state: Gets or sets the registration state of the
+ provider.
+ :type registration_state: str
+ :param resource_types: Gets or sets the collection of provider resource
+ types.
+ :type resource_types: list of :class:`ProviderResourceType
+ `
+ """
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'namespace': {'key': 'namespace', 'type': 'str'},
+ 'registration_state': {'key': 'registrationState', 'type': 'str'},
+ 'resource_types': {'key': 'resourceTypes', 'type': '[ProviderResourceType]'},
+ }
+
+ def __init__(self, id=None, namespace=None, registration_state=None, resource_types=None):
+ self.id = id
+ self.namespace = namespace
+ self.registration_state = registration_state
+ self.resource_types = resource_types
diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/models/provider_resource_type.py b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/models/provider_resource_type.py
new file mode 100644
index 00000000000..13a24108cc0
--- /dev/null
+++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/models/provider_resource_type.py
@@ -0,0 +1,43 @@
+#---------------------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+#---------------------------------------------------------------------------------------------
+#pylint: skip-file
+
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.serialization import Model
+
+
+class ProviderResourceType(Model):
+ """
+ Resource type managed by the resource provider.
+
+ :param resource_type: Gets or sets the resource type.
+ :type resource_type: str
+ :param locations: Gets or sets the collection of locations where this
+ resource type can be created in.
+ :type locations: list of str
+ :param api_versions: Gets or sets the api version.
+ :type api_versions: list of str
+ :param properties: Gets or sets the properties.
+ :type properties: dict
+ """
+
+ _attribute_map = {
+ 'resource_type': {'key': 'resourceType', 'type': 'str'},
+ 'locations': {'key': 'locations', 'type': '[str]'},
+ 'api_versions': {'key': 'apiVersions', 'type': '[str]'},
+ 'properties': {'key': 'properties', 'type': '{str}'},
+ }
+
+ def __init__(self, resource_type=None, locations=None, api_versions=None, properties=None):
+ self.resource_type = resource_type
+ self.locations = locations
+ self.api_versions = api_versions
+ self.properties = properties
diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/models/template_link.py b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/models/template_link.py
new file mode 100644
index 00000000000..7f12456a0d7
--- /dev/null
+++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/models/template_link.py
@@ -0,0 +1,45 @@
+#---------------------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+#---------------------------------------------------------------------------------------------
+#pylint: skip-file
+
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.serialization import Model
+
+
+class TemplateLink(Model):
+ """
+ Entity representing the reference to the template.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar uri: URI referencing the template. Default value:
+ "https://azuresdkci.blob.core.windows.net/templatehost/CreateTrafficManagerProfile_2016-08-08/azuredeploy.json"
+ .
+ :vartype uri: str
+ :param content_version: If included it must match the ContentVersion in
+ the template.
+ :type content_version: str
+ """
+
+ _validation = {
+ 'uri': {'required': True, 'constant': True},
+ }
+
+ _attribute_map = {
+ 'uri': {'key': 'uri', 'type': 'str'},
+ 'content_version': {'key': 'contentVersion', 'type': 'str'},
+ }
+
+ uri = "https://azuresdkci.blob.core.windows.net/templatehost/CreateTrafficManagerProfile_2016-08-08/azuredeploy.json"
+
+ def __init__(self, content_version=None):
+ self.content_version = content_version
diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/models/traffic_manager_profile_creation_client_enums.py b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/models/traffic_manager_profile_creation_client_enums.py
new file mode 100644
index 00000000000..4aee1f75b5c
--- /dev/null
+++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/models/traffic_manager_profile_creation_client_enums.py
@@ -0,0 +1,39 @@
+#---------------------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+#---------------------------------------------------------------------------------------------
+#pylint: skip-file
+
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from enum import Enum
+
+
+class monitorProtocol(Enum):
+
+ http = "http"
+ https = "https"
+
+
+class routingMethod(Enum):
+
+ priority = "priority"
+ performance = "performance"
+ weighted = "weighted"
+
+
+class status(Enum):
+
+ enabled = "enabled"
+ disabled = "disabled"
+
+
+class DeploymentMode(Enum):
+
+ incremental = "Incremental"
+ complete = "Complete"
diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/operations/__init__.py b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/operations/__init__.py
new file mode 100644
index 00000000000..621f09d6058
--- /dev/null
+++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/operations/__init__.py
@@ -0,0 +1,18 @@
+#---------------------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+#---------------------------------------------------------------------------------------------
+#pylint: skip-file
+
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from .traffic_manager_profile_operations import TrafficManagerProfileOperations
+
+__all__ = [
+ 'TrafficManagerProfileOperations',
+]
diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/operations/traffic_manager_profile_operations.py b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/operations/traffic_manager_profile_operations.py
new file mode 100644
index 00000000000..338d123c6f6
--- /dev/null
+++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/operations/traffic_manager_profile_operations.py
@@ -0,0 +1,160 @@
+#---------------------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+#---------------------------------------------------------------------------------------------
+#pylint: skip-file
+
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.pipeline import ClientRawResponse
+from msrestazure.azure_exceptions import CloudError
+from msrestazure.azure_operation import AzureOperationPoller
+import uuid
+
+from .. import models
+
+
+class TrafficManagerProfileOperations(object):
+ """TrafficManagerProfileOperations operations.
+
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An objec model deserializer.
+ """
+
+ def __init__(self, client, config, serializer, deserializer):
+
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+
+ self.config = config
+
+ def create_or_update(
+ self, resource_group_name, deployment_name, routing_method, traffic_manager_profile_name, unique_dns_name, content_version=None, location="global", monitor_path="/", monitor_port=80, monitor_protocol="http", status="enabled", ttl=30, custom_headers=None, raw=False, **operation_config):
+ """
+ Create or update a virtual machine.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param deployment_name: The name of the deployment.
+ :type deployment_name: str
+ :param routing_method: Routing method. Possible values include:
+ 'priority', 'performance', 'weighted'
+ :type routing_method: str or :class:`routingMethod
+ `
+ :param traffic_manager_profile_name: Name of resource.
+ :type traffic_manager_profile_name: str
+ :param unique_dns_name: Relative DNS name for the traffic manager
+ profile, resulting FQDN will be .trafficmanager.net,
+ must be globally unique.
+ :type unique_dns_name: str
+ :param content_version: If included it must match the ContentVersion
+ in the template.
+ :type content_version: str
+ :param location: Location for traffic manager or 'global'.
+ :type location: str
+ :param monitor_path: Path to monitor.
+ :type monitor_path: str
+ :param monitor_port: Port to monitor.
+ :type monitor_port: int
+ :param monitor_protocol: Monitor protocol. Possible values include:
+ 'http', 'https'
+ :type monitor_protocol: str or :class:`monitorProtocol
+ `
+ :param status: Create an enabled or disabled profile. Possible values
+ include: 'enabled', 'disabled'
+ :type status: str or :class:`status
+ `
+ :param ttl: DNS Config time-to-live in seconds.
+ :type ttl: int
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :rtype:
+ :class:`AzureOperationPoller`
+ instance that returns :class:`DeploymentExtended
+ `
+ :rtype: :class:`ClientRawResponse`
+ if raw=true
+ """
+ parameters = models.DeploymentTrafficManagerProfile(content_version=content_version, location=location, monitor_path=monitor_path, monitor_port=monitor_port, monitor_protocol=monitor_protocol, routing_method=routing_method, status=status, traffic_manager_profile_name=traffic_manager_profile_name, ttl=ttl, unique_dns_name=unique_dns_name)
+
+ # Construct URL
+ url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}'
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=64, min_length=1, pattern='^[-\w\._]+$'),
+ 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1, pattern='^[-\w\._]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.config.api_version", self.config.api_version, 'str')
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct body
+ body_content = self._serialize.body(parameters, 'DeploymentTrafficManagerProfile')
+
+ # Construct and send request
+ def long_running_send():
+
+ request = self._client.put(url, query_parameters)
+ return self._client.send(
+ request, header_parameters, body_content, **operation_config)
+
+ def get_long_running_status(status_link, headers=None):
+
+ request = self._client.get(status_link)
+ if headers:
+ request.headers.update(headers)
+ return self._client.send(
+ request, header_parameters, **operation_config)
+
+ def get_long_running_output(response):
+
+ if response.status_code not in [200, 201]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+
+ if response.status_code == 200:
+ deserialized = self._deserialize('DeploymentExtended', response)
+ if response.status_code == 201:
+ deserialized = self._deserialize('DeploymentExtended', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+
+ if raw:
+ response = long_running_send()
+ return get_long_running_output(response)
+
+ long_running_operation_timeout = operation_config.get(
+ 'long_running_operation_timeout',
+ self.config.long_running_operation_timeout)
+ return AzureOperationPoller(
+ long_running_send, get_long_running_output,
+ get_long_running_status, long_running_operation_timeout)
diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/traffic_manager_profile_creation_client.py b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/traffic_manager_profile_creation_client.py
new file mode 100644
index 00000000000..76e538ed474
--- /dev/null
+++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/traffic_manager_profile_creation_client.py
@@ -0,0 +1,122 @@
+#---------------------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+#---------------------------------------------------------------------------------------------
+#pylint: skip-file
+
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
+# 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.traffic_manager_profile_operations import TrafficManagerProfileOperations
+from . import models
+
+
+class TrafficManagerProfileCreationClientConfiguration(AzureConfiguration):
+ """Configuration for TrafficManagerProfileCreationClient
+ Note that all parameters used to create this instance are saved as instance
+ attributes.
+
+ :param credentials: Gets Azure subscription credentials.
+ :type credentials: :mod:`A msrestazure Credentials
+ object`
+ :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='2015-11-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(TrafficManagerProfileCreationClientConfiguration, self).__init__(base_url, filepath)
+
+ self.add_user_agent('trafficmanagerprofilecreationclient/{}'.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 TrafficManagerProfileCreationClient(object):
+ """TrafficManagerProfileCreationClient
+
+ :ivar config: Configuration for client.
+ :vartype config: TrafficManagerProfileCreationClientConfiguration
+
+ :ivar traffic_manager_profile: TrafficManagerProfile operations
+ :vartype traffic_manager_profile: .operations.TrafficManagerProfileOperations
+
+ :param credentials: Gets Azure subscription credentials.
+ :type credentials: :mod:`A msrestazure Credentials
+ object`
+ :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='2015-11-01', accept_language='en-US', long_running_operation_retry_timeout=30, generate_client_request_id=True, base_url=None, filepath=None):
+
+ self.config = TrafficManagerProfileCreationClientConfiguration(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.traffic_manager_profile = TrafficManagerProfileOperations(
+ self._client, self.config, self._serialize, self._deserialize)
diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/version.py b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/version.py
new file mode 100644
index 00000000000..e326ce19915
--- /dev/null
+++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/lib/version.py
@@ -0,0 +1,15 @@
+#---------------------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+#---------------------------------------------------------------------------------------------
+#pylint: skip-file
+
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+VERSION = "2015-11-01"
+
diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/swagger_create_traffic_manager_profile.json b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/swagger_create_traffic_manager_profile.json
new file mode 100644
index 00000000000..7b68e3ded15
--- /dev/null
+++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_traffic_manager_profile/swagger_create_traffic_manager_profile.json
@@ -0,0 +1,548 @@
+{
+ "swagger": "2.0",
+ "info": {
+ "title": "TrafficManagerProfileCreationClient",
+ "version": "2015-11-01"
+ },
+ "host": "management.azure.com",
+ "schemes": [
+ "https"
+ ],
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "security": [
+ {
+ "azure_auth": [
+ "user_impersonation"
+ ]
+ }
+ ],
+ "securityDefinitions": {
+ "azure_auth": {
+ "type": "oauth2",
+ "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
+ "flow": "implicit",
+ "description": "Azure Active Directory OAuth2 Flow",
+ "scopes": {
+ "user_impersonation": "impersonate your user account"
+ }
+ }
+ },
+ "paths": {
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}": {
+ "put": {
+ "tags": [
+ "TrafficManagerProfile"
+ ],
+ "operationId": "TrafficManagerProfile_CreateOrUpdate",
+ "description": "Create or update a virtual machine.",
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group. The name is case insensitive.",
+ "pattern": "^[-\\w\\._]+$",
+ "minLength": 1,
+ "maxLength": 64
+ },
+ {
+ "name": "deploymentName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the deployment.",
+ "pattern": "^[-\\w\\._]+$",
+ "minLength": 1,
+ "maxLength": 64
+ },
+ {
+ "name": "parameters",
+ "x-ms-client-flatten": true,
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/Deployment_TrafficManagerProfile"
+ },
+ "description": "Additional parameters supplied to the operation."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/DeploymentExtended"
+ }
+ },
+ "201": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/DeploymentExtended"
+ }
+ }
+ },
+ "x-ms-long-running-operation": true
+ }
+ }
+ },
+ "definitions": {
+ "Deployment_TrafficManagerProfile": {
+ "properties": {
+ "properties": {
+ "$ref": "#/definitions/DeploymentProperties_TrafficManagerProfile",
+ "description": "Gets or sets the deployment properties.",
+ "x-ms-client-flatten": true
+ }
+ },
+ "description": "Deployment operation parameters."
+ },
+ "DeploymentProperties_TrafficManagerProfile": {
+ "properties": {
+ "templateLink": {
+ "$ref": "#/definitions/TemplateLink",
+ "description": "Gets or sets the URI referencing the template. Use only one of Template or TemplateLink.",
+ "x-ms-client-flatten": true
+ },
+ "parameters": {
+ "$ref": "#/definitions/TrafficManagerProfileParameters",
+ "type": "object",
+ "description": "Deployment parameters. Use only one of Parameters or ParametersLink.",
+ "x-ms-client-flatten": true
+ },
+ "mode": {
+ "type": "string",
+ "description": "Gets or sets the deployment mode.",
+ "enum": [
+ "Incremental"
+ ],
+ "x-ms-enum": {
+ "name": "DeploymentMode",
+ "modelAsString": false
+ }
+ }
+ },
+ "required": [
+ "templateLink",
+ "parameters",
+ "mode"
+ ],
+ "description": "Deployment properties."
+ },
+ "TemplateLink": {
+ "properties": {
+ "uri": {
+ "type": "string",
+ "description": "URI referencing the template.",
+ "enum": [
+ "https://azuresdkci.blob.core.windows.net/templatehost/CreateTrafficManagerProfile_2016-08-08/azuredeploy.json"
+ ]
+ },
+ "contentVersion": {
+ "type": "string",
+ "description": "If included it must match the ContentVersion in the template."
+ }
+ },
+ "required": [
+ "uri"
+ ],
+ "description": "Entity representing the reference to the template."
+ },
+ "TrafficManagerProfileParameters": {
+ "properties": {
+ "location": {
+ "type": "object",
+ "$ref": "#/definitions/DeploymentParameter_location",
+ "x-ms-client-flatten": true
+ },
+ "monitorPath": {
+ "type": "object",
+ "$ref": "#/definitions/DeploymentParameter_monitorPath",
+ "x-ms-client-flatten": true
+ },
+ "monitorPort": {
+ "type": "object",
+ "$ref": "#/definitions/DeploymentParameter_monitorPort",
+ "x-ms-client-flatten": true
+ },
+ "monitorProtocol": {
+ "type": "object",
+ "$ref": "#/definitions/DeploymentParameter_monitorProtocol",
+ "x-ms-client-flatten": true
+ },
+ "routingMethod": {
+ "type": "object",
+ "$ref": "#/definitions/DeploymentParameter_routingMethod",
+ "x-ms-client-flatten": true
+ },
+ "status": {
+ "type": "object",
+ "$ref": "#/definitions/DeploymentParameter_status",
+ "x-ms-client-flatten": true
+ },
+ "trafficManagerProfileName": {
+ "type": "object",
+ "$ref": "#/definitions/DeploymentParameter_trafficManagerProfileName",
+ "x-ms-client-flatten": true
+ },
+ "ttl": {
+ "type": "object",
+ "$ref": "#/definitions/DeploymentParameter_ttl",
+ "x-ms-client-flatten": true
+ },
+ "uniqueDnsName": {
+ "type": "object",
+ "$ref": "#/definitions/DeploymentParameter_uniqueDnsName",
+ "x-ms-client-flatten": true
+ }
+ },
+ "required": [
+ "uniqueDnsName",
+ "trafficManagerProfileName",
+ "routingMethod"
+ ]
+ },
+ "DeploymentParameter_location": {
+ "properties": {
+ "value": {
+ "type": "string",
+ "description": "Location for traffic manager or 'global'.",
+ "x-ms-client-name": "location",
+ "default": "global"
+ }
+ }
+ },
+ "DeploymentParameter_monitorPath": {
+ "properties": {
+ "value": {
+ "type": "string",
+ "description": "Path to monitor.",
+ "x-ms-client-name": "monitorPath",
+ "default": "/"
+ }
+ }
+ },
+ "DeploymentParameter_monitorPort": {
+ "properties": {
+ "value": {
+ "type": "integer",
+ "description": "Port to monitor.",
+ "x-ms-client-name": "monitorPort",
+ "default": "80"
+ }
+ }
+ },
+ "DeploymentParameter_monitorProtocol": {
+ "properties": {
+ "value": {
+ "type": "string",
+ "description": "Monitor protocol.",
+ "x-ms-client-name": "monitorProtocol",
+ "enum": [
+ "http",
+ "https"
+ ],
+ "x-ms-enum": {
+ "name": "monitorProtocol",
+ "modelAsString": false
+ },
+ "default": "http"
+ }
+ }
+ },
+ "DeploymentParameter_routingMethod": {
+ "properties": {
+ "value": {
+ "type": "string",
+ "description": "Routing method.",
+ "x-ms-client-name": "routingMethod",
+ "enum": [
+ "priority",
+ "performance",
+ "weighted"
+ ],
+ "x-ms-enum": {
+ "name": "routingMethod",
+ "modelAsString": false
+ }
+ }
+ },
+ "required": [
+ "value"
+ ]
+ },
+ "DeploymentParameter_status": {
+ "properties": {
+ "value": {
+ "type": "string",
+ "description": "Create an enabled or disabled profile.",
+ "x-ms-client-name": "status",
+ "enum": [
+ "enabled",
+ "disabled"
+ ],
+ "x-ms-enum": {
+ "name": "status",
+ "modelAsString": false
+ },
+ "default": "enabled"
+ }
+ }
+ },
+ "DeploymentParameter_trafficManagerProfileName": {
+ "properties": {
+ "value": {
+ "type": "string",
+ "description": "Name of resource.",
+ "x-ms-client-name": "trafficManagerProfileName"
+ }
+ },
+ "required": [
+ "value"
+ ]
+ },
+ "DeploymentParameter_ttl": {
+ "properties": {
+ "value": {
+ "type": "integer",
+ "description": "DNS Config time-to-live in seconds.",
+ "x-ms-client-name": "ttl",
+ "default": "30"
+ }
+ }
+ },
+ "DeploymentParameter_uniqueDnsName": {
+ "properties": {
+ "value": {
+ "type": "string",
+ "description": "Relative DNS name for the traffic manager profile, resulting FQDN will be .trafficmanager.net, must be globally unique.",
+ "x-ms-client-name": "uniqueDnsName"
+ }
+ },
+ "required": [
+ "value"
+ ]
+ },
+ "ParametersLink": {
+ "properties": {
+ "uri": {
+ "type": "string",
+ "description": "URI referencing the template."
+ },
+ "contentVersion": {
+ "type": "string",
+ "description": "If included it must match the ContentVersion in the template."
+ }
+ },
+ "required": [
+ "uri"
+ ],
+ "description": "Entity representing the reference to the deployment paramaters."
+ },
+ "ProviderResourceType": {
+ "properties": {
+ "resourceType": {
+ "type": "string",
+ "description": "Gets or sets the resource type."
+ },
+ "locations": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "Gets or sets the collection of locations where this resource type can be created in."
+ },
+ "apiVersions": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "Gets or sets the api version."
+ },
+ "properties": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "description": "Gets or sets the properties."
+ }
+ },
+ "description": "Resource type managed by the resource provider."
+ },
+ "Provider": {
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Gets or sets the provider id."
+ },
+ "namespace": {
+ "type": "string",
+ "description": "Gets or sets the namespace of the provider."
+ },
+ "registrationState": {
+ "type": "string",
+ "description": "Gets or sets the registration state of the provider."
+ },
+ "resourceTypes": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/ProviderResourceType"
+ },
+ "description": "Gets or sets the collection of provider resource types."
+ }
+ },
+ "description": "Resource provider information."
+ },
+ "BasicDependency": {
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Gets or sets the ID of the dependency."
+ },
+ "resourceType": {
+ "type": "string",
+ "description": "Gets or sets the dependency resource type."
+ },
+ "resourceName": {
+ "type": "string",
+ "description": "Gets or sets the dependency resource name."
+ }
+ },
+ "description": "Deployment dependency information."
+ },
+ "Dependency": {
+ "properties": {
+ "dependsOn": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/BasicDependency"
+ },
+ "description": "Gets the list of dependencies."
+ },
+ "id": {
+ "type": "string",
+ "description": "Gets or sets the ID of the dependency."
+ },
+ "resourceType": {
+ "type": "string",
+ "description": "Gets or sets the dependency resource type."
+ },
+ "resourceName": {
+ "type": "string",
+ "description": "Gets or sets the dependency resource name."
+ }
+ },
+ "description": "Deployment dependency information."
+ },
+ "DeploymentPropertiesExtended": {
+ "properties": {
+ "provisioningState": {
+ "type": "string",
+ "description": "Gets or sets the state of the provisioning."
+ },
+ "correlationId": {
+ "type": "string",
+ "description": "Gets or sets the correlation ID of the deployment."
+ },
+ "timestamp": {
+ "type": "string",
+ "format": "date-time",
+ "description": "Gets or sets the timestamp of the template deployment."
+ },
+ "outputs": {
+ "type": "object",
+ "description": "Gets or sets key/value pairs that represent deploymentoutput."
+ },
+ "providers": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/Provider"
+ },
+ "description": "Gets the list of resource providers needed for the deployment."
+ },
+ "dependencies": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/Dependency"
+ },
+ "description": "Gets the list of deployment dependencies."
+ },
+ "template": {
+ "type": "object",
+ "description": "Gets or sets the template content. Use only one of Template or TemplateLink."
+ },
+ "TemplateLink": {
+ "$ref": "#/definitions/TemplateLink",
+ "description": "Gets or sets the URI referencing the template. Use only one of Template or TemplateLink."
+ },
+ "parameters": {
+ "type": "object",
+ "description": "Deployment parameters. Use only one of Parameters or ParametersLink."
+ },
+ "parametersLink": {
+ "$ref": "#/definitions/ParametersLink",
+ "description": "Gets or sets the URI referencing the parameters. Use only one of Parameters or ParametersLink."
+ },
+ "mode": {
+ "type": "string",
+ "description": "Gets or sets the deployment mode.",
+ "enum": [
+ "Incremental",
+ "Complete"
+ ],
+ "x-ms-enum": {
+ "name": "DeploymentMode",
+ "modelAsString": false
+ }
+ }
+ },
+ "description": "Deployment properties with additional details."
+ },
+ "DeploymentExtended": {
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Gets or sets the ID of the deployment."
+ },
+ "name": {
+ "type": "string",
+ "description": "Gets or sets the name of the deployment."
+ },
+ "properties": {
+ "$ref": "#/definitions/DeploymentPropertiesExtended",
+ "description": "Gets or sets deployment properties."
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "description": "Deployment information."
+ }
+ },
+ "parameters": {
+ "SubscriptionIdParameter": {
+ "name": "subscriptionId",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."
+ },
+ "ApiVersionParameter": {
+ "name": "api-version",
+ "in": "query",
+ "required": true,
+ "type": "string",
+ "description": "Client Api Version."
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/recordings/test_network_traffic_manager.yaml b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/recordings/test_network_traffic_manager.yaml
new file mode 100644
index 00000000000..46671469a9e
--- /dev/null
+++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/recordings/test_network_traffic_manager.yaml
@@ -0,0 +1,258 @@
+interactions:
+- request:
+ body: '{"type": "Microsoft.Network/trafficManagerProfiles", "name": "myfoobar1"}'
+ headers:
+ Accept: [application/json]
+ Accept-Encoding: ['gzip, deflate']
+ Authorization: [Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IlliUkFRUlljRV9tb3RXVkpLSHJ3TEJiZF85cyIsImtpZCI6IlliUkFRUlljRV9tb3RXVkpLSHJ3TEJiZF85cyJ9.eyJhdWQiOiJodHRwczovL21hbmFnZW1lbnQuY29yZS53aW5kb3dzLm5ldC8iLCJpc3MiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC83MmY5ODhiZi04NmYxLTQxYWYtOTFhYi0yZDdjZDAxMWRiNDcvIiwiaWF0IjoxNDcxMzAyODU4LCJuYmYiOjE0NzEzMDI4NTgsImV4cCI6MTQ3MTMwNjc1OCwiX2NsYWltX25hbWVzIjp7Imdyb3VwcyI6InNyYzEifSwiX2NsYWltX3NvdXJjZXMiOnsic3JjMSI6eyJlbmRwb2ludCI6Imh0dHBzOi8vZ3JhcGgud2luZG93cy5uZXQvNzJmOTg4YmYtODZmMS00MWFmLTkxYWItMmQ3Y2QwMTFkYjQ3L3VzZXJzLzAzZjFmMWJiLWM4MjYtNGM3Yi1iMzY4LTk0MGMyYWEyNDJkZi9nZXRNZW1iZXJPYmplY3RzIn19LCJhY3IiOiIxIiwiYW1yIjpbIndpYSIsIm1mYSJdLCJhcHBpZCI6IjA0YjA3Nzk1LThkZGItNDYxYS1iYmVlLTAyZjllMWJmN2I0NiIsImFwcGlkYWNyIjoiMCIsImVfZXhwIjo3MjAwLCJmYW1pbHlfbmFtZSI6IkJpZWxpY2tpIiwiZ2l2ZW5fbmFtZSI6IkJ1cnQiLCJpcGFkZHIiOiIxNjcuMjIwLjAuNTAiLCJuYW1lIjoiQnVydCBCaWVsaWNraSIsIm9pZCI6IjAzZjFmMWJiLWM4MjYtNGM3Yi1iMzY4LTk0MGMyYWEyNDJkZiIsIm9ucHJlbV9zaWQiOiJTLTEtNS0yMS0yMTI3NTIxMTg0LTE2MDQwMTI5MjAtMTg4NzkyNzUyNy00ODEyODA2IiwicHVpZCI6IjEwMDNCRkZEODAxQzA4QkMiLCJzY3AiOiJ1c2VyX2ltcGVyc29uYXRpb24iLCJzdWIiOiJDeUIyOFc5T21GWkZ4bDRoZ0lFWW10MEd5amNDYkVDbVB6NWR4VUVSMWxjIiwidGlkIjoiNzJmOTg4YmYtODZmMS00MWFmLTkxYWItMmQ3Y2QwMTFkYjQ3IiwidW5pcXVlX25hbWUiOiJidXJ0YmllbEBtaWNyb3NvZnQuY29tIiwidXBuIjoiYnVydGJpZWxAbWljcm9zb2Z0LmNvbSIsInZlciI6IjEuMCJ9.AUutIvXoSv92-0RKkt-6SxmFInrtcTmdCpjI4568-m8GiaCA7OZJvctJOOOEmvrziJR8hXhp24JfuXmNA_8tfyp4bCG-xtifJMguLizEteI8elrTUrilRfvBveRfrinKvKXq5VfCaf1iUY3JDXCRcfd4VpfxcnV06N8Qxez0WKj-HWmhr48pQezDJoeBxAM_al9JuIws0I29_kgfOD2DvIhONxyy2l3uZHHfRbqgHjrhCpW83ezvFtfvW6Q8cSklGwGAlptEA8_W_uaZcSmNA88g9CTuDFHD9njl_Pla-_3sunJZ4WAdV1WYXlOxb26bcawybLrkZ3U6ai2sITclCw]
+ Connection: [keep-alive]
+ Content-Length: ['73']
+ Content-Type: [application/json; charset=utf-8]
+ User-Agent: [python/2.7.10 (Windows-8-6.2.9200) requests/2.9.1 msrest/0.4.0
+ msrest_azure/0.4.1 trafficmanagermanagementclient/0.30.0rc5 Azure-SDK-For-Python
+ AZURECLI/TEST/0.0.1.dev0]
+ accept-language: [en-US]
+ x-ms-client-request-id: [b46d6b80-6342-11e6-9fcc-001dd8b7c0ad]
+ method: POST
+ uri: https://management.azure.com/providers/Microsoft.Network/checkTrafficManagerNameAvailability?api-version=2015-11-01
+ response:
+ body:
+ string: !!binary |
+ H4sIAAAAAAAEAO29B2AcSZYlJi9tynt/SvVK1+B0oQiAYBMk2JBAEOzBiM3mkuwdaUcjKasqgcpl
+ VmVdZhZAzO2dvPfee++999577733ujudTif33/8/XGZkAWz2zkrayZ4hgKrIHz9+fB8/In7xR8ts
+ kX/06KPF9XlVTbJ696PRR+31Ch99UUzrqqnO2/GLvL2q6re/7922zs7Pi+kX2TK7yOuXdXVelHlD
+ rwDK8WVWlNmkpHfbep2PPqrzrKmWHz1arsty9NEibxp6S/78Jf8P9cY4H3kAAAA=
+ headers:
+ cache-control: [private]
+ content-encoding: [gzip]
+ content-type: [application/json; charset=utf-8]
+ date: ['Mon, 15 Aug 2016 23:48:02 GMT']
+ server: [Microsoft-IIS/8.5]
+ strict-transport-security: [max-age=31536000; includeSubDomains]
+ vary: [Accept-Encoding]
+ x-aspnet-version: [4.0.30319]
+ x-content-type-options: [nosniff]
+ x-ms-ratelimit-remaining-tenant-writes: ['1199']
+ x-powered-by: [ASP.NET]
+ status: {code: 200, message: OK}
+- request:
+ body: '{"properties": {"templateLink": {"uri": "https://azuresdkci.blob.core.windows.net/templatehost/CreateTrafficManagerProfile_2016-08-08/azuredeploy.json"},
+ "mode": "Incremental", "parameters": {"status": {"value": "enabled"}, "monitorPort":
+ {"value": 80}, "trafficManagerProfileName": {"value": "mytmprofile"}, "monitorPath":
+ {"value": "/"}, "monitorProtocol": {"value": "http"}, "ttl": {"value": 30},
+ "routingMethod": {"value": "weighted"}, "uniqueDnsName": {"value": "mytrafficmanager001100a"},
+ "location": {"value": "global"}}}}'
+ headers:
+ Accept: [application/json]
+ Accept-Encoding: ['gzip, deflate']
+ Authorization: [Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IlliUkFRUlljRV9tb3RXVkpLSHJ3TEJiZF85cyIsImtpZCI6IlliUkFRUlljRV9tb3RXVkpLSHJ3TEJiZF85cyJ9.eyJhdWQiOiJodHRwczovL21hbmFnZW1lbnQuY29yZS53aW5kb3dzLm5ldC8iLCJpc3MiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC83MmY5ODhiZi04NmYxLTQxYWYtOTFhYi0yZDdjZDAxMWRiNDcvIiwiaWF0IjoxNDcxMzAyODU4LCJuYmYiOjE0NzEzMDI4NTgsImV4cCI6MTQ3MTMwNjc1OCwiX2NsYWltX25hbWVzIjp7Imdyb3VwcyI6InNyYzEifSwiX2NsYWltX3NvdXJjZXMiOnsic3JjMSI6eyJlbmRwb2ludCI6Imh0dHBzOi8vZ3JhcGgud2luZG93cy5uZXQvNzJmOTg4YmYtODZmMS00MWFmLTkxYWItMmQ3Y2QwMTFkYjQ3L3VzZXJzLzAzZjFmMWJiLWM4MjYtNGM3Yi1iMzY4LTk0MGMyYWEyNDJkZi9nZXRNZW1iZXJPYmplY3RzIn19LCJhY3IiOiIxIiwiYW1yIjpbIndpYSIsIm1mYSJdLCJhcHBpZCI6IjA0YjA3Nzk1LThkZGItNDYxYS1iYmVlLTAyZjllMWJmN2I0NiIsImFwcGlkYWNyIjoiMCIsImVfZXhwIjo3MjAwLCJmYW1pbHlfbmFtZSI6IkJpZWxpY2tpIiwiZ2l2ZW5fbmFtZSI6IkJ1cnQiLCJpcGFkZHIiOiIxNjcuMjIwLjAuNTAiLCJuYW1lIjoiQnVydCBCaWVsaWNraSIsIm9pZCI6IjAzZjFmMWJiLWM4MjYtNGM3Yi1iMzY4LTk0MGMyYWEyNDJkZiIsIm9ucHJlbV9zaWQiOiJTLTEtNS0yMS0yMTI3NTIxMTg0LTE2MDQwMTI5MjAtMTg4NzkyNzUyNy00ODEyODA2IiwicHVpZCI6IjEwMDNCRkZEODAxQzA4QkMiLCJzY3AiOiJ1c2VyX2ltcGVyc29uYXRpb24iLCJzdWIiOiJDeUIyOFc5T21GWkZ4bDRoZ0lFWW10MEd5amNDYkVDbVB6NWR4VUVSMWxjIiwidGlkIjoiNzJmOTg4YmYtODZmMS00MWFmLTkxYWItMmQ3Y2QwMTFkYjQ3IiwidW5pcXVlX25hbWUiOiJidXJ0YmllbEBtaWNyb3NvZnQuY29tIiwidXBuIjoiYnVydGJpZWxAbWljcm9zb2Z0LmNvbSIsInZlciI6IjEuMCJ9.AUutIvXoSv92-0RKkt-6SxmFInrtcTmdCpjI4568-m8GiaCA7OZJvctJOOOEmvrziJR8hXhp24JfuXmNA_8tfyp4bCG-xtifJMguLizEteI8elrTUrilRfvBveRfrinKvKXq5VfCaf1iUY3JDXCRcfd4VpfxcnV06N8Qxez0WKj-HWmhr48pQezDJoeBxAM_al9JuIws0I29_kgfOD2DvIhONxyy2l3uZHHfRbqgHjrhCpW83ezvFtfvW6Q8cSklGwGAlptEA8_W_uaZcSmNA88g9CTuDFHD9njl_Pla-_3sunJZ4WAdV1WYXlOxb26bcawybLrkZ3U6ai2sITclCw]
+ Connection: [keep-alive]
+ Content-Length: ['529']
+ Content-Type: [application/json; charset=utf-8]
+ User-Agent: [python/2.7.10 (Windows-8-6.2.9200) requests/2.9.1 msrest/0.4.0
+ msrest_azure/0.4.1 trafficmanagerprofilecreationclient/2015-11-01 Azure-SDK-For-Python
+ AZURECLI/TEST/0.0.1.dev0]
+ accept-language: [en-US]
+ x-ms-client-request-id: [b4d30b21-6342-11e6-bdfc-001dd8b7c0ad]
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_traffic_manager_test1/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2015-11-01
+ response:
+ body: {string: !!python/unicode '{"id":"/subscriptions/304e8996-77fb-46e8-bada-557601594be4/resourceGroups/cli_traffic_manager_test1/providers/Microsoft.Resources/deployments/azurecli1471304883.426765","name":"azurecli1471304883.426765","properties":{"templateLink":{"uri":"https://azuresdkci.blob.core.windows.net/templatehost/CreateTrafficManagerProfile_2016-08-08/azuredeploy.json","contentVersion":"1.0.0.0"},"parameters":{"location":{"type":"String","value":"global"},"monitorPath":{"type":"String","value":"/"},"monitorPort":{"type":"Int","value":80},"monitorProtocol":{"type":"String","value":"http"},"routingMethod":{"type":"String","value":"weighted"},"status":{"type":"String","value":"enabled"},"trafficManagerProfileName":{"type":"String","value":"mytmprofile"},"ttl":{"type":"Int","value":30},"uniqueDnsName":{"type":"String","value":"mytrafficmanager001100a"}},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2016-08-15T23:48:04.3350504Z","duration":"PT0.3257968S","correlationId":"d9658395-1ccb-40af-aefc-05d3020b75b4","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"trafficManagerProfiles","locations":["global"]}]}],"dependencies":[]}}'}
+ headers:
+ azure-asyncoperation: ['https://management.azure.com/subscriptions/304e8996-77fb-46e8-bada-557601594be4/resourcegroups/cli_traffic_manager_test1/providers/Microsoft.Resources/deployments/azurecli1471304883.426765/operationStatuses/08587303020014683782?api-version=2015-11-01']
+ cache-control: [no-cache]
+ content-length: ['1168']
+ content-type: [application/json; charset=utf-8]
+ date: ['Mon, 15 Aug 2016 23:48:04 GMT']
+ expires: ['-1']
+ pragma: [no-cache]
+ strict-transport-security: [max-age=31536000; includeSubDomains]
+ x-ms-ratelimit-remaining-subscription-writes: ['1199']
+ status: {code: 201, message: Created}
+- request:
+ body: null
+ headers:
+ Accept: [application/json]
+ Accept-Encoding: ['gzip, deflate']
+ Authorization: [Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IlliUkFRUlljRV9tb3RXVkpLSHJ3TEJiZF85cyIsImtpZCI6IlliUkFRUlljRV9tb3RXVkpLSHJ3TEJiZF85cyJ9.eyJhdWQiOiJodHRwczovL21hbmFnZW1lbnQuY29yZS53aW5kb3dzLm5ldC8iLCJpc3MiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC83MmY5ODhiZi04NmYxLTQxYWYtOTFhYi0yZDdjZDAxMWRiNDcvIiwiaWF0IjoxNDcxMzAyODU4LCJuYmYiOjE0NzEzMDI4NTgsImV4cCI6MTQ3MTMwNjc1OCwiX2NsYWltX25hbWVzIjp7Imdyb3VwcyI6InNyYzEifSwiX2NsYWltX3NvdXJjZXMiOnsic3JjMSI6eyJlbmRwb2ludCI6Imh0dHBzOi8vZ3JhcGgud2luZG93cy5uZXQvNzJmOTg4YmYtODZmMS00MWFmLTkxYWItMmQ3Y2QwMTFkYjQ3L3VzZXJzLzAzZjFmMWJiLWM4MjYtNGM3Yi1iMzY4LTk0MGMyYWEyNDJkZi9nZXRNZW1iZXJPYmplY3RzIn19LCJhY3IiOiIxIiwiYW1yIjpbIndpYSIsIm1mYSJdLCJhcHBpZCI6IjA0YjA3Nzk1LThkZGItNDYxYS1iYmVlLTAyZjllMWJmN2I0NiIsImFwcGlkYWNyIjoiMCIsImVfZXhwIjo3MjAwLCJmYW1pbHlfbmFtZSI6IkJpZWxpY2tpIiwiZ2l2ZW5fbmFtZSI6IkJ1cnQiLCJpcGFkZHIiOiIxNjcuMjIwLjAuNTAiLCJuYW1lIjoiQnVydCBCaWVsaWNraSIsIm9pZCI6IjAzZjFmMWJiLWM4MjYtNGM3Yi1iMzY4LTk0MGMyYWEyNDJkZiIsIm9ucHJlbV9zaWQiOiJTLTEtNS0yMS0yMTI3NTIxMTg0LTE2MDQwMTI5MjAtMTg4NzkyNzUyNy00ODEyODA2IiwicHVpZCI6IjEwMDNCRkZEODAxQzA4QkMiLCJzY3AiOiJ1c2VyX2ltcGVyc29uYXRpb24iLCJzdWIiOiJDeUIyOFc5T21GWkZ4bDRoZ0lFWW10MEd5amNDYkVDbVB6NWR4VUVSMWxjIiwidGlkIjoiNzJmOTg4YmYtODZmMS00MWFmLTkxYWItMmQ3Y2QwMTFkYjQ3IiwidW5pcXVlX25hbWUiOiJidXJ0YmllbEBtaWNyb3NvZnQuY29tIiwidXBuIjoiYnVydGJpZWxAbWljcm9zb2Z0LmNvbSIsInZlciI6IjEuMCJ9.AUutIvXoSv92-0RKkt-6SxmFInrtcTmdCpjI4568-m8GiaCA7OZJvctJOOOEmvrziJR8hXhp24JfuXmNA_8tfyp4bCG-xtifJMguLizEteI8elrTUrilRfvBveRfrinKvKXq5VfCaf1iUY3JDXCRcfd4VpfxcnV06N8Qxez0WKj-HWmhr48pQezDJoeBxAM_al9JuIws0I29_kgfOD2DvIhONxyy2l3uZHHfRbqgHjrhCpW83ezvFtfvW6Q8cSklGwGAlptEA8_W_uaZcSmNA88g9CTuDFHD9njl_Pla-_3sunJZ4WAdV1WYXlOxb26bcawybLrkZ3U6ai2sITclCw]
+ Connection: [keep-alive]
+ Content-Type: [application/json; charset=utf-8]
+ User-Agent: [python/2.7.10 (Windows-8-6.2.9200) requests/2.9.1 msrest/0.4.0
+ msrest_azure/0.4.1 trafficmanagerprofilecreationclient/2015-11-01 Azure-SDK-For-Python
+ AZURECLI/TEST/0.0.1.dev0]
+ accept-language: [en-US]
+ x-ms-client-request-id: [b4d30b21-6342-11e6-bdfc-001dd8b7c0ad]
+ method: GET
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_traffic_manager_test1/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587303020014683782?api-version=2015-11-01
+ response:
+ body:
+ string: !!binary |
+ H4sIAAAAAAAEAO29B2AcSZYlJi9tynt/SvVK1+B0oQiAYBMk2JBAEOzBiM3mkuwdaUcjKasqgcpl
+ VmVdZhZAzO2dvPfee++999577733ujudTif33/8/XGZkAWz2zkrayZ4hgKrIHz9+fB8/In7xR02b
+ tevmo0cfvV5Pp3k+y2cf/ZL/ByCIe+QWAAAA
+ headers:
+ cache-control: [no-cache]
+ content-encoding: [gzip]
+ content-length: ['141']
+ content-type: [application/json; charset=utf-8]
+ date: ['Mon, 15 Aug 2016 23:48:33 GMT']
+ expires: ['-1']
+ pragma: [no-cache]
+ strict-transport-security: [max-age=31536000; includeSubDomains]
+ vary: [Accept-Encoding]
+ status: {code: 200, message: OK}
+- request:
+ body: null
+ headers:
+ Accept: [application/json]
+ Accept-Encoding: ['gzip, deflate']
+ Authorization: [Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IlliUkFRUlljRV9tb3RXVkpLSHJ3TEJiZF85cyIsImtpZCI6IlliUkFRUlljRV9tb3RXVkpLSHJ3TEJiZF85cyJ9.eyJhdWQiOiJodHRwczovL21hbmFnZW1lbnQuY29yZS53aW5kb3dzLm5ldC8iLCJpc3MiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC83MmY5ODhiZi04NmYxLTQxYWYtOTFhYi0yZDdjZDAxMWRiNDcvIiwiaWF0IjoxNDcxMzAyODU4LCJuYmYiOjE0NzEzMDI4NTgsImV4cCI6MTQ3MTMwNjc1OCwiX2NsYWltX25hbWVzIjp7Imdyb3VwcyI6InNyYzEifSwiX2NsYWltX3NvdXJjZXMiOnsic3JjMSI6eyJlbmRwb2ludCI6Imh0dHBzOi8vZ3JhcGgud2luZG93cy5uZXQvNzJmOTg4YmYtODZmMS00MWFmLTkxYWItMmQ3Y2QwMTFkYjQ3L3VzZXJzLzAzZjFmMWJiLWM4MjYtNGM3Yi1iMzY4LTk0MGMyYWEyNDJkZi9nZXRNZW1iZXJPYmplY3RzIn19LCJhY3IiOiIxIiwiYW1yIjpbIndpYSIsIm1mYSJdLCJhcHBpZCI6IjA0YjA3Nzk1LThkZGItNDYxYS1iYmVlLTAyZjllMWJmN2I0NiIsImFwcGlkYWNyIjoiMCIsImVfZXhwIjo3MjAwLCJmYW1pbHlfbmFtZSI6IkJpZWxpY2tpIiwiZ2l2ZW5fbmFtZSI6IkJ1cnQiLCJpcGFkZHIiOiIxNjcuMjIwLjAuNTAiLCJuYW1lIjoiQnVydCBCaWVsaWNraSIsIm9pZCI6IjAzZjFmMWJiLWM4MjYtNGM3Yi1iMzY4LTk0MGMyYWEyNDJkZiIsIm9ucHJlbV9zaWQiOiJTLTEtNS0yMS0yMTI3NTIxMTg0LTE2MDQwMTI5MjAtMTg4NzkyNzUyNy00ODEyODA2IiwicHVpZCI6IjEwMDNCRkZEODAxQzA4QkMiLCJzY3AiOiJ1c2VyX2ltcGVyc29uYXRpb24iLCJzdWIiOiJDeUIyOFc5T21GWkZ4bDRoZ0lFWW10MEd5amNDYkVDbVB6NWR4VUVSMWxjIiwidGlkIjoiNzJmOTg4YmYtODZmMS00MWFmLTkxYWItMmQ3Y2QwMTFkYjQ3IiwidW5pcXVlX25hbWUiOiJidXJ0YmllbEBtaWNyb3NvZnQuY29tIiwidXBuIjoiYnVydGJpZWxAbWljcm9zb2Z0LmNvbSIsInZlciI6IjEuMCJ9.AUutIvXoSv92-0RKkt-6SxmFInrtcTmdCpjI4568-m8GiaCA7OZJvctJOOOEmvrziJR8hXhp24JfuXmNA_8tfyp4bCG-xtifJMguLizEteI8elrTUrilRfvBveRfrinKvKXq5VfCaf1iUY3JDXCRcfd4VpfxcnV06N8Qxez0WKj-HWmhr48pQezDJoeBxAM_al9JuIws0I29_kgfOD2DvIhONxyy2l3uZHHfRbqgHjrhCpW83ezvFtfvW6Q8cSklGwGAlptEA8_W_uaZcSmNA88g9CTuDFHD9njl_Pla-_3sunJZ4WAdV1WYXlOxb26bcawybLrkZ3U6ai2sITclCw]
+ Connection: [keep-alive]
+ Content-Type: [application/json; charset=utf-8]
+ User-Agent: [python/2.7.10 (Windows-8-6.2.9200) requests/2.9.1 msrest/0.4.0
+ msrest_azure/0.4.1 trafficmanagerprofilecreationclient/2015-11-01 Azure-SDK-For-Python
+ AZURECLI/TEST/0.0.1.dev0]
+ accept-language: [en-US]
+ x-ms-client-request-id: [b4d30b21-6342-11e6-bdfc-001dd8b7c0ad]
+ method: GET
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_traffic_manager_test1/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2015-11-01
+ response:
+ body:
+ string: !!binary |
+ H4sIAAAAAAAEAO29B2AcSZYlJi9tynt/SvVK1+B0oQiAYBMk2JBAEOzBiM3mkuwdaUcjKasqgcpl
+ VmVdZhZAzO2dvPfee++999577733ujudTif33/8/XGZkAWz2zkrayZ4hgKrIHz9+fB8/In7xR8Xs
+ o0cf3W3Wk2ZaF6u2qJbN3Xs7+/nBw4efbj94cD7Z3v80P9ieZLNs+/79B5/u7N5/uD/J9+/WeVOt
+ 62n+eV2tV83daVn8/m2dnZ8X099/kS2zi7z+/du8aXfvrurqspjldXP3i2JaV0113o5f6cvN3Vm+
+ KqvrRb5sm7vZD9Z1ToB29x/sEg4HB/fG+3ufPvj0/kejj5bZIidMNzWhjlZ53RZ589GjX/xRmy9W
+ Zdbmz4vlW/y9rgt6f962q+bRXemqmb2dFuNJWU3G06rOx1fFclZdNeNl3t41r8+rpr17Uuf06xsZ
+ 3hcyupd1dV6U+e+/t7P76fbOAf1PgMqAxj/dVEvCaVotWxrbT9LwibSEwO54B/999EsI36ymQbX0
+ FfArq2kG8uP39nqFwb5u62J5QVAus3KNDy4I1azEu4tqWbRV/TJr55teuOu3rerWa3u2bF3Dgx2v
+ XV211bQqvbY9uCAjQNPct/TNF3k7r4iRhl+4youLeZvP8FLTZu2axzzUOl9mk1IaK0+FRH+RgRmG
+ 319ctwviBjRlGK0/mGDg9zDw9bL4Rev86bK5BVxBRzl8Z2d3d2cn++iXEJBFNUOTs+W0zsHONE80
+ xeB9zDzBeU3DRovX6+k0JzaZ0fdtsSAZyRYr+tww0u79N3v3Hu0fPNp5MP70wc7+/r1Pf4qazta1
+ 8sdHL9/cG3/66e7uw9f0OXFunROn0ldnNAUfzR5+ev/g3sP727vTKQnvTna+neXn0+2d+7N7O3s7
+ kwf3J/v0GmMGqfzo0fd+MUtXs8qmwM9J6Yu8varqt9SaZIXl9Q0RRt7wP6GXlC7hNDX0pmFrvGX4
+ 9/u/hP6jEeWrfDnLl1OW2O/RJ8RNq3VLf9AUxADyF9Lhl5OfzqfeRP5ijAhtQGZw10enykREZYH1
+ isDTPBhm/ei7hicJlWVzUi3PiwsAEnJeKpcNTvroo/NfNMN0DDQYh59Cq9A7zIvMdSpurl8dwBfy
+ uR3H2TKbAh16mVqoaH707TdvXuITFuqDHfqNVYFIPJF1VRWkUkHWXwLupKETZa3apc9V9fdm+66i
+ HVK+uUujdDL1/V/yS/4fzBfE0jsGAAA=
+ headers:
+ cache-control: [no-cache]
+ content-encoding: [gzip]
+ content-length: ['935']
+ content-type: [application/json; charset=utf-8]
+ date: ['Mon, 15 Aug 2016 23:48:34 GMT']
+ expires: ['-1']
+ pragma: [no-cache]
+ strict-transport-security: [max-age=31536000; includeSubDomains]
+ vary: [Accept-Encoding]
+ status: {code: 200, message: OK}
+- request:
+ body: null
+ headers:
+ Accept: [application/json]
+ Accept-Encoding: ['gzip, deflate']
+ Authorization: [Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IlliUkFRUlljRV9tb3RXVkpLSHJ3TEJiZF85cyIsImtpZCI6IlliUkFRUlljRV9tb3RXVkpLSHJ3TEJiZF85cyJ9.eyJhdWQiOiJodHRwczovL21hbmFnZW1lbnQuY29yZS53aW5kb3dzLm5ldC8iLCJpc3MiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC83MmY5ODhiZi04NmYxLTQxYWYtOTFhYi0yZDdjZDAxMWRiNDcvIiwiaWF0IjoxNDcxMzAyODU4LCJuYmYiOjE0NzEzMDI4NTgsImV4cCI6MTQ3MTMwNjc1OCwiX2NsYWltX25hbWVzIjp7Imdyb3VwcyI6InNyYzEifSwiX2NsYWltX3NvdXJjZXMiOnsic3JjMSI6eyJlbmRwb2ludCI6Imh0dHBzOi8vZ3JhcGgud2luZG93cy5uZXQvNzJmOTg4YmYtODZmMS00MWFmLTkxYWItMmQ3Y2QwMTFkYjQ3L3VzZXJzLzAzZjFmMWJiLWM4MjYtNGM3Yi1iMzY4LTk0MGMyYWEyNDJkZi9nZXRNZW1iZXJPYmplY3RzIn19LCJhY3IiOiIxIiwiYW1yIjpbIndpYSIsIm1mYSJdLCJhcHBpZCI6IjA0YjA3Nzk1LThkZGItNDYxYS1iYmVlLTAyZjllMWJmN2I0NiIsImFwcGlkYWNyIjoiMCIsImVfZXhwIjo3MjAwLCJmYW1pbHlfbmFtZSI6IkJpZWxpY2tpIiwiZ2l2ZW5fbmFtZSI6IkJ1cnQiLCJpcGFkZHIiOiIxNjcuMjIwLjAuNTAiLCJuYW1lIjoiQnVydCBCaWVsaWNraSIsIm9pZCI6IjAzZjFmMWJiLWM4MjYtNGM3Yi1iMzY4LTk0MGMyYWEyNDJkZiIsIm9ucHJlbV9zaWQiOiJTLTEtNS0yMS0yMTI3NTIxMTg0LTE2MDQwMTI5MjAtMTg4NzkyNzUyNy00ODEyODA2IiwicHVpZCI6IjEwMDNCRkZEODAxQzA4QkMiLCJzY3AiOiJ1c2VyX2ltcGVyc29uYXRpb24iLCJzdWIiOiJDeUIyOFc5T21GWkZ4bDRoZ0lFWW10MEd5amNDYkVDbVB6NWR4VUVSMWxjIiwidGlkIjoiNzJmOTg4YmYtODZmMS00MWFmLTkxYWItMmQ3Y2QwMTFkYjQ3IiwidW5pcXVlX25hbWUiOiJidXJ0YmllbEBtaWNyb3NvZnQuY29tIiwidXBuIjoiYnVydGJpZWxAbWljcm9zb2Z0LmNvbSIsInZlciI6IjEuMCJ9.AUutIvXoSv92-0RKkt-6SxmFInrtcTmdCpjI4568-m8GiaCA7OZJvctJOOOEmvrziJR8hXhp24JfuXmNA_8tfyp4bCG-xtifJMguLizEteI8elrTUrilRfvBveRfrinKvKXq5VfCaf1iUY3JDXCRcfd4VpfxcnV06N8Qxez0WKj-HWmhr48pQezDJoeBxAM_al9JuIws0I29_kgfOD2DvIhONxyy2l3uZHHfRbqgHjrhCpW83ezvFtfvW6Q8cSklGwGAlptEA8_W_uaZcSmNA88g9CTuDFHD9njl_Pla-_3sunJZ4WAdV1WYXlOxb26bcawybLrkZ3U6ai2sITclCw]
+ Connection: [keep-alive]
+ Content-Type: [application/json; charset=utf-8]
+ User-Agent: [python/2.7.10 (Windows-8-6.2.9200) requests/2.9.1 msrest/0.4.0
+ msrest_azure/0.4.1 trafficmanagermanagementclient/0.30.0rc5 Azure-SDK-For-Python
+ AZURECLI/TEST/0.0.1.dev0]
+ accept-language: [en-US]
+ x-ms-client-request-id: [c7fb37de-6342-11e6-b1c1-001dd8b7c0ad]
+ method: GET
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_traffic_manager_test1/providers/Microsoft.Network/trafficmanagerprofiles/mytmprofile?api-version=2015-11-01
+ response:
+ body:
+ string: !!binary |
+ H4sIAAAAAAAEAO29B2AcSZYlJi9tynt/SvVK1+B0oQiAYBMk2JBAEOzBiM3mkuwdaUcjKasqgcpl
+ VmVdZhZAzO2dvPfee++999577733ujudTif33/8/XGZkAWz2zkrayZ4hgKrIHz9+fB8/In7xR8Xs
+ o0cf/b53m/WkmdbFqi2qZfP73r23s58fPHz46faDB+eT7f1P84PtSTbLtu/ff/Dpzu79h/uTfP/3
+ vVvnTbWup/nndbVe0VvTsvj92zo7Py+mv/8iW2YXef37t3nT7v6+d1d1dVnM8ppafVFM66qpztvx
+ i7y9quq3v+9dfekLeedlXZ0XZU5NF9ftgt7EXx+NPlpmi5yQDT9sr1f48NZA6ZWymmYYJ712UVaT
+ rKTPCOAqr9uCGjz6xfgLjV+3WbumDz46XWaTMp9ROwX6qlq3xfLii7ydVyDgd/PiYt5yi9myOamW
+ 58UFANV5SV1d5i8s6vK+UmdnZ3d3Zyejt85/0Qz4DDQYh5+Ol3lL77Rt+dGjezu/ZPTRoloWbVW7
+ fnUAX8jndhxny2wKdOhlatFW04ogfPTtN29e4pOqbj96dLBDv2XtnD7/fe9+RLDz5WxVFcuW3v/e
+ 93/JL/l/AAxhfGwyAgAA
+ headers:
+ cache-control: [private]
+ content-encoding: [gzip]
+ content-type: [application/json; charset=utf-8]
+ date: ['Mon, 15 Aug 2016 23:48:35 GMT']
+ server: [Microsoft-IIS/8.5]
+ strict-transport-security: [max-age=31536000; includeSubDomains]
+ vary: [Accept-Encoding]
+ x-aspnet-version: [4.0.30319]
+ x-content-type-options: [nosniff]
+ x-ms-ratelimit-remaining-subscription-resource-requests: ['10799']
+ x-powered-by: [ASP.NET]
+ status: {code: 200, message: OK}
+- request:
+ body: '{"properties": {"target": "www.microsoft.com", "weight": 50}}'
+ headers:
+ Accept: [application/json]
+ Accept-Encoding: ['gzip, deflate']
+ Authorization: [Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IlliUkFRUlljRV9tb3RXVkpLSHJ3TEJiZF85cyIsImtpZCI6IlliUkFRUlljRV9tb3RXVkpLSHJ3TEJiZF85cyJ9.eyJhdWQiOiJodHRwczovL21hbmFnZW1lbnQuY29yZS53aW5kb3dzLm5ldC8iLCJpc3MiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC83MmY5ODhiZi04NmYxLTQxYWYtOTFhYi0yZDdjZDAxMWRiNDcvIiwiaWF0IjoxNDcxMzAyODU4LCJuYmYiOjE0NzEzMDI4NTgsImV4cCI6MTQ3MTMwNjc1OCwiX2NsYWltX25hbWVzIjp7Imdyb3VwcyI6InNyYzEifSwiX2NsYWltX3NvdXJjZXMiOnsic3JjMSI6eyJlbmRwb2ludCI6Imh0dHBzOi8vZ3JhcGgud2luZG93cy5uZXQvNzJmOTg4YmYtODZmMS00MWFmLTkxYWItMmQ3Y2QwMTFkYjQ3L3VzZXJzLzAzZjFmMWJiLWM4MjYtNGM3Yi1iMzY4LTk0MGMyYWEyNDJkZi9nZXRNZW1iZXJPYmplY3RzIn19LCJhY3IiOiIxIiwiYW1yIjpbIndpYSIsIm1mYSJdLCJhcHBpZCI6IjA0YjA3Nzk1LThkZGItNDYxYS1iYmVlLTAyZjllMWJmN2I0NiIsImFwcGlkYWNyIjoiMCIsImVfZXhwIjo3MjAwLCJmYW1pbHlfbmFtZSI6IkJpZWxpY2tpIiwiZ2l2ZW5fbmFtZSI6IkJ1cnQiLCJpcGFkZHIiOiIxNjcuMjIwLjAuNTAiLCJuYW1lIjoiQnVydCBCaWVsaWNraSIsIm9pZCI6IjAzZjFmMWJiLWM4MjYtNGM3Yi1iMzY4LTk0MGMyYWEyNDJkZiIsIm9ucHJlbV9zaWQiOiJTLTEtNS0yMS0yMTI3NTIxMTg0LTE2MDQwMTI5MjAtMTg4NzkyNzUyNy00ODEyODA2IiwicHVpZCI6IjEwMDNCRkZEODAxQzA4QkMiLCJzY3AiOiJ1c2VyX2ltcGVyc29uYXRpb24iLCJzdWIiOiJDeUIyOFc5T21GWkZ4bDRoZ0lFWW10MEd5amNDYkVDbVB6NWR4VUVSMWxjIiwidGlkIjoiNzJmOTg4YmYtODZmMS00MWFmLTkxYWItMmQ3Y2QwMTFkYjQ3IiwidW5pcXVlX25hbWUiOiJidXJ0YmllbEBtaWNyb3NvZnQuY29tIiwidXBuIjoiYnVydGJpZWxAbWljcm9zb2Z0LmNvbSIsInZlciI6IjEuMCJ9.AUutIvXoSv92-0RKkt-6SxmFInrtcTmdCpjI4568-m8GiaCA7OZJvctJOOOEmvrziJR8hXhp24JfuXmNA_8tfyp4bCG-xtifJMguLizEteI8elrTUrilRfvBveRfrinKvKXq5VfCaf1iUY3JDXCRcfd4VpfxcnV06N8Qxez0WKj-HWmhr48pQezDJoeBxAM_al9JuIws0I29_kgfOD2DvIhONxyy2l3uZHHfRbqgHjrhCpW83ezvFtfvW6Q8cSklGwGAlptEA8_W_uaZcSmNA88g9CTuDFHD9njl_Pla-_3sunJZ4WAdV1WYXlOxb26bcawybLrkZ3U6ai2sITclCw]
+ Connection: [keep-alive]
+ Content-Length: ['61']
+ Content-Type: [application/json; charset=utf-8]
+ User-Agent: [python/2.7.10 (Windows-8-6.2.9200) requests/2.9.1 msrest/0.4.0
+ msrest_azure/0.4.1 trafficmanagermanagementclient/0.30.0rc5 Azure-SDK-For-Python
+ AZURECLI/TEST/0.0.1.dev0]
+ accept-language: [en-US]
+ x-ms-client-request-id: [c8294cc0-6342-11e6-b1e4-001dd8b7c0ad]
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_traffic_manager_test1/providers/Microsoft.Network/trafficmanagerprofiles/mytmprofile/externalEndpoints/myendpoint?api-version=2015-11-01
+ response:
+ body: {string: !!python/unicode '{"id":"\/subscriptions\/304e8996-77fb-46e8-bada-557601594be4\/resourceGroups\/cli_traffic_manager_test1\/providers\/Microsoft.Network\/trafficManagerProfiles\/mytmprofile\/externalEndpoints\/myendpoint","name":"myendpoint","type":"Microsoft.Network\/trafficManagerProfiles\/externalEndpoints","properties":{"endpointStatus":"Enabled","endpointMonitorStatus":"CheckingEndpoint","target":"www.microsoft.com","weight":50,"priority":1,"endpointLocation":null}}'}
+ headers:
+ cache-control: [private]
+ content-length: ['456']
+ content-type: [application/json; charset=utf-8]
+ date: ['Mon, 15 Aug 2016 23:48:36 GMT']
+ server: [Microsoft-IIS/8.5]
+ strict-transport-security: [max-age=31536000; includeSubDomains]
+ x-aspnet-version: [4.0.30319]
+ x-content-type-options: [nosniff]
+ x-ms-ratelimit-remaining-subscription-writes: ['1196']
+ x-powered-by: [ASP.NET]
+ status: {code: 201, message: Created}
+- request:
+ body: null
+ headers:
+ Accept: [application/json]
+ Accept-Encoding: ['gzip, deflate']
+ Authorization: [Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IlliUkFRUlljRV9tb3RXVkpLSHJ3TEJiZF85cyIsImtpZCI6IlliUkFRUlljRV9tb3RXVkpLSHJ3TEJiZF85cyJ9.eyJhdWQiOiJodHRwczovL21hbmFnZW1lbnQuY29yZS53aW5kb3dzLm5ldC8iLCJpc3MiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC83MmY5ODhiZi04NmYxLTQxYWYtOTFhYi0yZDdjZDAxMWRiNDcvIiwiaWF0IjoxNDcxMzAyODU4LCJuYmYiOjE0NzEzMDI4NTgsImV4cCI6MTQ3MTMwNjc1OCwiX2NsYWltX25hbWVzIjp7Imdyb3VwcyI6InNyYzEifSwiX2NsYWltX3NvdXJjZXMiOnsic3JjMSI6eyJlbmRwb2ludCI6Imh0dHBzOi8vZ3JhcGgud2luZG93cy5uZXQvNzJmOTg4YmYtODZmMS00MWFmLTkxYWItMmQ3Y2QwMTFkYjQ3L3VzZXJzLzAzZjFmMWJiLWM4MjYtNGM3Yi1iMzY4LTk0MGMyYWEyNDJkZi9nZXRNZW1iZXJPYmplY3RzIn19LCJhY3IiOiIxIiwiYW1yIjpbIndpYSIsIm1mYSJdLCJhcHBpZCI6IjA0YjA3Nzk1LThkZGItNDYxYS1iYmVlLTAyZjllMWJmN2I0NiIsImFwcGlkYWNyIjoiMCIsImVfZXhwIjo3MjAwLCJmYW1pbHlfbmFtZSI6IkJpZWxpY2tpIiwiZ2l2ZW5fbmFtZSI6IkJ1cnQiLCJpcGFkZHIiOiIxNjcuMjIwLjAuNTAiLCJuYW1lIjoiQnVydCBCaWVsaWNraSIsIm9pZCI6IjAzZjFmMWJiLWM4MjYtNGM3Yi1iMzY4LTk0MGMyYWEyNDJkZiIsIm9ucHJlbV9zaWQiOiJTLTEtNS0yMS0yMTI3NTIxMTg0LTE2MDQwMTI5MjAtMTg4NzkyNzUyNy00ODEyODA2IiwicHVpZCI6IjEwMDNCRkZEODAxQzA4QkMiLCJzY3AiOiJ1c2VyX2ltcGVyc29uYXRpb24iLCJzdWIiOiJDeUIyOFc5T21GWkZ4bDRoZ0lFWW10MEd5amNDYkVDbVB6NWR4VUVSMWxjIiwidGlkIjoiNzJmOTg4YmYtODZmMS00MWFmLTkxYWItMmQ3Y2QwMTFkYjQ3IiwidW5pcXVlX25hbWUiOiJidXJ0YmllbEBtaWNyb3NvZnQuY29tIiwidXBuIjoiYnVydGJpZWxAbWljcm9zb2Z0LmNvbSIsInZlciI6IjEuMCJ9.AUutIvXoSv92-0RKkt-6SxmFInrtcTmdCpjI4568-m8GiaCA7OZJvctJOOOEmvrziJR8hXhp24JfuXmNA_8tfyp4bCG-xtifJMguLizEteI8elrTUrilRfvBveRfrinKvKXq5VfCaf1iUY3JDXCRcfd4VpfxcnV06N8Qxez0WKj-HWmhr48pQezDJoeBxAM_al9JuIws0I29_kgfOD2DvIhONxyy2l3uZHHfRbqgHjrhCpW83ezvFtfvW6Q8cSklGwGAlptEA8_W_uaZcSmNA88g9CTuDFHD9njl_Pla-_3sunJZ4WAdV1WYXlOxb26bcawybLrkZ3U6ai2sITclCw]
+ Connection: [keep-alive]
+ Content-Type: [application/json; charset=utf-8]
+ User-Agent: [python/2.7.10 (Windows-8-6.2.9200) requests/2.9.1 msrest/0.4.0
+ msrest_azure/0.4.1 trafficmanagermanagementclient/0.30.0rc5 Azure-SDK-For-Python
+ AZURECLI/TEST/0.0.1.dev0]
+ accept-language: [en-US]
+ x-ms-client-request-id: [c8d19aae-6342-11e6-a99f-001dd8b7c0ad]
+ method: GET
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_traffic_manager_test1/providers/Microsoft.Network/trafficmanagerprofiles/mytmprofile/externalEndpoints/myendpoint?api-version=2015-11-01
+ response:
+ body:
+ string: !!binary |
+ H4sIAAAAAAAEAO29B2AcSZYlJi9tynt/SvVK1+B0oQiAYBMk2JBAEOzBiM3mkuwdaUcjKasqgcpl
+ VmVdZhZAzO2dvPfee++999577733ujudTif33/8/XGZkAWz2zkrayZ4hgKrIHz9+fB8/In7xR8Xs
+ o0cf/b53m/WkmdbFqi2qZfP73r23s58fPHz46faDB+eT7f1P84PtSTbLtu/ff/Dpzu79h/uTfP/3
+ vVvnTbWup/nndbVe0VvTsvj92zo7Py+mv/8iW2YXef37t3nT7v6+d1d1dVnM8ppafVFM66qpztvx
+ i7y9quq3v+9dfekLeedlXZ0XZU5NF9ftgt7EX7/v3fxdm9fLrDxdzlZVsWz5+1z/+Gj00TJb5DSW
+ 4LP2eoXP3qPLXi8EhVBY5XVb5M1Hj37xRwb86zZr1/TJR6fLbFLmM2povvqiWhZtVdsWJ/N8+rZY
+ Xhig1LTN6ou8pe+urq7GC4vftFrQl1d5cTGnL+/voPOiqov2+qNHu66D59U0w1R99Gi5Lstf8kv+
+ HxkbPfHIAQAA
+ headers:
+ cache-control: [private]
+ content-encoding: [gzip]
+ content-type: [application/json; charset=utf-8]
+ date: ['Mon, 15 Aug 2016 23:48:36 GMT']
+ server: [Microsoft-IIS/8.5]
+ strict-transport-security: [max-age=31536000; includeSubDomains]
+ vary: [Accept-Encoding]
+ x-aspnet-version: [4.0.30319]
+ x-content-type-options: [nosniff]
+ x-powered-by: [ASP.NET]
+ status: {code: 200, message: OK}
+version: 1
diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py
index 8e3c1bc8f68..241bd98dbc8 100644
--- a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py
+++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py
@@ -907,3 +907,38 @@ def body(self):
self.cmd('network vpn-connection create -n myconnection -g {0} --shared-key 123' \
' --vnet-gateway1-id {1} --vnet-gateway2-id {2}'.format(rg, gateway1_id, gateway2_id))
+
+class NetworkTrafficManagerScenarioTest(ResourceGroupVCRTestBase):
+
+ def __init__(self, test_method):
+ super(NetworkTrafficManagerScenarioTest, self).__init__(__file__, test_method)
+ self.resource_group = 'cli_traffic_manager_test1'
+
+ def test_network_traffic_manager(self):
+ self.execute()
+
+ def body(self):
+ tm_name = 'mytmprofile'
+ endpoint_name = 'myendpoint'
+ unique_dns_name = 'mytrafficmanager001100a'
+
+ self.cmd('network traffic-manager profile check-dns -n myfoobar1')
+ self.cmd('network traffic-manager profile create -n {tm_name} -g {resource_group}'
+ ' --routing-method weighted --unique-dns-name {unique_dns_name}'
+ .format(tm_name=tm_name, resource_group=self.resource_group, unique_dns_name=unique_dns_name), checks=[
+ JMESPathCheck('trafficManagerProfile.trafficRoutingMethod', 'Weighted')
+ ])
+ self.cmd('network traffic-manager profile show -g {resource_group} -n {tm_name}'
+ .format(resource_group=self.resource_group, tm_name=tm_name), checks=[
+ JMESPathCheck('dnsConfig.relativeName', unique_dns_name)
+ ])
+ self.cmd('network traffic-manager endpoint create -n {endpoint_name} --profile-name {tm_name} -g {resource_group}'
+ ' --type externalEndpoints --weight 50 --target www.microsoft.com'
+ .format(endpoint_name=endpoint_name, tm_name=tm_name, resource_group=self.resource_group), checks=[
+ JMESPathCheck('type', 'Microsoft.Network/trafficManagerProfiles/externalEndpoints')
+ ])
+ self.cmd('network traffic-manager endpoint show --profile-name {tm_name} --type externalEndpoints'
+ ' -n {endpoint_name} -g {resource_group}'
+ .format(tm_name=tm_name, endpoint_name=endpoint_name, resource_group=self.resource_group), checks=[
+ JMESPathCheck('target', 'www.microsoft.com')
+ ])
diff --git a/src/command_modules/azure-cli-network/setup.py b/src/command_modules/azure-cli-network/setup.py
index 546f616c946..09ef584d919 100644
--- a/src/command_modules/azure-cli-network/setup.py
+++ b/src/command_modules/azure-cli-network/setup.py
@@ -25,6 +25,7 @@
DEPENDENCIES = [
'azure==2.0.0rc5',
+ 'azure-mgmt-trafficmanager==0.30.0rc5'
]
with open('README.rst', 'r', encoding='utf-8') as f:
@@ -103,6 +104,10 @@
'azure.cli.command_modules.network.mgmt_express_route_peering.lib',
'azure.cli.command_modules.network.mgmt_express_route_peering.lib.models',
'azure.cli.command_modules.network.mgmt_express_route_peering.lib.operations',
+ 'azure.cli.command_modules.network.mgmt_traffic_manager_profile',
+ 'azure.cli.command_modules.network.mgmt_traffic_manager_profile.lib',
+ 'azure.cli.command_modules.network.mgmt_traffic_manager_profile.lib.models',
+ 'azure.cli.command_modules.network.mgmt_traffic_manager_profile.lib.operations',
],
install_requires=DEPENDENCIES,
)