3 # Copyright (c) 2016 Orange and others.
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
14 import functest.core.testcase_base as testcase_base
15 import functest.core.vnf_base as vnf_base
16 import functest.utils.functest_logger as ft_logger
19 class AaaVnf(vnf_base.VnfOnBoardingBase):
21 logger = ft_logger.Logger("VNF AAA").getLogger()
24 super(AaaVnf, self).__init__(case="aaa")
26 def deploy_orchestrator(self):
27 self.logger.info("No VNFM needed to deploy a free radius here")
30 # TODO see how to use build in exception form releng module
32 self.logger.info("Freeradius VNF deployment")
33 # TODO apt-get update + config tuning
35 deploy_vnf['status'] = "PASS"
36 deploy_vnf['result'] = {}
40 self.logger.info("Run test towards freeradius")
41 # TODO: once the freeradius is deployed..make some tests
43 test_vnf['status'] = "PASS"
44 test_vnf['result'] = {}
47 def main(self, **kwargs):
48 self.logger.info("AAA VNF onboarding")
50 if self.criteria is "PASS":
53 return self.EX_RUN_ERROR
57 return self.main(**kwargs)
59 if __name__ == '__main__':
60 parser = argparse.ArgumentParser()
61 args = vars(parser.parse_args())
64 result = aaa_vnf.main(**args)
65 if result != testcase_base.TestcaseBase.EX_OK:
68 sys.exit(aaa_vnf.push_to_db())
70 sys.exit(testcase_base.TestcaseBase.EX_RUN_ERROR)