Issue 198: work around intermittent service bug by retrying when getVapp returns null on a vapp that exists in available resources

This commit is contained in:
Adrian Cole 2010-03-15 16:54:46 -07:00
parent 7def9eee7c
commit 4a880d1f47
1 changed files with 2 additions and 2 deletions

View File

@ -124,7 +124,7 @@ public class VCloudComputeServiceContextModule extends VCloudContextModule {
@Named("NAMING_CONVENTION")
@Singleton
String provideNamingConvention() {
return "%s%d";
return "%s-%d";
}
@Singleton
@ -281,7 +281,7 @@ public class VCloudComputeServiceContextModule extends VCloudContextModule {
protected NodeMetadata getNodeMetadataByIdInVDC(String vDCId, String id) {
VApp vApp = client.getVApp(id);
String tag = vApp.getName().replaceAll("[0-9]+", "");
String tag = vApp.getName().replaceAll("-[0-9]+", "");
return new NodeMetadataImpl(vApp.getId(), vApp.getName(), vDCId, vApp.getLocation(),
ImmutableMap.<String, String> of(), tag, vAppStatusToNodeState.get(vApp
.getStatus()), computeClient.getPublicAddresses(id), computeClient