Moshe | 0bb532c | 2018-02-26 13:39:57 +0200 | [diff] [blame] | 1 | ############################################################################## |
| 2 | # Copyright 2018 EuropeanSoftwareMarketingLtd. |
| 3 | # =================================================================== |
| 4 | # Licensed under the ApacheLicense, Version2.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 |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # software distributed under the License is distributed on an "AS IS" BASIS, |
| 10 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 11 | # See the License for the specific language governing permissions and limitations under |
| 12 | # the License |
| 13 | ############################################################################## |
| 14 | |
| 15 | import logging |
Moshe | 30497ac | 2018-03-14 14:22:13 +0200 | [diff] [blame^] | 16 | |
| 17 | from vnftest.contexts.base import Context |
Moshe | 0bb532c | 2018-02-26 13:39:57 +0200 | [diff] [blame] | 18 | |
| 19 | LOG = logging.getLogger(__name__) |
| 20 | |
| 21 | |
| 22 | class CSARContext(Context): |
| 23 | """Class that handle sdc info""" |
| 24 | |
| 25 | __context_type__ = "CSAR" |
| 26 | |
| 27 | def __init__(self): |
| 28 | self.csar_name = None |
| 29 | self.csar_id = None |
| 30 | self.csar_package_location = None |
| 31 | super(CSARContext, self).__init__() |
| 32 | |
| 33 | def init(self, attrs): |
| 34 | """initializes itself from the supplied arguments""" |
| 35 | self.csar_name = attrs.get("csar_name") |
| 36 | self.csar_id = attrs.get("csar_id") |
| 37 | self.csar_package_location = attrs.get("csar_package_location") |
| 38 | |
| 39 | def deploy(self): |
| 40 | """no need to deploy""" |
| 41 | pass |
| 42 | |
| 43 | def undeploy(self): |
| 44 | """no need to undeploy""" |
| 45 | super(CSARContext, self).undeploy() |