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