예제 #1
0
    def instantiate(self, scenario_cfg, context_cfg):
        self.scenario_helper.scenario_cfg = scenario_cfg
        self.context_cfg = context_cfg
        self.nfvi_context = Context.get_context_from_server(self.scenario_helper.nodes[self.name])
        # self.nfvi_context = None

        self.deploy_helper.deploy_vnfs(self.APP_NAME)
        self.resource_helper.setup()
        self._start_vnf()
예제 #2
0
    def instantiate(self, scenario_cfg, context_cfg):
        self.scenario_helper.scenario_cfg = scenario_cfg
        self.context_cfg = context_cfg
        self.nfvi_context = Context.get_context_from_server(self.scenario_helper.nodes[self.name])
        # self.nfvi_context = None

        # vnf deploy is unsupported, use ansible playbooks
        if self.scenario_helper.options.get("vnf_deploy", False):
            self.deploy_helper.deploy_vnfs(self.APP_NAME)
        self.resource_helper.setup()
        self._start_vnf()
예제 #3
0
    def instantiate(self, scenario_cfg, context_cfg):
        self.scenario_helper.scenario_cfg = scenario_cfg
        self.resource_helper.update_from_context(
            Context.get_context_from_server(self.scenario_helper.nodes[self.name]),
            self.scenario_helper.nodes[self.name]
        )

        self.resource_helper.setup()
        # must generate_cfg after DPDK bind because we need port number
        self.resource_helper.generate_cfg()

        LOG.info("Starting %s server...", self.APP_NAME)
        name = "{}-{}-{}".format(self.name, self.APP_NAME, os.getpid())
        self._tg_process = Process(name=name, target=self._start_server)
        self._tg_process.start()
예제 #4
0
 def instantiate(self, scenario_cfg, context_cfg):
     self.scenario_helper.scenario_cfg = scenario_cfg
     self.context_cfg = context_cfg
     self.nfvi_context = Context.get_context_from_server(
         self.scenario_helper.nodes[self.name])
     self.configure_routes(self.name, scenario_cfg, context_cfg)