From c65d2e761955affbdb76fc31ebb188ac492c31ca Mon Sep 17 00:00:00 2001 From: Vishwesh M Rudramuni Date: Mon, 25 Sep 2017 03:36:02 +0530 Subject: REST_API: rest api client implementation JIRA: SAMPLEVNF-78 This patch implements rest api's for VNF clients. This comprises of * vnf api's for common functionality * vnf api's for CGNAPT * vnf api's for VFW Change-Id: I56d22c64bf3ee5b0a2e536da8169ac7583499041 Signed-off-by: Vishwesh M Rudramuni --- common/vnf_common/config_parse.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'common/vnf_common/config_parse.c') diff --git a/common/vnf_common/config_parse.c b/common/vnf_common/config_parse.c index 5f7ec8a6..eeb547e6 100644 --- a/common/vnf_common/config_parse.c +++ b/common/vnf_common/config_parse.c @@ -35,6 +35,7 @@ /** * Default config values **/ +uint32_t rest_support = 1; static struct app_params app_params_default = { .config_file = "./config/ip_pipeline.cfg", @@ -239,6 +240,11 @@ do { \ "Parse error in section \"%s\"", section_name); \ } while (0) +uint32_t is_rest_support(void) +{ + return rest_support; +} + int parser_read_arg_bool(const char *p) { @@ -3264,6 +3270,9 @@ app_config_args(struct app_params *app, int argc, char **argv) "more than once\n"); f_present = 1; + /* REST API not needed as user has supplied the config file */ + rest_support = 0; + if (!strlen(optarg)) rte_panic("Error: Config file name is null\n"); @@ -3271,6 +3280,7 @@ app_config_args(struct app_params *app, int argc, char **argv) if (app->config_file == NULL) rte_panic("Error: Memory allocation failure\n"); + break; case 's': -- cgit 1.2.3-korg