forked from gCubeSystem/registry-publisher
if the resource type is a RunningInstance or a GHN, the more recent
resource check is bypassed
This commit is contained in:
parent
8c5b74c444
commit
69ca8d374d
|
@ -446,6 +446,9 @@ public class RegistryPublisherImpl implements RegistryPublisher {
|
||||||
|
|
||||||
private <T extends Resource> HashSet<String> updateResourceScopes(T resource) {
|
private <T extends Resource> HashSet<String> updateResourceScopes(T resource) {
|
||||||
HashSet<String> vosScopes = Utils.getInternalVOScopes(resource);
|
HashSet<String> vosScopes = Utils.getInternalVOScopes(resource);
|
||||||
|
// if the resource type is a RunningInstance or a HostingNode the check on the most recent resource is bypassed
|
||||||
|
if((resource.type().toString().equalsIgnoreCase("RunningInstance")) || (resource.type().toString().equalsIgnoreCase("GHN")))
|
||||||
|
return vosScopes;
|
||||||
//extract the scopes from the more recent resource found at vo level
|
//extract the scopes from the more recent resource found at vo level
|
||||||
List <String> latestScopesFound= Utils.setLatestInternalScopes(resource, vosScopes);
|
List <String> latestScopesFound= Utils.setLatestInternalScopes(resource, vosScopes);
|
||||||
log.debug("latest scope found are "+latestScopesFound);
|
log.debug("latest scope found are "+latestScopesFound);
|
||||||
|
|
|
@ -154,6 +154,7 @@ public class Utils {
|
||||||
|
|
||||||
private static <T extends Resource> List<String> extractInternalScopes(T resource, String latestVO) {
|
private static <T extends Resource> List<String> extractInternalScopes(T resource, String latestVO) {
|
||||||
T extractedResource=null;
|
T extractedResource=null;
|
||||||
|
log.debug("checking resource "+resource.id()+" type: "+resource.type());
|
||||||
if(resource.type().toString().equalsIgnoreCase("RuntimeResource")){
|
if(resource.type().toString().equalsIgnoreCase("RuntimeResource")){
|
||||||
extractedResource= (T)getServiceEndpointByID(resource.id(), latestVO);
|
extractedResource= (T)getServiceEndpointByID(resource.id(), latestVO);
|
||||||
}else if(resource.type().toString().equalsIgnoreCase("GenericResource")){
|
}else if(resource.type().toString().equalsIgnoreCase("GenericResource")){
|
||||||
|
|
Loading…
Reference in New Issue