[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[geclipse-dev] AWS in headless mode!
|
HI all
I currently try to run the g-Eclipse core in headless mode in order to get a list of AWS resources, etc.
So I did the following in my simple program:
// 1. Create a AWS VO
IVirtualOrganization vo = null;
IVoManager manager = GridModel.getVoManager();
AWSVoCreator creator = new AWSVoCreator();
creator.setVoName("aws-vo");
creator.setAwsAccessId(aws_accessId);
vo = (IVirtualOrganization) manager.create(creator);
System.out.println(" VO created");
// 2 create the authentication token
IAuthenticationTokenDescription desc = new AWSAuthTokenDescription(
(AWSVirtualOrganization) vo);
AuthenticationTokenManager tokenManager = AuthenticationTokenManager
.getManager();
AWSAuthToken token = (AWSAuthToken) tokenManager.createToken(desc);
PasswordManager.registerPassword(
AWSAuthTokenDescription.SECURE_STORAGE_NODE + aws_accessId,
aws_secretkey);
token.setActive(true);
IAuthenticationToken test = tokenManager.findToken(desc);
// get a list of all aws storage services
IGridInfoService infoService = vo.getInfoService();
IGridResourceCategory category = GridResourceCategoryFactory
.getCategory(IAWSCategories.CATEGORY_AWS_STORAGE);
IGridResource[] resources = infoService.fetchResources(vo, vo,
category, null);
for (IGridResource iRes : resources) {
System.out.println(iRes.getName() + "@" + iRes.getHostName());
}
But I never get any resource. I'm not sure if the "injection" of the passworkd (aws_secretkey)
works as expected.
Any ideas??
Harald