From 8a1ad0004db1a07fa475e0bc495ae4f58ad76e0b Mon Sep 17 00:00:00 2001 From: Sean Hyrich Date: Wed, 15 May 2013 15:21:43 -0700 Subject: [PATCH] fixed problem with adding an endpoint to a VM (role) Apparently the order of child xml elements on the InputEndpoint matters, the order was causing the operation of adding a new endpoint to a VM to fail with the error "InputEndpoint has a missing, misspelled or out of order element.". Basically just moved the EnableDirectServerReturn element from the beginning to the end of the list of children under InputEndpoint. --- .gitignore | 2 ++ src/azure/servicemanagement/__init__.py | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..045af8977ec2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.idea +src/build \ No newline at end of file diff --git a/src/azure/servicemanagement/__init__.py b/src/azure/servicemanagement/__init__.py index 23c31aae4f41..37308511d3fc 100644 --- a/src/azure/servicemanagement/__init__.py +++ b/src/azure/servicemanagement/__init__.py @@ -900,8 +900,7 @@ def network_configuration_to_xml(configuration): xml += '' for endpoint in configuration.input_endpoints: xml += '' - xml += _XmlSerializer.data_to_xml([('EnableDirectServerReturn', endpoint.enable_direct_server_return, _lower), - ('LoadBalancedEndpointSetName', endpoint.load_balanced_endpoint_set_name), + xml += _XmlSerializer.data_to_xml([('LoadBalancedEndpointSetName', endpoint.load_balanced_endpoint_set_name), ('LocalPort', endpoint.local_port), ('Name', endpoint.name), ('Port', endpoint.port)]) @@ -913,7 +912,8 @@ def network_configuration_to_xml(configuration): ('Protocol', endpoint.load_balancer_probe.protocol)]) xml += '' - xml += _XmlSerializer.data_to_xml([('Protocol', endpoint.protocol)]) + xml += _XmlSerializer.data_to_xml([('Protocol', endpoint.protocol), + ('EnableDirectServerReturn', endpoint.enable_direct_server_return, _lower)]) xml += '' xml += '' xml += ''