diff options
author | DR695H <dr695h@att.com> | 2019-06-20 15:04:04 -0400 |
---|---|---|
committer | DR695H <dr695h@att.com> | 2019-06-20 15:04:04 -0400 |
commit | 3bb6cf4b938d3e725860606d3ddaa8eecd872151 (patch) | |
tree | e03ccb5b30413d9fc7b3cef8c5ef0827d2e641d2 /robot/resources/openstack/neutron_interface.robot | |
parent | 3440942ef2c78e1a8eb07c70c1a03b3834beaecf (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/neutron_interface.robot')
-rw-r--r-- | robot/resources/openstack/neutron_interface.robot | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/robot/resources/openstack/neutron_interface.robot b/robot/resources/openstack/neutron_interface.robot index 640a237a..058809de 100644 --- a/robot/resources/openstack/neutron_interface.robot +++ b/robot/resources/openstack/neutron_interface.robot @@ -3,16 +3,16 @@ Documentation The main interface for interacting with Openstack. It handles Library ONAPLibrary.Openstack Library RequestsLibrary Library Collections +Library ONAPLibrary.Templating Resource ../global_properties.robot -Resource ../json_templater.robot Resource openstack_common.robot *** Variables *** ${OPENSTACK_NEUTRON_API_VERSION} /v2.0 ${OPENSTACK_NEUTRON_NETWORK_PATH} /networks -${OPENSTACK_NEUTRON_NETWORK_ADD_BODY_FILE} robot/assets/templates/neutron_add_network.template +${OPENSTACK_NEUTRON_NETWORK_ADD_BODY_FILE} openstack/neutron_add_network.jinja ${OPENSTACK_NEUTRON_SUBNET_PATH} /subnets -${OPENSTACK_NEUTRON_SUBNET_ADD_BODY_FILE} robot/assets/templates/neutron_add_subnet.template +${OPENSTACK_NEUTRON_SUBNET_ADD_BODY_FILE} openstack/neutron_add_subnet.jinja ${OPENSTACK_NEUTRON_PORT_PATH} /ports *** Keywords *** @@ -44,7 +44,8 @@ Add Openstack Network [Documentation] Runs an Openstack Request to add a network and returns that network id of the created network [Arguments] ${alias} ${name} ${arguments}= Create Dictionary name=${name} - ${data}= Fill JSON Template File ${OPENSTACK_NEUTRON_NETWORK_ADD_BODY_FILE} ${arguments} + Create Environment openstack ${GLOBAL_TEMPLATE_FOLDER} + ${data}= Apply Template openstack ${OPENSTACK_NEUTRON_NETWORK_ADD_BODY_FILE} ${arguments} ${resp}= Internal Post Openstack ${alias} ${GLOBAL_OPENSTACK_NEUTRON_SERVICE_TYPE} ${OPENSTACK_NEUTRON_NETWORK_PATH} data_path= data=${data} Should Be Equal As Strings 201 ${resp.status_code} [Return] ${resp.json()['network']['id']} @@ -73,7 +74,8 @@ Add Openstack Network With Subnet [Arguments] ${alias} ${name} ${cidr} ${network_id}= Add Openstack Network ${alias} ${name} ${arguments}= Create Dictionary network_id=${network_id} cidr=${cidr} subnet_name=${name} - ${data}= Fill JSON Template File ${OPENSTACK_NEUTRON_SUBNET_ADD_BODY_FILE} ${arguments} + Create Environment openstack ${GLOBAL_TEMPLATE_FOLDER} + ${data}= Apply Template openstack ${OPENSTACK_NEUTRON_SUBNET_ADD_BODY_FILE} ${arguments} ${resp}= Internal Post Openstack ${alias} ${GLOBAL_OPENSTACK_NEUTRON_SERVICE_TYPE} ${OPENSTACK_NEUTRON_SUBNET_PATH} data_path= data=${data} Should Be Equal As Strings 201 ${resp.status_code} [Return] ${network_id} |