diff options
author | DR695H <dr695h@att.com> | 2019-06-19 17:40:26 -0400 |
---|---|---|
committer | DR695H <dr695h@att.com> | 2019-06-19 17:40:26 -0400 |
commit | daec16c9140e962235523a357b465c70c166a88f (patch) | |
tree | d31e294937780d1672953c285eee834a92292201 /robot/resources/openstack/neutron_interface.robot | |
parent | 9d810d0f842705d1ff29684b489deb4188096879 (diff) |
only use the file version of json template
Issue-ID: TEST-158
Change-Id: Ib172145fe3e5d77bd688505b145ca1709422366a
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 | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/robot/resources/openstack/neutron_interface.robot b/robot/resources/openstack/neutron_interface.robot index 63b3cd7c..640a237a 100644 --- a/robot/resources/openstack/neutron_interface.robot +++ b/robot/resources/openstack/neutron_interface.robot @@ -2,7 +2,6 @@ Documentation The main interface for interacting with Openstack. It handles low level stuff like managing the authtoken and Openstack required fields Library ONAPLibrary.Openstack Library RequestsLibrary -Library OperatingSystem Library Collections Resource ../global_properties.robot Resource ../json_templater.robot @@ -44,9 +43,8 @@ Get Openstack Ports Add Openstack Network [Documentation] Runs an Openstack Request to add a network and returns that network id of the created network [Arguments] ${alias} ${name} - ${data_template}= OperatingSystem.Get File ${OPENSTACK_NEUTRON_NETWORK_ADD_BODY_FILE} ${arguments}= Create Dictionary name=${name} - ${data}= Fill JSON Template ${data_template} ${arguments} + ${data}= Fill JSON Template File ${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']} @@ -74,9 +72,8 @@ Add Openstack Network With Subnet [Documentation] Runs an Openstack Request to add a network and returns that network id of the created network [Arguments] ${alias} ${name} ${cidr} ${network_id}= Add Openstack Network ${alias} ${name} - ${data_template}= OperatingSystem.Get File ${OPENSTACK_NEUTRON_SUBNET_ADD_BODY_FILE} ${arguments}= Create Dictionary network_id=${network_id} cidr=${cidr} subnet_name=${name} - ${data}= Fill JSON Template ${data_template} ${arguments} + ${data}= Fill JSON Template File ${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} |