From: Philip Joseph Date: Mon, 14 Nov 2016 06:57:38 +0000 (+0000) Subject: New Feature: VCA config parameter request and source X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=79ecd193c359a8582b7537a336a6721c9d1ce1f9;p=osm%2FSO.git New Feature: VCA config parameter request and source Feature name changed from VNF access point Signed-off-by: Philip Joseph --- diff --git a/examples/ping_pong_ns/rift/mano/examples/ping_pong_nsd.py b/examples/ping_pong_ns/rift/mano/examples/ping_pong_nsd.py index ff706c88..ca4bb674 100755 --- a/examples/ping_pong_ns/rift/mano/examples/ping_pong_nsd.py +++ b/examples/ping_pong_ns/rift/mano/examples/ping_pong_nsd.py @@ -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) diff --git a/models/plugins/yang/vnfd.yang b/models/plugins/yang/vnfd.yang index 946b446b..27adfbc1 100644 --- a/models/plugins/yang/vnfd.yang +++ b/models/plugins/yang/vnfd.yang @@ -674,11 +674,8 @@ module vnfd key "id"; uses vnfd-descriptor; -<<<<<<< 06c19bf9f52cb8fa2c61d4135e0ab237b4f4d7d5 -======= uses vnf-access-point; ->>>>>>> Model changes for VNF access point support } } } diff --git a/rwcal/plugins/vala/rwcal_openstack/rwcal_openstack.py b/rwcal/plugins/vala/rwcal_openstack/rwcal_openstack.py index 9d5670ba..2be896a5 100644 --- a/rwcal/plugins/vala/rwcal_openstack/rwcal_openstack.py +++ b/rwcal/plugins/vala/rwcal_openstack/rwcal_openstack.py @@ -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, diff --git a/rwcm/plugins/rwconman/rift/tasklets/rwconmantasklet/rwconman_config.py b/rwcm/plugins/rwconman/rift/tasklets/rwconmantasklet/rwconman_config.py index 237b8c4e..7fbe1230 100644 --- a/rwcm/plugins/rwconman/rift/tasklets/rwconmantasklet/rwconman_config.py +++ b/rwcm/plugins/rwconman/rift/tasklets/rwconmantasklet/rwconman_config.py @@ -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