From: Philip Joseph Date: Thu, 12 Jan 2017 09:16:22 +0000 (+0000) Subject: Fix merge conflicts X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=21fa51b4ea610c501189add5e2be5693246aacfc;p=osm%2FSO.git Fix merge conflicts Signed-off-by: Philip Joseph --- diff --git a/BUILD.sh b/BUILD.sh index 788f9d14..2e3ba89e 100755 --- a/BUILD.sh +++ b/BUILD.sh @@ -172,7 +172,11 @@ fi # and install of the packages required to build and run # this module if $runMkcontainer; then - sudo apt-get install -y libxml2-dev libxslt-dev + if [[ $PLATFORM == ub16 ]]; then + sudo apt-get install -y libxml2-dev libxslt-dev python3-crypto + elif [[ $PLATFORM == fc20 ]]; then + sudo yum-install --assumeyes libxml2-devel libxslt-devel python3-crypto + fi sudo /usr/rift/container_tools/mkcontainer --modes build --modes ext --repo ${PLATFORM_REPOSITORY} sudo pip3 install lxml==3.4.0 fi 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 4a16c7a8..39537870 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 @@ -1520,6 +1520,13 @@ def generate_ping_pong_descriptors(fmt="json", for i in range(external_vlr_count): cpgroup_list.append([]) + if use_charm: + use_vca_conf = True + + if use_vca_conf: + use_ns_init_conf = True + use_vnf_init_conf = False + suffix = '' ping = VirtualNetworkFunction("ping_vnfd%s" % (suffix), pingcount) ping.use_vnf_init_conf = use_vnf_init_conf diff --git a/models/plugins/yang/rw-vnfd.yang b/models/plugins/yang/rw-vnfd.yang index 29eb852f..456a667c 100644 --- a/models/plugins/yang/rw-vnfd.yang +++ b/models/plugins/yang/rw-vnfd.yang @@ -113,5 +113,14 @@ module rw-vnfd } } } + + augment /vnfd:vnfd-catalog/vnfd:vnfd/vnfd:mgmt-interface { + leaf ssh-key { + description + "Whether SSH keys need to be generated and passed + to the RO and VCA during instantiation."; + type boolean; + } + } } // vim: sw=2 diff --git a/models/plugins/yang/rw-vnfr.yang b/models/plugins/yang/rw-vnfr.yang index be8acb4b..7394706e 100644 --- a/models/plugins/yang/rw-vnfr.yang +++ b/models/plugins/yang/rw-vnfr.yang @@ -296,6 +296,23 @@ module rw-vnfr uses vnfd-ref-count; } + augment /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:vnfd/vnfr:mgmt-interface { + leaf ssh-key { + description + "Whether SSH keys need to be generated and passed + to the RO and VCA during instantiation."; + type boolean; + } + } + + augment /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:vnfd { + leaf meta { + description + "Any meta-data needed by the UI"; + type string; + } + } + container vnfr-console { config false; list vnfr { diff --git a/models/plugins/yang/vnfd.yang b/models/plugins/yang/vnfd.yang index d47472dd..75de5e33 100644 --- a/models/plugins/yang/vnfd.yang +++ b/models/plugins/yang/vnfd.yang @@ -342,13 +342,6 @@ module vnfd type inet:port-number; } - leaf ssh-key { - description - "Whether SSH keys need to be generated and passed - to the RO and VCA during instantiation."; - type boolean; - } - container dashboard-params { description "Parameters for the VNF dashboard"; diff --git a/rwcm/plugins/rwconman/rift/tasklets/rwconmantasklet/rwconman_config.py b/rwcm/plugins/rwconman/rift/tasklets/rwconmantasklet/rwconman_config.py index cda6e90b..69871283 100644 --- a/rwcm/plugins/rwconman/rift/tasklets/rwconmantasklet/rwconman_config.py +++ b/rwcm/plugins/rwconman/rift/tasklets/rwconmantasklet/rwconman_config.py @@ -1182,13 +1182,7 @@ class ConfigManagerConfig(object): vnfr_name = vnfr.name - vnfd = yield from self.cmdts_obj.get_vnfd(vnfr.vnfd_ref) - if vnfd is None: - msg = "VNFR {}, unable to get VNFD {}". \ - format(vnfr_name, vnfr.vnfd_ref) - self._log.error(msg) - raise InitialConfigError(msg) - + vnfd = vnfr.vnfd vnf_cfg = vnfd.vnf_configuration for conf in vnf_cfg.initial_config_primitive: diff --git a/rwlaunchpad/plugins/rwnsm/rift/tasklets/rwnsmtasklet/openmano_nsm.py b/rwlaunchpad/plugins/rwnsm/rift/tasklets/rwnsmtasklet/openmano_nsm.py index 31b05448..431be98b 100644 --- a/rwlaunchpad/plugins/rwnsm/rift/tasklets/rwnsmtasklet/openmano_nsm.py +++ b/rwlaunchpad/plugins/rwnsm/rift/tasklets/rwnsmtasklet/openmano_nsm.py @@ -323,7 +323,7 @@ class OpenmanoNsr(object): self._log.debug("Key pair NSD is %s",authorized_key) key_pairs.append(authorized_key.key) - if self._ssh_key: + if self._ssh_key['public_key']: self._log.debug("Pub key NSD is %s", self._ssh_key['public_key']) key_pairs.append(self._ssh_key['public_key']) diff --git a/rwlaunchpad/plugins/rwnsm/rift/tasklets/rwnsmtasklet/rwnsmtasklet.py b/rwlaunchpad/plugins/rwnsm/rift/tasklets/rwnsmtasklet/rwnsmtasklet.py index c9f7bb9e..84fd3d33 100755 --- a/rwlaunchpad/plugins/rwnsm/rift/tasklets/rwnsmtasklet/rwnsmtasklet.py +++ b/rwlaunchpad/plugins/rwnsm/rift/tasklets/rwnsmtasklet/rwnsmtasklet.py @@ -964,9 +964,9 @@ class VirtualNetworkFunctionRecord(object): vnfr = RwVnfrYang.YangData_Vnfr_VnfrCatalog_Vnfr.from_dict(vnfr_dict) - vnfr.vnfd = VnfrYang.YangData_Vnfr_VnfrCatalog_Vnfr_Vnfd.from_dict( - self.vnfd.as_dict(), - ignore_missing_keys=True) + vnfr.vnfd = RwVnfrYang.YangData_Vnfr_VnfrCatalog_Vnfr_Vnfd.from_dict( + self.vnfd.as_dict()) + vnfr.member_vnf_index_ref = self.member_vnf_index vnfr.vnf_configuration.from_dict(self._vnfd.vnf_configuration.as_dict()) @@ -3972,8 +3972,11 @@ class NsManager(object): ) self._nsrs[nsr_msg.id] = nsr - # Generate ssh key pair if required - yield from nsr.generate_ssh_key_pair(config_xact) + try: + # Generate ssh key pair if required + yield from nsr.generate_ssh_key_pair(config_xact) + except Exception as e: + self._log.exception("SSH key: {}".format(e)) self._log.debug("NSR {}: SSh key generated: {}".format(nsr_msg.name, nsr.public_key)) @@ -4002,7 +4005,11 @@ class NsManager(object): raise NetworkServiceRecordError(err) nsr = self._nsrs[nsr_id] - yield from nsr.nsm_plugin.instantiate_ns(nsr, config_xact) + try: + yield from nsr.nsm_plugin.instantiate_ns(nsr, config_xact) + except Exception as e: + self._log.exception("NS instantiate: {}".format(e)) + raise e @asyncio.coroutine def update_vnfr(self, vnfr): diff --git a/rwlaunchpad/plugins/rwvnfm/rift/tasklets/rwvnfmtasklet/rwvnfmtasklet.py b/rwlaunchpad/plugins/rwvnfm/rift/tasklets/rwvnfmtasklet/rwvnfmtasklet.py index d3cef3e5..65f55752 100755 --- a/rwlaunchpad/plugins/rwvnfm/rift/tasklets/rwvnfmtasklet/rwvnfmtasklet.py +++ b/rwlaunchpad/plugins/rwvnfm/rift/tasklets/rwvnfmtasklet/rwvnfmtasklet.py @@ -1385,7 +1385,7 @@ class VirtualNetworkFunctionRecord(object): vnfr_dict.update(vnfd_copy_dict) vnfr_msg = RwVnfrYang.YangData_Vnfr_VnfrCatalog_Vnfr.from_dict(vnfr_dict) - vnfr_msg.vnfd = VnfrYang.YangData_Vnfr_VnfrCatalog_Vnfr_Vnfd.from_dict(self.vnfd.as_dict()) + vnfr_msg.vnfd = RwVnfrYang.YangData_Vnfr_VnfrCatalog_Vnfr_Vnfd.from_dict(self.vnfd.as_dict()) vnfr_msg.create_time = self._create_time vnfr_msg.uptime = int(time.time()) - self._create_time