New Feature: VCA config parameter request and source 68/1168/1
authorPhilip Joseph <philip.joseph@riftio.com>
Mon, 14 Nov 2016 06:57:38 +0000 (06:57 +0000)
committerPhilip Joseph <philip.joseph@riftio.com>
Thu, 23 Feb 2017 14:19:20 +0000 (19:49 +0530)
Feature name changed from VNF access point

Signed-off-by: Philip Joseph <philip.joseph@riftio.com>
examples/ping_pong_ns/rift/mano/examples/ping_pong_nsd.py
models/plugins/yang/vnfd.yang
rwcal/plugins/vala/rwcal_openstack/rwcal_openstack.py
rwcm/plugins/rwconman/rift/tasklets/rwconmantasklet/rwconman_config.py

index ff706c8..ca4bb67 100755 (executable)
@@ -729,6 +729,16 @@ class VirtualNetworkFunction(ManoDescriptor):
                     else:
                         self.add_ping_config()
 
+            # Add VNF access point
+            if use_vca_conf:
+                self.add_vnf_access_point(mano_ut=mano_ut)
+                if 'pong_' in self.name:
+                    self.add_pong_config(mano_ut=mano_ut,
+                                         use_ns_init_conf=use_ns_init_conf)
+                else:
+                    self.add_ping_config(mano_ut=mano_ut,
+                                         use_ns_init_conf=use_ns_init_conf)
+
             # sepcify the guest EPA
             if use_epa:
                 vdu.guest_epa.trusted_execution = False
@@ -824,14 +834,14 @@ class VirtualNetworkFunction(ManoDescriptor):
                     member_vdu.member_vdu_ref = vdu.id
 
 
-    def write_to_file(self, outdir, output_format):
+    def write_to_file(self, outdir, output_format, use_vca_conf=False):
         dirpath = "%s/%s" % (outdir, self.name)
         if not os.path.exists(dirpath):
             os.makedirs(dirpath)
         super(VirtualNetworkFunction, self).write_to_file(['vnfd', 'rw-vnfd'],
                                                           dirpath,
                                                           output_format)
-        self.add_scripts(outdir)
+        self.add_scripts(outdir, use_vca_conf=use_vca_conf)
 
     def add_cloud_init(self, outdir):
         script_dir = os.path.join(outdir, self.name, 'cloud_init')
@@ -1690,8 +1700,10 @@ def generate_ping_pong_descriptors(fmt="json",
     )
 
     if write_to_file:
-        ping.write_to_file(out_dir, ping_fmt if ping_fmt is not None else fmt)
-        pong.write_to_file(out_dir, pong_fmt if ping_fmt is not None else fmt)
+        ping.write_to_file(out_dir, ping_fmt if ping_fmt is not None else fmt,
+                           use_vca_conf=use_vca_conf)
+        pong.write_to_file(out_dir, pong_fmt if ping_fmt is not None else fmt,
+                           use_vca_conf=use_vca_conf)
         nsd_catalog.write_config(out_dir, vnfd_list)
         nsd_catalog.write_to_file(out_dir, ping_fmt if nsd_fmt is not None else fmt)
 
index 946b446..27adfbc 100644 (file)
@@ -674,11 +674,8 @@ module vnfd
       key "id";
 
       uses vnfd-descriptor;
-<<<<<<< 06c19bf9f52cb8fa2c61d4135e0ab237b4f4d7d5
-=======
 
       uses vnf-access-point;
->>>>>>> Model changes for VNF access point support
     }
   }
 }
index 9d5670b..2be896a 100644 (file)
@@ -29,13 +29,10 @@ import rift.cal.rwcal_status as rwcal_status
 import rwlogger
 import neutronclient.common.exceptions as NeutronException
 import keystoneclient.exceptions as KeystoneExceptions
-<<<<<<< 06b6ab4edf863c75fc6e2947ad52d1c76de1a308
 import tornado
 import gi
 
 gi.require_version('RwSdn', '1.0')
-=======
->>>>>>> RIFT-14308 Meaningful logs  while initalizing Openstack driver
 
 from gi.repository import (
     GObject,
index 237b8c4..7fbe123 100644 (file)
@@ -1192,11 +1192,15 @@ class ConfigManagerConfig(object):
 
                 yield from self.process_initial_config(nsr_obj, conf, script)
 
-    @asyncio.coroutine
-    def process_vnf_initial_config(self, nsr_obj, vnfr):
-        '''Apply the initial-config-primitives specified in VNFD'''
+                    parameters = []
+                    try:
+                        parameters = conf['parameter']
+                    except Exception as e:
+                        self._log.debug("Parameter conf: {}, e: {}".
+                                        format(conf, e))
+                        pass
 
-        vnfr_name = vnfr.name
+                    inp_file = get_input_file(parameters)
 
         vnfd = vnfr.vnfd
         vnf_cfg = vnfd.vnf_configuration