summaryrefslogtreecommitdiffstats
path: root/docker/storperf-master/storperf/resources/hot
diff options
context:
space:
mode:
authormbeierl <mark.beierl@dell.com>2018-07-04 20:51:54 -0400
committermbeierl <mark.beierl@dell.com>2018-07-05 09:14:02 -0400
commit3de258b9d0f6d4249a5e7f42eec41fcb0080bc66 (patch)
treef2ce3eceb3efcb31822c294aade70b937d75127b /docker/storperf-master/storperf/resources/hot
parenta6c0c07da775203c813bc9a0effba6e0d37d15f7 (diff)
Adds volume_type support
Adds a new optional parameter, volume_type, to the configurations REST API, allowing the user to specify the volume type to create. Change-Id: I29b7bee442a5e1b6b98be439c06a58e3fd322943 JIRA: STORPERF-217 Co-Authored-By: Ameed.Ashour.Ext@Nokia.com Signed-off-by: mbeierl <mark.beierl@dell.com>
Diffstat (limited to 'docker/storperf-master/storperf/resources/hot')
-rw-r--r--docker/storperf-master/storperf/resources/hot/agent-group.yaml20
-rw-r--r--docker/storperf-master/storperf/resources/hot/storperf-agent.yaml5
-rw-r--r--docker/storperf-master/storperf/resources/hot/storperf-volume.yaml26
3 files changed, 41 insertions, 10 deletions
diff --git a/docker/storperf-master/storperf/resources/hot/agent-group.yaml b/docker/storperf-master/storperf/resources/hot/agent-group.yaml
index ea7b51f..4e79d81 100644
--- a/docker/storperf-master/storperf/resources/hot/agent-group.yaml
+++ b/docker/storperf-master/storperf/resources/hot/agent-group.yaml
@@ -7,7 +7,7 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-heat_template_version: 2013-05-23
+heat_template_version: 2017-09-01
parameters:
public_network:
@@ -20,6 +20,12 @@ parameters:
agent_image:
type: string
default: 'StorPerf Ubuntu 14.04'
+ volume_count:
+ type: number
+ default: 0
+ constraints:
+ - range: { min: 0, max: 512 }
+ description: must be between 1 and 512 agents.
volume_size:
type: number
description: Size of the volume to be created.
@@ -27,12 +33,9 @@ parameters:
constraints:
- range: { min: 1, max: 1024 }
description: must be between 1 and 1024 Gb.
- volume_count:
- type: number
- default: 0
- constraints:
- - range: { min: 0, max: 512 }
- description: must be between 1 and 512 agents.
+ volume_type:
+ type: string
+ default: 'None'
agent_count:
type: number
default: 1
@@ -61,7 +64,8 @@ resources:
storperf_open_security_group: {get_resource: storperf_open_security_group},
key_name: {get_resource: storperf_key_pair},
volume_count: {get_param: volume_count},
- volume_size: {get_param: volume_size}
+ volume_size: {get_param: volume_size},
+ volume_type: {get_param: volume_type}
}
}
diff --git a/docker/storperf-master/storperf/resources/hot/storperf-agent.yaml b/docker/storperf-master/storperf/resources/hot/storperf-agent.yaml
index 8895c9f..6314514 100644
--- a/docker/storperf-master/storperf/resources/hot/storperf-agent.yaml
+++ b/docker/storperf-master/storperf/resources/hot/storperf-agent.yaml
@@ -7,7 +7,7 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-heat_template_version: 2013-05-23
+heat_template_version: 2017-09-01
parameters:
flavor:
@@ -38,6 +38,8 @@ parameters:
constraints:
- range: { min: 1, max: 1024 }
description: must be between 1 and 1024 Gb.
+ volume_type:
+ type: string
agent_network:
type: string
constraints:
@@ -101,6 +103,7 @@ resources:
type: "storperf-volume.yaml",
properties: {
volume_size: { get_param: volume_size },
+ volume_type: { get_param: volume_type },
agent_instance_uuid: { get_resource: storperf_agent }
}
}
diff --git a/docker/storperf-master/storperf/resources/hot/storperf-volume.yaml b/docker/storperf-master/storperf/resources/hot/storperf-volume.yaml
index aec3393..cbdd861 100644
--- a/docker/storperf-master/storperf/resources/hot/storperf-volume.yaml
+++ b/docker/storperf-master/storperf/resources/hot/storperf-volume.yaml
@@ -7,7 +7,7 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-heat_template_version: 2013-05-23
+heat_template_version: 2017-09-01
parameters:
volume_size:
@@ -17,17 +17,41 @@ parameters:
constraints:
- range: { min: 1, max: 1024 }
description: must be between 1 and 1024 Gb.
+ volume_type:
+ type: string
+ default: None
agent_instance_uuid:
type: string
+conditions: {
+ 'without_type': {equals: [{get_param: volume_type}, 'None']},
+ 'with_type': {not: {equals: [{get_param: volume_type}, 'None']}}
+}
+
resources:
+ agent_volume_type:
+ type: OS::Cinder::Volume
+ condition: 'with_type'
+ properties:
+ size: { get_param: volume_size }
+ volume_type: { get_param: volume_type}
+
+ agent_volume_type_att:
+ type: OS::Cinder::VolumeAttachment
+ condition: 'with_type'
+ properties:
+ instance_uuid: { get_param: agent_instance_uuid }
+ volume_id: { get_resource: agent_volume_type}
+
agent_volume:
type: OS::Cinder::Volume
+ condition: 'without_type'
properties:
size: { get_param: volume_size }
agent_volume_att:
type: OS::Cinder::VolumeAttachment
+ condition: 'without_type'
properties:
instance_uuid: { get_param: agent_instance_uuid }
volume_id: { get_resource: agent_volume}