def parse_endpoint_from_params(protocol, azure_vm_name, endpoint_param_string)
      fields = endpoint_param_string.split(":").map(&:strip)
      hash = {}
      hash["LocalPort"] = fields[0]
      hash["Port"] = fields[1] || fields[0]
      hash["LoadBalancerName"] = fields[2] if fields[2] != "EXTERNAL" # TODO: hackity hack.. Shouldn't use magic words.
      hash["LoadBalancedEndpointSetName"] = fields[3]
      hash["Protocol"] = protocol
      if TCP_ENDPOINTS_MAPPING.include?(hash["Port"]) && protocol == "TCP"
        hash["Name"] = TCP_ENDPOINTS_MAPPING[hash["Port"]]
      else
        hash["Name"] = "#{protocol}Endpoint_chef_#{fields[0]}"
      end
      if fields[2]
        hash["LoadBalancerProbe"] = {}
        hash["LoadBalancerProbe"]["Path"] = fields[4]
        hash["LoadBalancerProbe"]["Port"] = fields[0]
        hash["LoadBalancerProbe"]["Protocol"] = fields[4] ? "HTTP" : protocol
      end
      hash
    end
def parse_endpoint_from_params(protocol, azure_vm_name, endpoint_param_string)
      fields = endpoint_param_string.split(":").map(&:strip)
      hash = {}
      hash["LocalPort"] = fields[0]
      hash["Port"] = fields[1] || fields[0]
      hash["LoadBalancerName"] = fields[2] if fields[2] != "EXTERNAL" # TODO: hackity hack.. Shouldn't use magic words.
      hash["LoadBalancedEndpointSetName"] = fields[3]
      hash["Protocol"] = protocol
      if TCP_ENDPOINTS_MAPPING.include?(hash["Port"]) && protocol == "TCP"
        hash["Name"] = TCP_ENDPOINTS_MAPPING[hash["Port"]]
      else
        hash["Name"] = "#{protocol}Endpoint_chef_#{fields[0]}"
      end
      if fields[2]
        hash["LoadBalancerProbe"] = {}
        hash["LoadBalancerProbe"]["Path"] = fields[4]
        hash["LoadBalancerProbe"]["Port"] = fields[0]
        hash["LoadBalancerProbe"]["Protocol"] = fields[4] ? "HTTP" : protocol
      end
      hash
    end
Expects endpoint_param_string to be in the form {localport}:{publicport}:{lb_set_name}:{lb_probe_path}
 Only localport is mandatory.