Skip to content

Commit ad50a8d

Browse files
Storage plugin for Dell EMC PowerFlex/ScaleIO (formerly VxFlexOS)
1 parent 18e8375 commit ad50a8d

File tree

138 files changed

+7822
-460
lines changed

Some content is hidden

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

138 files changed

+7822
-460
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
@@ -20,6 +20,7 @@
2020
import java.util.Map;
2121
import java.util.HashMap;
2222

23+
import com.cloud.network.element.NetworkElement;
2324
import com.cloud.template.VirtualMachineTemplate.BootloaderType;
2425
import com.cloud.vm.VirtualMachine;
2526
import com.cloud.vm.VirtualMachine.Type;
@@ -73,6 +74,7 @@ public class VirtualMachineTO {
7374
String configDriveLabel = null;
7475
String configDriveIsoRootFolder = null;
7576
String configDriveIsoFile = null;
77+
NetworkElement.Location configDriveLocation = NetworkElement.Location.SECONDARY;
7678

7779
Double cpuQuotaPercentage = null;
7880

@@ -349,6 +351,18 @@ public void setConfigDriveIsoFile(String configDriveIsoFile) {
349351
this.configDriveIsoFile = configDriveIsoFile;
350352
}
351353

354+
public boolean isConfigDriveOnHostCache() {
355+
return (this.configDriveLocation == NetworkElement.Location.HOST);
356+
}
357+
358+
public NetworkElement.Location getConfigDriveLocation() {
359+
return configDriveLocation;
360+
}
361+
362+
public void setConfigDriveLocation(NetworkElement.Location configDriveLocation) {
363+
this.configDriveLocation = configDriveLocation;
364+
}
365+
352366
public Map<String, String> getGuestOsDetails() {
353367
return guestOsDetails;
354368
}
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
DatastoreCluster(true, true); // for VMware, to abstract pool of clusters
140141

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

Lines changed: 6 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
};
@@ -79,6 +84,7 @@ public String getDescription() {
7984
s_fsm.addTransition(new StateMachine2.Transition<State, Event>(Creating, Event.OperationSucceeded, Ready, null));
8085
s_fsm.addTransition(new StateMachine2.Transition<State, Event>(Creating, Event.DestroyRequested, Destroy, null));
8186
s_fsm.addTransition(new StateMachine2.Transition<State, Event>(Creating, Event.CreateRequested, Creating, null));
87+
s_fsm.addTransition(new StateMachine2.Transition<State, Event>(Ready, Event.CreateRequested, Creating, null));
8288
s_fsm.addTransition(new StateMachine2.Transition<State, Event>(Ready, Event.ResizeRequested, Resizing, null));
8389
s_fsm.addTransition(new StateMachine2.Transition<State, Event>(Resizing, Event.OperationSucceeded, Ready, Arrays.asList(new StateMachine2.Transition.Impact[]{StateMachine2.Transition.Impact.USAGE})));
8490
s_fsm.addTransition(new StateMachine2.Transition<State, Event>(Resizing, Event.OperationFailed, Ready, null));

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
@@ -832,6 +832,8 @@ public class ApiConstants {
832832
public static final String TEMPLATETYPE = "templatetype";
833833
public static final String SOURCETEMPLATEID = "sourcetemplateid";
834834

835+
public static final String POOL_TYPE ="pooltype";
836+
835837
public enum BootType {
836838
UEFI, BIOS;
837839

0 commit comments

Comments
 (0)