summaryrefslogtreecommitdiffstats
path: root/robot/resources/oof_interface.robot
diff options
context:
space:
mode:
authorDR695H <dr695h@att.com>2019-05-08 13:55:32 -0400
committerDR695H <dr695h@att.com>2019-05-09 10:41:52 -0400
commit910097ed0b1f7922715bfead98d3be6809fe2479 (patch)
treeb8700a356eaeb81f38d34a186ce0e4dbb879c790 /robot/resources/oof_interface.robot
parentc5febc8b6264a08484b23ababec8f912cdd8f70d (diff)
upgrade to python3 libraries
basing the code off of robot framework 3.1.1 instead of 3.0, replacing selenium2lib with selnium lib and selenium3, replacing extendedselenium with angularjs lib. Fixing most warnings and all errors from these moves Change-Id: Ifed68c5b8cd28c7bbdc80ee7245860914bdee5b4 Issue-ID: TEST-151 Signed-off-by: DR695H <dr695h@att.com>
Diffstat (limited to 'robot/resources/oof_interface.robot')
-rw-r--r--robot/resources/oof_interface.robot11
1 files changed, 6 insertions, 5 deletions
diff --git a/robot/resources/oof_interface.robot b/robot/resources/oof_interface.robot
index 987c27fc..de922d3b 100644
--- a/robot/resources/oof_interface.robot
+++ b/robot/resources/oof_interface.robot
@@ -2,6 +2,7 @@
Documentation The main interface for interacting with OOF: SNIRO and Homing Service
Library RequestsLibrary
Library UUID
+Library OperatingSystem
Library String
Library DateTime
Library Collections
@@ -116,7 +117,7 @@ OOF-CMSO Create Schedule
${nodelist}= Create List node1 node2 node3 node4
${nn}= Catenate 1
# Support up to 4 ChangeWindows
- : For ${i} IN RANGE 1 4
+ :FOR ${i} IN RANGE 1 4
\ ${today}= Evaluate ((${i}-1)*1440)+${minutesFromNow}
\ ${tomorrow} Evaluate ${today}+1440
\ ${last_time} Evaluate ${today}+30
@@ -124,7 +125,7 @@ OOF-CMSO Create Schedule
\ ${end_time}= Get Current Date UTC + ${tomorrow} minutes result_format=${OOF_CMSO_UTC}
\ Set To Dictionary ${map} start_time${i}=${start_time} end_time${i}=${end_time}
${requestList}= Create List
- : For ${vnf} IN @{nodelist}
+ :FOR ${vnf} IN @{nodelist}
\ Set To Dictionary ${map} node${nn} ${vnf}
\ ${nn}= Evaluate ${nn}+1
\ Set To DIctionary ${dict} vnfName=${vnf}
@@ -166,7 +167,7 @@ OOF-CMSO Json Escape
Run OOF-OSDF Post Request
[Documentation] Runs a scheduler POST request
- [Arguments] ${data_path} ${data}={} ${auth}
+ [Arguments] ${data_path} ${auth} ${data}={}
${session}= Create Session session ${OOF_OSDF_ENDPOINT} auth=${auth}
${headers}= Create Dictionary Accept=application/json Content-Type=application/json
@@ -179,12 +180,12 @@ Run OOF-OSDF Post Homing
[Documentation] Runs a osdf homing request
${auth}= Create List ${GLOBAL_OOF_OSDF_USERNAME} ${GLOBAL_OOF_OSDF_PASSWORD}
${data}= Get Binary File ${OOF_OSDF_TEMPLATE_FOLDER}${/}placement_request.json
- ${resp}= Run OOF-OSDF Post Request /api/oof/placement/v1 data=${data} auth=${auth}
+ ${resp}= Run OOF-OSDF Post Request /api/oof/placement/v1 auth=${auth} data=${data}
Should Be Equal As Strings ${resp.status_code} 204
Run OOF-OSDF Post PCI-OPT
[Documentation] Runs a osdf PCI-OPT request
${auth}= Create List ${GLOBAL_OOF_PCI_USERNAME} ${GLOBAL_OOF_PCI_PASSWORD}
${data}= Get Binary File ${OOF_OSDF_TEMPLATE_FOLDER}${/}pci-opt-request.json
- ${resp}= Run OOF-OSDF Post Request /api/oof/pci/v1 data=${data} auth=${auth}
+ ${resp}= Run OOF-OSDF Post Request /api/oof/pci/v1 auth=${auth} data=${data}
Should Be Equal As Strings ${resp.status_code} 204