2 # Copyright 2016 RIFT.IO Inc
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
16 # Author(s): Varun Prasad
17 # Creation Date: 09/25/2016
25 class AbstractPackageManagerProxy():
26 """Proxy interface that need to be implemented by the package store
30 def endpoint(self
, package_type
, package_id
):
31 """Rest based endpoint to reveal the package contents
34 package_type (str): NSD, VNFD
38 str: URL of the endpoint
45 def schema(self
, package_type
):
49 package_type (str): Type of package (NSD|VNFD)
52 list: List of top level dirs
59 def package_file_add(self
, new_file
, package_type
, package_id
, package_path
):
60 """Add file to a package
63 new_file (str): Path to the new file
64 package_type (str): NSD,VNFD
66 package_path (str): relative path into the package.
69 Bool: True, If operation succeeded.
75 def package_file_delete(self
, package_type
, package_id
, package_path
):
76 """delete file from a package
79 package_type (str): NSD,VNFD
81 package_path (str): relative path into the package.
84 Bool: True, If operation succeeded.