Commit 743afa54 authored by Kostis Trantzas's avatar Kostis Trantzas
Browse files

Merge branch 'issue_60' into 'develop'

MR for fixing #60

See merge request !52
parents a019f0bd edb211d4
Loading
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -74,7 +74,7 @@ public class ResourceApiRouteBuilder extends RouteBuilder {
	public void configure() throws Exception {
		
		from( CATALOG_ADD_RESOURCE )
		.log(LoggingLevel.INFO, log, CATALOG_ADD_RESOURCE + " message received!")
		.log(LoggingLevel.DEBUG, log, CATALOG_ADD_RESOURCE + " message received!")
		.to("log:DEBUG?showBody=true&showHeaders=true")
		.unmarshal().json( JsonLibrary.Jackson, ResourceCreate.class, true)
		.bean( resourceRepoService, "addResource(${body})")
@@ -83,13 +83,13 @@ public class ResourceApiRouteBuilder extends RouteBuilder {
		.convertBodyTo( String.class );
		
		from( CATALOG_GET_RESOURCE_BY_ID )
		.log(LoggingLevel.INFO, log, CATALOG_GET_RESOURCE_BY_ID + " message received!")
		.log(LoggingLevel.DEBUG, log, CATALOG_GET_RESOURCE_BY_ID + " message received!")
		.to("log:DEBUG?showBody=true&showHeaders=true")
		.bean( resourceRepoService, "getResourceEagerAsString")
		.convertBodyTo( String.class );	
				
		from( CATALOG_UPD_RESOURCE )
		.log(LoggingLevel.INFO, log, CATALOG_UPD_RESOURCE + " message received!")
		.log(LoggingLevel.DEBUG, log, CATALOG_UPD_RESOURCE + " message received!")
		.to("log:DEBUG?showBody=true&showHeaders=true")
		.unmarshal().json( JsonLibrary.Jackson, ResourceUpdate.class, true)
		.bean( resourceRepoService, "updateResource(${header.resourceId}, ${body}, ${header.triggerServiceActionQueue} )")
@@ -97,14 +97,14 @@ public class ResourceApiRouteBuilder extends RouteBuilder {
		.convertBodyTo( String.class );		

		from( CATALOG_RESOURCES_OF_PARTNERS )
		.log(LoggingLevel.INFO, log, CATALOG_RESOURCES_OF_PARTNERS + " message received!")
		.log(LoggingLevel.DEBUG, log, CATALOG_RESOURCES_OF_PARTNERS + " message received!")
		.to("log:DEBUG?showBody=true&showHeaders=true")
		.bean( resourceRepoService, "findAllActiveAndReservedResourcesOfPartners")
		.marshal().json( JsonLibrary.Jackson)
		.convertBodyTo( String.class );
		
		from( CATALOG_UPDADD_RESOURCE )
		.log(LoggingLevel.INFO, log, CATALOG_UPDADD_RESOURCE + " message received!")
		.log(LoggingLevel.DEBUG, log, CATALOG_UPDADD_RESOURCE + " message received!")
		.to("log:DEBUG?showBody=true&showHeaders=true")
		.unmarshal().json( JsonLibrary.Jackson, ResourceCreate.class, true)
		.bean( resourceRepoService, "addOrUpdateResourceByNameCategoryVersion(${header.aname},${header.acategory}, ${header.aversion}, ${body})")
+12 −12
Original line number Diff line number Diff line
@@ -123,7 +123,7 @@ public class ServiceApiRouteBuilder extends RouteBuilder {
      
      
		from( CATALOG_ADD_SERVICE )
		.log(LoggingLevel.INFO, log, CATALOG_ADD_SERVICE + " message received and will be processed for service inventory!")
		.log(LoggingLevel.DEBUG, log, CATALOG_ADD_SERVICE + " message received and will be processed for service inventory!")
		.to("log:DEBUG?showBody=true&showHeaders=true")
		.unmarshal().json( JsonLibrary.Jackson, ServiceCreate.class, true)
		.bean( serviceRepoService, "addService(${body})")
@@ -131,7 +131,7 @@ public class ServiceApiRouteBuilder extends RouteBuilder {
		.convertBodyTo( String.class );
		
		from( CATALOG_GET_SERVICE_BY_ID )
		.log(LoggingLevel.INFO, log, CATALOG_GET_SERVICE_BY_ID + " message received and will be processed for service inventory!")
		.log(LoggingLevel.DEBUG, log, CATALOG_GET_SERVICE_BY_ID + " message received and will be processed for service inventory!")
		.to("log:DEBUG?showBody=true&showHeaders=true")
		.bean( serviceRepoService, "getServiceEagerAsString")
		.convertBodyTo( String.class );
@@ -139,7 +139,7 @@ public class ServiceApiRouteBuilder extends RouteBuilder {
		
		
		from( CATALOG_UPD_SERVICE )
		.log(LoggingLevel.INFO, log, CATALOG_UPD_SERVICE + " message received and will be processed for service inventory!")
		.log(LoggingLevel.DEBUG, log, CATALOG_UPD_SERVICE + " message received and will be processed for service inventory!")
		.to("log:DEBUG?showBody=true&showHeaders=true")
		.unmarshal().json( JsonLibrary.Jackson, ServiceUpdate.class, true)
		.bean( serviceRepoService, "updateService(${header.serviceid}, ${body}, ${header.triggerServiceActionQueue} )")
@@ -148,14 +148,14 @@ public class ServiceApiRouteBuilder extends RouteBuilder {
		
		
		from( CATALOG_SERVICE_QUEUE_ITEMS_GET )
		.log(LoggingLevel.INFO, log, CATALOG_SERVICE_QUEUE_ITEMS_GET + " message received and will be processed for service inventory!")
		.log(LoggingLevel.DEBUG, log, CATALOG_SERVICE_QUEUE_ITEMS_GET + " message received and will be processed for service inventory!")
		.to("log:DEBUG?showBody=true&showHeaders=true")
		.bean( serviceRepoService, "findAllServiceActionQueueItems")
		.marshal().json( JsonLibrary.Jackson)
		.convertBodyTo( String.class );
		
		from( CATALOG_SERVICE_QUEUE_ITEM_UPD )
		.log(LoggingLevel.INFO, log, CATALOG_SERVICE_QUEUE_ITEM_UPD + " message received and will be processed for service inventory!")
		.log(LoggingLevel.DEBUG, log, CATALOG_SERVICE_QUEUE_ITEM_UPD + " message received and will be processed for service inventory!")
		.to("log:DEBUG?showBody=true&showHeaders=true")
		.unmarshal().json( JsonLibrary.Jackson, ServiceActionQueueItem.class, true)
		.bean( serviceRepoService, "updateServiceActionQueueItem(${body})")
@@ -163,7 +163,7 @@ public class ServiceApiRouteBuilder extends RouteBuilder {
		.convertBodyTo( String.class );
		
		from( CATALOG_SERVICE_QUEUE_ITEM_DELETE )
		.log(LoggingLevel.INFO, log, CATALOG_SERVICE_QUEUE_ITEM_DELETE + " message received and will be processed for service inventory!")
		.log(LoggingLevel.DEBUG, log, CATALOG_SERVICE_QUEUE_ITEM_DELETE + " message received and will be processed for service inventory!")
		.to("log:DEBUG?showBody=true&showHeaders=true")
		.unmarshal().json( JsonLibrary.Jackson, ServiceActionQueueItem.class, true)
		.bean( serviceRepoService, "deleteServiceActionQueueItemByUuid(${header.itemid})");
@@ -171,7 +171,7 @@ public class ServiceApiRouteBuilder extends RouteBuilder {
		
		
		from( CATALOG_SERVICES_TO_TERMINATE )
		.log(LoggingLevel.INFO, log, CATALOG_SERVICES_TO_TERMINATE + " message received and will be processed for service inventory!")
		.log(LoggingLevel.DEBUG, log, CATALOG_SERVICES_TO_TERMINATE + " message received and will be processed for service inventory!")
		.to("log:DEBUG?showBody=true&showHeaders=true")
		.bean( serviceRepoService, "findAllActiveServicesToTerminate")
		.marshal().json( JsonLibrary.Jackson)
@@ -179,7 +179,7 @@ public class ServiceApiRouteBuilder extends RouteBuilder {
		

		from( CATALOG_SERVICES_OF_PARTNERS )
		.log(LoggingLevel.INFO, log, CATALOG_SERVICES_OF_PARTNERS + " message received and will be processed for service inventory!")
		.log(LoggingLevel.DEBUG, log, CATALOG_SERVICES_OF_PARTNERS + " message received and will be processed for service inventory!")
		.to("log:DEBUG?showBody=true&showHeaders=true")
		.bean( serviceRepoService, "findAllActiveAndReservedServicesOfPartners")
		.marshal().json( JsonLibrary.Jackson)
@@ -187,14 +187,14 @@ public class ServiceApiRouteBuilder extends RouteBuilder {
		

		from( CATALOG_GET_SERVICE_BY_ORDERID )
		.log(LoggingLevel.INFO, log, CATALOG_GET_SERVICE_BY_ORDERID + " message received and will be processed for service inventory!")
		.log(LoggingLevel.DEBUG, log, CATALOG_GET_SERVICE_BY_ORDERID + " message received and will be processed for service inventory!")
		.to("log:DEBUG?showBody=true&showHeaders=true")
		.bean( serviceRepoService, "getServicesFromOrderID")
		.marshal().json( JsonLibrary.Jackson)
		.convertBodyTo( String.class );
		
		from( NFV_CATALOG_NS_LCMCHANGED )
		.log(LoggingLevel.INFO, log, NFV_CATALOG_NS_LCMCHANGED + " message received and will be processed for service inventory!")
		.log(LoggingLevel.DEBUG, log, NFV_CATALOG_NS_LCMCHANGED + " message received and will be processed for service inventory!")
		.to("log:DEBUG?showBody=true&showHeaders=true")
		.unmarshal().json( JsonLibrary.Jackson, DeploymentDescriptor.class, true)
		.bean( serviceRepoService, "nfvCatalogNSResourceChanged(${body})");
@@ -202,7 +202,7 @@ public class ServiceApiRouteBuilder extends RouteBuilder {


        from( EVENT_RESOURCE_STATE_CHANGED )
        .log(LoggingLevel.INFO, log, EVENT_RESOURCE_STATE_CHANGED + " message received and will be processed for service inventory!")
        .log(LoggingLevel.DEBUG, log, EVENT_RESOURCE_STATE_CHANGED + " message received and will be processed for service inventory!")
        .to("log:DEBUG?showBody=true&showHeaders=true")
        .unmarshal().json( JsonLibrary.Jackson, ResourceStateChangeNotification.class, true)
        .bean( serviceRepoService, "resourceStateChangedEvent(${body})");
@@ -216,7 +216,7 @@ public class ServiceApiRouteBuilder extends RouteBuilder {
            .logHandled(true)
            .retriesExhaustedLogLevel(LoggingLevel.ERROR)
            .retryAttemptedLogLevel(LoggingLevel.ERROR))     
        .log(LoggingLevel.INFO, log, EVENT_RESOURCE_CREATE + " message received and will be processed for service inventory!")
        .log(LoggingLevel.DEBUG, log, EVENT_RESOURCE_CREATE + " message received and will be processed for service inventory!")
        .to("log:DEBUG?showBody=true&showHeaders=true")
        .unmarshal().json( JsonLibrary.Jackson, ResourceCreateNotification.class, true)
        .bean( serviceRepoService, "resourceCreatedEvent(${body})");
+199 −65
Original line number Diff line number Diff line
@@ -340,6 +340,25 @@ public class ServiceRepoService {
		noteItem.setDate(OffsetDateTime.now(ZoneOffset.UTC) );
		s.addNoteItem(noteItem);		
		
        // double characteristic investigation
		//
		//
        // int cnt = 0;
        // if ( service.getServiceCharacteristic()!=null)
        //   for (Characteristic ch : service.getServiceCharacteristic()) {
        //     if ( ch.getName().equals( "org.etsi.osl.prefixName" ) ) {
        //       cnt++; 
        //     }
        //     if ( ch.getName().equals( "AdditionPropertiesAsJson" ) ) {
        //       logger.debug("=============================================>  FOUND CHARACTERISTIC addService AdditionPropertiesAsJson IN addService" );
        //       logger.debug("=============================================>  AdditionPropertiesAsJson charlength=" + ch.getValue().getValue().length() );
        //     }
        // } 

        // if ( cnt>1) {
        //   logger.debug("=============================================>  FOUND CHARACTERISTIC TWICE AFTER service  addService" );
          
        // }
		
		s = this.serviceRepo.save( s );

@@ -393,6 +412,42 @@ public class ServiceRepoService {
			e.printStackTrace();
		}
		
		// double characteristic investigation
		//
		//
        // int cnt = 0;
        // if ( servUpd.getServiceCharacteristic() != null ) {
        //   for (Characteristic ch1 : servUpd.getServiceCharacteristic()) {
        //       if ( ch1.getName().equals( "org.etsi.osl.prefixName" ) ) {
        //         cnt++; 
        //       }
        //       if ( ch1.getName().equals( "AdditionPropertiesAsJson" ) ) {
        //         logger.debug("=============================================>  FOUND CHARACTERISTIC AdditionPropertiesAsJson IN servUpd" );
        //         logger.debug("=============================================>  AdditionPropertiesAsJson charlength=" + ch1.getValue().getValue().length() );
        //       }
              
        //   } 

        //   if ( cnt>1) {
        //     logger.debug("=============================================>  FOUND CHARACTERISTIC TWICE servUpd updateService servUpd" );
            
        //   }            
        // }
        // cnt = 0;
        //   for (Characteristic ch : service.getServiceCharacteristic()) {
        //       if ( ch.getName().equals( "org.etsi.osl.prefixName" ) ) {
        //         cnt++; 
        //       }
        //       if ( ch.getName().equals( "AdditionPropertiesAsJson" ) ) {
        //         logger.debug("=============================================>  FOUND CHARACTERISTIC AdditionPropertiesAsJson IN service" );
        //         logger.debug("=============================================>  AdditionPropertiesAsJson charlength=" + ch.getValue().getValue().length() );
        //       }
        //   } 

        //   if ( cnt>1) {
        //     logger.debug("=============================================>  FOUND CHARACTERISTIC TWICE service updateService service" );
            
        //   }
		
				
		if (servUpd.getType()!=null) {
@@ -536,7 +591,19 @@ public class ServiceRepoService {
					} else {
						service.addServiceCharacteristicItem(n);

						// double characteristic investigation
						//
						//
			            //   if ( n.getName().equals( "AdditionPropertiesAsJson" ) ) {
			            //     logger.debug("=============================================>  ADDING AdditionPropertiesAsJson to service" );
			            //     if ( n.getValue()!=null ) {
		                //         logger.debug("=============================================>  ADDING AdditionPropertiesAsJson charlength=" + n.getValue().getValue().length() );                        
		                //       } else {

		                //         logger.debug("=============================================>  ADDING AdditionPropertiesAsJson charlength=NULL" );
		                //       }
		                      
			            //   }
						if ( !n.getName().contains("::") ) { //it is not a child characteristic
	                        serviceCharacteristicChanged = true;    
	                        charChangedForNotes += n.getName() + ", "; 						  
@@ -613,6 +680,7 @@ public class ServiceRepoService {
		
        if (charChangedForNotes.contains( "reconciledAt") ) { //this is just a sync message, so we need to igore such changes
          serviceCharacteristicChanged = false;
          logger.debug("=============================================>  Just reconciledAt changed" );
        }
		
		if (serviceCharacteristicChanged) {
@@ -634,6 +702,24 @@ public class ServiceRepoService {
		
		service = this.serviceRepo.save( service );
		
		// double characteristic investigation
		//
		//
        // cnt = 0;
        // for (Characteristic ch : service.getServiceCharacteristic()) {
        //     if ( ch.getName().equals( "org.etsi.osl.prefixName" ) ) {
        //       cnt++; 
        //     }
        //     if ( ch.getName().equals( "AdditionPropertiesAsJson" ) ) {
        //       logger.debug("=============================================>  FOUND CHARACTERISTIC AFTER AdditionPropertiesAsJson IN service" );
        //       logger.debug("=============================================>  AdditionPropertiesAsJson charlength=" + ch.getValue().getValue().length() );
        //     }
        // } 

        // if ( cnt>1) {
        //   logger.debug("=============================================>  FOUND CHARACTERISTIC TWICE AFTER service updateService service" );
          
        // }
		
	    String requestedServiceAsJson = null;
	    try {
@@ -765,22 +851,6 @@ public class ServiceRepoService {
		}
		
		
		Characteristic schart = service.getServiceCharacteristicByName("long_string");

		if ( schart!= null ) {
			String teest = schart.getValue().getValue();
			logger.info("schart size = " + teest.length() );
			
			logger.info("schart " + teest );
			System.out.println("The value is : \n " + teest);
//			try (PrintWriter out = new PrintWriter("C:\\tranoris\\ctranup\\personal\\Invoices\\filename.txt")) {
//			    out.println( teest );
//			} catch (FileNotFoundException e) {
//				// TODO Auto-generated catch block
//				e.printStackTrace();
//			}		
		}
		
		return service;
	}

@@ -890,15 +960,15 @@ public class ServiceRepoService {
		String res = mapper.writeValueAsString(s);


		Characteristic schart = s.getServiceCharacteristicByName("long_string");
		// Characteristic schart = s.getServiceCharacteristicByName("long_string");

		if ( schart!= null ) {
			String teest = schart.getValue().getValue();
			logger.debug("schart size = " + teest.length() );
		// if ( schart!= null ) {
		// 	String teest = schart.getValue().getValue();
		// 	logger.debug("schart size = " + teest.length() );
			
			logger.debug("schart " + teest );
			logger.debug("======================================================================================================");			
		}
		// 	logger.debug("schart " + teest );
		// 	logger.debug("======================================================================================================");			
		// }
		
		return res;
	}
@@ -1155,16 +1225,14 @@ public class ServiceRepoService {
	public void  updateServicesHavingThisSupportingResource(@Valid Resource res) {
      try {
        
        logger.debug("Will update services related to this resource with id = " + res.getId() );
        
        logger.debug("================> Will update services related to this resource with id = " + res.getId() );        
        var aservices = findServicesHavingThisSupportingResourceID(  res.getId() );
        
        logger.debug("services.found = " + aservices.size() );
        
        for (Service as : aservices) {
            
              Service aService = findByUuid(as.getId()); 
              Service aService = getServiceEager(as.getId());

              ServiceStateType nextState =  aService.getState();
              List<Resource> rlist = new ArrayList<Resource>();
              for (ResourceRef rref : aService.getSupportingResource()) {
                Optional<Resource> result = resourceRepo.findByUuid(rref.getId());
@@ -1173,27 +1241,98 @@ public class ServiceRepoService {
                }
              }
              
              rlist.add(res); //add also this one
              //copy characteristics, from resource to service

              /*
               * Construct characteristic name
               */
              String kind = "";
              String resourcename = res.getName() ;
              
              org.etsi.osl.tmf.ri639.model.Characteristic ckind = res.getResourceCharacteristicByName("Kind");
              if ( ckind != null && ckind.getValue() != null) {
                kind = ckind.getValue().getValue() ; //example "ConfigMap"
              }
              
              if ( res.getName().indexOf('@')>0) {
                String firstToken = res.getName().substring(  0, res.getName().indexOf('@') );
                resourcename = firstToken ;  //example "cr0fc1234-amf"       
              }
              
              Boolean resourceIsSameKind = aService.checkIsKindResource(res) || aService.getServiceCharacteristicByName("Kind")==null; //either Kind is the same or simply does not exist. Then behave the same
              if (resourceIsSameKind) { //if this service is the same kind as the resource then don't prefix the characteristic
                kind = "";
                resourcename="";   
                //rlist.add(res); //add only this one
              }else { 
                //enable the following to remove crXXXXXX prefix in name
//                org.etsi.osl.tmf.ri639.model.Characteristic kubinstance = res.getResourceCharacteristicByName("app.kubernetes.io/instance");
//                if ( kubinstance != null && kubinstance.getValue() != null) {
//                  String removePrefix = kubinstance.getValue().getValue();
//                  resourcename = resourcename.replace( removePrefix + "-", "");
//                  resourcename = resourcename.replace( removePrefix, "");
//                }        
                kind = kind + ".";
                resourcename = resourcename + ".";
              }
              
              ServiceStateType nextState = aService.findNextStateBasedOnSupportingResources(rlist);
              
              Boolean stateChaged = false;
              ServiceUpdate supd = new ServiceUpdate();
              nextState = aService.findNextStateBasedOnResourceList(rlist);
              supd.setState(nextState);
              String stateText="";
              if ( !aService.getState().equals(nextState)) {
                stateChaged = true;
                stateText = "State changed from " + aService.getState() + " to " + nextState + ".";
                logger.debug("====================>  stateText = " + stateText);
                for (Resource r : rlist) {
                  logger.debug("==================>  r:{}, state:{} ="+  r.getName() + ", "+  r.getResourceStatus().name());
                  
                }
              }
              
              //adding all characteristics from service
              for (Characteristic ch : aService.getServiceCharacteristic()) {
                supd.addServiceCharacteristicItem(ch);
                
                //copy characteristics, from resource to service
                
              }
              
              Boolean characteristicFoundDifferent =false;
              String dontCopyChars = "clusterMasterURL,currentContextCluster,fullResourceName,Kind,apiGroup,UID,metadata";
              String[] arrayDontCopyChars = dontCopyChars.split(",");
              Set<String> setB = new HashSet<>(Arrays.asList(arrayDontCopyChars));
              for (org.etsi.osl.tmf.ri639.model.Characteristic rChar : res.getResourceCharacteristic()) {
                if ( resourceIsSameKind ||  ( !setB.contains( rChar.getName()) &&  !rChar.getName().startsWith("org.etsi.osl") )    ){ //don;t copy characteristics in set                  
                  if  ( rChar.getValue() != null ) {

                    String characteristicname = kind + resourcename + rChar.getName();
                    Characteristic servChar = supd.getServiceCharacteristicByName( characteristicname );
                    if ( servChar != null && servChar.getValue() != null) {                      
                      if (! servChar.getValue().getValue().equals( rChar.getValue().getValue() ) ) {
                        characteristicFoundDifferent = true;
                        supd.getServiceCharacteristicByName( characteristicname ) .value(new Any( rChar.getValue() ));  
                        logger.debug("====================>  add characteristic: " + characteristicname +", value: "+ rChar.getValue().getValue());                      
                      }
                      
                    } else {
                      Characteristic cNew = new Characteristic();
                    cNew.setName( rChar.getName());
                      cNew.setName( characteristicname  );     
                      cNew.value( new Any( rChar.getValue() ));
                      supd.addServiceCharacteristicItem( cNew );
                      characteristicFoundDifferent = true;
                      logger.debug("====================>  add New characteristic: " + characteristicname +", value: "+ rChar.getValue().getValue());
                    }
                    
                    
                  }                  
                }
                    
              }

                
              if ( stateChaged || characteristicFoundDifferent) {
                Characteristic noteCheck = as.getServiceCharacteristicByName("_DETAILED_NOTES_");
                if ( noteCheck!= null 
                    && noteCheck.getValue() != null
@@ -1210,6 +1349,8 @@ public class ServiceRepoService {
                
              }

        }
      

      }catch (Exception e) {
        e.printStackTrace();
@@ -1218,6 +1359,8 @@ public class ServiceRepoService {
    }
    
    
    
    
    @Transactional  
    public void  resourceCreatedEvent(@Valid ResourceCreateNotification resNotif) {  
      try {
@@ -1248,10 +1391,8 @@ public class ServiceRepoService {
    @Transactional  
    private void updateServiceFromresourceChange(Resource res) {
      
      updateServicesHavingThisSupportingResource(res);

      addAnyNewRelatedResourcesFromKubernetesLabel(res);      

      updateServicesHavingThisSupportingResource(res);
      
    }

@@ -1273,7 +1414,7 @@ public class ServiceRepoService {
        String serviceId = res.getResourceCharacteristicByName("org.etsi.osl.serviceId").getValue().getValue();
        logger.debug("rserviceId: " + serviceId); 
        
        Service aService = findByUuid( serviceId ); 
        Service aService = getServiceEager( serviceId ); 
        if ( aService !=null ) {
          logger.debug("aService found "); 
          Boolean resourceFoundInSupportedResourcesOfService = false; 
@@ -1292,13 +1433,6 @@ public class ServiceRepoService {
            rref.id(res.getId()).name(res.getName());
            supd.addSupportingResourceItem(rref );
            
            //copy characteristics from resource to service
            for (org.etsi.osl.tmf.ri639.model.Characteristic rChar : res.getResourceCharacteristic()) {
              Characteristic cNew = new Characteristic();
              cNew.setName( rChar.getName());
              cNew.value( new Any( rChar.getValue() ));                
              supd.addServiceCharacteristicItem( cNew );  
            }

            
            Note n = new Note();
+1 −0
Original line number Diff line number Diff line
@@ -247,6 +247,7 @@ public class ServiceRepoServiceTest {
        ResourceRef firstResourceRef = resourceRefList.get(0);

        Resource resource = resourceRepoService.findByUuid(firstResourceRef.getId());
        resource.setResourceStatus(ResourceStatusType.STANDBY);

        ResourceStateChangeNotification resourceCreateNotification = new ResourceStateChangeNotification();
        ResourceStateChangeEvent event = new ResourceStateChangeEvent();