Revision 403bb53b src/com/rackspace/cloud/loadbalancer/api/client/AlgorithmManager.java
b/src/com/rackspace/cloud/loadbalancer/api/client/AlgorithmManager.java | ||
---|---|---|
25 | 25 |
import com.rackspace.cloud.files.api.client.CustomHttpClient; |
26 | 26 |
import com.rackspace.cloud.loadbalancer.api.parsers.AlgorithmsXMLParser; |
27 | 27 |
import com.rackspace.cloud.servers.api.client.Account; |
28 |
import com.rackspacecloud.android.Preferences; |
|
28 | 29 |
|
29 | 30 |
public class AlgorithmManager extends EntityManager { |
30 | 31 |
|
31 | 32 |
public ArrayList<Algorithm> createList(Context context) { |
32 | 33 |
CustomHttpClient httpclient = new CustomHttpClient(context); |
33 |
HttpGet get = new HttpGet(Account.getLoadBalancerDFWUrl() + Account.getAccount().getAccountId() + "/loadbalancers/algorithms.xml"); |
|
34 |
|
|
35 |
String url = ""; |
|
36 |
if(Account.getAccount().getAuthServer().equals(Preferences.COUNTRY_US_AUTH_SERVER)){ |
|
37 |
url = Account.getLoadBalancerDFWUrl() + Account.getAccount().getAccountId() + "/loadbalancers/algorithms.xml"; |
|
38 |
} else if(Account.getAccount().getAuthServer().equals(Preferences.COUNTRY_UK_AUTH_SERVER)){ |
|
39 |
url = Account.getLoadBalancerLONUrl() + Account.getAccount().getAccountId() + "/loadbalancers/algorithms.xml"; |
|
40 |
} |
|
41 |
HttpGet get = new HttpGet(url); |
|
42 |
|
|
34 | 43 |
ArrayList<Algorithm> algorithms = new ArrayList<Algorithm>(); |
35 | 44 |
|
36 | 45 |
get.addHeader("X-Auth-Token", Account.getAccount().getAuthToken()); |
Also available in: Unified diff