Merge "Bug 129 RIFT-15122"
diff --git a/BUILD.sh b/BUILD.sh
index cb6fb37..4d9f36a 100755
--- a/BUILD.sh
+++ b/BUILD.sh
@@ -158,6 +158,7 @@
# and install of the packages required to build and run
# this module
if $runMkcontainer; then
+ sudo apt-get install -y libxml2-dev libxslt-dev
sudo /usr/rift/container_tools/mkcontainer --modes build --modes ext --repo ${PLATFORM_REPOSITORY}
fi
@@ -269,8 +270,6 @@
sudo make -C $UIPathToBuild install
fi
-echo "To run SO with UI please run:"
-echo 'sudo -H /usr/rift/rift-shell -r -i /usr/rift -a /usr/rift/.artifacts -- ./demos/launchpad.py --use-xml-mode'
-echo
-echo "To run SO without UI please run:"
-echo 'sudo -H /usr/rift/rift-shell -r -i /usr/rift -a /usr/rift/.artifacts -- ./demos/launchpad.py --use-xml-mode --no-ui'
+echo "Creating Service ...."
+sudo $(dirname $0)/create_launchpad_service
+
diff --git a/common/plugins/yang/rw-cloud.yang b/common/plugins/yang/rw-cloud.yang
index e4682ac..2c7ce6f 100644
--- a/common/plugins/yang/rw-cloud.yang
+++ b/common/plugins/yang/rw-cloud.yang
@@ -60,7 +60,7 @@
leaf sdn-account {
description "Configured SDN account associated with this cloud account";
type leafref {
- path "/rw-sdn:sdn-account/rw-sdn:name";
+ path "/rw-sdn:sdn/rw-sdn:account/rw-sdn:name";
}
}
diff --git a/common/plugins/yang/rw-sdn.tailf.yang b/common/plugins/yang/rw-sdn.tailf.yang
index c8a4d46..3f63883 100644
--- a/common/plugins/yang/rw-sdn.tailf.yang
+++ b/common/plugins/yang/rw-sdn.tailf.yang
@@ -30,7 +30,7 @@
prefix tailf-common;
}
- tailf-common:annotate "/rw-sdn:sdn-account/rw-sdn:connection-status" {
+ tailf:annotate "/rw-sdn:sdn/rw-sdn:account/rw-sdn:connection-status" {
tailf-common:callpoint rw_callpoint;
}
diff --git a/common/plugins/yang/rw-sdn.yang b/common/plugins/yang/rw-sdn.yang
index 0a5b228..6475cc5 100644
--- a/common/plugins/yang/rw-sdn.yang
+++ b/common/plugins/yang/rw-sdn.yang
@@ -25,7 +25,7 @@
import rw-pb-ext {
- prefix "rw-pb-ext";
+ prefix "rwpb";
}
import rwsdn {
@@ -37,16 +37,17 @@
"Initial revision.";
}
- list sdn-account {
- rw-pb-ext:msg-new SDNAccountConfig;
+ container sdn {
+ list account {
+ rwpb:msg-new SDNAccountConfig;
+ key "name";
+ leaf name {
+ type string;
+ }
- key "name";
- leaf name {
- type string;
+ uses rwsdn:sdn-provider-auth;
+ uses rwsdn:connection-status;
}
-
- uses rwsdn:sdn-provider-auth;
- uses rwsdn:connection-status;
}
rpc update-sdn-status {
diff --git a/create_launchpad_service b/create_launchpad_service
new file mode 100755
index 0000000..7e862d6
--- /dev/null
+++ b/create_launchpad_service
@@ -0,0 +1,40 @@
+#!/bin/bash
+# install the launchpad systemd service
+# these files should work on both ub16 and fc20
+
+if [ $(whoami) != "root" ]; then
+ echo must be root
+ exit 1
+fi
+
+
+cat <<EOF >/etc/systemd/system/launchpad.service
+[Unit]
+Description=RIFT.ware Launchpad
+After=network-online.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/bin/sh -c 'nohup sudo -b -H /usr/rift/rift-shell -r -i /usr/rift -a /usr/rift/.artifacts -- ./demos/launchpad.py --use-xml-mode'
+ExecStop=/bin/sh -c 'killall rwmain'
+
+[Install]
+WantedBy=default.target
+EOF
+
+chmod 664 /etc/systemd/system/launchpad.service
+
+if ! systemctl daemon-reload; then
+ echo "WARNING: Not able to reload daemons: this must be run in a privileged container: sudo systemctl daemon-reload ; sudo systemctl enable launchpad.service"
+else
+ # enable launchpad at boot - should always succeed in a privileged container
+ systemctl enable launchpad.service
+fi
+
+# start launchpad?
+#sudo systemctl start launchpad.service
+
+echo
+echo "Launchpad service created and enabled. Run 'sudo systemctl start launchpad.service' to start the service."
+echo
diff --git a/models/openmano/python/rift/openmano/rift2openmano.py b/models/openmano/python/rift/openmano/rift2openmano.py
index 67cef7e..c29818f 100755
--- a/models/openmano/python/rift/openmano/rift2openmano.py
+++ b/models/openmano/python/rift/openmano/rift2openmano.py
@@ -443,8 +443,11 @@
vnfc["image name"] = vdu.image
if vdu.has_field("image_checksum"):
vnfc["image checksum"] = vdu.image_checksum
-
- if vdu.guest_epa.has_field("numa_node_policy"):
+ dedicated_int = False
+ for intf in list(vdu.internal_interface) + list(vdu.external_interface):
+ if intf.virtual_interface.type_yang in ["SR_IOV", "PCI_PASSTHROUGH"]:
+ dedicated_int = True
+ if vdu.guest_epa.has_field("numa_node_policy") or dedicated_int:
vnfc["numas"] = [{
"memory": max(int(vdu.vm_flavor.memory_mb/1024), 1),
"interfaces":[],
@@ -510,9 +513,9 @@
elif int_if.virtual_interface.type_yang in ["OM_MGMT"]:
vnfc["bridge-ifaces"].append(intf)
- elif int_if.virtual_interface.type_yang == "SR-IOV":
+ elif int_if.virtual_interface.type_yang == "SR_IOV":
intf["bandwidth"] = "10 Gbps"
- intf["dedicated"] = "yes:sriov"
+ intf["dedicated"] = "no"
vnfc["numas"][0]["interfaces"].append(intf)
elif int_if.virtual_interface.type_yang == "PCI_PASSTHROUGH":
diff --git a/models/plugins/yang/mano-types.yang b/models/plugins/yang/mano-types.yang
index 5f68b41..c3ea698 100644
--- a/models/plugins/yang/mano-types.yang
+++ b/models/plugins/yang/mano-types.yang
@@ -851,8 +851,8 @@
}
choice numa-policy {
- case numa-unware {
- leaf numa-unware {
+ case numa-unaware {
+ leaf numa-unaware {
type empty;
}
}
diff --git a/models/plugins/yang/nsr.yang b/models/plugins/yang/nsr.yang
index f7c16fe..e8b65ae 100644
--- a/models/plugins/yang/nsr.yang
+++ b/models/plugins/yang/nsr.yang
@@ -133,7 +133,7 @@
list key-pair {
key "name";
- description "Used to configure the list of public keys to be injected as part
+ description "Used to configure the list of public keys to be injected as part
of ns instantiation";
leaf name {
description "Name of this key pair";
@@ -151,7 +151,7 @@
input {
leaf name {
mandatory true;
- description "Name of the Network Service";
+ description "Name of the Network Service";
type string;
}
leaf nsd-ref {
@@ -265,8 +265,8 @@
key "placement-group-ref vnfd-id-ref";
leaf vnfd-id-ref {
- description
- "A reference to a vnfd. This is a
+ description
+ "A reference to a vnfd. This is a
leafref to path:
../../../../nsd:constituent-vnfd
+ [nsr:id = current()/../nsd:id-ref]
@@ -327,7 +327,7 @@
"The SDN account to use when requesting resources for
this vnffgr";
type leafref {
- path "/rwsdn:sdn-account/rwsdn:name";
+ path "/rwsdn:sdn/rwsdn:account/rwsdn:name";
}
}
diff --git a/models/plugins/yang/rw-nsr.yang b/models/plugins/yang/rw-nsr.yang
index ae2c92a..805ed00 100644
--- a/models/plugins/yang/rw-nsr.yang
+++ b/models/plugins/yang/rw-nsr.yang
@@ -64,8 +64,8 @@
key "id";
description
"Recent operational events for this network service.
- Though the model does not impose any restrictions on the numbe of events,
- the max operational events will be limited to the most recent 10";
+ Though the model does not impose any restrictions on the numbe of events,
+ the max operational events will be limited to the most recent 10";
leaf id {
description "The id of the instance";
@@ -137,9 +137,9 @@
by multiple cloud accounts when that becomes available.";
type string;
}
-
+
list vnf-cloud-account-map {
- description
+ description
"Mapping VNF to Cloud Account where VNF will be instantiated";
key "member-vnf-index-ref";
@@ -178,13 +178,13 @@
}
list vl-cloud-account-map {
- description
+ description
"Mapping VL to Cloud Account where VL will be instantiated";
key "vld-id-ref";
leaf vld-id-ref {
- description
+ description
"A reference to a vld.
leafref path ../../nsd/vld/id";
type string;
@@ -218,7 +218,7 @@
augment /nsr:start-network-service/nsr:input{
uses rw-ns-instance-config;
- }
+ }
augment /nsr:ns-instance-opdata/nsr:nsr {
uses manotypes:action-param;
@@ -229,7 +229,7 @@
"The SDN account associted with the cloud account using which an
NS was instantiated.";
type leafref {
- path "/rw-sdn:sdn-account/rw-sdn:name";
+ path "/rw-sdn:sdn/rw-sdn:account/rw-sdn:name";
}
}
@@ -438,7 +438,7 @@
notification nsm-notification {
description "Notification for NSM Events.
- The timestamp of this event is automatically expressed
+ The timestamp of this event is automatically expressed
in human readble format - 1970-01-01T00:00:00Z";
leaf event {
diff --git a/models/plugins/yang/rw-vlr.yang b/models/plugins/yang/rw-vlr.yang
index bbfd616..755bb81 100644
--- a/models/plugins/yang/rw-vlr.yang
+++ b/models/plugins/yang/rw-vlr.yang
@@ -32,7 +32,7 @@
}
import rw-cloud {
- prefix "rwcloud";
+ prefix "rw-cloud";
}
import ietf-yang-types {
@@ -53,7 +53,7 @@
"The cloud account to use when requesting resources for
this vlr";
type leafref {
- path "/rwcloud:cloud/rwcloud:account/rwcloud:name";
+ path "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
}
}
leaf om-datacenter {
diff --git a/models/plugins/yang/rw-vnfr.yang b/models/plugins/yang/rw-vnfr.yang
index eb027e0..be8acb4 100644
--- a/models/plugins/yang/rw-vnfr.yang
+++ b/models/plugins/yang/rw-vnfr.yang
@@ -38,7 +38,7 @@
}
import rw-cloud {
- prefix "rwcloud";
+ prefix "rw-cloud";
}
import rwvcs-types {
@@ -150,7 +150,7 @@
"The cloud account to use when requesting resources for
this vnf";
type leafref {
- path "/rwcloud:cloud/rwcloud:account/rwcloud:name";
+ path "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
}
}
diff --git a/models/plugins/yang/vnfr.yang b/models/plugins/yang/vnfr.yang
index 14a2d81..4a85588 100644
--- a/models/plugins/yang/vnfr.yang
+++ b/models/plugins/yang/vnfr.yang
@@ -191,7 +191,7 @@
}
leaf create-time {
- description
+ description
"Creation timestamp of this Virtual Network
Function. The timestamp is expressed as
seconds since unix epoch - 1970-01-01T00:00:00Z";
@@ -258,7 +258,7 @@
uses vnfd:common-connection-point;
leaf vlr-ref {
- description
+ description
"Reference to the VLR associated with this connection point";
type leafref {
path "/vlr:vlr-catalog/vlr:vlr/vlr:id";
@@ -266,10 +266,16 @@
}
leaf ip-address {
- description
+ description
"IP address assigned to the external connection point";
type inet:ip-address;
}
+ leaf mac-address {
+ description
+ "MAC address assigned to the external connection point";
+ // type inet:mac-address;
+ type string;
+ }
leaf connection-point-id {
rwpb:field-inline "true";
rwpb:field-string-max 64;
@@ -371,10 +377,16 @@
uses vnfd:common-connection-point;
leaf ip-address {
- description
- "IP address assigned to the external connection point";
+ description
+ "IP address assigned to the internal connection point";
type inet:ip-address;
}
+ leaf mac-address {
+ description
+ "MAC address assigned to the internal connection point";
+ // type inet:mac-address;
+ type string;
+ }
}
list internal-interface {
diff --git a/rwcal/plugins/vala/rwcal_openstack/rwcal_openstack.py b/rwcal/plugins/vala/rwcal_openstack/rwcal_openstack.py
index d3c0b97..9cfdd75 100644
--- a/rwcal/plugins/vala/rwcal_openstack/rwcal_openstack.py
+++ b/rwcal/plugins/vala/rwcal_openstack/rwcal_openstack.py
@@ -1181,6 +1181,8 @@
if ('fixed_ips' in port_info) and (len(port_info['fixed_ips']) >= 1):
if 'ip_address' in port_info['fixed_ips'][0]:
c_point.ip_address = port_info['fixed_ips'][0]['ip_address']
+ if 'mac_address' in port_info :
+ c_point.mac_addr = port_info['mac_address']
if port_info['status'] == 'ACTIVE':
c_point.state = 'active'
else:
diff --git a/rwcal/plugins/yang/rwcal.yang b/rwcal/plugins/yang/rwcal.yang
index e038c47..4c58f1b 100644
--- a/rwcal/plugins/yang/rwcal.yang
+++ b/rwcal/plugins/yang/rwcal.yang
@@ -1120,6 +1120,12 @@
rwpb:field-string-max 64;
type string;
}
+
+ leaf mac-addr {
+ rwpb:field-inline "true";
+ rwpb:field-string-max 48;
+ type string;
+ }
}
grouping virtual-link-info-params {
diff --git a/rwlaunchpad/plugins/rwlaunchpadtasklet/scripts/onboard_pkg b/rwlaunchpad/plugins/rwlaunchpadtasklet/scripts/onboard_pkg
index 6a39775..741fbae 100755
--- a/rwlaunchpad/plugins/rwlaunchpadtasklet/scripts/onboard_pkg
+++ b/rwlaunchpad/plugins/rwlaunchpadtasklet/scripts/onboard_pkg
@@ -400,8 +400,8 @@
parser.add_argument("-p", "--upload-port", default=4567, type=int,
help="Upload port number, default 4567")
- parser.add_argument("-P", "--restconf-port", default=8888, type=int,
- help="RESTconf port number, default 8888")
+ parser.add_argument("-P", "--restconf-port", default=8008, type=int,
+ help="RESTconf port number, default 8008")
parser.add_argument("--restconf-user", default='admin',
help="RESTconf user name, default admin")
parser.add_argument("--restconf-password", default='admin',
diff --git a/rwlaunchpad/plugins/rwnsm/rift/tasklets/rwnsmtasklet/openmano_nsm.py b/rwlaunchpad/plugins/rwnsm/rift/tasklets/rwnsmtasklet/openmano_nsm.py
index d3ff7f2..6c18946 100644
--- a/rwlaunchpad/plugins/rwnsm/rift/tasklets/rwnsmtasklet/openmano_nsm.py
+++ b/rwlaunchpad/plugins/rwnsm/rift/tasklets/rwnsmtasklet/openmano_nsm.py
@@ -550,6 +550,11 @@
return vnf["ip_address"].strip()
return None
+ def get_vnf_mac_address(vnf):
+ if "mac_address" in vnf:
+ return vnf["mac_address"].strip()
+ return None
+
def get_ext_cp_info(vnf):
cp_info_list = []
for vm in vnf["vms"]:
@@ -567,7 +572,11 @@
if ip_address is None:
ip_address = "0.0.0.0"
- cp_info_list.append((intf["external_name"], ip_address))
+ mac_address = intf["mac_address"]
+ if mac_address is None:
+ mac_address="00:00:00:00:00:00"
+
+ cp_info_list.append((intf["external_name"], ip_address, mac_address))
return cp_info_list
@@ -615,6 +624,7 @@
if all_vms_active(vnf_status):
vnf_ip_address = get_vnf_ip_address(vnf_status)
+ vnf_mac_address = get_vnf_mac_address(vnf_status)
if vnf_ip_address is None:
self._log.warning("No IP address obtained "
@@ -625,7 +635,7 @@
self._log.debug("All VMs in VNF are active. Marking as running.")
vnfr_msg.operational_status = "running"
- self._log.debug("Got VNF ip address: %s", vnf_ip_address)
+ self._log.debug("Got VNF ip address: %s, mac-address: %s", vnf_ip_address, vnf_mac_address)
vnfr_msg.mgmt_interface.ip_address = vnf_ip_address
vnfr_msg.vnf_configuration.config_access.mgmt_ip_address = vnf_ip_address
@@ -643,11 +653,12 @@
# Add connection point information for the config manager
cp_info_list = get_ext_cp_info(vnf_status)
- for (cp_name, cp_ip) in cp_info_list:
+ for (cp_name, cp_ip, cp_mac_addr) in cp_info_list:
cp = vnfr_msg.connection_point.add()
cp.name = cp_name
cp.short_name = cp_name
cp.ip_address = cp_ip
+ cp.mac_address = cp_mac_addr
yield from self._publisher.publish_vnfr(None, vnfr_msg)
active_vnfs.append(vnfr)
diff --git a/rwlaunchpad/plugins/rwnsm/rift/tasklets/rwnsmtasklet/rwnsmtasklet.py b/rwlaunchpad/plugins/rwnsm/rift/tasklets/rwnsmtasklet/rwnsmtasklet.py
index f43b0cb..8534952 100755
--- a/rwlaunchpad/plugins/rwnsm/rift/tasklets/rwnsmtasklet/rwnsmtasklet.py
+++ b/rwlaunchpad/plugins/rwnsm/rift/tasklets/rwnsmtasklet/rwnsmtasklet.py
@@ -220,7 +220,6 @@
if self._vnffgr_state == VnffgRecordState.INIT:
vnffgr_dict = {"id": self._vnffgr_id,
- "nsd_id": self._nsr.nsd_id,
"vnffgd_id_ref": self._vnffgd_msg.id,
"vnffgd_name_ref": self._vnffgd_msg.name,
"sdn_account": self._sdn_account_name,
@@ -229,7 +228,6 @@
vnffgr = NsrYang.YangData_Nsr_NsInstanceOpdata_Nsr_Vnffgr.from_dict(vnffgr_dict)
elif self._vnffgr_state == VnffgRecordState.TERMINATED:
vnffgr_dict = {"id": self._vnffgr_id,
- "nsd_id": self._nsr.nsd_id,
"vnffgd_id_ref": self._vnffgd_msg.id,
"vnffgd_name_ref": self._vnffgd_msg.name,
"sdn_account": self._sdn_account_name,
@@ -243,7 +241,6 @@
self._log.exception("Fetching VNFFGR for VNFFG with id %s failed", self._vnffgr_id)
self._vnffgr_state = VnffgRecordState.FAILED
vnffgr_dict = {"id": self._vnffgr_id,
- "nsd_id": self._nsr.nsd_id,
"vnffgd_id_ref": self._vnffgd_msg.id,
"vnffgd_name_ref": self._vnffgd_msg.name,
"sdn_account": self._sdn_account_name,
@@ -257,7 +254,6 @@
def vnffgr_create_msg(self):
""" Virtual Link Record message for Creating VLR in VNS """
vnffgr_dict = {"id": self._vnffgr_id,
- "nsd_id": self._nsr.nsd_id,
"vnffgd_id_ref": self._vnffgd_msg.id,
"vnffgd_name_ref": self._vnffgd_msg.name,
"sdn_account": self._sdn_account_name,
@@ -4124,7 +4120,10 @@
# Terminate the instances/networks assocaited with this nw service
self._log.debug("Terminating the network service %s", nsr_id)
- yield from self._nsrs[nsr_id].terminate()
+ try :
+ yield from self._nsrs[nsr_id].terminate()
+ except Exception as e:
+ self.log.exception("Failed to terminate NSR[id=%s]", nsr_id)
# Unref the NSD
yield from self.nsd_unref_by_nsr_id(nsr_id)
diff --git a/rwlaunchpad/plugins/rwnsm/rift/tasklets/rwnsmtasklet/rwvnffgmgr.py b/rwlaunchpad/plugins/rwnsm/rift/tasklets/rwnsmtasklet/rwvnffgmgr.py
index 0ebe9df..cf83612 100755
--- a/rwlaunchpad/plugins/rwnsm/rift/tasklets/rwnsmtasklet/rwvnffgmgr.py
+++ b/rwlaunchpad/plugins/rwnsm/rift/tasklets/rwnsmtasklet/rwvnffgmgr.py
@@ -190,7 +190,7 @@
vnfr.mgmt_address = cp_ref.connection_point_params.mgmt_address
vnfr.mgmt_port = 5000
vnfr_list.append(vnfr)
-
+
vdu = vnfr.vdu_list.add()
vdu.name = cp_ref.connection_point_params.name
vdu.port_id = cp_ref.connection_point_params.port_id
@@ -220,9 +220,9 @@
if(len(classifier_list) == 2):
meta[vnffgr.classifier[0].id] = '0x' + ''.join(str("%0.2X"%int(i)) for i in vnffgr.classifier[1].ip_address.split('.'))
meta[vnffgr.classifier[1].id] = '0x' + ''.join(str("%0.2X"%int(i)) for i in vnffgr.classifier[0].ip_address.split('.'))
-
+
self._log.debug("VNFFG Meta VNFFG chain is {}".format(meta))
-
+
for classifier in classifier_list:
vnffgr_cl = [_classifier for _classifier in vnffgr.classifier if classifier.id == _classifier.id]
if len(vnffgr_cl) > 0:
@@ -236,8 +236,8 @@
vnffgcl.port_id = vnffgr_cl[0].port_id
vnffgcl.vm_id = vnffgr_cl[0].vm_id
# Get the symmetric classifier endpoint ip and set it in nsh ctx1
-
- vnffgcl.vnffg_metadata.ctx1 = meta.get(vnffgr_cl[0].id,'0')
+
+ vnffgcl.vnffg_metadata.ctx1 = meta.get(vnffgr_cl[0].id,'0')
vnffgcl.vnffg_metadata.ctx2 = '0'
vnffgcl.vnffg_metadata.ctx3 = '0'
vnffgcl.vnffg_metadata.ctx4 = '0'
@@ -323,7 +323,7 @@
del self._vnffgr_list[vnffgr_id]
class SDNAccountDtsHandler(object):
- XPATH = "C,/rw-sdn:sdn-account"
+ XPATH = "C,/rw-sdn:sdn/rw-sdn:account"
def __init__(self, dts, log, parent):
self._dts = dts
diff --git a/rwlaunchpad/plugins/rwvnfm/rift/tasklets/rwvnfmtasklet/rwvnfmtasklet.py b/rwlaunchpad/plugins/rwvnfm/rift/tasklets/rwvnfmtasklet/rwvnfmtasklet.py
index 0f4ef34..d359aa4 100755
--- a/rwlaunchpad/plugins/rwvnfm/rift/tasklets/rwvnfmtasklet/rwvnfmtasklet.py
+++ b/rwlaunchpad/plugins/rwvnfm/rift/tasklets/rwvnfmtasklet/rwvnfmtasklet.py
@@ -311,6 +311,14 @@
return conn_point.ip_address
return "0.0.0.0"
+ def cp_mac_addr(self, cp_name):
+ """ Find mac address by connection point name """
+ if self._vm_resp is not None:
+ for conn_point in self._vm_resp.connection_points:
+ if conn_point.name == cp_name:
+ return conn_point.mac_addr
+ return "00:00:00:00:00:00"
+
def cp_id(self, cp_name):
""" Find connection point id by connection point name """
if self._vm_resp is not None:
@@ -422,7 +430,8 @@
icp_list.append({"name": cp.name,
"id": cp.id,
"type_yang": "VPORT",
- "ip_address": self.cp_ip_addr(cp.id)})
+ "ip_address": self.cp_ip_addr(cp.id),
+ "mac_address": self.cp_mac_addr(cp.id)})
ii_list.append({"name": intf.name,
"vdur_internal_connection_point_ref": cp.id,
@@ -437,7 +446,10 @@
ei_list.append({"name": cp,
"vnfd_connection_point_ref": cp,
"virtual_interface": {}})
- self._vnfr.update_cp(cp, self.cp_ip_addr(cp), self.cp_id(cp))
+ self._vnfr.update_cp(cp,
+ self.cp_ip_addr(cp),
+ self.cp_mac_addr(cp),
+ self.cp_id(cp))
vdur_dict["external_interface"] = ei_list
@@ -1706,13 +1718,14 @@
# Update the VNFR with the changed status
yield from self.publish(None)
- def update_cp(self, cp_name, ip_address, cp_id):
+ def update_cp(self, cp_name, ip_address, mac_addr, cp_id):
"""Updated the connection point with ip address"""
for cp in self._cprs:
if cp.name == cp_name:
self._log.debug("Setting ip address and id for cp %s, cpr %s with ip %s id %s",
cp_name, cp, ip_address, cp_id)
cp.ip_address = ip_address
+ cp.mac_address = mac_addr
cp.connection_point_id = cp_id
return
diff --git a/rwlaunchpad/plugins/rwvns/rift/tasklets/rwvnstasklet/rwvnstasklet.py b/rwlaunchpad/plugins/rwvns/rift/tasklets/rwvnstasklet/rwvnstasklet.py
index 1f88824..0ced574 100755
--- a/rwlaunchpad/plugins/rwvns/rift/tasklets/rwvnstasklet/rwvnstasklet.py
+++ b/rwlaunchpad/plugins/rwvns/rift/tasklets/rwvnstasklet/rwvnstasklet.py
@@ -82,7 +82,7 @@
def _register_show_status(self):
def get_xpath(sdn_name=None):
- return "D,/rw-sdn:sdn-account{}/rw-sdn:connection-status".format(
+ return "D,/rw-sdn:sdn/rw-sdn:account{}/rw-sdn:connection-status".format(
"[name='%s']" % sdn_name if sdn_name is not None else ''
)
@@ -152,7 +152,7 @@
yield from self._register_validate_rpc()
class SDNAccountDtsHandler(object):
- XPATH = "C,/rw-sdn:sdn-account"
+ XPATH = "C,/rw-sdn:sdn/rw-sdn:account"
def __init__(self, dts, log, parent):
self._dts = dts