@@ -2189,7 +2189,7 @@ public ServiceOfferingVO createServiceOffering(long userId, boolean isSystem, Vi
21892189 String name , int cpu , int ramSize , int speed , String displayText , boolean localStorageRequired ,
21902190 boolean offerHA , boolean limitResourceUse , boolean volatileVm , String tags , Long domainId , String hostTag ,
21912191 Integer networkRate , String deploymentPlanner , Map <String , String > details , Long bytesReadRate , Long bytesWriteRate , Long iopsReadRate , Long iopsWriteRate ) {
2192- tags = cleanupTags (tags );
2192+ tags = StringUtils . cleanupTags (tags );
21932193 ServiceOfferingVO offering = new ServiceOfferingVO (name , cpu , ramSize , speed , networkRate , null , offerHA ,
21942194 limitResourceUse , volatileVm , displayText , localStorageRequired , false , tags , isSystem , vm_type ,
21952195 domainId , hostTag , deploymentPlanner );
@@ -2341,7 +2341,7 @@ public DiskOfferingVO createDiskOffering(Long domainId, String name, String desc
23412341 maxIops = null ;
23422342 }
23432343
2344- tags = cleanupTags (tags );
2344+ tags = StringUtils . cleanupTags (tags );
23452345 DiskOfferingVO newDiskOffering = new DiskOfferingVO (domainId , name , description , diskSize , tags , isCustomized ,
23462346 isCustomizedIops , minIops , maxIops );
23472347 newDiskOffering .setUseLocalStorage (localStorageRequired );
@@ -3428,50 +3428,6 @@ public boolean releasePublicIpRange(long vlanDbId, long userId, Account caller)
34283428 }
34293429 }
34303430
3431- @ Override
3432- public List <String > csvTagsToList (String tags ) {
3433- List <String > tagsList = new ArrayList <String >();
3434-
3435- if (tags != null ) {
3436- String [] tokens = tags .split ("," );
3437- for (int i = 0 ; i < tokens .length ; i ++) {
3438- tagsList .add (tokens [i ].trim ());
3439- }
3440- }
3441-
3442- return tagsList ;
3443- }
3444-
3445- @ Override
3446- public String listToCsvTags (List <String > tagsList ) {
3447- String tags = "" ;
3448- if (tagsList .size () > 0 ) {
3449- for (int i = 0 ; i < tagsList .size (); i ++) {
3450- tags += tagsList .get (i );
3451- if (i != tagsList .size () - 1 ) {
3452- tags += "," ;
3453- }
3454- }
3455- }
3456-
3457- return tags ;
3458- }
3459-
3460- @ Override
3461- public String cleanupTags (String tags ) {
3462- if (tags != null ) {
3463- String [] tokens = tags .split ("," );
3464- StringBuilder t = new StringBuilder ();
3465- for (int i = 0 ; i < tokens .length ; i ++) {
3466- t .append (tokens [i ].trim ()).append ("," );
3467- }
3468- t .delete (t .length () - 1 , t .length ());
3469- tags = t .toString ();
3470- }
3471-
3472- return tags ;
3473- }
3474-
34753431 @ DB
34763432 protected boolean savePublicIPRange (String startIP , String endIP , long zoneId , long vlanDbId , long sourceNetworkid ,
34773433 long physicalNetworkId ) {
@@ -4120,7 +4076,7 @@ public NetworkOfferingVO createNetworkOffering(String name, String displayText,
41204076
41214077 String multicastRateStr = _configDao .getValue ("multicast.throttling.rate" );
41224078 int multicastRate = ((multicastRateStr == null ) ? 10 : Integer .parseInt (multicastRateStr ));
4123- tags = cleanupTags (tags );
4079+ tags = StringUtils . cleanupTags (tags );
41244080
41254081 // specifyVlan should always be true for Shared network offerings
41264082 if (!specifyVlan && type == GuestType .Shared ) {
0 commit comments