blob: 7b3cad202bf71b5d2ed52982b6b1271b225df25a [file] [log] [blame]
Dominik Fleischmanna07c2b32020-07-31 15:17:26 +02001# -*- coding: utf-8 -*-
2
3##
4# Copyright 2019 Tech Mahindra Limited
5#
6# All Rights Reserved.
7#
8# Licensed under the Apache License, Version 2.0 (the "License"); you may
9# not use this file except in compliance with the License. You may obtain
10# a copy of the License at
11#
12# http://www.apache.org/licenses/LICENSE-2.0
13#
14# Unless required by applicable law or agreed to in writing, software
15# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17# License for the specific language governing permissions and limitations
18# under the License.
19##
20
21## Change log:
22# 1. Feature 7829: Jayant Madavi, Mrityunjay Yadav : MY00514913@techmahindra.com : 06-sep-2019
23##
24
25*** Settings ***
26Library String
27
28
29*** Variables ***
30${success_return_code} 0
31${delete_max_wait_time} 1min
32${delete_pol_time} 15sec
33
34
35*** Keywords ***
36Upload Package
37 [Documentation] Onboards ("creates") a NF Package into OSM.
38 ... - Parameters:
39 ... - pkg: Name (and location) of the NF Package
40
41 [Arguments] ${pkg}
42
43 # Proceedes with the onboarding with the appropriate arguments
44 ${rc} ${stdout}= Run and Return RC and Output tar -czf ${pkg}.tar.gz -C ${pkg} .
45 ${rc} ${stdout}= Run and Return RC and Output osm upload-package ${pkg}.tar.gz
46 log ${stdout}
47 Should Be Equal As Integers ${rc} ${success_return_code}
48 [Return] ${stdout}
49
50
51Delete Package
52 [Arguments] ${pkg}
53
54 # Proceedes with the onboarding with the appropriate arguments
55 ${rc} ${stdout}= Run and Return RC and Output rm ${pkg}.tar.gz