Merge branch 'pm_phase2' into v2.0. Amend change for NSD based on package_type rpc param.
Signed-off-by: sinhan <nandan.sinha@riftio.com>
diff --git a/BUILD.sh b/BUILD.sh
index 40c5990..ab1e685 100755
--- a/BUILD.sh
+++ b/BUILD.sh
@@ -114,10 +114,10 @@
if [[ $PLATFORM == ub16 ]]; then
PLATFORM_REPOSITORY=${1:-OSM}
- PLATFORM_VERSION=${2:-4.4.0.0.57702}
+ PLATFORM_VERSION=${2:-4.4.2.0.60195}
elif [[ $PLATFORM == fc20 ]]; then
PLATFORM_REPOSITORY=${1:-OSM} # change to OSM when published
- PLATFORM_VERSION=${2:-4.3.1.0.53705}
+ PLATFORM_VERSION=${2:-4.4.2.0.60195}
else
echo "Internal error: unknown platform $PLATFORM"
exit 1
@@ -305,12 +305,6 @@
exit 1
fi
-# install some base files used to create VNFs
-test -d /usr/rift/images || mkdir /usr/rift/images
-for file in Fedora-x86_64-20-20131211.1-sda-ping.qcow2 Fedora-x86_64-20-20131211.1-sda-pong.qcow2 Fedora-x86_64-20-20131211.1-sda.qcow2; do
- test -f /usr/rift/images/$file || curl -o /usr/rift/images/$file http://repo.riftio.com/releases/open.riftio.com/4.3.1/$file
-done
-
# If you are re-building SO, you just need to run
# these two steps
if ! $installSO; then
diff --git a/models/plugins/yang/mano-types.yang b/models/plugins/yang/mano-types.yang
index ab234be..4ec602c 100644
--- a/models/plugins/yang/mano-types.yang
+++ b/models/plugins/yang/mano-types.yang
@@ -227,7 +227,7 @@
leaf protocol {
description
- "Protocol to use for NETCONF such as ssh";
+ "Protocol to use for NETCONF, such as ssh";
type enumeration {
enum None;
enum ssh;
@@ -313,7 +313,7 @@
leaf config-priority {
description
"Configuration priority - order of configuration
- to be applied to each VNF in this NS ,A low
+ to be applied to each VNF in this NS. A low
number takes precedence over a high number";
type uint64;
}
@@ -1252,14 +1252,17 @@
key id;
leaf id {
+ description "Identifier for control parameter";
type string;
}
leaf name {
+ description "Name of a control parameter";
type string;
}
leaf description {
+ description "A description of the control parameter";
type string;
}
diff --git a/models/plugins/yang/nsd.yang b/models/plugins/yang/nsd.yang
index 15cd2e3..7818391 100644
--- a/models/plugins/yang/nsd.yang
+++ b/models/plugins/yang/nsd.yang
@@ -148,8 +148,8 @@
leaf logo {
description
- "File path for the vendor specific logo. For example icons/mylogo.png.
- The logo should be part of the network service";
+ "File path for the vendor-specific logo. For example, icons/mylogo.png.
+ The logo should be part of the network service";
type string;
}
@@ -166,16 +166,11 @@
list connection-point {
description
"List for external connection points.
- Each NS has one or more external connection
- points. As the name implies that external
- connection points are used for connecting
- the NS to other NS or to external networks.
- Each NS exposes these connection points to
- the orchestrator. The orchestrator can
- construct network service chains by
- connecting the connection points between
- different NS.";
-
+ Each network service (NS) has one or more external connection
+ points that connect the NS to other NSs or to external networks.
+ Each NS exposes connection points to the orchestrator, which can
+ construct network service chains by connecting the connection
+ points between different NSs.";
key "name";
leaf name {
description
@@ -190,12 +185,12 @@
}
}
- /* Still having issues modelling this,
+ /* Model Limitations,
see the comments under vnfd-connection-point-ref
*/
list vld {
description
- "List of Virtual Link Descriptors.";
+ "List of Virtual Link Descriptors (VLDs).";
key "id";
@@ -262,7 +257,7 @@
leaf vnfd-id-ref {
description
- "A reference to a vnfd";
+ "A reference to a VNFD";
type leafref {
path "../../../constituent-vnfd" +
"[member-vnf-index = current()/../member-vnf-index-ref]" +
@@ -321,8 +316,8 @@
leaf member-vnf-index {
description
"Identifier/index for the VNFD. This separate id
- is required to ensure that multiple VNFs can be
- part of single NS";
+ is required so that multiple VNFs can be part of
+ single NS";
type uint64;
}
@@ -344,7 +339,7 @@
list scaling-group-descriptor {
description
- "scaling group descriptor within this network service.
+ "Scaling group descriptor within this network service.
The scaling group defines a group of VNFs,
and the ratio of VNFs in the network service
that is used as target for scaling action";
@@ -392,7 +387,7 @@
description
"Operation to be applied to check between scaling criterias to
check if the scale out threshold condition has been met.
- Defauls to OR";
+ Defaults to OR";
type scaling-criteria-operation;
default OR;
}
@@ -407,7 +402,7 @@
leaf cooldown-time {
description
"The duration after a scaling-in/scaling-out action has been
- triggered, for which there will be no further optional";
+ triggered, for which there will be no further scaling activity";
type uint32;
mandatory true;
}
@@ -419,18 +414,21 @@
key "name";
leaf name {
+ description "Name of the scaling criteria";
type string;
}
leaf scale-in-threshold {
description
- "Value below which scale-in requests are generated";
+ "Value below which scale-in requests are generated
+ (depends on monitoring parameters)";
type uint64;
}
leaf scale-out-threshold {
description
- "Value above which scale-out requests are generated";
+ "Value above which scale-out requests are generated
+ (depends on monitoring parameters)";
type uint64;
}
@@ -450,7 +448,7 @@
key "member-vnf-index-ref";
leaf member-vnf-index-ref {
- description "member VNF index of this member VNF";
+ description "Member VNF index of this member VNF";
type leafref {
path "../../../constituent-vnfd/member-vnf-index";
}
@@ -458,9 +456,9 @@
leaf count {
description
- "count of this member VNF within this scaling group.
- The count allows to define the number of instances
- when a scaling action targets this scaling group";
+ "Count of this member VNF within this scaling group.
+ The count defines the number of instances when a
+ scaling action targets this scaling group.";
type uint32;
default 1;
}
@@ -468,19 +466,20 @@
leaf min-instance-count {
description
- "Minimum instances of the scaling group which are allowed.
- These instances are created by default when the network service
- is instantiated.";
+ "Minimum number of instances of the scaling group that
+ are allowed in a single network service. These instances
+ are created by default when the network service is
+ instantiated.";
type uint32;
default 0;
}
leaf max-instance-count {
description
- "Maximum instances of this scaling group that are allowed
- in a single network service. The network service scaling
- will fail, when the number of service group instances
- exceed the max-instance-count specified.";
+ "Maximum number of instances of this scaling group that
+ are allowed in a single network service. The network
+ service scaling fails when the number of service group
+ instances exceeds the max-instance-count specified.";
type uint32;
default 10;
}
@@ -490,7 +489,7 @@
key "trigger";
leaf trigger {
- description "scaling trigger";
+ description "Scaling trigger";
type scaling-trigger;
}
@@ -516,7 +515,7 @@
key "member-vnf-index-ref";
leaf member-vnf-index-ref {
- description "member VNF index of this member VNF";
+ description "Member VNF index of this member VNF";
type leafref {
path "../../../constituent-vnfd/member-vnf-index";
}
@@ -547,7 +546,7 @@
}
leaf vnf-depends-on-ref {
description
- "Reference to VNF that sorce VNF depends.";
+ "Reference to VNF on which the source VNF depends.";
type leafref {
path "../../constituent-vnfd/vnfd-id-ref";
}
@@ -686,7 +685,7 @@
leaf vnfd-id-ref {
description
- "A reference to a vnfd";
+ "A reference to a VNFD";
type leafref {
path "../../../constituent-vnfd" +
"[member-vnf-index = current()/../member-vnf-index-ref]" +
@@ -718,7 +717,7 @@
leaf ip-proto {
description
- "IP Protocol.";
+ "Internet Protocol.";
type uint8;
}
@@ -745,22 +744,23 @@
"Destination port number.";
type inet:port-number;
}
- //TODO: Add more match criteria
} //match-attributes
} // classifier
} // vnffgd
list monitoring-param {
description
- "List of monitoring parameters from VNF's that should be
+ "List of monitoring parameters from VNFs that should be
propogated up into NSR";
key "id";
leaf id {
+ description "Identifier for a monitoring parameter";
type string;
}
leaf name {
+ description "Name of the monitoring parameter";
type string;
}
@@ -774,7 +774,7 @@
leaf vnfd-id-ref {
description
- "A reference to a vnfd. This is a leafref";
+ "A reference to a VNFD. This is a leafref";
type leafref {
path "../../../constituent-vnfd" +
@@ -806,8 +806,8 @@
list parameter-pool {
description
- "Pool of parameter values which must be
- pulled from during configuration";
+ "Pool of parameter values from which to choose during
+ configuration.";
key "name";
leaf name {
@@ -818,7 +818,7 @@
container range {
description
- "Create a range of values to populate the pool with";
+ "Create a range of values from which to populate the pool with";
leaf start-value {
description
@@ -873,7 +873,7 @@
leaf vnfd-id-ref {
description
- "A reference to a vnfd. This is a leafref";
+ "A reference to a VNFD. This is a leafref";
type leafref {
path "../../../constituent-vnfd" +
@@ -925,7 +925,7 @@
list key-pair {
key "name";
description "Used to configure the list of public keys to be injected as part
- of ns instantiation";
+ of NS instantiation";
leaf name {
description "Name of this key pair";
@@ -955,7 +955,7 @@
list key-pair {
key "name";
description "Used to configure the list of public keys to be injected as part
- of ns instantiation";
+ of NS instantiation";
leaf name {
description "Name of this key pair";
diff --git a/models/plugins/yang/nsr.yang b/models/plugins/yang/nsr.yang
index b081f6a..3fdd642 100644
--- a/models/plugins/yang/nsr.yang
+++ b/models/plugins/yang/nsr.yang
@@ -271,11 +271,7 @@
../../../../nsd:constituent-vnfd
+ [nsr:id = current()/../nsd:id-ref]
+ /nsd:vnfd-id-ref
- NOTE: An issue with confd is preventing the
- use of xpath. Seems to be an issue with leafref
- to leafref, whose target is in a different module.
- Once that is resolved this will switched to use
- leafref";
+ NOTE: confd limitations prevent the use of xpath";
type yang:uuid;
}
@@ -869,11 +865,7 @@
../../../../nsd:constituent-vnfd
+ [nsd:id = current()/../nsd:id-ref]
+ /nsd:vnfd-id-ref
- NOTE: An issue with confd is preventing the
- use of xpath. Seems to be an issue with leafref
- to leafref, whose target is in a different module.
- Once that is resolved this will switched to use
- leafref";
+ NOTE: confd limitations prevent the use of xpath";
type string;
}
@@ -931,12 +923,17 @@
}
list parameter {
+ description
+ "List of parameters for the initial config primitive";
key "name";
leaf name {
+ description "Name of the intitial config parameter";
type string;
}
leaf value {
+ description "Value associated with the initial config
+ parameter";
type string;
}
}
@@ -1178,11 +1175,7 @@
../../../../nsd:constituent-vnfd
+ [nsd:id = current()/../nsd:id-ref]
+ /nsd:vnfd-id-ref
- NOTE: An issue with confd is preventing the
- use of xpath. Seems to be an issue with leafref
- to leafref, whose target is in a different module.
- Once that is resolved this will switched to use
- leafref";
+ NOTE: confd limitations prevent the use of xpath";
type string;
}
diff --git a/rwcal/plugins/vala/rwcal_openstack/rift/rwcal/openstack/utils/compute.py b/rwcal/plugins/vala/rwcal_openstack/rift/rwcal/openstack/utils/compute.py
index be7a969..e886bb2 100644
--- a/rwcal/plugins/vala/rwcal_openstack/rift/rwcal/openstack/utils/compute.py
+++ b/rwcal/plugins/vala/rwcal_openstack/rift/rwcal/openstack/utils/compute.py
@@ -266,10 +266,17 @@
kwargs = dict()
if vdu_params.has_field('volumes'):
kwargs['block_device_mapping_v2'] = list()
+ bootvol_list = list()
+ othervol_list = list()
# Ignore top-level image
kwargs['image_id'] = ""
for volume in vdu_params.volumes:
- kwargs['block_device_mapping_v2'].append(self.make_vdu_volume_args(volume, vdu_params))
+ if 'boot_priority' in volume:
+ bootvol_list.append(self.make_vdu_volume_args(volume, vdu_params))
+ else:
+ othervol_list.append(self.make_vdu_volume_args(volume, vdu_params))
+ # Sort block_device_mapping_v2 list by boot index, Openstack does not seem to respecting order by boot index
+ kwargs['block_device_mapping_v2'] = sorted(bootvol_list, key=lambda k: k['boot_index']) + othervol_list
return kwargs
def make_vdu_network_args(self, vdu_params):
diff --git a/rwlaunchpad/plugins/rwpkgmgr/rift/tasklets/rwpkgmgr/downloader/url.py b/rwlaunchpad/plugins/rwpkgmgr/rift/tasklets/rwpkgmgr/downloader/url.py
index 88155fa..6c49323 100644
--- a/rwlaunchpad/plugins/rwpkgmgr/rift/tasklets/rwpkgmgr/downloader/url.py
+++ b/rwlaunchpad/plugins/rwpkgmgr/rift/tasklets/rwpkgmgr/downloader/url.py
@@ -71,7 +71,8 @@
self.package_id = package_id
self.package_type = package_type
self.package_path = package_path
- self.package_file_type = vnfd_file_type.lower() if vnfd_file_type else nsd_file_type.lower()
+ self.package_file_type = vnfd_file_type.lower() \
+ if package_type == 'VNFD' else nsd_file_type.lower()
self.proxy = proxy
def convert_to_yang(self):
diff --git a/rwlaunchpad/plugins/rwpkgmgr/rift/tasklets/rwpkgmgr/rpc.py b/rwlaunchpad/plugins/rwpkgmgr/rift/tasklets/rwpkgmgr/rpc.py
index dc0b27a..56dd404 100644
--- a/rwlaunchpad/plugins/rwpkgmgr/rift/tasklets/rwpkgmgr/rpc.py
+++ b/rwlaunchpad/plugins/rwpkgmgr/rift/tasklets/rwpkgmgr/rpc.py
@@ -193,7 +193,7 @@
try:
package_file_type = msg.vnfd_file_type.lower() \
- if msg.vnfd_file_type else msg.nsd_file_type.lower()
+ if msg.package_type == 'VNFD' else msg.nsd_file_type.lower()
self.proxy.package_file_delete(
msg.package_type,
msg.package_id,