X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2Ftests.git;a=blobdiff_plain;f=robot-systest%2Flib%2Fnsd_lib.resource;fp=robot-systest%2Flib%2Fnsd_lib.resource;h=0000000000000000000000000000000000000000;hp=175322bf81c42570e390337b3189d339d1fd230f;hb=23ff8f980f66ef57fb4d254336a018e3a697a187;hpb=5e001f506b744021d5ef25999c9da28cf56d8fbc diff --git a/robot-systest/lib/nsd_lib.resource b/robot-systest/lib/nsd_lib.resource deleted file mode 100644 index 175322b..0000000 --- a/robot-systest/lib/nsd_lib.resource +++ /dev/null @@ -1,63 +0,0 @@ -*** Comments *** -# Copyright 2019 Tech Mahindra Limited -# -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - - -*** Settings *** -Documentation Library providing keywords for CRUD operations over NSD/NSpkg with OSM client. - -Library OperatingSystem -Library String - - -*** Variables *** -${SUCCESS_RETURN_CODE} 0 -${NSD_DELETE_MAX_WAIT_TIME} 1min -${NSD_DELETE_POL_TIME} 15sec - - -*** Keywords *** -Get NSDs List - [Documentation] Get the list of NS packages and log it. - ${rc} ${stdout}= Run And Return Rc And Output osm nspkg-list - Log ${stdout} - Should Be Equal As Integers ${rc} ${SUCCESS_RETURN_CODE} - -Create NSD - [Documentation] Upload a NS package to OSM and return the id. - [Arguments] ${nsd_pkg} - ${rc} ${stdout}= Run And Return Rc And Output osm nspkg-create ${nsd_pkg} - Log ${stdout} - Should Be Equal As Integers ${rc} ${SUCCESS_RETURN_CODE} - ${lines}= Get Line Count ${stdout} - ${last}= Evaluate ${lines} - 1 - ${id}= Get Line ${stdout} ${last} - RETURN ${id} - -Delete NSD - [Documentation] Delete a NS package from OSM. - [Arguments] ${nsd_id} - ${rc} ${stdout}= Run Keyword And Continue On Failure Run And Return Rc And Output osm nspkg-delete ${nsd_id} - Should Be Equal As Integers ${rc} ${SUCCESS_RETURN_CODE} - Log ${stdout} - Wait Until Keyword Succeeds ${NSD_DELETE_MAX_WAIT_TIME} ${NSD_DELETE_POL_TIME} Check For NSD ${nsd_id} - -Check For NSD - [Documentation] Check that a NS package exists in OSM. - [Arguments] ${nsd_id} - ${rc} ${stdout}= Run And Return Rc And Output osm nspkg-list | awk '{print $2}' | grep ${nsd_id} - Log ${rc},${stdout} - Should Not Be Equal As Strings ${stdout} ${nsd_id}