Clean up code
This commit is contained in:
parent
d4a8a8bf6b
commit
09a19962be
|
@ -1,5 +1,7 @@
|
|||
package com.rcarrillocruz.android.openstackdroid;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import android.os.Bundle;
|
||||
import android.view.MenuItem;
|
||||
import android.widget.FrameLayout;
|
||||
|
@ -14,21 +16,53 @@ import android.app.FragmentTransaction;
|
|||
import android.content.Intent;
|
||||
|
||||
public class CloudBrowserActivity extends Activity implements TabListener {
|
||||
private List<ServerModel> servers;
|
||||
private List<VolumeModel> volumes;
|
||||
private List<FlavorModel> flavors;
|
||||
private List<ImageModel> images;
|
||||
public List<UserModel> users;
|
||||
public List<TenantModel> tenants;
|
||||
|
||||
private Fragment mListFragmentAttached;
|
||||
private Fragment mServerListFragment;
|
||||
private Fragment mServerDetailsFragment;
|
||||
private Fragment mVolumeListFragment;
|
||||
private Fragment mVolumeDetailsFragment;
|
||||
private Fragment mFlavorListFragment;
|
||||
private Fragment mFlavorDetailsFragment;
|
||||
private Fragment mImageListFragment;
|
||||
private Fragment mImageDetailsFragment;
|
||||
private Fragment mUserListFragment;
|
||||
private Fragment mUserDetailsFragment;
|
||||
private Fragment mTenantListFragment;
|
||||
private Fragment mTenantDetailsFragment;
|
||||
|
||||
private boolean isDetailEnabled;
|
||||
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
servers = new ArrayList<ServerModel>();
|
||||
volumes = new ArrayList<VolumeModel>();
|
||||
flavors = new ArrayList<FlavorModel>();
|
||||
images = new ArrayList<ImageModel>();
|
||||
users = new ArrayList<UserModel>();
|
||||
tenants = new ArrayList<TenantModel>();
|
||||
|
||||
isDetailEnabled = false;
|
||||
mListFragmentAttached = null;
|
||||
mServerListFragment = null;
|
||||
mServerDetailsFragment = null;
|
||||
mVolumeListFragment = null;
|
||||
mVolumeDetailsFragment = null;
|
||||
mFlavorListFragment = null;
|
||||
mFlavorDetailsFragment = null;
|
||||
mImageListFragment = null;
|
||||
mImageDetailsFragment = null;
|
||||
mUserListFragment = null;
|
||||
mUserDetailsFragment = null;
|
||||
mTenantListFragment = null;
|
||||
mTenantDetailsFragment = null;
|
||||
|
||||
setContentView(R.layout.cloud_browser);
|
||||
|
||||
final ActionBar actionBar = getActionBar();
|
||||
|
@ -39,15 +73,28 @@ public class CloudBrowserActivity extends Activity implements TabListener {
|
|||
|
||||
ActionBar.Tab serverTab = actionBar.newTab().setText("Instances");
|
||||
ActionBar.Tab volumeTab = actionBar.newTab().setText("Volumes");
|
||||
|
||||
|
||||
serverTab.setTabListener(this);
|
||||
volumeTab.setTabListener(this);
|
||||
|
||||
actionBar.addTab(serverTab);
|
||||
actionBar.addTab(volumeTab);
|
||||
|
||||
//actionBar.addTab(flavorTab);
|
||||
|
||||
|
||||
if (((OpenstackdroidApplication)getApplication()).isAdminUser) {
|
||||
ActionBar.Tab flavorTab = actionBar.newTab().setText("Flavors");
|
||||
ActionBar.Tab imagesTab = actionBar.newTab().setText("Images");
|
||||
ActionBar.Tab usersTab = actionBar.newTab().setText("Users");
|
||||
ActionBar.Tab tenantsTab = actionBar.newTab().setText("Projects");
|
||||
|
||||
flavorTab.setTabListener(this);
|
||||
imagesTab.setTabListener(this);
|
||||
usersTab.setTabListener(this);
|
||||
tenantsTab.setTabListener(this);
|
||||
|
||||
actionBar.addTab(flavorTab);
|
||||
actionBar.addTab(imagesTab);
|
||||
actionBar.addTab(usersTab);
|
||||
actionBar.addTab(tenantsTab);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -88,6 +135,18 @@ public class CloudBrowserActivity extends Activity implements TabListener {
|
|||
case 1:
|
||||
tabClass = VolumeListFragment.class;
|
||||
break;
|
||||
case 2:
|
||||
tabClass = FlavorListFragment.class;
|
||||
break;
|
||||
case 3:
|
||||
tabClass = ImageListFragment.class;
|
||||
break;
|
||||
case 4:
|
||||
tabClass = UserListFragment.class;
|
||||
break;
|
||||
case 5:
|
||||
tabClass = TenantListFragment.class;
|
||||
break;
|
||||
}
|
||||
|
||||
hideDetailsLayout();
|
||||
|
@ -101,6 +160,14 @@ public class CloudBrowserActivity extends Activity implements TabListener {
|
|||
mServerListFragment = mListFragmentAttached;
|
||||
} else if (tabClass == VolumeListFragment.class) {
|
||||
mVolumeListFragment = mListFragmentAttached;
|
||||
} else if (tabClass == FlavorListFragment.class) {
|
||||
mFlavorListFragment = mListFragmentAttached;
|
||||
} else if (tabClass == ImageListFragment.class) {
|
||||
mImageListFragment = mListFragmentAttached;
|
||||
} else if (tabClass == UserListFragment.class) {
|
||||
mUserListFragment = mListFragmentAttached;
|
||||
} else if (tabClass == TenantListFragment.class) {
|
||||
mTenantListFragment = mListFragmentAttached;
|
||||
}
|
||||
|
||||
ft.add(R.id.items_list, mListFragmentAttached);
|
||||
|
@ -123,7 +190,43 @@ public class CloudBrowserActivity extends Activity implements TabListener {
|
|||
mVolumeListFragment = mListFragmentAttached;
|
||||
ft.add(R.id.items_list, mListFragmentAttached);
|
||||
}
|
||||
}
|
||||
} else if (tabClass == FlavorListFragment.class) {
|
||||
if (mFlavorListFragment != null) {
|
||||
mListFragmentAttached = mFlavorListFragment;
|
||||
ft.attach(mListFragmentAttached);
|
||||
} else {
|
||||
mListFragmentAttached = Fragment.instantiate(this, tabClass.getName());
|
||||
mFlavorListFragment = mListFragmentAttached;
|
||||
ft.add(R.id.items_list, mListFragmentAttached);
|
||||
}
|
||||
} else if (tabClass == ImageListFragment.class) {
|
||||
if (mImageListFragment != null) {
|
||||
mListFragmentAttached = mImageListFragment;
|
||||
ft.attach(mListFragmentAttached);
|
||||
} else {
|
||||
mListFragmentAttached = Fragment.instantiate(this, tabClass.getName());
|
||||
mImageListFragment = mListFragmentAttached;
|
||||
ft.add(R.id.items_list, mListFragmentAttached);
|
||||
}
|
||||
} else if (tabClass == UserListFragment.class) {
|
||||
if (mUserListFragment != null) {
|
||||
mListFragmentAttached = mUserListFragment;
|
||||
ft.attach(mListFragmentAttached);
|
||||
} else {
|
||||
mListFragmentAttached = Fragment.instantiate(this, tabClass.getName());
|
||||
mUserListFragment = mListFragmentAttached;
|
||||
ft.add(R.id.items_list, mListFragmentAttached);
|
||||
}
|
||||
} else if (tabClass == TenantListFragment.class) {
|
||||
if (mTenantListFragment != null) {
|
||||
mListFragmentAttached = mTenantListFragment;
|
||||
ft.attach(mListFragmentAttached);
|
||||
} else {
|
||||
mListFragmentAttached = Fragment.instantiate(this, tabClass.getName());
|
||||
mTenantListFragment = mListFragmentAttached;
|
||||
ft.add(R.id.items_list, mListFragmentAttached);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -172,6 +275,141 @@ public class CloudBrowserActivity extends Activity implements TabListener {
|
|||
public void setmVolumeDetailsFragment(Fragment mVolumeDetailsFragment) {
|
||||
this.mVolumeDetailsFragment = mVolumeDetailsFragment;
|
||||
}
|
||||
|
||||
|
||||
public List<ServerModel> getServers() {
|
||||
return servers;
|
||||
}
|
||||
|
||||
public void setServers(List<ServerModel> servers) {
|
||||
this.servers = servers;
|
||||
}
|
||||
|
||||
public List<VolumeModel> getVolumes() {
|
||||
return volumes;
|
||||
}
|
||||
|
||||
public void setVolumes(List<VolumeModel> volumes) {
|
||||
this.volumes = volumes;
|
||||
}
|
||||
|
||||
public List<ImageModel> getImages() {
|
||||
return images;
|
||||
}
|
||||
|
||||
public void setImages(List<ImageModel> images) {
|
||||
this.images = images;
|
||||
}
|
||||
|
||||
public Fragment getmImageListFragment() {
|
||||
return mImageListFragment;
|
||||
}
|
||||
|
||||
public void setmImageListFragment(Fragment mImageListFragment) {
|
||||
this.mImageListFragment = mImageListFragment;
|
||||
}
|
||||
|
||||
public Fragment getmImageDetailsFragment() {
|
||||
return mImageDetailsFragment;
|
||||
}
|
||||
|
||||
public void setmImageDetailsFragment(Fragment mImageDetailsFragment) {
|
||||
this.mImageDetailsFragment = mImageDetailsFragment;
|
||||
}
|
||||
|
||||
public List<FlavorModel> getFlavors() {
|
||||
return flavors;
|
||||
}
|
||||
|
||||
public void setFlavors(List<FlavorModel> flavors) {
|
||||
this.flavors = flavors;
|
||||
}
|
||||
|
||||
public List<UserModel> getUsers() {
|
||||
return users;
|
||||
}
|
||||
|
||||
public void setUsers(List<UserModel> users) {
|
||||
this.users = users;
|
||||
}
|
||||
|
||||
public List<TenantModel> getTenants() {
|
||||
return tenants;
|
||||
}
|
||||
|
||||
public void setTenants(List<TenantModel> tenants) {
|
||||
this.tenants = tenants;
|
||||
}
|
||||
|
||||
public Fragment getmFlavorListFragment() {
|
||||
return mFlavorListFragment;
|
||||
}
|
||||
|
||||
public void setmFlavorListFragment(Fragment mFlavorListFragment) {
|
||||
this.mFlavorListFragment = mFlavorListFragment;
|
||||
}
|
||||
|
||||
public Fragment getmFlavorDetailsFragment() {
|
||||
return mFlavorDetailsFragment;
|
||||
}
|
||||
|
||||
public void setmFlavorDetailsFragment(Fragment mFlavorDetailsFragment) {
|
||||
this.mFlavorDetailsFragment = mFlavorDetailsFragment;
|
||||
}
|
||||
|
||||
public Fragment getmListFragmentAttached() {
|
||||
return mListFragmentAttached;
|
||||
}
|
||||
|
||||
public void setmListFragmentAttached(Fragment mListFragmentAttached) {
|
||||
this.mListFragmentAttached = mListFragmentAttached;
|
||||
}
|
||||
|
||||
public Fragment getmServerListFragment() {
|
||||
return mServerListFragment;
|
||||
}
|
||||
|
||||
public void setmServerListFragment(Fragment mServerListFragment) {
|
||||
this.mServerListFragment = mServerListFragment;
|
||||
}
|
||||
|
||||
public Fragment getmVolumeListFragment() {
|
||||
return mVolumeListFragment;
|
||||
}
|
||||
|
||||
public void setmVolumeListFragment(Fragment mVolumeListFragment) {
|
||||
this.mVolumeListFragment = mVolumeListFragment;
|
||||
}
|
||||
|
||||
public Fragment getmUserListFragment() {
|
||||
return mUserListFragment;
|
||||
}
|
||||
|
||||
public void setmUserListFragment(Fragment mUserListFragment) {
|
||||
this.mUserListFragment = mUserListFragment;
|
||||
}
|
||||
|
||||
public Fragment getmUserDetailsFragment() {
|
||||
return mUserDetailsFragment;
|
||||
}
|
||||
|
||||
public void setmUserDetailsFragment(Fragment mUserDetailsFragment) {
|
||||
this.mUserDetailsFragment = mUserDetailsFragment;
|
||||
}
|
||||
|
||||
public Fragment getmTenantListFragment() {
|
||||
return mTenantListFragment;
|
||||
}
|
||||
|
||||
public void setmTenantListFragment(Fragment mTenantListFragment) {
|
||||
this.mTenantListFragment = mTenantListFragment;
|
||||
}
|
||||
|
||||
public Fragment getmTenantDetailsFragment() {
|
||||
return mTenantDetailsFragment;
|
||||
}
|
||||
|
||||
public void setmTenantDetailsFragment(Fragment mTenantDetailsFragment) {
|
||||
this.mTenantDetailsFragment = mTenantDetailsFragment;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -33,11 +33,20 @@ import android.widget.Toast;
|
|||
public class CloudControllerService extends IntentService {
|
||||
public static final String TAG = CloudControllerResultReceiver.class.getName();
|
||||
public static final String GET_TOKEN_OPERATION = "com.rcarrillocruz.android.openstackdroid.GetTokenOperation";
|
||||
public static final String GET_SERVERS_OPERATION = "com.rcarrillocruz.android.openstackdroid.GetServersOperation";
|
||||
public static final String GET_VOLUMES_OPERATION = "com.rcarrillocruz.android.openstackdroid.GetVolumesOperation";
|
||||
public static final String GET_IMAGES_OPERATION = "com.rcarrillocruz.android.openstackdroid.GetImagesOperation";
|
||||
public static final String GET_FLAVORS_OPERATION = "com.rcarrillocruz.android.openstackdroid.GetFlavorsOperation";
|
||||
public static final String GET_USERS_OPERATION = "com.rcarrillocruz.android.openstackdroid.GetUsersOperation";
|
||||
public static final String GET_TENANTS_OPERATION = "com.rcarrillocruz.android.openstackdroid.GetTenantsOperation";
|
||||
|
||||
public static final String OPERATION = "com.rcarrillocruz.android.openstackdroid.OPERATION";
|
||||
public static final String TOKEN = "com.rcarrillocruz.android.openstackdroid.TOKEN";
|
||||
public static final String TENANT = "com.rcarrillocruz.android.openstackdroid.TENANT";
|
||||
public static final String PARAMS = "com.rcarrillocruz.android.openstackdroid.PARAMS";
|
||||
public static final String RECEIVER = "com.rcarrillocruz.android.openstackdroid.RECEIVER";
|
||||
|
||||
public static final String OPERATION_RESULTS = "com.rcarrillocruz.android.openstackdroid.RESULTS";
|
||||
|
||||
public CloudControllerService() {
|
||||
super("CloudControllerService");
|
||||
// TODO Auto-generated constructor stub
|
||||
|
@ -50,12 +59,11 @@ public class CloudControllerService extends IntentService {
|
|||
Bundle extras = intent.getExtras();
|
||||
|
||||
String operation = extras.getString(OPERATION);
|
||||
String token = extras.getString(TOKEN);
|
||||
String tenantId = extras.getString(TENANT);
|
||||
ResultReceiver receiver = extras.getParcelable(RECEIVER);
|
||||
Bundle params = extras.getParcelable(PARAMS);
|
||||
|
||||
String tenantId = params.getString("tenantId");
|
||||
String token = null;
|
||||
|
||||
ApiOperation apiOperation = getOperationInstance(operation);
|
||||
|
||||
HttpRequestBase request = apiOperation.invoke(data, token, tenantId, params);
|
||||
|
@ -63,7 +71,7 @@ public class CloudControllerService extends IntentService {
|
|||
HttpResponse response = null;
|
||||
response = executeOperation(request);
|
||||
//android.os.Debug.waitForDebugger();
|
||||
returnResultstoReceiver(response, receiver);
|
||||
returnResultstoReceiver(operation, response, receiver);
|
||||
}
|
||||
|
||||
private ApiOperation getOperationInstance(String operation) {
|
||||
|
@ -103,13 +111,20 @@ public class CloudControllerService extends IntentService {
|
|||
return response;
|
||||
}
|
||||
|
||||
private void returnResultstoReceiver(HttpResponse response,
|
||||
private void returnResultstoReceiver(String operation, HttpResponse response,
|
||||
ResultReceiver receiver) {
|
||||
// TODO Auto-generated method stub
|
||||
Bundle results = new Bundle();
|
||||
|
||||
|
||||
try {
|
||||
results.putString("results", EntityUtils.toString(response.getEntity()));
|
||||
results.putString(OPERATION, operation);
|
||||
if (response != null) {
|
||||
results.putString(OPERATION_RESULTS, EntityUtils.toString(response.getEntity()));
|
||||
receiver.send(response.getStatusLine().getStatusCode(), results);
|
||||
} else {
|
||||
results.putString(OPERATION_RESULTS, "Connection to Openstack could not be established!");
|
||||
receiver.send(504, results);
|
||||
}
|
||||
} catch (ParseException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
|
@ -117,11 +132,9 @@ public class CloudControllerService extends IntentService {
|
|||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
receiver.send(response.getStatusLine().getStatusCode(), results);
|
||||
}
|
||||
|
||||
private static List<BasicNameValuePair> paramsToList(Bundle params) {
|
||||
/* private static List<BasicNameValuePair> paramsToList(Bundle params) {
|
||||
ArrayList<BasicNameValuePair> formList = new ArrayList<BasicNameValuePair>(params.size());
|
||||
|
||||
for (String key : params.keySet()) {
|
||||
|
@ -130,5 +143,5 @@ public class CloudControllerService extends IntentService {
|
|||
}
|
||||
|
||||
return formList;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ public class GetTokenOperation implements ApiOperation {
|
|||
String username = params.getString("username");
|
||||
String password = params.getString("password");
|
||||
|
||||
GetTokenRequest request = new GetTokenRequest(new AuthObject(new PasswordCredentialsObject(params.getString("username"), params.getString("password")), tenantId));
|
||||
GetTokenRequest request = new GetTokenRequest(new AuthObject(new PasswordCredentialsObject(username, password), tenantId));
|
||||
|
||||
StringEntity se = null;
|
||||
try {
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
package com.rcarrillocruz.android.openstackdroid;
|
||||
|
||||
public class LinkObject {
|
||||
private String href;
|
||||
private String rel;
|
||||
|
||||
public LinkObject() {
|
||||
super();
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public String getHref() {
|
||||
return href;
|
||||
}
|
||||
|
||||
public void setHref(String href) {
|
||||
this.href = href;
|
||||
}
|
||||
|
||||
public String getRel() {
|
||||
return rel;
|
||||
}
|
||||
|
||||
public void setRel(String rel) {
|
||||
this.rel = rel;
|
||||
}
|
||||
}
|
|
@ -5,6 +5,7 @@ import java.util.List;
|
|||
|
||||
import android.net.Uri;
|
||||
import android.os.Handler;
|
||||
import android.os.Parcelable;
|
||||
import android.app.ListActivity;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.ContentValues;
|
||||
|
@ -129,12 +130,13 @@ public class LoginActivity extends ListActivity implements Receiver, LoaderManag
|
|||
Intent serviceIntent = new Intent(this, CloudControllerService.class);
|
||||
serviceIntent.setData(Uri.parse(endpoint));
|
||||
serviceIntent.putExtra(CloudControllerService.OPERATION, CloudControllerService.GET_TOKEN_OPERATION);
|
||||
serviceIntent.putExtra(CloudControllerService.TOKEN, (String)null);
|
||||
serviceIntent.putExtra(CloudControllerService.TENANT, tenantId);
|
||||
serviceIntent.putExtra(CloudControllerService.RECEIVER, mReceiver);
|
||||
|
||||
Bundle params = new Bundle();
|
||||
params.putString("username", username);
|
||||
params.putString("password", password);
|
||||
params.putString("tenantId", tenantId);
|
||||
|
||||
serviceIntent.putExtra(CloudControllerService.PARAMS, params);
|
||||
|
||||
|
@ -166,25 +168,39 @@ public class LoginActivity extends ListActivity implements Receiver, LoaderManag
|
|||
|
||||
if (resultCode == 200) {
|
||||
Gson gson = new Gson();
|
||||
GetTokenResponse gtr = gson.fromJson(resultData.getString("results"), GetTokenResponse.class);
|
||||
|
||||
GetTokenResponse gtr = gson.fromJson(resultData.getString(CloudControllerService.OPERATION_RESULTS), GetTokenResponse.class);
|
||||
OpenstackdroidApplication application = (OpenstackdroidApplication) getApplication();
|
||||
List<ServiceCatalogObject> sc = gtr.getAccess().getServiceCatalog();
|
||||
|
||||
application.setAdminUser(false);
|
||||
Iterator<RoleObject> it = gtr.getAccess().getUser().getRoles().iterator();
|
||||
|
||||
while (it.hasNext()) {
|
||||
if (it.next().getName().equals("admin"))
|
||||
application.setAdminUser(true);
|
||||
}
|
||||
|
||||
application.setToken(gtr.getAccess().getToken().getId());
|
||||
application.setComputeEndpoint(getEndpointByType(sc, COMPUTE_ENDPOINT));
|
||||
application.setVolumeEndpoint(getEndpointByType(sc, VOLUME_ENDPOINT));
|
||||
application.setIdentityEndpoint(getEndpointByType(sc, IDENTITY_ENDPOINT));
|
||||
application.setImageEndpoint(getEndpointByType(sc, IMAGE_ENDPOINT));
|
||||
application.setTenantId(gtr.getAccess().getToken().getTenant().getId());
|
||||
application.setComputeEndpoint(getEndpointByType(sc, COMPUTE_ENDPOINT).getPublicURL());
|
||||
application.setVolumeEndpoint(getEndpointByType(sc, VOLUME_ENDPOINT).getPublicURL());
|
||||
|
||||
EndpointObject ieo = getEndpointByType(sc, IDENTITY_ENDPOINT);
|
||||
application.setIdentityEndpoint(ieo.getPublicURL());
|
||||
application.setIdentityAdminEndpoint(ieo.getAdminURL());
|
||||
|
||||
application.setImageEndpoint(getEndpointByType(sc, IMAGE_ENDPOINT).getPublicURL());
|
||||
|
||||
Intent browserIntent = new Intent(this, CloudBrowserActivity.class);
|
||||
startActivity(browserIntent);
|
||||
} else {
|
||||
Toast.makeText(this, "Error " + resultCode + ": " + resultData.getString(CloudControllerService.OPERATION_RESULTS) , Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
|
||||
private String getEndpointByType(List<ServiceCatalogObject> sc, String type) {
|
||||
private EndpointObject getEndpointByType(List<ServiceCatalogObject> sc, String type) {
|
||||
// TODO Auto-generated method stub
|
||||
String url = null;
|
||||
EndpointObject eo = null;
|
||||
boolean found = false;
|
||||
ServiceCatalogObject item = null;
|
||||
|
||||
|
@ -194,13 +210,13 @@ public class LoginActivity extends ListActivity implements Receiver, LoaderManag
|
|||
item = it.next();
|
||||
|
||||
if (item.getType().equals(type)) {
|
||||
url = item.getEndpoints().get(0).getPublicURL();
|
||||
eo = item.getEndpoints().get(0);
|
||||
found = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return url;
|
||||
return eo;
|
||||
}
|
||||
|
||||
private void addConnectionProfile() {
|
||||
|
|
|
@ -4,9 +4,12 @@ import android.app.Application;
|
|||
|
||||
public class OpenstackdroidApplication extends Application {
|
||||
private String token;
|
||||
private String tenantId;
|
||||
public boolean isAdminUser;
|
||||
private String computeEndpoint;
|
||||
private String volumeEndpoint;
|
||||
private String identityEndpoint;
|
||||
private String identityAdminEndpoint;
|
||||
private String imageEndpoint;
|
||||
|
||||
@Override
|
||||
|
@ -25,6 +28,18 @@ public class OpenstackdroidApplication extends Application {
|
|||
public void setToken(String token) {
|
||||
this.token = token;
|
||||
}
|
||||
public String getTenantId() {
|
||||
return tenantId;
|
||||
}
|
||||
public void setTenantId(String tenantId) {
|
||||
this.tenantId = tenantId;
|
||||
}
|
||||
public boolean isAdminUser() {
|
||||
return isAdminUser;
|
||||
}
|
||||
public void setAdminUser(boolean isAdminUser) {
|
||||
this.isAdminUser = isAdminUser;
|
||||
}
|
||||
public String getComputeEndpoint() {
|
||||
return computeEndpoint;
|
||||
}
|
||||
|
@ -43,6 +58,12 @@ public class OpenstackdroidApplication extends Application {
|
|||
public void setIdentityEndpoint(String identityEndpoint) {
|
||||
this.identityEndpoint = identityEndpoint;
|
||||
}
|
||||
public String getIdentityAdminEndpoint() {
|
||||
return identityAdminEndpoint;
|
||||
}
|
||||
public void setIdentityAdminEndpoint(String identityAdminEndpoint) {
|
||||
this.identityAdminEndpoint = identityAdminEndpoint;
|
||||
}
|
||||
public String getImageEndpoint() {
|
||||
return imageEndpoint;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue