Skip to content

Commit aa3b9bc

Browse files
Storage plugin for Dell EMC PowerFlex/ScaleIO (formerly VxFlexOS)
1 parent d6db476 commit aa3b9bc

File tree

134 files changed

+7336
-399
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+7336
-399
lines changed

agent/conf/agent.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ hypervisor.type=kvm
143143
# This parameter specifies a directory on the host local storage for temporary storing direct download templates
144144
#direct.download.temporary.download.location=/var/lib/libvirt/images
145145

146+
# This parameter specifies a directory on the host local storage for creating and hosting the config drives
147+
#host.cache.location=/var/cache/cloud
148+
146149
# set the rolling maintenance hook scripts directory
147150
#rolling.maintenance.hooks.dir=/etc/cloudstack/agent/hooks.d
148151

api/src/main/java/com/cloud/agent/api/to/VirtualMachineTO.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
import com.cloud.agent.api.LogLevel;
2424
import com.cloud.agent.api.storage.OVFPropertyTO;
25+
import com.cloud.network.element.NetworkElement;
2526
import com.cloud.template.VirtualMachineTemplate.BootloaderType;
2627
import com.cloud.utils.Pair;
2728
import com.cloud.vm.VirtualMachine;
@@ -76,6 +77,7 @@ public class VirtualMachineTO {
7677
String configDriveLabel = null;
7778
String configDriveIsoRootFolder = null;
7879
String configDriveIsoFile = null;
80+
NetworkElement.Location configDriveLocation = NetworkElement.Location.SECONDARY;
7981

8082
Double cpuQuotaPercentage = null;
8183

@@ -353,6 +355,18 @@ public void setConfigDriveIsoFile(String configDriveIsoFile) {
353355
this.configDriveIsoFile = configDriveIsoFile;
354356
}
355357

358+
public boolean isConfigDriveOnHostCache() {
359+
return (this.configDriveLocation == NetworkElement.Location.HOST);
360+
}
361+
362+
public NetworkElement.Location getConfigDriveLocation() {
363+
return configDriveLocation;
364+
}
365+
366+
public void setConfigDriveLocation(NetworkElement.Location configDriveLocation) {
367+
this.configDriveLocation = configDriveLocation;
368+
}
369+
356370
public Map<String, String> getGuestOsDetails() {
357371
return guestOsDetails;
358372
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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+
package com.cloud.exception;
18+
19+
import com.cloud.utils.SerialVersionUID;
20+
21+
/**
22+
* If the cause is due to storage pool not accessible on host, calling
23+
* problem with.
24+
*
25+
*/
26+
public class StorageAccessException extends RuntimeException {
27+
private static final long serialVersionUID = SerialVersionUID.StorageAccessException;
28+
29+
public StorageAccessException(String message) {
30+
super(message);
31+
}
32+
}

api/src/main/java/com/cloud/network/element/NetworkElement.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@
3939
*/
4040
public interface NetworkElement extends Adapter {
4141

42+
enum Location {
43+
SECONDARY, PRIMARY, HOST
44+
}
45+
4246
Map<Service, Map<Capability, String>> getCapabilities();
4347

4448
/**

api/src/main/java/com/cloud/storage/Storage.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ public static enum StoragePoolType {
135135
OCFS2(true, false),
136136
SMB(true, false),
137137
Gluster(true, false),
138+
PowerFlex(true, true), // Dell EMC PowerFlex/ScaleIO (formerly VxFlexOS)
138139
ManagedNFS(true, false);
139140

140141
private final boolean shared;

api/src/main/java/com/cloud/storage/Volume.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@
2929
import com.cloud.utils.fsm.StateObject;
3030

3131
public interface Volume extends ControlledEntity, Identity, InternalIdentity, BasedOn, StateObject<Volume.State>, Displayable {
32+
33+
// Managed storage volume parameters (specified in the compute/disk offering for PowerFlex)
34+
String BANDWIDTH_LIMIT_IN_MBPS = "bandwidthLimitInMbps";
35+
String IOPS_LIMIT = "iopsLimit";
36+
3237
enum Type {
3338
UNKNOWN, ROOT, SWAP, DATADISK, ISO
3439
};

api/src/main/java/com/cloud/vm/VirtualMachineProfile.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
import java.util.Map;
2121

2222
import com.cloud.agent.api.to.DiskTO;
23+
import com.cloud.host.Host;
2324
import com.cloud.hypervisor.Hypervisor.HypervisorType;
25+
import com.cloud.network.element.NetworkElement;
2426
import com.cloud.offering.ServiceOffering;
2527
import com.cloud.template.VirtualMachineTemplate;
2628
import com.cloud.template.VirtualMachineTemplate.BootloaderType;
@@ -54,6 +56,10 @@ public interface VirtualMachineProfile {
5456

5557
void setConfigDriveIsoFile(String isoFile);
5658

59+
NetworkElement.Location getConfigDriveLocation();
60+
61+
void setConfigDriveLocation(NetworkElement.Location location);
62+
5763
public static class Param {
5864

5965
public static final Param VmPassword = new Param("VmPassword");
@@ -100,6 +106,10 @@ public boolean equals(Object obj) {
100106
}
101107
}
102108

109+
Long getHostId();
110+
111+
void setHost(Host host);
112+
103113
String getHostName();
104114

105115
String getInstanceName();

api/src/main/java/com/cloud/vm/VmDetailConstants.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ public interface VmDetailConstants {
5656
String PASSWORD = "password";
5757
String ENCRYPTED_PASSWORD = "Encrypted.Password";
5858

59+
String CONFIG_DRIVE_LOCATION = "configDriveLocation";
60+
5961
// VM import with nic, disk and custom params for custom compute offering
6062
String NIC = "nic";
6163
String NETWORK = "network";

api/src/main/java/org/apache/cloudstack/alert/AlertService.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
// under the License.
1717
package org.apache.cloudstack.alert;
1818

19-
import com.cloud.capacity.Capacity;
20-
import com.cloud.exception.InvalidParameterValueException;
21-
2219
import java.util.HashSet;
2320
import java.util.Set;
2421

22+
import com.cloud.capacity.Capacity;
23+
import com.cloud.exception.InvalidParameterValueException;
24+
2525
public interface AlertService {
2626
public static class AlertType {
2727
private static Set<AlertType> defaultAlertTypes = new HashSet<AlertType>();
@@ -69,6 +69,7 @@ private AlertType(short type, String name, boolean isDefault) {
6969
public static final AlertType ALERT_TYPE_OOBM_AUTH_ERROR = new AlertType((short)29, "ALERT.OOBM.AUTHERROR", true);
7070
public static final AlertType ALERT_TYPE_HA_ACTION = new AlertType((short)30, "ALERT.HA.ACTION", true);
7171
public static final AlertType ALERT_TYPE_CA_CERT = new AlertType((short)31, "ALERT.CA.CERT", true);
72+
public static final AlertType ALERT_TYPE_VM_SNAPSHOT = new AlertType((short)32, "ALERT.VM.SNAPSHOT", true);
7273

7374
public short getType() {
7475
return type;

api/src/main/java/org/apache/cloudstack/api/ApiConstants.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -825,6 +825,8 @@ public class ApiConstants {
825825
public static final String BOOT_MODE = "bootmode";
826826
public static final String BOOT_INTO_SETUP = "bootintosetup";
827827

828+
public static final String POOL_TYPE ="pooltype";
829+
828830
public enum BootType {
829831
UEFI, BIOS;
830832

0 commit comments

Comments
 (0)