Skip to content

Commit 996e9b0

Browse files
committed
Added missing Apache license
1 parent 9ab0f18 commit 996e9b0

3 files changed

Lines changed: 27 additions & 10 deletions

File tree

plugins/storage/volume/storpool/src/main/java/org/apache/cloudstack/storage/datastore/api/StorPoolVolume.java renamed to plugins/storage/volume/storpool/src/main/java/org/apache/cloudstack/storage/datastore/api/StorPoolVolumeDef.java

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,26 @@
1+
// Licensed to the Apache Software Foundation (ASF) under one
2+
// or more contributor license agreements. See the NOTICE file
3+
// distributed with this work for additional information
4+
// regarding copyright ownership. The ASF licenses this file
5+
// to you under the Apache License, Version 2.0 (the
6+
// "License"); you may not use this file except in compliance
7+
// with the License. You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing,
12+
// software distributed under the License is distributed on an
13+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
// KIND, either express or implied. See the License for the
15+
// specific language governing permissions and limitations
16+
// under the License.
17+
118
package org.apache.cloudstack.storage.datastore.api;
219

320
import java.io.Serializable;
421
import java.util.Map;
522

6-
public class StorPoolVolume implements Serializable {
23+
public class StorPoolVolumeDef implements Serializable {
724

825
private static final long serialVersionUID = 1L;
926
private transient String name;
@@ -16,11 +33,11 @@ public class StorPoolVolume implements Serializable {
1633
private String rename;
1734
private Boolean shrinkOk;
1835

19-
public StorPoolVolume() {
36+
public StorPoolVolumeDef() {
2037
}
2138

22-
public StorPoolVolume(String name, Long size, Map<String, String> tags, String parent, Long iops, String template,
23-
String baseOn, String rename, Boolean shrinkOk) {
39+
public StorPoolVolumeDef(String name, Long size, Map<String, String> tags, String parent, Long iops, String template,
40+
String baseOn, String rename, Boolean shrinkOk) {
2441
super();
2542
this.name = name;
2643
this.size = size;

plugins/storage/volume/storpool/src/main/java/org/apache/cloudstack/storage/datastore/driver/StorPoolPrimaryDataStoreDriver.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
import org.apache.cloudstack.storage.command.CreateObjectAnswer;
4848
import org.apache.cloudstack.storage.command.StorageSubSystemCommand;
4949
import org.apache.cloudstack.storage.datastore.api.StorPoolSnapshotDef;
50-
import org.apache.cloudstack.storage.datastore.api.StorPoolVolume;
50+
import org.apache.cloudstack.storage.datastore.api.StorPoolVolumeDef;
5151
import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
5252
import org.apache.cloudstack.storage.datastore.db.SnapshotDataStoreDao;
5353
import org.apache.cloudstack.storage.datastore.db.SnapshotDataStoreVO;
@@ -456,13 +456,13 @@ private String updateStorPoolVolume(VolumeObject vol, ResizeVolumePayload payloa
456456
SpApiResponse resp = new SpApiResponse();
457457
if (tier != null || template != null) {
458458
Map<String, String> tags = StorPoolHelper.addStorPoolTags(null, null, null, null, tier);
459-
StorPoolVolume spVolume = new StorPoolVolume(name, payload.newSize, tags, null, null, template, null, null,
459+
StorPoolVolumeDef spVolume = new StorPoolVolumeDef(name, payload.newSize, tags, null, null, template, null, null,
460460
payload.shrinkOk);
461461
resp = StorPoolUtil.volumeUpdate(spVolume, conn);
462462
} else {
463463
long maxIops = payload.newMaxIops == null ? Long.valueOf(0) : payload.newMaxIops;
464464

465-
StorPoolVolume spVolume = new StorPoolVolume(name, payload.newSize, null, null, maxIops, null, null, null,
465+
StorPoolVolumeDef spVolume = new StorPoolVolumeDef(name, payload.newSize, null, null, maxIops, null, null, null,
466466
payload.shrinkOk);
467467
StorPoolUtil.spLog(
468468
"StorpoolPrimaryDataStoreDriverImpl.resize: name=%s, uuid=%s, oldSize=%d, newSize=%s, shrinkOk=%s, maxIops=%s",
@@ -1394,7 +1394,7 @@ public void updateStorageWithTheNewDiskOffering(Volume volume, DiskOffering newD
13941394
StorPoolUtil.spLog("Updating volume [%s] with tier tag [%s] or template [%s] from Disk offering", volume.getId(), tier, template);
13951395
String volumeName = StorPoolStorageAdaptor.getVolumeNameFromPath(volume.getPath(), true);
13961396
Map<String, String> tags = StorPoolHelper.addStorPoolTags(null, null, null, null, tier);
1397-
StorPoolVolume spVolume = new StorPoolVolume(volumeName, null, tags, null, null, template, null, null, null);
1397+
StorPoolVolumeDef spVolume = new StorPoolVolumeDef(volumeName, null, tags, null, null, template, null, null, null);
13981398
SpApiResponse response = StorPoolUtil.volumeUpdate(spVolume, conn);
13991399
if (response.getError() != null) {
14001400
StorPoolUtil.spLog("Could not update volume [%s] with tier tag [%s] or template [%s] from Disk offering due to [%s]", volume.getId(), tier, template, response.getError());

plugins/storage/volume/storpool/src/main/java/org/apache/cloudstack/storage/datastore/util/StorPoolUtil.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
import com.google.gson.JsonPrimitive;
3131

3232
import org.apache.cloudstack.storage.datastore.api.StorPoolSnapshotDef;
33-
import org.apache.cloudstack.storage.datastore.api.StorPoolVolume;
33+
import org.apache.cloudstack.storage.datastore.api.StorPoolVolumeDef;
3434
import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
3535
import org.apache.cloudstack.storage.datastore.db.StoragePoolDetailVO;
3636
import org.apache.cloudstack.storage.datastore.db.StoragePoolDetailsDao;
@@ -599,7 +599,7 @@ public static SpApiResponse volumeUpdateTemplate(final String name, SpConnection
599599
return POST("MultiCluster/VolumeUpdate/" + name, json, conn);
600600
}
601601

602-
public static SpApiResponse volumeUpdate(StorPoolVolume volume, SpConnectionDesc conn) {
602+
public static SpApiResponse volumeUpdate(StorPoolVolumeDef volume, SpConnectionDesc conn) {
603603
return POST("MultiCluster/VolumeUpdate/" + volume.getName(), volume, conn);
604604
}
605605

0 commit comments

Comments
 (0)