summaryrefslogtreecommitdiffstats
path: root/robot/resources/openstack/cinder_interface.robot
diff options
context:
space:
mode:
authorDR695H <dr695h@att.com>2019-06-20 15:04:04 -0400
committerDR695H <dr695h@att.com>2019-06-20 15:04:04 -0400
commit3bb6cf4b938d3e725860606d3ddaa8eecd872151 (patch)
treee03ccb5b30413d9fc7b3cef8c5ef0827d2e641d2 /robot/resources/openstack/cinder_interface.robot
parent3440942ef2c78e1a8eb07c70c1a03b3834beaecf (diff)
replace aai, closeloop, sdc with jinja
Issue-ID: TEST-158 Change-Id: I95a783f26e28512cb4fc98e50931d62001c489c6 Signed-off-by: DR695H <dr695h@att.com>
Diffstat (limited to 'robot/resources/openstack/cinder_interface.robot')
-rw-r--r--robot/resources/openstack/cinder_interface.robot7
1 files changed, 4 insertions, 3 deletions
diff --git a/robot/resources/openstack/cinder_interface.robot b/robot/resources/openstack/cinder_interface.robot
index 41667999..ca6e62b7 100644
--- a/robot/resources/openstack/cinder_interface.robot
+++ b/robot/resources/openstack/cinder_interface.robot
@@ -3,8 +3,8 @@ Documentation The main interface for interacting with Openstack. It handles
Library ONAPLibrary.Openstack
Library RequestsLibrary
Library ONAPLibrary.Utilities
+Library ONAPLibrary.Templating
Resource ../global_properties.robot
-Resource ../json_templater.robot
Resource openstack_common.robot
@@ -12,7 +12,7 @@ Resource openstack_common.robot
${OPENSTACK_CINDER_API_VERSION} /v1
${OPENSTACK_CINDER_TYPES_PATH} /types
${OPENSTACK_CINDER_VOLUMES_PATH} /volumes
-${OPENSTACK_CINDER_VOLUMES_ADD_BODY_FILE} robot/assets/templates/cinder_add_volume.template
+${OPENSTACK_CINDER_VOLUMES_ADD_BODY_FILE} openstack/cinder_add_volume.jinja
${OPENSTACK_CINDER_VOLUMES_TYPE} SSD
${OPENSTACK_CINDER_AVAILABILITY_ZONE} nova
@@ -34,7 +34,8 @@ Add Openstack Volume
[Arguments] ${alias} ${name} ${size}
${uuid}= Generate UUID4
${arguments}= Create Dictionary name=${name} description=${GLOBAL_APPLICATION_ID}${uuid} size=${size} type=${OPENSTACK_CINDER_VOLUMES_TYPE} availability_zone=${OPENSTACK_CINDER_AVAILABILITY_ZONE}
- ${data}= Fill JSON Template File ${OPENSTACK_CINDER_VOLUMES_ADD_BODY_FILE} ${arguments}
+ Create Environment cinder ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Apply Template cinder ${OPENSTACK_CINDER_VOLUMES_ADD_BODY_FILE} ${arguments}
${resp}= Internal Post Openstack ${alias} ${GLOBAL_OPENSTACK_CINDER_SERVICE_TYPE} ${OPENSTACK_CINDER_VOLUMES_PATH} data_path= data=${data}
Should Be Equal As Strings 200 ${resp.status_code}
[Return] ${resp.json()['volume']['id']}