#
-# Copyright 2016 RIFT.IO Inc
+# Copyright 2016-2017 RIFT.IO Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
##
# Yang targets
##
+
rift_add_yang_target(
TARGET rwcloud_yang
YANG_FILES rw-cloud.yang rw-sdn.yang
LIBRARIES
rwsdn_yang_gen
rwcal_yang_gen
+ rwproject_yang_gen
+ mano-types_yang_gen
DEPENDS
rwcal_yang
+ rwsdn_yang
+ rwproject_yang
+ mano-types_yang
)
rift_add_yang_target(
COMPONENT ${PKG_LONG_NAME}
LIBRARIES
rwcal_yang_gen
+ rwproject_yang_gen
DEPENDS
rwcal_yang
+ rwproject_yang
)
/*
*
- * Copyright 2016 RIFT.IO Inc
+ * Copyright 2016-2017 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
prefix rw-cloud;
}
+ import rw-project {
+ prefix "rw-project";
+ }
+
import tailf-common {
prefix tailf-common;
}
- tailf-common:annotate "/rw-cloud:cloud/rw-cloud:account/rw-cloud:connection-status" {
+ tailf-common:annotate "/rw-project:project/rw-cloud:cloud/rw-cloud:account/rw-cloud:connection-status" {
tailf-common:callpoint rw_callpoint;
}
/*
*
- * Copyright 2016 RIFT.IO Inc
+ * Copyright 2016-2017 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
prefix "rw-sdn";
}
+ import mano-types {
+ prefix "manotypes";
+ }
+
+ import rw-project {
+ prefix "rw-project";
+ }
+
+ revision 2017-02-08 {
+ description
+ "Update model to support projects.";
+ }
+
revision 2015-09-14 {
description
"Initial revision.";
}
- container cloud {
- rw-pb-ext:msg-new CloudConfig;
- list account {
- rw-pb-ext:msg-new CloudAccount;
- description "Configure Cloud Accounts";
+ augment "/rw-project:project" {
+ container cloud {
+ rw-pb-ext:msg-new CloudConfig;
+ list account {
+ rw-pb-ext:msg-new CloudAcc;
+ description "Configure Cloud Accounts";
- max-elements 16;
- key "name";
+ max-elements 16;
+ key "name";
- leaf name {
- mandatory true;
- type string {
+ leaf name {
+ mandatory true;
+ type string {
length "1..255";
+ }
}
- }
- leaf sdn-account {
- description "Configured SDN account associated with this cloud account";
- type leafref {
- path "/rw-sdn:sdn/rw-sdn:account/rw-sdn:name";
+ leaf sdn-account {
+ description "Configured SDN account associated with this cloud account";
+ type leafref {
+ path "../../../rw-sdn:sdn/rw-sdn:account/rw-sdn:name";
+ }
}
- }
- uses rwcal:provider-auth;
- uses rwcal:connection-status;
+ uses rwcal:provider-auth;
+ uses rwcal:connection-status;
+ }
}
}
"The cloud account name to update connection status for";
type string;
}
+
+ uses manotypes:rpc-project-name;
}
}
/*
*
- * Copyright 2016 RIFT.IO Inc
+ * Copyright 2016-2017 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
prefix tailf-common;
}
- tailf-common:annotate "/rw-config-agent:config-agent/rw-config-agent:account/rw-config-agent:connection-status" {
+ import rw-project {
+ prefix "rw-project";
+ }
+
+ tailf-common:annotate "/rw-project:project/rw-config-agent:config-agent" +
+ "/rw-config-agent:account/rw-config-agent:connection-status" {
tailf-common:callpoint rw_callpoint;
}
/*
*
- * Copyright 2016 RIFT.IO Inc
+ * Copyright 2016-2017 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
prefix "rwcal";
}
+ import rw-project {
+ prefix "rw-project";
+ }
+
+ import mano-types {
+ prefix "manotypes";
+ }
+
+ revision 2017-02-08 {
+ description
+ "Update model to support projects.";
+ }
+
revision 2016-02-04 {
description
"Initial revision.";
}
}
- container config-agent {
- rwpb:msg-new ConfigAgent;
+ augment "/rw-project:project" {
+ container config-agent {
+ rwpb:msg-new ConfigAgent;
- list account {
- rwpb:msg-new ConfigAgentAccount;
- key "name";
+ list account {
+ rwpb:msg-new ConfigAgentAccount;
+ key "name";
- description "List of configuration agent accounts";
+ description "List of configuration agent accounts";
- leaf name {
- description "Name of this config agent account";
- type string;
- }
+ leaf name {
+ description "Name of this config agent account";
+ type string;
+ }
- leaf account-type {
- description
+ leaf account-type {
+ description
"Default account type is Rift Configuration Agent (RiftCA)";
- type config-agent-account-type;
- default "riftca";
- }
+ type config-agent-account-type;
+ default "riftca";
+ }
- choice config-agent-account-type {
- case juju {
- description
- "Configure the VNF through Juju.";
- container juju {
- leaf ip-address {
+ choice config-agent-account-type {
+ case juju {
+ description
+ "Configure the VNF through Juju.";
+ container juju {
+ leaf ip-address {
description "Juju host IP address.";
type inet:ip-address;
- }
- leaf port {
+ }
+ leaf port {
description
- "Juju host port number. Default 17070.";
+ "Juju host port number. Default 17070.";
type inet:port-number;
default 17070;
- }
- leaf user {
+ }
+ leaf user {
description
- "User name to connect to Juju host. Default user-admin.";
+ "User name to connect to Juju host. Default user-admin.";
type string;
default "user-admin" ;
- }
- leaf secret {
+ }
+ leaf secret {
description
- "Admin secret or password for Juju host.";
+ "Admin secret or password for Juju host.";
type string;
+ }
}
}
}
+ uses rwcal:connection-status;
}
- uses rwcal:connection-status;
}
}
"The config agent account name to update connection status for";
type string;
}
+
+ uses manotypes:rpc-project-name;
}
}
}
/*
*
- * Copyright 2016 RIFT.IO Inc
+ * Copyright 2016-2017 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import rw-sdn {
prefix rw-sdn;
}
+
+ import rw-project {
+ prefix "rw-project";
+ }
+
import tailf-common {
prefix tailf-common;
}
- tailf:annotate "/rw-sdn:sdn/rw-sdn:account/rw-sdn:connection-status" {
+ tailf:annotate "/rw-project:project/rw-sdn:sdn/rw-sdn:account/rw-sdn:connection-status" {
tailf-common:callpoint rw_callpoint;
}
/*
*
- * Copyright 2016 RIFT.IO Inc
+ * Copyright 2016-2017 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
prefix "rwpb";
}
+ import mano-types {
+ prefix "manotypes";
+ }
+
+ import rw-project {
+ prefix "rw-project";
+ }
+
import rwsdn {
prefix "rwsdn";
}
+ revision 2017-02-08 {
+ description
+ "Update model to support projects.";
+ }
+
revision 2015-09-14 {
description
"Initial revision.";
}
- container sdn {
- list account {
- rwpb:msg-new SDNAccountConfig;
- key "name";
- leaf name {
- type string;
- }
+ augment "/rw-project:project" {
+ container sdn {
+ list account {
+ rwpb:msg-new SDNAccountConfig;
+ key "name";
+ leaf name {
+ type string;
+ }
- uses rwsdn:sdn-provider-auth;
- uses rwsdn:connection-status;
+ uses rwsdn:sdn-provider-auth;
+ uses rwsdn:connection-status;
+ }
}
}
"The sdn account name to update connection status for";
type string;
}
+
+ uses manotypes:rpc-project-name;
}
}
}
rift/mano/utils/__init.py__
rift/mano/utils/compare_desc.py
rift/mano/utils/juju_api.py
+ rift/mano/utils/project.py
COMPONENT ${PKG_LONG_NAME}
PYTHON3_ONLY
)
#
-# Copyright 2016 RIFT.IO Inc
+# Copyright 2016-2017 RIFT.IO Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
class CloudAccountConfigSubscriber(object):
- XPATH = "C,/rw-cloud:cloud/rw-cloud:account"
+ XPATH = "C,/rw-project:project/rw-cloud:cloud/rw-cloud:account"
def __init__(self, dts, log, rwlog_hdl, cloud_callbacks):
self._dts = dts
#
-# Copyright 2016 RIFT.IO Inc
+# Copyright 2016-2017 RIFT.IO Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
def _register_show_status(self):
def get_xpath(cloud_name=None):
- return "D,/rw-cloud:cloud/account{}/connection-status".format(
+ return "D,/rw-project:project/rw-cloud:cloud/account{}/connection-status".format(
"[name='%s']" % cloud_name if cloud_name is not None else ''
)
--- /dev/null
+#!/usr/bin/env python3
+
+#
+# Copyright 2017 RIFT.IO Inc
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+
+class ManoProjectError(Exception):
+ pass
+
+
+class ManoProjNameSetErr(ManoProjectError):
+ pass
+
+
+class ManoProjXpathNoProjErr(ManoProjectError):
+ pass
+
+
+class ManoProjXpathKeyErr(ManoProjectError):
+ pass
+
+
+class ManoProject(object):
+ '''Class to handle the project name'''
+
+ NS = 'rw-project'
+ XPATH = '/{}:project'.format(NS)
+ XPATH_LEN = len(XPATH)
+
+ NAME = 'name'
+ NAME_LEN = len(NAME)
+ NS_NAME = '{}:{}'.format(NS, NAME)
+
+ @classmethod
+ def create_from_xpath(cls, xpath, log):
+ name = cls.from_xpath(xpath, log)
+ if name is None:
+ return None
+
+ proj = ManoProject(log, name=name)
+ return proj
+
+ @classmethod
+ def from_xpath(cls, xpath, log):
+ log.debug("Get project name from {}".format(xpath));
+
+ if cls.XPATH in xpath:
+ idx = xpath.find(cls.XPATH) + cls.XPATH_LEN
+ if idx == -1:
+ msg = "Project not found in XPATH: {}".format(xpath)
+ log.error(msg)
+ raise ManoProjXpathNoProjErr(msg)
+
+ sub = xpath[idx:]
+ sub = sub.strip()
+ if (len(sub) < cls.NAME_LEN) or (sub[0] != '['):
+ msg = "Project name not found in XPath: {}".format(xpath)
+ log.error(msg)
+ raise ManoProjXpathKeyErr(msg)
+
+ sub = sub[1:].strip()
+ idx = sub.find(cls.NS_NAME)
+ if idx == -1:
+ idx = sub.find(cls.NAME)
+ if idx != 0:
+ msg = "Project name not found in XPath: {}".format(xpath)
+ log.error(msg)
+ raise ManoProjXpathKeyErr(msg)
+
+ idx = sub.find(']')
+ if idx == -1:
+ msg = "XPath is invalid: {}".format(xpath)
+ log.error(msg)
+ raise ManoProjXpathKeyErr(msg)
+
+ sub = sub[:idx-1].strip()
+ try:
+ k, n = sub.split("=", 2)
+ name = n.strip()
+ if name is None:
+ msg = "Project name is empty in XPath".format(xpath)
+ log.error(msg)
+ raise ManoProjXpathKeyErr (msg)
+
+ log.debug("Found project name {} from XPath {}".
+ format(name, xpath))
+ return name
+
+ except ValueError as e:
+ msg = "Project name not found in XPath: {}, exception: {}" \
+ .format(xpath, e)
+ log.exception(msg)
+ raise ManoProjXpathKeyErr(msg)
+
+ def __init__(self, log, name=None):
+ self._log = log
+ self._name = name
+
+ @property
+ def name(self):
+ return self._name
+
+ @name.setter
+ def name(self, value):
+ if self._name is None:
+ self._name = value
+ else:
+ msg = "Project name already set to {}".format(self._name)
+ self._log.error(msg)
+ raise ManoProjNameSetErr(msg)
+
+ def set_from_xpath(self, xpath):
+ self.name = ManoProject.get_from_xpath(xpath, self._log)
#!/usr/bin/env python3
#
-# Copyright 2016 RIFT.IO Inc
+# Copyright 2016-2017 RIFT.IO Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
import argparse
+import simplejson
import os
+import yaml
import shutil
import sys
import uuid
+from xml.dom.minidom import parseString
+
import gi
gi.require_version('RwYang', '1.0')
+gi.require_version('RwProjectYang', '1.0')
gi.require_version('RwVnfdYang', '1.0')
gi.require_version('VnfdYang', '1.0')
gi.require_version('RwNsdYang', '1.0')
RwVnfdYang,
VnfdYang,
RwYang,
+ RwProjectYang,
)
for module in module_list:
model.load_module(module)
- if output_format == 'json':
- with open('%s/%s.json' % (outdir, self.name), "w") as fh:
- fh.write(self.descriptor.to_json(model))
+ # Need to extract the catalog part to dump as descriptor
+ if output_format in ['json', 'yaml']:
+ # Convert to yaml instead of directly using as_dict as
+ # this adds the namespaces correctly
+ ya = self.descriptor.to_yaml(model)
+ proj = yaml.load(ya)
+ desc = proj['rw-project:project'][0]
+
+ if output_format == 'json':
+ with open('%s/%s.json' % (outdir, self.name), "w") as fh:
+ fh.write(simplejson.dumps(desc, indent=4))
+ elif output_format.strip() == 'yaml':
+ with open('%s/%s.yaml' % (outdir, self.name), "w") as fh:
+ fh.write(yaml.dump(desc, default_flow_style=False))
elif output_format.strip() == 'xml':
+ # Converting from dict to xml does not provide the
+ # required output. So using the PBCM to_xml and then
+ # printing only from the catalog tag.
with open('%s/%s.xml' % (outdir, self.name), "w") as fh:
- fh.write(self.descriptor.to_xml_v2(model))
- elif output_format.strip() == 'yaml':
- with open('%s/%s.yaml' % (outdir, self.name), "w") as fh:
- fh.write(self.descriptor.to_yaml(model))
+ proj = self.descriptor.to_xml_v2(model)
+ dom = parseString(proj)
+ desc = dom.getElementsByTagName("vnfd:vnfd-catalog")
+ if not desc:
+ desc = dom.getElementsByTagName("nsd:nsd-catalog")
+ fh.write(desc[0].toprettyxml())
else:
raise Exception("Invalid output format for the descriptor")
def compose(self, image_name, cloud_init="", cloud_init_file="", endpoint=None, mon_params=[],
mon_port=8888, mgmt_port=8888, num_vlr_count=1, num_ivlr_count=1,
num_vms=1, image_md5sum=None, mano_ut=False):
- self.descriptor = RwVnfdYang.YangData_Vnfd_VnfdCatalog()
+ self.descriptor = RwVnfdYang.YangData_RwProject_Project_VnfdCatalog()
self.id = str(uuid.uuid1())
vnfd = self.descriptor.vnfd.add()
vnfd.id = self.id
cp.name = '%s/cp%d' % (self.name, i)
if endpoint is not None:
- endp = VnfdYang.YangData_Vnfd_VnfdCatalog_Vnfd_HttpEndpoint(
+ endp = VnfdYang.YangData_RwProject_Project_VnfdCatalog_Vnfd_HttpEndpoint(
path=endpoint, port=mon_port, polling_interval_secs=2
)
vnfd.http_endpoint.append(endp)
# Monitoring params
for monp_dict in mon_params:
- monp = VnfdYang.YangData_Vnfd_VnfdCatalog_Vnfd_MonitoringParam.from_dict(monp_dict)
+ monp = VnfdYang.YangData_RwProject_Project_VnfdCatalog_Vnfd_MonitoringParam.from_dict(monp_dict)
monp.http_endpoint_ref = endpoint
vnfd.monitoring_param.append(monp)
dirpath = "%s/%s" % (outdir, self.name)
if not os.path.exists(dirpath):
os.makedirs(dirpath)
- super(VirtualNetworkFunction, self).write_to_file(['vnfd', 'rw-vnfd'],
+ super(VirtualNetworkFunction, self).write_to_file(['rw-project', 'vnfd', 'rw-vnfd'],
dirpath,
output_format)
self.add_scripts(outdir)
self._placement_groups.append(placement_group)
def create_mon_params(self, vnfds):
- NsdMonParam = NsdYang.YangData_Nsd_NsdCatalog_Nsd_MonitoringParam
+ NsdMonParam = NsdYang.YangData_RwProject_Project_NsdCatalog_Nsd_MonitoringParam
param_id = 1
for vnfd_obj in vnfds:
for mon_param in vnfd_obj.vnfd.monitoring_param:
use_ns_init_conf = False
use_vnf_init_conf = False
- self.descriptor = RwNsdYang.YangData_Nsd_NsdCatalog()
+ self.descriptor = RwNsdYang.YangData_RwProject_Project_NsdCatalog()
self.id = str(uuid.uuid1())
nsd = self.descriptor.nsd.add()
self.nsd = nsd
nsd.description = 'Toy NS'
nsd.version = '1.0'
nsd.input_parameter_xpath.append(
- NsdYang.YangData_Nsd_NsdCatalog_Nsd_InputParameterXpath(
+ NsdYang.YangData_RwProject_Project_NsdCatalog_Nsd_InputParameterXpath(
xpath="/nsd:nsd-catalog/nsd:nsd/nsd:vendor",
)
)
vld.ip_profile_ref = 'InterVNFLink'
for cp in cpgroup:
cpref = vld.vnfd_connection_point_ref.add()
- cpref.member_vnf_index_ref = cp[0]
+ cpref.member_vnf_index_ref = str(cp[0])
cpref.vnfd_id_ref = cp[1]
cpref.vnfd_connection_point_ref = cp[2]
for member_vnfd in placement_group.vnfd_list:
member = group.member_vnfd.add()
member.vnfd_id_ref = member_vnfd.descriptor.vnfd[0].id
- member.member_vnf_index_ref = vnfd_index_map[member_vnfd]
+ member.member_vnf_index_ref = str(vnfd_index_map[member_vnfd])
# self.create_mon_params(vnfd_list)
if not os.path.exists(dirpath):
os.makedirs(dirpath)
- super(NetworkService, self).write_to_file(["nsd", "rw-nsd"],
+ super(NetworkService, self).write_to_file(["rw-project", "nsd", "rw-nsd"],
dirpath,
output_format)
#!/usr/bin/env python3
#
-# Copyright 2016 RIFT.IO Inc
+# Copyright 2016-2017 RIFT.IO Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
gi.require_version('RwYang', '1.0')
gi.require_version('RwVnfdYang', '1.0')
gi.require_version('RwNsdYang', '1.0')
+gi.require_version('RwProjectYang', '1.0')
from gi.repository import (
RwYang,
RwVnfdYang,
RwNsdYang,
+ RwProjectYang,
)
logging.basicConfig(level=logging.WARNING)
return vnf_name
def openmano2rift(self, vnf_list):
- self.descriptor = RwNsdYang.YangData_Nsd_NsdCatalog()
+ self.descriptor = RwNsdYang.YangData_RwProject_Project_NsdCatalog()
openmano_nsd = self.openmano.dictionary
self.name = openmano_nsd['name']
nsd = self.descriptor.nsd.add()
if topo_node['type'] == 'VNF':
cpref = vld.vnfd_connection_point_ref.add()
cpref.from_dict(dict(
- member_vnf_index_ref=vnf_member_index_dict[node_key],
+ member_vnf_index_ref=str(vnf_member_index_dict[node_key]),
vnfd_id_ref=self.get_vnfd_id(vnf_list, topo_node['VNF model']),
#vnfd_id_ref=topo_node['VNF model'],
vnfd_connection_point_ref=node[node_key],
return None
def openmano2rift(self):
- self.descriptor = RwVnfdYang.YangData_Vnfd_VnfdCatalog()
+ self.descriptor = RwVnfdYang.YangData_RwProject_Project_VnfdCatalog()
vnfd = self.descriptor.vnfd.add()
self.vnfd = vnfd
vnfd.id = str(uuid.uuid1())
ns_list = create_ns_from_yaml_files(args.yaml_file_hdls, vnf_list)
writer = DescriptorFileWriter(
- module_list=['nsd', 'rw-nsd', 'vnfd', 'rw-vnfd'],
+ module_list=['rw-project', 'nsd', 'rw-nsd', 'vnfd', 'rw-vnfd'],
output_dir=args.outdir,
output_format=args.format,
)
#
-# Copyright 2016 RIFT.IO Inc
+# Copyright 2016-2017 RIFT.IO Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
vnffgd.yang
)
+rift_add_yang_target(
+ TARGET rwproject_yang
+ YANG_FILES
+ rw-project.yang
+ GIR_PATHS ${CMAKE_CURRENT_BINARY_DIR}
+ COMPONENT ${PKG_LONG_NAME}
+ )
+
rift_add_yang_target(
TARGET mano-types_yang
YANG_FILES
mano-types.yang
COMPONENT ${PKG_LONG_NAME}
+ LIBRARIES
+ rwproject_yang_gen
+ DEPENDS
+ rwproject_yang
)
rift_add_yang_target(
rwcloud_yang_gen
rwconfig_agent_yang_gen
mano-types_yang_gen
+ rwproject_yang_gen
DEPENDS
rwcloud_yang
rwconfig_agent_yang
+ rwproject_yang
)
#rift_gen_yang_tree(mano-pyang-trees
/*
*
- * Copyright 2016 RIFT.IO Inc
+ * Copyright 2016-2017 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
prefix "rwpb";
}
+ import rw-project {
+ prefix "rw-project";
+ }
+
+ revision 2017-02-08 {
+ description
+ "Update model to support projects.";
+ }
+
revision 2015-04-23 {
description
"Initial revision. This YANG file defines
}
}
+
+ grouping rpc-project-name {
+ leaf project-name {
+ mandatory true;
+ description
+ "Project to which this belongs";
+ type leafref {
+ path "/rw-project:project/rw-project:name";
+ }
+ }
+ }
}
/*
*
- * Copyright 2016 RIFT.IO Inc
+ * Copyright 2016-2017 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
prefix "manotypes";
}
+ import rw-project {
+ prefix "rw-project";
+ }
+
+ revision 2017-02-08 {
+ description
+ "Update model to support projects.";
+ }
+
revision 2014-10-27 {
description
"Initial revision. This YANG file defines
}
}
- grouping nsd-descriptor {
+ grouping nsd-descriptor-common {
leaf id {
description "Identifier for the NSD.";
type string;
}
}
- /* Still having issues modelling this,
- see the comments under vnfd-connection-point-ref
- */
- list vld {
- description
- "List of Virtual Link Descriptors.";
-
- key "id";
-
- leaf id {
- description
- "Identifier for the VLD.";
- type string;
- }
-
- leaf name {
- description
- "Virtual Link Descriptor (VLD) name.";
- type string;
- }
-
- leaf short-name {
- description
- "Short name for VLD for UI";
- type string;
- }
-
- leaf vendor {
- description "Provider of the VLD.";
- type string;
- }
-
- leaf description {
- description "Description of the VLD.";
- type string;
- }
-
- leaf version {
- description "Version of the VLD";
- type string;
- }
-
- leaf type {
- type manotypes:virtual-link-type;
- }
-
- leaf root-bandwidth {
- description
- "For ELAN this is the aggregate bandwidth.";
- type uint64;
- }
-
- leaf leaf-bandwidth {
- description
- "For ELAN this is the bandwidth of branches.";
- type uint64;
- }
-
- list vnfd-connection-point-ref {
- description
- "A list of references to connection points.";
- key "member-vnf-index-ref vnfd-connection-point-ref";
-
- leaf member-vnf-index-ref {
- description "Reference to member-vnf within constituent-vnfds";
- type leafref {
- path "../../../constituent-vnfd/member-vnf-index";
- }
- }
-
- leaf vnfd-id-ref {
- description
- "A reference to a vnfd. This is a
- leafref to path:
- ../../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 resovled this will switched to use
- leafref";
- type leafref {
- path "../../../constituent-vnfd" +
- "[member-vnf-index = current()/../member-vnf-index-ref]" +
- "/vnfd-id-ref";
- }
- }
-
- leaf vnfd-connection-point-ref {
- description "A reference to a connection point name";
- type leafref {
- path "/vnfd:vnfd-catalog/vnfd:vnfd" +
- "[vnfd:id = current()/../vnfd-id-ref]/" +
- "vnfd:connection-point/vnfd:name";
- }
- }
- }
-
- // replicate for pnfd container here
- uses manotypes:provider-network;
-
- leaf mgmt-network {
- description "Flag indicating whether this network is a VIM management network";
- type boolean;
- default false;
- }
-
- choice init-params {
- description "Extra parameters for VLD instantiation";
-
- case vim-network-ref {
- leaf vim-network-name {
- description
- "Name of network in VIM account. This is used to indicate
- pre-provisioned network name in cloud account.";
- type string;
- }
- }
-
- case vim-network-profile {
- leaf ip-profile-ref {
- description "Named reference to IP-profile object";
- type string;
- }
- }
-
- }
- }
-
- list constituent-vnfd {
- description
- "List of VNFDs that are part of this
- network service.";
-
- key "member-vnf-index";
-
- 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";
- type uint64;
- }
-
- leaf vnfd-id-ref {
- description
- "Identifier for the VNFD.";
- type leafref {
- path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
- }
- }
-
- leaf start-by-default {
- description
- "VNFD is started as part of the NS instantiation";
- type boolean;
- default true;
- }
- }
-
list scaling-group-descriptor {
description
"scaling group descriptor within this network service.
leaf scale-in-operation-type {
description
- "Operation to be applied to check between scaling criterias to
+ "Operation to be applied to check between scaling criterias to
check if the scale in threshold condition has been met.
Defaults to AND";
type scaling-criteria-operation;
leaf scale-out-operation-type {
description
- "Operation to be applied to check between scaling criterias to
+ "Operation to be applied to check between scaling criterias to
check if the scale out threshold condition has been met.
Defauls to OR";
type scaling-criteria-operation;
}
leaf ns-monitoring-param-ref {
- description
+ description
"Reference to the NS level monitoring parameter
that is aggregated";
type leafref {
}
}
- list placement-groups {
- description "List of placement groups at NS level";
-
- key "name";
- uses manotypes:placement-group-info;
-
- list member-vnfd {
- description
- "List of VNFDs that are part of this placement group";
-
- key "member-vnf-index-ref";
-
- leaf member-vnf-index-ref {
- description "member VNF index of this member VNF";
- type leafref {
- path "../../../constituent-vnfd/member-vnf-index";
- }
- }
-
- leaf vnfd-id-ref {
- description
- "Identifier for the VNFD.";
- type leafref {
- path "../../../constituent-vnfd" +
- "[member-vnf-index = current()/../member-vnf-index-ref]" +
- "/vnfd-id-ref";
- }
- }
- }
- }
-
- uses manotypes:ip-profile-list;
-
- list vnf-dependency {
- description
- "List of VNF dependencies.";
- key vnf-source-ref;
- leaf vnf-source-ref {
- type leafref {
- path "../../constituent-vnfd/vnfd-id-ref";
- }
- }
- leaf vnf-depends-on-ref {
- description
- "Reference to VNF that sorce VNF depends.";
- type leafref {
- path "../../constituent-vnfd/vnfd-id-ref";
- }
- }
- }
list vnffgd {
description
list rsp {
description
- "List of Rendered Service Paths (RSP).";
+ "List of Rendered Service Paths (RSP).";
key "id";
leaf id {
description
- "Identifier for the RSP.";
+ "Identifier for the RSP.";
type string;
}
leaf name {
description
- "RSP name.";
+ "RSP name.";
type string;
}
list vnfd-connection-point-ref {
description
- "A list of references to connection points.";
+ "A list of references to connection points.";
key "member-vnf-index-ref";
leaf member-vnf-index-ref {
leaf order {
type uint8;
description
- "A number that denotes the order of a VNF in a chain";
+ "A number that denotes the order of a VNF in a chain";
}
- leaf vnfd-id-ref {
- description
- "A reference to a vnfd. This is a
+ leaf vnfd-id-ref {
+ description
+ "A reference to a vnfd. This is a
leafref to path:
../../../../nsd:constituent-vnfd
+ [nsd:id = current()/../nsd:id-ref]
}
}
- leaf vnfd-connection-point-ref {
- description
- "A reference to a connection point name
+ leaf vnfd-connection-point-ref {
+ description
+ "A reference to a connection point name
in a vnfd. This is a leafref to path:
/vnfd:vnfd-catalog/vnfd:vnfd
+ [vnfd:id = current()/../nsd:vnfd-id-ref]
to leafref, whose target is in a different module.
Once that is resovled this will switched to use
leafref";
- type leafref {
- path "/vnfd:vnfd-catalog/vnfd:vnfd" +
- "[vnfd:id = current()/../vnfd-id-ref]/" +
- "vnfd:connection-point/vnfd:name";
- }
+ // TODO: Keeping as string as this needs to be
+ // diffenent lvel based of if it is nsd-catalog or
+ // in nsr.
+ // type leafref {
+ // path "../../../../../../vnfd:vnfd-catalog/vnfd:vnfd" +
+ // "[vnfd:id = current()/../vnfd-id-ref]/" +
+ // "vnfd:connection-point/vnfd:name";
+ // }
+ type string;
}
}
} //rsp
to leafref, whose target is in a different module.
Once that is resovled this will switched to use
leafref";
- type leafref {
- path "/vnfd:vnfd-catalog/vnfd:vnfd" +
- "[vnfd:id = current()/../vnfd-id-ref]/" +
- "vnfd:connection-point/vnfd:name";
- }
+ // TODO: Keeping as string as this needs to be
+ // diffenent lvel based of if it is nsd-catalog or
+ // in nsr.
+ // type leafref {
+ // path "../../../../../vnfd:vnfd-catalog/vnfd:vnfd" +
+ // "[vnfd:id = current()/../vnfd-id-ref]/" +
+ // "vnfd:connection-point/vnfd:name";
+ // }
+ type string;
}
list match-attributes {
} // classifier
} // vnffgd
- list monitoring-param {
- description
- "List of monitoring parameters from VNF's that should be
- propogated up into NSR";
- key "id";
-
- leaf id {
- type string;
- }
-
- leaf name {
- type string;
- }
-
- uses manotypes:monitoring-param-value;
- uses manotypes:monitoring-param-ui-data;
- uses manotypes:monitoring-param-aggregation;
-
- list vnfd-monitoring-param {
- description "A list of VNFD monitoring params";
- key "member-vnf-index-ref vnfd-monitoring-param-ref";
-
- leaf vnfd-id-ref {
- description
- "A reference to a vnfd. This is a
- leafref to path:
- ../../../../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";
+ uses manotypes:ip-profile-list;
- type leafref {
- path "../../../constituent-vnfd" +
- "[member-vnf-index = current()/../member-vnf-index-ref]" +
- "/vnfd-id-ref";
- }
- }
+ uses manotypes:ns-service-primitive;
- leaf vnfd-monitoring-param-ref {
- description "A reference to the VNFD monitoring param";
- type leafref {
- path "/vnfd:vnfd-catalog/vnfd:vnfd"
- + "[vnfd:id = current()/../vnfd-id-ref]"
- + "/vnfd:monitoring-param/vnfd:id";
- }
- }
+ list initial-config-primitive {
+ rwpb:msg-new NsdInitialConfigPrimitive;
+ description
+ "Initial set of configuration primitives for NSD.";
+ key "seq";
- leaf member-vnf-index-ref {
- description
- "Mandatory reference to member-vnf within constituent-vnfds";
- type leafref {
- path "../../../constituent-vnfd/member-vnf-index";
- }
- }
- }
+ uses manotypes:initial-config;
}
uses manotypes:input-parameter-xpath;
}
}
- uses manotypes:ns-service-primitive;
-
- list initial-config-primitive {
- rwpb:msg-new NsdInitialConfigPrimitive;
- description
- "Initial set of configuration primitives for NSD.";
- key "seq";
-
- uses manotypes:initial-config;
- }
-
list key-pair {
key "name";
description "Used to configure the list of public keys to be injected as part
}
}
-
- container nsd-catalog {
-
- list nsd {
+ grouping nsd-vld-common {
+ /* Still having issues modelling this,
+ see the comments under vnfd-connection-point-ref
+ */
+ description
+ "List of Virtual Link Descriptors.";
+
+ leaf id {
+ description
+ "Identifier for the VLD.";
+ type string;
+ }
+
+ leaf name {
+ description
+ "Virtual Link Descriptor (VLD) name.";
+ type string;
+ }
+
+ leaf short-name {
+ description
+ "Short name for VLD for UI";
+ type string;
+ }
+
+ leaf vendor {
+ description "Provider of the VLD.";
+ type string;
+ }
+
+ leaf description {
+ description "Description of the VLD.";
+ type string;
+ }
+
+ leaf version {
+ description "Version of the VLD";
+ type string;
+ }
+
+ leaf type {
+ type manotypes:virtual-link-type;
+ }
+
+ leaf root-bandwidth {
+ description
+ "For ELAN this is the aggregate bandwidth.";
+ type uint64;
+ }
+
+ leaf leaf-bandwidth {
+ description
+ "For ELAN this is the bandwidth of branches.";
+ type uint64;
+ }
+
+ // replicate for pnfd container here
+ uses manotypes:provider-network;
+
+ leaf mgmt-network {
+ description "Flag indicating whether this network is a VIM management network";
+ type boolean;
+ default false;
+ }
+
+ choice init-params {
+ description "Extra parameters for VLD instantiation";
+
+ case vim-network-ref {
+ leaf vim-network-name {
+ description
+ "Name of network in VIM account. This is used to indicate
+ pre-provisioned network name in cloud account.";
+ type string;
+ }
+ }
+
+ case vim-network-profile {
+ leaf ip-profile-ref {
+ description "Named reference to IP-profile object";
+ type string;
+ }
+ }
+
+ }
+ }
+
+ grouping nsd-vld {
+ list vld {
+
+ key "id";
+
+ uses nsd-vld-common;
+
+ list vnfd-connection-point-ref {
+ description
+ "A list of references to connection points.";
+ key "member-vnf-index-ref vnfd-connection-point-ref";
+
+ leaf member-vnf-index-ref {
+ description "Reference to member-vnf within constituent-vnfds";
+ type leafref {
+ path "../../../constituent-vnfd/member-vnf-index";
+ }
+ }
+
+ leaf vnfd-id-ref {
+ description
+ "A reference to a vnfd. This is a
+ leafref to path:
+ ../../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 resovled this will switched to use
+ leafref";
+ type string;
+ }
+
+ leaf vnfd-connection-point-ref {
+ description "A reference to a connection point name";
+ type leafref {
+ path "../../../../../vnfd:vnfd-catalog/vnfd:vnfd" +
+ "[vnfd:id = current()/../vnfd-id-ref]/" +
+ "vnfd:connection-point/vnfd:name";
+ }
+ }
+ }
+ }
+ }
+
+ grouping nsr-nsd-vld {
+ list vld {
+
+ key "id";
+
+ uses nsd-vld-common;
+
+ list vnfd-connection-point-ref {
+ description
+ "A list of references to connection points.";
+ key "member-vnf-index-ref vnfd-connection-point-ref";
+
+ leaf member-vnf-index-ref {
+ description "Reference to member-vnf within constituent-vnfds";
+ type leafref {
+ path "../../../constituent-vnfd/member-vnf-index";
+ }
+ }
+
+ leaf vnfd-id-ref {
+ description
+ "A reference to a vnfd. This is a
+ leafref to path:
+ ../../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 resovled this will switched to use
+ leafref";
+ type string;
+ }
+
+ leaf vnfd-connection-point-ref {
+ description "A reference to a connection point name";
+ type leafref {
+ path "../../../../../../vnfd:vnfd-catalog/vnfd:vnfd" +
+ "[vnfd:id = current()/../vnfd-id-ref]/" +
+ "vnfd:connection-point/vnfd:name";
+ }
+ }
+ }
+ }
+ }
+
+ grouping nsd-constituent-vnfd {
+ list constituent-vnfd {
+ description
+ "List of VNFDs that are part of this
+ network service.";
+
+ key "member-vnf-index";
+
+ 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";
+ type uint64;
+ }
+
+ leaf vnfd-id-ref {
+ description
+ "Identifier for the VNFD.";
+ type leafref {
+ path "../../../../vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
+ }
+ }
+
+ leaf start-by-default {
+ description
+ "VNFD is started as part of the NS instantiation";
+ type boolean;
+ default true;
+ }
+ }
+ }
+
+ grouping nsr-nsd-constituent-vnfd {
+ list constituent-vnfd {
+ description
+ "List of VNFDs that are part of this
+ network service.";
+
+ key "member-vnf-index";
+
+ 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";
+ type uint64;
+ }
+
+ leaf vnfd-id-ref {
+ description
+ "Identifier for the VNFD.";
+ type leafref {
+ path "../../../../../vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
+ }
+ }
+
+ leaf start-by-default {
+ description
+ "VNFD is started as part of the NS instantiation";
+ type boolean;
+ default true;
+ }
+ }
+ }
+
+ grouping nsd-placement-groups {
+ list placement-groups {
+ description "List of placement groups at NS level";
+
+ key "name";
+ uses manotypes:placement-group-info;
+
+ list member-vnfd {
+ description
+ "List of VNFDs that are part of this placement group";
+
+ key "member-vnf-index-ref";
+
+ leaf member-vnf-index-ref {
+ description "member VNF index of this member VNF";
+ type leafref {
+ path "../../../constituent-vnfd/member-vnf-index";
+ }
+ }
+
+ leaf vnfd-id-ref {
+ description
+ "Identifier for the VNFD.";
+ type leafref {
+ path "../../../../../vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
+ }
+ }
+ }
+ }
+ }
+
+ grouping nsr-nsd-placement-groups {
+ list placement-groups {
+ description "List of placement groups at NS level";
+
+ key "name";
+ uses manotypes:placement-group-info;
+
+ list member-vnfd {
+ description
+ "List of VNFDs that are part of this placement group";
+
+ key "member-vnf-index-ref";
+
+ leaf member-vnf-index-ref {
+ description "member VNF index of this member VNF";
+ type leafref {
+ path "../../../constituent-vnfd/member-vnf-index";
+ }
+ }
+
+ leaf vnfd-id-ref {
+ description
+ "Identifier for the VNFD.";
+ type leafref {
+ path "../../../../../../vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
+ }
+ }
+ }
+ }
+ }
+
+ grouping nsd-vnf-dependency {
+ list vnf-dependency {
+ description
+ "List of VNF dependencies.";
+ key vnf-source-ref;
+ leaf vnf-source-ref {
+ type leafref {
+ path "../../../../vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
+ }
+ }
+ leaf vnf-depends-on-ref {
+ description
+ "Reference to VNF that sorce VNF depends.";
+ type leafref {
+ path "../../../../vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
+ }
+ }
+ }
+ }
+
+ grouping nsr-nsd-vnf-dependency {
+ list vnf-dependency {
+ description
+ "List of VNF dependencies.";
+ key vnf-source-ref;
+ leaf vnf-source-ref {
+ type leafref {
+ path "../../../../../vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
+ }
+ }
+ leaf vnf-depends-on-ref {
+ description
+ "Reference to VNF that sorce VNF depends.";
+ type leafref {
+ path "../../../../../vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
+ }
+ }
+ }
+ }
+
+ grouping monitoring-param-common {
+ // list monitoring-param {
+ description
+ "List of monitoring parameters from VNF's that should be
+ propogated up into NSR";
+ leaf id {
+ type string;
+ }
+
+ leaf name {
+ type string;
+ }
+
+ uses manotypes:monitoring-param-value;
+ uses manotypes:monitoring-param-ui-data;
+ uses manotypes:monitoring-param-aggregation;
+ }
+
+ grouping nsd-monitoring-param {
+
+ list monitoring-param {
key "id";
- uses nsd-descriptor;
+ uses monitoring-param-common;
+
+ list vnfd-monitoring-param {
+ description "A list of VNFD monitoring params";
+ key "vnfd-id-ref vnfd-monitoring-param-ref";
+
+ leaf vnfd-id-ref {
+ description
+ "A reference to a vnfd. This is a
+ leafref to path:
+ ../../../../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";
+
+ type yang:uuid;
+ }
+
+ leaf vnfd-monitoring-param-ref {
+ description "A reference to the VNFD monitoring param";
+ type leafref {
+ path "../../../../../vnfd:vnfd-catalog/vnfd:vnfd"
+ + "[vnfd:id = current()/../vnfd-id-ref]"
+ + "/vnfd:monitoring-param/vnfd:id";
+ }
+ }
+
+ leaf-list member-vnf-index-ref {
+ description
+ "Optional reference to member-vnf within constituent-vnfds";
+ type uint64;
+ }
+ }
+ }
+ }
+
+ grouping nsr-nsd-monitoring-param {
+ list monitoring-param {
+ key "id";
+
+ uses monitoring-param-common;
+
+ list vnfd-monitoring-param {
+ description "A list of VNFD monitoring params";
+ key "vnfd-id-ref vnfd-monitoring-param-ref";
+
+ leaf vnfd-id-ref {
+ description
+ "A reference to a vnfd. This is a
+ leafref to path:
+ ../../../../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";
+
+ type yang:uuid;
+ }
+
+ leaf vnfd-monitoring-param-ref {
+ description "A reference to the VNFD monitoring param";
+ type leafref {
+ path "../../../../../../vnfd:vnfd-catalog/vnfd:vnfd"
+ + "[vnfd:id = current()/../vnfd-id-ref]"
+ + "/vnfd:monitoring-param/vnfd:id";
+ }
+ }
+
+ leaf-list member-vnf-index-ref {
+ description
+ "Optional reference to member-vnf within constituent-vnfds";
+ type uint64;
+ }
+ }
}
}
+
+ augment "/rw-project:project" {
+ container nsd-catalog {
+
+ list nsd {
+ key "id";
+
+ uses nsd-descriptor-common;
+
+ uses nsd-vld;
+
+ uses nsd-constituent-vnfd;
+
+ uses nsd-placement-groups;
+
+ uses nsd-vnf-dependency;
+
+ uses nsd-monitoring-param;
+ }
+ }
+ }
}
/*
*
- * Copyright 2016 RIFT.IO Inc
+ * Copyright 2016-2017 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
prefix nsr;
}
- tailf:annotate "/nsr:ns-instance-opdata" {
+ import rw-project {
+ prefix "rw-project";
+ }
+
+ tailf:annotate "/rw-project:project/nsr:ns-instance-opdata" {
tailf:callpoint rw_callpoint;
}
tailf:annotate "/nsr:exec-ns-service-primitive" {
/*
*
- * Copyright 2016 RIFT.IO Inc
+ * Copyright 2016-2017 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
import rw-sdn {
- prefix "rwsdn";
+ prefix "rw-sdn";
+ }
+
+ import rw-project {
+ prefix "rw-project";
+ }
+
+ revision 2017-02-08 {
+ description
+ "Update model to support projects.";
}
revision 2015-09-10 {
}
}
- grouping cloud-config {
- description "List of cloud config parameters";
-
- list ssh-authorized-key {
- key "key-pair-ref";
-
- description "List of authorized ssh keys as part of cloud-config";
-
- leaf key-pair-ref {
- description "A reference to the key pair entry in the global key pair table";
- type leafref {
- path "/nsr:key-pair/nsr:name";
- }
- }
- }
- list user {
+ augment "/rw-project:project" {
+ list key-pair {
key "name";
-
- description "List of users to be added through cloud-config";
+ description "Used to configure the list of public keys to be injected as part
+ of ns instantiation";
leaf name {
- description "Name of the user ";
- type string;
- }
- leaf user-info {
- description "The user name's real name";
+ description "Name of this key pair";
type string;
}
- list ssh-authorized-key {
- key "key-pair-ref";
- description "Used to configure the list of public keys to be injected as part
- of ns instantiation";
-
- leaf key-pair-ref {
- description "A reference to the key pair entry in the global key pair table";
- type leafref {
- path "/nsr:key-pair/nsr:name";
- }
- }
+ leaf key {
+ description "Key associated with this key pair";
+ type string;
}
}
}
- list key-pair {
- key "name";
- 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";
- type string;
- }
+ augment "/rw-project:project" {
+ container ns-instance-config {
- leaf key {
- description "Key associated with this key pair";
- type string;
- }
- }
+ list nsr {
+ key "id";
+ unique "name";
- rpc start-network-service {
- description "Start the network service";
- input {
- leaf name {
- mandatory true;
- description "Name of the Network Service";
- type string;
- }
- leaf nsd-ref {
- description "Reference to NSR ID ref";
- mandatory true;
- type leafref {
- path "/nsd:nsd-catalog/nsd:nsd/nsd:id";
+ leaf id {
+ description "Identifier for the NSR.";
+ type yang:uuid;
}
- }
- uses ns-instance-config-params;
- }
- output {
- leaf nsr-id {
- description "Automatically generated parameter";
- type yang:uuid;
- }
- }
- }
+ leaf name {
+ description "NSR name.";
+ type string;
+ }
+ leaf short-name {
+ description "NSR short name.";
+ type string;
+ }
+ leaf description {
+ description "NSR description.";
+ type string;
+ }
- container ns-instance-config {
+ leaf admin-status {
+ description
+ "This is the administrative status of the NS instance";
- list nsr {
- key "id";
- unique "name";
+ type enumeration {
+ enum ENABLED;
+ enum DISABLED;
+ }
+ }
- leaf id {
- description "Identifier for the NSR.";
- type yang:uuid;
- }
+ container nsd {
+ description "NS descriptor used to instantiate this NS";
- leaf name {
- description "NSR name.";
- type string;
- }
+ uses nsd:nsd-descriptor-common;
- leaf short-name {
- description "NSR short name.";
- type string;
- }
+ uses nsd:nsr-nsd-vld;
- leaf description {
- description "NSR description.";
- type string;
- }
+ uses nsd:nsr-nsd-constituent-vnfd;
- leaf admin-status {
- description
- "This is the administrative status of the NS instance";
+ uses nsd:nsr-nsd-placement-groups;
- type enumeration {
- enum ENABLED;
- enum DISABLED;
+ uses nsd:nsr-nsd-vnf-dependency;
+
+ uses nsd:nsr-nsd-monitoring-param;
}
- }
- container nsd {
- description "NS descriptor used to instantiate this NS";
- uses nsd:nsd-descriptor;
+ uses ns-instance-config-params;
}
-
- uses ns-instance-config-params;
}
}
- grouping ns-instance-config-params {
+ grouping ns-instance-config-params-common {
uses manotypes:input-parameter;
list scaling-group {
}
uses manotypes:placement-group-input;
}
+ }
+
+ grouping ns-instance-config-params {
+ uses ns-instance-config-params-common;
- list vnfd-placement-group-maps {
+ list vnfd-placement-group-maps {
description
- "Mapping from mano-placement groups construct from VNFD to cloud
+ "Mapping from mano-placement groups construct from VNFD to cloud
platform placement group construct";
- key "placement-group-ref vnfd-id-ref";
+ key "placement-group-ref vnfd-id-ref";
- leaf vnfd-id-ref {
- description
+ leaf vnfd-id-ref {
+ description
"A reference to a vnfd. This is a
leafref to path:
../../../../nsd:constituent-vnfd
- + [nsr:id = current()/../nsd:id-ref]
+ + [id = current()/../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 resovled this will switched to use
leafref";
- type yang:uuid;
- }
+ type yang:uuid;
+ }
- leaf placement-group-ref {
- description
+ leaf placement-group-ref {
+ description
"A reference to VNFD placement group";
- type leafref {
- path "/vnfd:vnfd-catalog/vnfd:vnfd[vnfd:id = current()/" +
- "../nsr:vnfd-id-ref]/vnfd:placement-groups/vnfd:name";
+ type leafref {
+ path "../../../../vnfd:vnfd-catalog/vnfd:vnfd[vnfd:id = " +
+ "current()/../vnfd-id-ref]/vnfd:placement-groups/vnfd:name";
+ }
}
+
+ uses manotypes:placement-group-input;
}
- uses manotypes:placement-group-input;
- }
- uses cloud-config;
+ list ssh-authorized-key {
+ key "key-pair-ref";
+
+ description "List of authorized ssh keys as part of cloud-config";
+
+ leaf key-pair-ref {
+ description "A reference to the key pair entry in the global key pair table";
+ type leafref {
+ path "../../../../key-pair/name";
+ }
+ }
+ }
+ list user {
+ key "name";
+
+ description "List of users to be added through cloud-config";
+ leaf name {
+ description "Name of the user ";
+ type string;
+ }
+
+ leaf user-info {
+ description "The user name's real name";
+ type string;
+ }
+
+ list ssh-authorized-key {
+ key "key-pair-ref";
+
+ description "Used to configure the list of public keys to be injected as part
+ of ns instantiation";
+
+ leaf key-pair-ref {
+ description "A reference to the key pair entry in the global key pair table";
+ type leafref {
+ path "../../../../../key-pair/name";
+ }
+ }
+ }
+ }
}
grouping vnffgr {
leaf vnffgd-id-ref {
description "VNFFG descriptor id reference";
type leafref {
- path "/nsr:ns-instance-config/nsr:nsr"
- + "[nsr:id=current()/../../ns-instance-config-ref]"
- + "/nsr:nsd/nsr:vnffgd/nsr:id";
+ // TODO: Fix leafref
+ path "../../../../ns-instance-config/nsr"
+ // + "[id=current()/../../ns-instance-config-ref]"
+ + "/nsd/vnffgd/id";
}
}
leaf vnffgd-name-ref {
description "VNFFG descriptor name reference";
+ // TODO: Fix leafref
type leafref {
- path "/ns-instance-config/nsr"
- + "[id=current()/../../ns-instance-config-ref]"
- + "/nsd/vnffgd[nsr:id = current()/../vnffgd-id-ref]"
+ path "../../../../ns-instance-config/nsr"
+ // + "[id=current()/../../ns-instance-config-ref]"
+ + "/nsd/vnffgd"
+ // + "[id=current()/../vnffgd-id-ref]"
+ "/name";
}
}
"The SDN account to use when requesting resources for
this vnffgr";
type leafref {
- path "/rwsdn:sdn/rwsdn:account/rwsdn:name";
+ path "../../../../rw-sdn:sdn/rw-sdn:account/rw-sdn:name";
}
}
leaf vnffgd-rsp-id-ref {
description
"Identifier for the VNFFG Descriptor RSP reference";
+ // TODO: Fix leafref
type leafref {
- path "/ns-instance-config/nsr"
- + "[id=current()/../../../ns-instance-config-ref]"
+ path "../../../../../ns-instance-config/nsr"
+ // + "[id=current()/../../../ns-instance-config-ref]"
+ "/nsd/vnffgd"
- + "[id=current()/../../vnffgd-id-ref]"
+ // + "[id=current()/../../vnffgd-id-ref]"
+ "/rsp/id";
}
}
leaf vnffgd-rsp-name-ref {
description
"Name for the VNFFG Descriptor RSP reference";
+ // TODO: Fix leafref
type leafref {
- path "/ns-instance-config/nsr:nsr"
- + "[id=current()/../../../ns-instance-config-ref]"
+ path "../../../../../ns-instance-config/nsr"
+ // + "[id=current()/../../../ns-instance-config-ref]"
+ "/nsd/vnffgd"
- + "[id=current()/../../vnffgd-id-ref]"
- + "/rsp[id=current()/../vnffgd-rsp-id-ref]"
+ // + "[id=current()/../../vnffgd-id-ref]"
+ + "/rsp"
+ // + "[id=current()/../vnffgd-rsp-id-ref]"
+ "/name";
}
}
description
"A reference to a vnfr id";
type leafref {
- path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
+ path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
}
}
leaf vnfr-name-ref {
description
"A reference to a vnfr name";
type leafref {
- path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
+ path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
}
}
leaf vnfr-connection-point-ref {
description
"A reference to a vnfr connection point.";
type leafref {
- path "/vnfr:vnfr-catalog/vnfr:vnfr"
- + "[vnfr:id = current()/../nsr:vnfr-id-ref]"
+ path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
+ + "[vnfr:id = current()/../vnfr-id-ref]"
+ "/vnfr:connection-point/vnfr:name";
}
}
description
"A reference to the RSP.";
type leafref {
- path "../../nsr:rsp/nsr:id";
+ path "../../rsp/id";
}
}
leaf rsp-name {
description
"A reference to a vnfr id";
type leafref {
- path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
+ path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
}
}
leaf vnfr-name-ref {
description
"A reference to a vnfr name";
type leafref {
- path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
+ path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
}
}
leaf vnfr-connection-point-ref {
description
"A reference to a vnfr connection point.";
type leafref {
- path "/vnfr:vnfr-catalog/vnfr:vnfr"
- + "[vnfr:id = current()/../nsr:vnfr-id-ref]"
+ path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
+ + "[vnfr:id = current()/../vnfr-id-ref]"
+ "/vnfr:connection-point/vnfr:name";
}
}
}
}
- container ns-instance-opdata {
- config false;
+ augment "/rw-project:project" {
+ container ns-instance-opdata {
+ config false;
- list nsr {
- key "ns-instance-config-ref";
+ list nsr {
+ key "ns-instance-config-ref";
- leaf ns-instance-config-ref {
- type leafref {
- path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
+ leaf ns-instance-config-ref {
+ type leafref {
+ path "../../../ns-instance-config/nsr/id";
+ }
+ // type yang:uuid;
}
- }
- leaf name-ref {
- description "Network service name reference";
- type leafref {
- path "/nsr:ns-instance-config/nsr:nsr/nsr:name";
+ leaf name-ref {
+ description "Network service name reference";
+ type leafref {
+ // TODO: Fix leafref
+ path "../../../ns-instance-config/nsr" +
+ // "[id=current()/../ns-instance-config-ref]" +
+ "/name";
+ }
}
- }
- leaf nsd-ref {
- description "Network service descriptor id reference";
- type leafref {
- path "/ns-instance-config/nsr"
- + "[id=current()/../ns-instance-config-ref]"
- + "/nsd/id";
+ leaf nsd-ref {
+ description "Network service descriptor id reference";
+ type leafref {
+ // TODO: fix leafref
+ path "../../../ns-instance-config/nsr"
+ // + "[id=current()/../ns-instance-config-ref]"
+ + "/nsd/id";
+ }
}
- }
- leaf nsd-name-ref {
- description "Network service descriptor name reference";
- type leafref {
- path "/ns-instance-config/nsr"
- + "[id=current()/../ns-instance-config-ref]"
- + "/nsd/name";
+ leaf nsd-name-ref {
+ description "Network service descriptor name reference";
+ // TODO: Fix leafref
+ type leafref {
+ path "../../../ns-instance-config/nsr"
+ // + "[id=current()/../ns-instance-config-ref]"
+ + "/nsd/name";
+ }
}
- }
- leaf create-time {
- description
- "Creation timestamp of this Network Service.
+ leaf create-time {
+ description
+ "Creation timestamp of this Network Service.
The timestamp is expressed as seconds
since unix epoch - 1970-01-01T00:00:00Z";
- type uint32;
- }
+ type uint32;
+ }
- leaf uptime {
- description
- "Active period of this Network Service.
+ leaf uptime {
+ description
+ "Active period of this Network Service.
Uptime is expressed in seconds";
- type uint32;
- }
+ type uint32;
+ }
- list connection-point {
- description
+ 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
construct network service chains by connecting the
connection points between different NS.";
- key "name";
- leaf name {
- description
+ key "name";
+ leaf name {
+ description
"Name of the NS connection point.";
- type string;
- }
+ type string;
+ }
- leaf type {
- description
+ leaf type {
+ description
"Type of the connection point.";
- type manotypes:connection-point-type;
+ type manotypes:connection-point-type;
+ }
}
- }
- list vlr {
- key "vlr-ref";
- leaf vlr-ref {
- description
+ list vlr {
+ key "vlr-ref";
+ leaf vlr-ref {
+ description
"Reference to a VLR record in the VLR catalog";
- type leafref {
- path "/vlr:vlr-catalog/vlr:vlr/vlr:id";
+ type leafref {
+ path "../../../../vlr:vlr-catalog/vlr:vlr/vlr:id";
+ }
}
- }
- list vnfr-connection-point-ref {
- description
- "A list of references to connection points.";
- key "vnfr-id";
+ list vnfr-connection-point-ref {
+ description
+ "A list of references to connection points.";
+ key "vnfr-id";
- leaf vnfr-id {
- description "A reference to a vnfr";
- type leafref {
- path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
+ leaf vnfr-id {
+ description "A reference to a vnfr";
+ type leafref {
+ path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
+ }
}
- }
- leaf connection-point {
- description
+ leaf connection-point {
+ description
"A reference to a connection point name in a vnfr";
- type leafref {
- path "/vnfr:vnfr-catalog/vnfr:vnfr"
- + "[vnfr:id = current()/../nsr:vnfr-id]"
- + "/vnfr:connection-point/vnfr:name";
+ type leafref {
+ path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
+ + "[vnfr:id = current()/../vnfr-id]"
+ + "/vnfr:connection-point/vnfr:name";
+ }
}
}
}
- }
- list constituent-vnfr-ref {
- description
+ list constituent-vnfr-ref {
+ description
"List of VNFRs that are part of this
network service.";
- key "vnfr-id";
+ key "vnfr-id";
- leaf vnfr-id {
- description
- "Reference to the VNFR id
- This should be a leafref to /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id
- But due to confd bug (RIFT-9451), changing to string.
- ";
- type string;
+ leaf vnfr-id {
+ description
+ "Reference to the VNFR id
+ This should be a leafref to /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id
+ But due to confd bug (RIFT-9451), changing to string.";
+ type string;
+ }
}
- }
- list scaling-group-record {
- description "List of scaling group records";
- key "scaling-group-name-ref";
+ list scaling-group-record {
+ description "List of scaling group records";
+ key "scaling-group-name-ref";
- leaf scaling-group-name-ref {
- description "name of the scaling group";
- type leafref {
- path "/ns-instance-config/nsr"
- + "[id=current()/../../ns-instance-config-ref]"
- + "/nsd/scaling-group-descriptor/name";
+ leaf scaling-group-name-ref {
+ description "name of the scaling group";
+ // TODO: Fix leafref
+ type leafref {
+ path "../../../../ns-instance-config/nsr"
+ // + "[id=current()/../../ns-instance-config-ref]"
+ + "/nsd/scaling-group-descriptor/name";
+ }
}
- }
- list instance {
- description "Reference to scaling group instance record";
- key "instance-id";
- leaf instance-id {
- description "Scaling group instance id";
- type uint16;
- }
+ list instance {
+ description "Reference to scaling group instance record";
+ key "instance-id";
+ leaf instance-id {
+ description "Scaling group instance id";
+ type uint16;
+ }
- leaf is-default {
- description "Flag indicating whether this instance was part of
+ leaf is-default {
+ description "Flag indicating whether this instance was part of
default scaling group (and thus undeletable)";
- type boolean;
- }
+ type boolean;
+ }
- leaf op-status {
- description
- "The operational status of the NS instance
+ leaf op-status {
+ description
+ "The operational status of the NS instance
init : The scaling group has just started.
vnf-init-phase : The VNFs in the scaling group are being instantiated.
running : The scaling group is in running state.
failed : The scaling group instantiation failed.
";
- type enumeration {
- enum init;
- enum vnf-init-phase;
- enum running;
- enum terminate;
- enum vnf-terminate-phase;
- enum terminated;
- enum failed;
+ type enumeration {
+ enum init;
+ enum vnf-init-phase;
+ enum running;
+ enum terminate;
+ enum vnf-terminate-phase;
+ enum terminated;
+ enum failed;
+ }
}
- }
- leaf config-status {
- description
- "The configuration status of the scaling group instance
+ leaf config-status {
+ description
+ "The configuration status of the scaling group instance
configuring : At least one of the VNFs in this scaling group instance
is in configuring state
configured : All the VNFs in this scaling group instance are
configured or config-not-needed state
failed : Configuring this scaling group instance failed
";
- type config-states;
- }
+ type config-states;
+ }
- leaf error-msg {
- description
- "Reason for failure in configuration of this scaling instance";
- type string;
- }
+ leaf error-msg {
+ description
+ "Reason for failure in configuration of this scaling instance";
+ type string;
+ }
- leaf create-time {
- description
- "Creation timestamp of this scaling group record.
+ leaf create-time {
+ description
+ "Creation timestamp of this scaling group record.
The timestamp is expressed as seconds
since unix epoch - 1970-01-01T00:00:00Z";
type uint32;
- }
+ }
- leaf-list vnfrs {
- description "Reference to VNFR within the scale instance";
- type leafref {
- path "../../../constituent-vnfr-ref/vnfr-id";
+ leaf-list vnfrs {
+ description "Reference to VNFR within the scale instance";
+ type leafref {
+ path "../../../constituent-vnfr-ref/vnfr-id";
+ }
}
}
}
- }
- uses vnffgr;
+ uses vnffgr;
- leaf operational-status {
- description
- "The operational status of the NS instance
+ leaf operational-status {
+ description
+ "The operational status of the NS instance
init : The network service has just started.
vl-init-phase : The VLs in the NS are being instantiated.
vnf-init-phase : The VNFs in the NS are being instantiated.
vl-terminate : The NS is terminating a VL
";
- type enumeration {
- enum init;
- enum vl-init-phase;
- enum vnf-init-phase;
- enum running;
- enum terminate;
- enum vnf-terminate-phase;
- enum vl-terminate-phase;
- enum terminated;
- enum failed;
- enum scaling-out;
- enum scaling-in;
- enum vl-instantiate;
- enum vl-terminate;
+ type enumeration {
+ enum init;
+ enum vl-init-phase;
+ enum vnf-init-phase;
+ enum running;
+ enum terminate;
+ enum vnf-terminate-phase;
+ enum vl-terminate-phase;
+ enum terminated;
+ enum failed;
+ enum scaling-out;
+ enum scaling-in;
+ enum vl-instantiate;
+ enum vl-terminate;
+ }
}
- }
- leaf config-status {
- description
- "The configuration status of the NS instance
+ leaf config-status {
+ description
+ "The configuration status of the NS instance
configuring: At least one of the VNFs in this instance is in configuring state
configured: All the VNFs in this NS instance are configured or config-not-needed state
";
- type config-states;
- }
+ type config-states;
+ }
- uses manotypes:ns-service-primitive;
+ uses manotypes:ns-service-primitive;
- list initial-config-primitive {
- rwpb:msg-new NsrInitialConfigPrimitive;
- description
- "Initial set of configuration primitives for NSD.";
- key "seq";
- leaf seq {
+ list initial-config-primitive {
+ rwpb:msg-new NsrInitialConfigPrimitive;
description
+ "Initial set of configuration primitives for NSD.";
+ key "seq";
+ leaf seq {
+ description
"Sequence number for the configuration primitive.";
- type uint64;
- }
+ type uint64;
+ }
- leaf name {
- description
+ leaf name {
+ description
"Name of the configuration primitive.";
- type string;
- mandatory "true";
- }
+ type string;
+ mandatory "true";
+ }
- leaf user-defined-script {
- description
+ leaf user-defined-script {
+ description
"A user defined script.";
- type string;
- }
-
- list parameter {
- key "name";
- leaf name {
type string;
}
- leaf value {
- type string;
+ list parameter {
+ key "name";
+ leaf name {
+ type string;
+ }
+
+ leaf value {
+ type string;
+ }
}
}
- }
- list monitoring-param {
- description
- "List of NS level params.";
- key "id";
+ list monitoring-param {
+ description
+ "List of NS level params.";
+ key "id";
- uses manotypes:monitoring-param-value;
- uses manotypes:monitoring-param-ui-data;
- uses manotypes:monitoring-param-aggregation;
+ uses manotypes:monitoring-param-value;
+ uses manotypes:monitoring-param-ui-data;
+ uses manotypes:monitoring-param-aggregation;
- leaf id {
- type string;
- }
+ leaf id {
+ type string;
+ }
- leaf name {
- type string;
- }
+ leaf name {
+ type string;
+ }
- leaf nsd-mon-param-ref {
- description "Reference to the NSD monitoring param descriptor
+ leaf nsd-mon-param-ref {
+ description "Reference to the NSD monitoring param descriptor
that produced this result";
- type leafref {
- path "/nsd:nsd-catalog/nsd:nsd[nsd:id = current()/" +
- "../../nsr:nsd-ref]/nsd:monitoring-param/nsd:id";
+ // TODO: Fix leafref
+ type leafref {
+ path "../../../../nsd:nsd-catalog/nsd:nsd" +
+ "[nsd:id = current()/../../nsd-ref]" +
+ "/nsd:monitoring-param/nsd:id";
+ }
}
- }
- list vnfr-mon-param-ref {
- description "A list of VNFR monitoring params associated with this monp";
- key "vnfr-id-ref vnfr-mon-param-ref";
+ list vnfr-mon-param-ref {
+ description "A list of VNFR monitoring params associated with this monp";
+ key "vnfr-id-ref vnfr-mon-param-ref";
- leaf vnfr-id-ref {
- description
- "A reference to a vnfr. This is a
+ leaf vnfr-id-ref {
+ description
+ "A reference to a vnfr. This is a
leafref to path:
/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
- type yang:uuid;
- }
+ type yang:uuid;
+ }
- leaf vnfr-mon-param-ref {
- description "A reference to the VNFR monitoring param";
- type leafref {
- path "/vnfr:vnfr-catalog/vnfr:vnfr"
- + "[vnfr:id = current()/../nsr:vnfr-id-ref]"
- + "/vnfr:monitoring-param/vnfr:id";
+ leaf vnfr-mon-param-ref {
+ description "A reference to the VNFR monitoring param";
+ type leafref {
+ path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
+ + "[vnfr:id = current()/../vnfr-id-ref]"
+ + "/vnfr:monitoring-param/vnfr:id";
+ }
}
}
}
- }
- list config-agent-job {
- key "job-id";
+ list config-agent-job {
+ key "job-id";
- leaf job-id {
- description "config agent job Identifier for the NS.";
- type uint64;
- }
+ leaf job-id {
+ description "config agent job Identifier for the NS.";
+ type uint64;
+ }
- leaf job-name {
- description "Config agent job name";
- type string;
- }
+ leaf job-name {
+ description "Config agent job name";
+ type string;
+ }
- leaf job-status {
- description
+ leaf job-status {
+ description
"Job status to be set based on each VNF primitive execution,
pending - if at least one VNF is in pending state
and remaining VNFs are in success state.
Success - if all VNF executions are in success state
failure - if one of the VNF executions is failure";
- type enumeration {
- enum pending;
- enum success;
- enum failure;
+ type enumeration {
+ enum pending;
+ enum success;
+ enum failure;
+ }
}
- }
- leaf triggered-by {
- description "The primitive is triggered from NS or VNF level";
- type trigger-type;
- }
+ leaf triggered-by {
+ description "The primitive is triggered from NS or VNF level";
+ type trigger-type;
+ }
- leaf create-time {
- description
- "Creation timestamp of this Config Agent Job.
+ leaf create-time {
+ description
+ "Creation timestamp of this Config Agent Job.
The timestamp is expressed as seconds
since unix epoch - 1970-01-01T00:00:00Z";
- type uint32;
- }
-
- leaf job-status-details {
- description "Config agent job status details, in case of errors";
- type string;
- }
-
- uses manotypes:primitive-parameter-value;
+ type uint32;
+ }
- list parameter-group {
- description
- "List of NS Primitive parameter groups";
- key "name";
- leaf name {
- description
- "Name of the parameter.";
+ leaf job-status-details {
+ description "Config agent job status details, in case of errors";
type string;
}
uses manotypes:primitive-parameter-value;
- }
- list vnfr {
- key "id";
- leaf id {
- description "Identifier for the VNFR.";
- type yang:uuid;
- }
- leaf vnf-job-status {
+ list parameter-group {
description
- "Job status to be set based on each VNF primitive execution,
- pending - if at least one primitive is in pending state
- and remaining primitives are in success state.
- Success - if all primitive executions are in success state
- failure - if one of the primitive executions is failure";
- type enumeration {
- enum pending;
- enum success;
- enum failure;
- }
- }
-
- list primitive {
+ "List of NS Primitive parameter groups";
key "name";
leaf name {
- description "the name of the primitive";
+ description
+ "Name of the parameter.";
type string;
}
uses manotypes:primitive-parameter-value;
+ }
- leaf execution-id {
- description "Execution id of the primitive";
- type string;
+ list vnfr {
+ key "id";
+ leaf id {
+ description "Identifier for the VNFR.";
+ type yang:uuid;
}
- leaf execution-status {
- description "status of the Execution";
+ leaf vnf-job-status {
+ description
+ "Job status to be set based on each VNF primitive execution,
+ pending - if at least one primitive is in pending state
+ and remaining primitives are in success state.
+ Success - if all primitive executions are in success state
+ failure - if one of the primitive executions is failure";
type enumeration {
enum pending;
enum success;
enum failure;
}
}
- leaf execution-error-details {
- description "Error details if execution-status is failure";
- type string;
+
+ list primitive {
+ key "name";
+ leaf name {
+ description "the name of the primitive";
+ type string;
+ }
+
+ uses manotypes:primitive-parameter-value;
+
+ leaf execution-id {
+ description "Execution id of the primitive";
+ type string;
+ }
+ leaf execution-status {
+ description "status of the Execution";
+ type enumeration {
+ enum pending;
+ enum success;
+ enum failure;
+ }
+ }
+ leaf execution-error-details {
+ description "Error details if execution-status is failure";
+ type string;
+ }
}
}
}
}
}
+ grouping rpc-common {
+ uses manotypes:rpc-project-name;
+
+ leaf nsr_id_ref {
+ description "Reference to NSR ID ref";
+ type leafref {
+ path "/rw-project:project[rw-project:name=current()/.." +
+ "/project-name]/ns-instance-config/nsr/id";
+ }
+ }
+ }
+
rpc get-ns-service-primitive-values {
description "Get the service primitive parameter values";
- input {
- leaf nsr_id_ref {
- description "Reference to NSR ID ref";
- mandatory true;
- type leafref {
- path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
- }
- }
+ input {
leaf name {
description "Name of the NS service primitive group";
mandatory true;
type string;
}
+
+ uses rpc-common;
}
output {
type string;
}
- leaf nsr_id_ref {
- description "Reference to NSR ID ref";
- type leafref {
- path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
- }
- }
+ uses rpc-common;
leaf triggered-by {
description "The primitive is triggered from NS or VNF level";
type string;
}
- leaf nsr_id_ref {
- description "Reference to NSR ID ref";
- type leafref {
- path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
- }
- }
+ uses rpc-common;
leaf triggered-by {
description "The primitive is triggered from NS or VNF level";
description "Executes scale out request";
input {
-
- leaf nsr-id-ref {
- description "Reference to NSR ID ref";
- type leafref {
- path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
- }
- }
+ uses rpc-common;
leaf scaling-group-name-ref {
description "name of the scaling group";
description "Executes scale out request";
input {
-
- leaf nsr-id-ref {
- description "Reference to NSR ID ref";
- type leafref {
- path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
- }
- }
+ uses rpc-common;
leaf scaling-group-name-ref {
description "name of the scaling group";
description "id of the scaling group";
type uint64;
}
-
}
+
output {
leaf instance-id {
description "id of the scaling group";
}
}
+ rpc start-network-service {
+ description "Start the network service";
+ input {
+ leaf name {
+ mandatory true;
+ description "Name of the Network Service";
+ type string;
+ }
+
+ uses rpc-common;
+
+ uses ns-instance-config-params-common;
+
+ list vnfd-placement-group-maps {
+ description
+ "Mapping from mano-placement groups construct from VNFD to cloud
+ platform placement group construct";
+
+ key "placement-group-ref vnfd-id-ref";
+
+ leaf vnfd-id-ref {
+ description
+ "A reference to a vnfd. This is a
+ leafref to path:
+ ../../../../nsd:constituent-vnfd
+ + [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 resovled this will switched to use
+ leafref";
+ type yang:uuid;
+ }
+
+ leaf placement-group-ref {
+ description
+ "A reference to VNFD placement group";
+ type leafref {
+ path "/rw-project:project[rw-project:name=current()/" +
+ "../../project-name]/vnfd:vnfd-catalog/vnfd:vnfd[vnfd:id = " +
+ "current()/../vnfd-id-ref]/vnfd:placement-groups/vnfd:name";
+ }
+ }
+
+ uses manotypes:placement-group-input;
+
+ list ssh-authorized-key {
+ key "key-pair-ref";
+
+ description "List of authorized ssh keys as part of cloud-config";
+
+ leaf key-pair-ref {
+ description "A reference to the key pair entry in the global key pair table";
+ type leafref {
+ path "/rw-project:project[rw-project:name=current()/../../../" +
+ "project-name]/key-pair/name";
+ }
+ }
+ }
+
+ list user {
+ key "name";
+
+ description "List of users to be added through cloud-config";
+ leaf name {
+ description "Name of the user ";
+ type string;
+ }
+ leaf user-info {
+ description "The user name's real name";
+ type string;
+ }
+ list ssh-authorized-key {
+ key "key-pair-ref";
+
+ description "Used to configure the list of public keys to be injected as part
+ of ns instantiation";
+
+ leaf key-pair-ref {
+ description "A reference to the key pair entry in the global key pair table";
+ type leafref {
+ path "/rw-project:project[rw-project:name=current()/" +
+ "../../../../project-name]/key-pair/name";
+ }
+ }
+ }
+ }
+ }
+ }
+
+ output {
+ leaf nsr-id {
+ description "Automatically generated parameter";
+ type yang:uuid;
+ }
+ }
+ }
+
}
/*
*
- * Copyright 2016 RIFT.IO Inc
+ * Copyright 2016-2017 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
prefix "manotypes";
}
+ import rw-project {
+ prefix "rw-project";
+ }
+
+ revision 2017-02-08 {
+ description
+ "Update model to support projects.";
+ }
+
revision 2015-09-10 {
description
"Initial revision. This YANG file defines
"Derived from earlier versions of base YANG files";
}
- container pnfd-catalog {
+ augment "/rw-project:project" {
+ container pnfd-catalog {
- list pnfd {
- key "id";
+ list pnfd {
+ key "id";
- leaf id {
- description "Identifier for the PNFD.";
- type yang:uuid;
- }
+ leaf id {
+ description "Identifier for the PNFD.";
+ type yang:uuid;
+ }
- leaf name {
- description "PNFD name.";
- type string;
- }
+ leaf name {
+ description "PNFD name.";
+ type string;
+ }
- leaf short-name {
- description "PNFD short name.";
- type string;
- }
+ leaf short-name {
+ description "PNFD short name.";
+ type string;
+ }
- leaf vendor {
- description "Vendor of the PNFD.";
- type string;
- }
+ leaf vendor {
+ description "Vendor of the PNFD.";
+ type string;
+ }
- leaf description {
- description "Description of the PNFD.";
- type string;
- }
+ leaf description {
+ description "Description of the PNFD.";
+ type string;
+ }
- leaf version {
- description "Version of the PNFD";
- type string;
- }
+ leaf version {
+ description "Version of the PNFD";
+ type string;
+ }
- list connection-point {
- description
+ list connection-point {
+ description
"List for external connection points. Each PNF has one or more external
connection points.";
- key "id";
- leaf id {
- description
+ key "id";
+ leaf id {
+ description
"Identifier for the external connection points";
- type uint64;
- }
+ type uint64;
+ }
- leaf cp-type {
- description
+ leaf cp-type {
+ description
"Type of the connection point.";
- type manotypes:connection-point-type;
+ type manotypes:connection-point-type;
+ }
}
}
}
/*
*
- * Copyright 2016 RIFT.IO Inc
+ * Copyright 2016-2017 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
prefix "manotypes";
}
+ import rw-project {
+ prefix "rw-project";
+ }
+
+ revision 2017-02-08 {
+ description
+ "Update model to support projects.";
+ }
+
revision 2015-09-10 {
description
"Initial revision. This YANG file augments
"Derived from earlier versions of base YANG files";
}
- augment /nsd:nsd-catalog/nsd:nsd {
+ augment /rw-project:project/nsd:nsd-catalog/nsd:nsd {
uses manotypes:control-param;
uses manotypes:action-param;
leaf meta {
/*
*
- * Copyright 2016 RIFT.IO Inc
+ * Copyright 2016-2017 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
prefix nsr;
}
- tailf:annotate "/nsr:ns-instance-opdata/nsr:nsr/rw-nsr:operational-events" {
+ import rw-project {
+ prefix "rw-project";
+ }
+
+ tailf:annotate "/rw-project:project/nsr:ns-instance-opdata/nsr:nsr/rw-nsr:operational-events" {
tailf:callpoint rw_callpoint;
}
- tailf:annotate "/nsr:ns-instance-opdata/rw-nsr:nsd-ref-count" {
+ tailf:annotate "/rw-project:project/nsr:ns-instance-opdata/rw-nsr:nsd-ref-count" {
tailf:callpoint rw_callpoint;
}
}
/*
*
- * Copyright 2016 RIFT.IO Inc
+ * Copyright 2016-2017 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
prefix "rw-sdn";
}
+ import rw-project {
+ prefix "rw-project";
+ }
+
import ietf-yang-types {
prefix "yang";
}
+ revision 2017-02-08 {
+ description
+ "Update model to support projects.";
+ }
+
revision 2015-09-10 {
description
"Initial revision. This YANG file augments
leaf nsd-id-ref {
description "Reference to NSD";
type leafref {
- path "/nsd:nsd-catalog/nsd:nsd/nsd:id";
+ path "../../../nsd:nsd-catalog/nsd:nsd/nsd:id";
}
}
leaf instance-ref-count {
All VDU's, Virtual Links, and provider networks will be requested
using the cloud-account's associated CAL instance";
type leafref {
- path "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
+ path "../../../rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
}
}
All VDU's, Virtual Links, and provider networks will be requested
using the cloud-account's associated CAL instance";
type leafref {
- path "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
+ path "../../../../rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
}
}
The configuration for this VNF will be driven using the specified config
agent account";
type leafref {
- path "/rw-config-agent:config-agent/rw-config-agent:account/rw-config-agent:name";
+ path "../../../../rw-config-agent:config-agent/" +
+ "rw-config-agent:account/rw-config-agent:name";
}
}
}
All VDU's, Virtual Links, and provider networks will be requested
using the cloud-account's associated CAL instance";
type leafref {
- path "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
+ path "../../../../rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
}
}
}
- augment /nsr:ns-instance-config/nsr:nsr {
+ augment /rw-project:project/nsr:ns-instance-config/nsr:nsr {
uses rw-ns-instance-config;
}
augment /nsr:start-network-service/nsr:input{
- uses rw-ns-instance-config;
+ leaf cloud-account {
+ description
+ "The configured cloud account which the NSR is instantiated within.
+ All VDU's, Virtual Links, and provider networks will be requested
+ using the cloud-account's associated CAL instance";
+ type leafref {
+ path "/rw-project:project[rw-project:name=current()/../" +
+ "nsr:project-name]/rw-cloud:cloud/rw-cloud:account" +
+ "/rw-cloud:name";
+ }
+ }
+
+ leaf om-datacenter {
+ description
+ "Openmano datacenter name to use when instantiating
+ the network service. This is only used when openmano
+ is selected as the cloud account. This should be superceded
+ by multiple cloud accounts when that becomes available.";
+ type string;
+ }
+
+ list vnf-cloud-account-map {
+ description
+ "Mapping VNF to Cloud Account where VNF will be instantiated";
+
+ key "member-vnf-index-ref";
+ leaf member-vnf-index-ref {
+ type uint64;
+ }
+
+ leaf cloud-account {
+ description
+ "The configured cloud account where VNF is instantiated within.
+ All VDU's, Virtual Links, and provider networks will be requested
+ using the cloud-account's associated CAL instance";
+ type leafref {
+ path "/rw-project:project[rw-project:name=current()/../../" +
+ "nsr:project-name]/rw-cloud:cloud/rw-cloud:account/" +
+ "rw-cloud:name";
+ }
+ }
+
+ leaf om-datacenter {
+ description
+ "Openmano datacenter name to use when instantiating
+ the network service. This is only used when openmano
+ is selected as the cloud account. This should be superceded
+ by multiple cloud accounts when that becomes available.";
+ type string;
+ }
+
+ leaf config-agent-account {
+ description
+ "The configured config agent account to use for instantiating this VNF.
+ The configuration for this VNF will be driven using the specified config
+ agent account";
+ type leafref {
+ path "/rw-project:project[rw-project:name=current()/../.." +
+ "/nsr:project-name]/rw-config-agent:config-agent/" +
+ "rw-config-agent:account/rw-config-agent:name";
+ }
+ }
+ }
+
+ list vl-cloud-account-map {
+ description
+ "Mapping VL to Cloud Account where VL will be instantiated";
+
+ key "vld-id-ref";
+
+ leaf vld-id-ref {
+ description
+ "A reference to a vld.
+ leafref path ../../nsd/vld/id";
+ type string;
+ }
+
+ leaf-list cloud-accounts {
+ description
+ "The configured list of cloud accounts where VL is instantiated.
+ All VDU's, Virtual Links, and provider networks will be requested
+ using the cloud-account's associated CAL instance";
+ type leafref {
+ path "/rw-project:project[rw-project:name=current()/../../" +
+ "nsr:project-name]/rw-cloud:cloud/rw-cloud:account/" +
+ "rw-cloud:name";
+ }
+ }
+
+ leaf-list om-datacenters {
+ description
+ "Openmano datacenter names to use when instantiating
+ the VLs. This is only used when openmano
+ is selected as the cloud account. This should be superceded
+ by multiple cloud accounts when that becomes available.";
+ type string;
+ }
+ }
}
- augment /nsr:ns-instance-opdata/nsr:nsr {
+ augment /rw-project:project/nsr:ns-instance-opdata/nsr:nsr {
uses manotypes:action-param;
uses manotypes:control-param;
"The SDN account associted with the cloud account using which an
NS was instantiated.";
type leafref {
- path "/rw-sdn:sdn/rw-sdn:account/rw-sdn:name";
+ path "../../../rw-sdn:sdn/rw-sdn:account/rw-sdn:name";
}
}
uses operational-events;
}
- augment /nsr:ns-instance-opdata {
+ augment /rw-project:project/nsr:ns-instance-opdata {
uses nsd-ref-count;
}
- augment /nsr:ns-instance-opdata/nsr:nsr/nsr:vlr {
+ augment /rw-project:project/nsr:ns-instance-opdata/nsr:nsr/nsr:vlr {
leaf assigned-subnet {
description "Subnet added for the VL";
type string;
description
"The configured cloud account in which the VL is instantiated within.";
type leafref {
- path "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
+ path "../../../../rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
}
}
leaf om-datacenter {
}
}
- augment /nsr:ns-instance-opdata/nsr:nsr/nsr:constituent-vnfr-ref {
+ augment /rw-project:project/nsr:ns-instance-opdata/nsr:nsr/nsr:constituent-vnfr-ref {
leaf cloud-account {
description
"The configured cloud account in which the VNF is instantiated within.
All VDU's, Virtual Links, and provider networks will be requested
using the cloud-account's associated CAL instance";
type leafref {
- path "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
+ path "../../../../rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
}
}
leaf om-datacenter {
}
}
- augment /nsr:ns-instance-config {
+ augment /rw-project:project/nsr:ns-instance-config {
leaf nfvi-polling-period {
description
"Defines the period (secons) that the NFVI metrics are polled at";
--- /dev/null
+/*
+ *
+ * Copyright 2017 RIFT.IO Inc
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+module rw-project
+{
+ namespace "http://riftio.com/ns/riftware-1.0/rw-project";
+ prefix "rw-project";
+
+ revision 2017-02-08 {
+ description
+ "Initial revision. This YANG file defines the
+ projects fo MANO to support Role Based Access
+ Control (RBAC)";
+ reference
+ "Derived from earlier versions of base YANG files";
+ }
+
+ list project {
+ description
+ "Configuration for individual Projects. RIFT.ware applications
+ and Projects are expected to augment this list in order to add
+ configuration for Projects that is specific to the product or
+ application. As such, this list contains minimal data defined
+ in this yang module. When augmenting this element, other yang
+ modules should prefer to define containers with the same name
+ as the augmenting module. (Augmenting RIFT.ware modules should
+ prefer to augment without the rw prefix [for new features], or
+ should prefer to augment the augmented container of an existing
+ augment.";
+
+ key name;
+ leaf name {
+ description "Name of the Project.";
+ type string {
+ length "1..255";
+ }
+ }
+
+ leaf description {
+ description "Information about Project";
+ type string;
+ }
+
+ container project-config {
+
+ description "Project management related configuration.";
+
+ // list user {
+ // description
+ // "The list of Users who have been assigned Roles within this
+ // Project.";
+
+ // key user-name user-domain;
+ // uses rw-rbac-base:user-key;
+
+ // list role {
+ // description
+ // "The list of Roles the User has been assigned.";
+
+ // key role key;
+ // uses rw-rbac-base:role-instance;
+ // }
+ // }
+ }
+
+ container project-state {
+
+ config false;
+
+ description "Project management operational data";
+ }
+ }
+}
/*
*
- * Copyright 2016 RIFT.IO Inc
+ * Copyright 2016-2017 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
prefix "yang";
}
+ import rw-project {
+ prefix "rw-project";
+ }
+
+ revision 2017-02-08 {
+ description
+ "Update model to support projects.";
+ }
+
revision 2015-09-30 {
description
"Initial revision. This YANG file augments
"Derived from earlier versions of base YANG files";
}
- augment /vlr:vlr-catalog/vlr:vlr {
+ augment /rw-project:project/vlr:vlr-catalog/vlr:vlr {
leaf cloud-account {
description
"The cloud account to use when requesting resources for
this vlr";
type leafref {
- path "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
+ path "../../../rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
}
}
leaf om-datacenter {
/*
*
- * Copyright 2016 RIFT.IO Inc
+ * Copyright 2016-2017 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
prefix "manotypes";
}
+ import rw-project {
+ prefix "rw-project";
+ }
+
+ revision 2017-02-08 {
+ description
+ "Update model to support projects.";
+ }
+
revision 2015-09-10 {
description
"Initial revision. This YANG file augments
"Derived from earlier versions of base YANG files";
}
- augment /vnfd:vnfd-catalog/vnfd:vnfd {
+ augment /rw-project:project/vnfd:vnfd-catalog/vnfd:vnfd {
uses manotypes:control-param;
uses manotypes:action-param;
leaf meta {
} // list component
}
- augment /vnfd:vnfd-catalog/vnfd:vnfd/vnfd:vdu {
+ augment /rw-project:project/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:vdu {
leaf vcs-component-ref {
description
"This defines the software components using the
Also using a state machine is not something that
is well described in MANO.";
type leafref {
- path "/vnfd:vnfd-catalog/vnfd:vnfd/rw-vnfd:component/rw-vnfd:component-name";
+ path "../../rw-vnfd:component/rw-vnfd:component-name";
}
}
}
/*
*
- * Copyright 2016 RIFT.IO Inc
+ * Copyright 2016-2017 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
prefix vnfr;
}
- tailf:annotate "/vnfr:vnfr-catalog/rw-vnfr:vnfd-ref-count" {
+ import rw-project {
+ prefix "rw-project";
+ }
+
+ tailf:annotate "/rw-project:project/vnfr:vnfr-catalog/rw-vnfr:vnfd-ref-count" {
tailf:callpoint rw_callpoint;
}
- tailf:annotate "/vnfr:vnfr-catalog/vnfr:vnfr/rw-vnfr:operational-events" {
+ tailf:annotate "/rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr/rw-vnfr:operational-events" {
tailf:callpoint rw_callpoint;
}
- tailf:annotate "/rw-vnfr:vnfr-console" {
+ tailf:annotate "/rw-project:project/rw-vnfr:vnfr-console" {
tailf:callpoint rw_callpoint;
}
/*
*
- * Copyright 2016 RIFT.IO Inc
+ * Copyright 2016-2017 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
prefix "inet";
}
+ import rw-project {
+ prefix "rw-project";
+ }
+
+ revision 2017-02-08 {
+ description
+ "Update model to support projects.";
+ }
+
revision 2015-09-10 {
description
"Initial revision. This YANG file augments
}
}
- augment /vnfr:vnfr-catalog/vnfr:vnfr {
+ augment /rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr {
uses manotypes:action-param;
uses manotypes:control-param;
"The cloud account to use when requesting resources for
this vnf";
type leafref {
- path "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
+ path "../../../rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
}
}
}
}
- augment /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:vdur {
+ augment /rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:vdur {
leaf vm-pool {
description
"The pool from which this vm was allocated from";
Also using a state machine is not something that
is well described in MANO.";
type leafref {
- path "/vnfr:vnfr-catalog/vnfr:vnfr/rw-vnfr:component/rw-vnfr:component-name";
+ path "../../rw-vnfr:component/rw-vnfr:component-name";
}
}
type string;
}
}
+
grouping vnfd-ref-count {
list vnfd-ref-count {
key "vnfd-id-ref";
leaf vnfd-id-ref {
description "Reference to VNFD";
type leafref {
- path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
+ path "../../../vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
}
}
leaf instance-ref-count {
}
}
}
- augment /vnfr:vnfr-catalog {
+
+ augment /rw-project:project/vnfr:vnfr-catalog {
uses vnfd-ref-count;
}
- container vnfr-console {
- config false;
- list vnfr {
- key "id";
- leaf id {
- description "Identifier for the VNFR.";
- type yang:uuid;
- }
- list vdur {
- description "List of Virtual Deployment Units";
+ augment /rw-project:project {
+ container vnfr-console {
+ config false;
+ list vnfr {
key "id";
leaf id {
- description "Unique id for the VDU";
+ description "Identifier for the VNFR.";
type yang:uuid;
}
- leaf console-url {
- description "Console URL for this VDU, if available";
- type inet:uri;
+ list vdur {
+ description "List of Virtual Deployment Units";
+ key "id";
+ leaf id {
+ description "Unique id for the VDU";
+ type yang:uuid;
+ }
+ leaf console-url {
+ description "Console URL for this VDU, if available";
+ type inet:uri;
+ }
}
}
}
/*
*
- * Copyright 2016 RIFT.IO Inc
+ * Copyright 2016-2017 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
prefix "manotypes";
}
+ import rw-project {
+ prefix "rw-project";
+ }
+
+ revision 2017-02-08 {
+ description
+ "Update model to support projects.";
+ }
+
revision 2015-09-10 {
description
"Initial revision. This YANG file defines
"Derived from earlier versions of base YANG files";
}
- container vld-catalog {
+ augment "/rw-project:project" {
+ container vld-catalog {
- list vld {
- key "id";
+ list vld {
+ key "id";
- leaf id {
- description "Identifier for the VLD.";
- type yang:uuid;
- }
+ leaf id {
+ description "Identifier for the VLD.";
+ type yang:uuid;
+ }
- leaf name {
- description "Virtual Link Descriptor (VLD) name.";
- type string;
- }
+ leaf name {
+ description "Virtual Link Descriptor (VLD) name.";
+ type string;
+ }
- leaf short-name {
- description "Short name for VLD for UI";
- type string;
- }
+ leaf short-name {
+ description "Short name for VLD for UI";
+ type string;
+ }
- leaf vendor {
- description "Provider of the VLD.";
- type string;
- }
+ leaf vendor {
+ description "Provider of the VLD.";
+ type string;
+ }
- leaf description {
- description "Description of the VLD.";
- type string;
- }
+ leaf description {
+ description "Description of the VLD.";
+ type string;
+ }
- leaf version {
- description "Version of the VLD";
- type string;
- }
+ leaf version {
+ description "Version of the VLD";
+ type string;
+ }
- leaf type {
- type manotypes:virtual-link-type;
- }
+ leaf type {
+ type manotypes:virtual-link-type;
+ }
- leaf root-bandwidth {
- description
+ leaf root-bandwidth {
+ description
"For ELAN this is the aggregate bandwidth.";
- type uint64;
- }
+ type uint64;
+ }
- leaf leaf-bandwidth {
- description
+ leaf leaf-bandwidth {
+ description
"For ELAN this is the bandwidth of branches.";
- type uint64;
- }
+ type uint64;
+ }
- list vnfd-connection-point-ref {
- description
+ list vnfd-connection-point-ref {
+ description
"A list of references to connection points.";
- key "vnfd-ref member-vnf-index-ref";
+ key "vnfd-ref member-vnf-index-ref";
- leaf vnfd-ref {
- description "A reference to a vnfd";
- type leafref {
- path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
+ leaf vnfd-ref {
+ description "A reference to a vnfd";
+ type leafref {
+ path "../../../../vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
+ }
}
- }
- leaf member-vnf-index-ref {
- description
+ leaf member-vnf-index-ref {
+ description
"A reference to the consituent-vnfd id in nsd.
Should have been a leafref to:
'/nsd:nsd-catalog:/nsd:nsd/constituent-vnfd/member-vnf-index-ref'.
Instead using direct leaf to avoid circular reference.";
- type uint64;
- }
+ type uint64;
+ }
- leaf vnfd-connection-point-ref {
- description
+ leaf vnfd-connection-point-ref {
+ description
"A reference to a connection point name in a vnfd";
- type leafref {
- path "/vnfd:vnfd-catalog/vnfd:vnfd"
- + "[vnfd:id = current()/../vld:vnfd-ref]"
- + "/vnfd:connection-point/vnfd:name";
+ type leafref {
+ path "../../../../vnfd:vnfd-catalog/vnfd:vnfd"
+ + "[vnfd:id = current()/../vld:vnfd-ref]"
+ + "/vnfd:connection-point/vnfd:name";
+ }
}
}
- }
- // replicate for pnfd container here
- uses manotypes:provider-network;
+ // replicate for pnfd container here
+ uses manotypes:provider-network;
+ }
}
}
}
/*
*
- * Copyright 2016 RIFT.IO Inc
+ * Copyright 2016-2017 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
prefix vlr;
}
- tailf:annotate "/vlr:vlr-catalog" {
+ import rw-project {
+ prefix "rw-project";
+ }
+
+ tailf:annotate "/rw-project:project/vlr:vlr-catalog" {
tailf:callpoint rw_callpoint;
}
}
/*
*
- * Copyright 2016 RIFT.IO Inc
+ * Copyright 2016-2017 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
prefix "vld";
}
+ import rw-project {
+ prefix "rw-project";
+ }
+
+ revision 2017-02-08 {
+ description
+ "Update model to support projects.";
+ }
+
revision 2015-09-10 {
description
"Initial revision. This YANG file defines
"Derived from earlier versions of base YANG files";
}
- container vlr-catalog {
- config false;
+ augment "/rw-project:project" {
+ container vlr-catalog {
+ config false;
- list vlr {
- key "id";
- unique "name";
+ list vlr {
+ key "id";
+ unique "name";
- leaf id {
- description "Identifier for the VLR.";
- type yang:uuid;
- }
+ leaf id {
+ description "Identifier for the VLR.";
+ type yang:uuid;
+ }
- leaf name {
- description "VLR name.";
- type string;
- }
+ leaf name {
+ description "VLR name.";
+ type string;
+ }
- leaf nsr-id-ref {
- description
+ leaf nsr-id-ref {
+ description
"NS instance identifier.
- This is a leafref /nsr:ns-instance-config/nsr:nsr/nsr:id";
- type yang:uuid;
- }
+ This is a leafref /rw-project:project/nsr:ns-instance-config/nsr:nsr/nsr:id";
+ type yang:uuid;
+ }
- leaf vld-ref {
- description
- "Reference to VLD
- /nsr:ns-instance-config/nsr:nsr[nsr:id=../nsr-id-ref]/nsd/vld:vld/vld:id";
- type string;
- }
+ leaf vld-ref {
+ description
+ "Reference to VLD
+ /rw-project:project/nsr:ns-instance-config/nsr:nsr[nsr:id=../nsr-id-ref]
+ /nsd/vld:vld/vld:id";
+ type string;
+ }
- leaf res-id {
- description "Identifier for resmgr id mapping";
- type yang:uuid;
- }
+ leaf res-id {
+ description "Identifier for resmgr id mapping";
+ type yang:uuid;
+ }
- leaf short-name {
- description "Short name for VLR for UI";
- type string;
- }
+ leaf short-name {
+ description "Short name for VLR for UI";
+ type string;
+ }
- leaf vendor {
- description "Provider of the VLR.";
- type string;
- }
+ leaf vendor {
+ description "Provider of the VLR.";
+ type string;
+ }
- leaf description {
- description "Description of the VLR.";
- type string;
- }
+ leaf description {
+ description "Description of the VLR.";
+ type string;
+ }
- leaf version {
- description "Version of the VLR";
- type string;
- }
+ leaf version {
+ description "Version of the VLR";
+ type string;
+ }
- leaf type {
- type manotypes:virtual-link-type;
- }
+ leaf type {
+ type manotypes:virtual-link-type;
+ }
- leaf root-bandwidth {
- description
+ leaf root-bandwidth {
+ description
"For ELAN this is the aggregate bandwidth.";
- type uint64;
- }
+ type uint64;
+ }
- leaf leaf-bandwidth {
- description
+ leaf leaf-bandwidth {
+ description
"For ELAN this is the bandwidth of branches.";
- type uint64;
- }
+ type uint64;
+ }
- leaf create-time {
- description
- "Creation timestamp of this Virtual Link.
+ leaf create-time {
+ description
+ "Creation timestamp of this Virtual Link.
The timestamp is expressed as seconds
since unix epoch - 1970-01-01T00:00:00Z";
- type uint32;
- }
+ type uint32;
+ }
- leaf uptime {
- description
- "Active period of this Virtual Link.
+ leaf uptime {
+ description
+ "Active period of this Virtual Link.
Uptime is expressed in seconds";
- type uint32;
- }
+ type uint32;
+ }
- leaf network-id {
- description
+ leaf network-id {
+ description
"Identifier for the allocated network resource.";
- type string;
- }
+ type string;
+ }
- leaf vim-network-name {
- description
+ leaf vim-network-name {
+ description
"Name of network in VIM account. This is used to indicate
pre-provisioned network name in cloud account.";
- type string;
- }
+ type string;
+ }
- // replicate for pnfd container here
+ // replicate for pnfd container here
- uses manotypes:provider-network;
- uses manotypes:ip-profile-info;
+ uses manotypes:provider-network;
+ uses manotypes:ip-profile-info;
- leaf status {
- description
+ leaf status {
+ description
"Status of the virtual link record.";
- type enumeration {
- enum LINK_UP;
- enum DEGRADED;
- enum LINK_DOWN;
+ type enumeration {
+ enum LINK_UP;
+ enum DEGRADED;
+ enum LINK_DOWN;
+ }
}
- }
- leaf operational-status {
- description
- "The operational status of the Virtual Link
+ leaf operational-status {
+ description
+ "The operational status of the Virtual Link
init : The VL is in init stat.
vl-alloc-pending : The VL alloc is pending in VIM
running : The VL is up and running in VM
failed : The VL instantiation failed in VIM.
";
- type enumeration {
- rwpb:enum-type "VlOperationalStatus";
- enum init;
- enum vl-alloc-pending;
- enum running;
- enum vl-terminate-pending;
- enum terminated;
- enum failed;
+ type enumeration {
+ rwpb:enum-type "VlOperationalStatus";
+ enum init;
+ enum vl-alloc-pending;
+ enum running;
+ enum vl-terminate-pending;
+ enum terminated;
+ enum failed;
+ }
}
}
}
/*
*
- * Copyright 2016 RIFT.IO Inc
+ * Copyright 2016-2017 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
prefix "inet";
}
+ import rw-project {
+ prefix "rw-project";
+ }
+
+ revision 2017-02-08 {
+ description
+ "Update model to support projects.";
+ }
+
revision 2015-09-10 {
description
"Initial revision. This YANG file defines
}
}
- container vnfd-catalog {
- description
+ augment "/rw-project:project" {
+ container vnfd-catalog {
+ description
"Virtual Network Function Descriptor (VNFD).";
- list vnfd {
- key "id";
+ list vnfd {
+ key "id";
- uses vnfd-descriptor;
- }
+ uses vnfd-descriptor;
+ }
+ }
}
}
/*
*
- * Copyright 2016 RIFT.IO Inc
+ * Copyright 2016-2017 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
prefix "manotypes";
}
+ import rw-project {
+ prefix "rw-project";
+ }
+
+ revision 2017-02-08 {
+ description
+ "Update model to support projects.";
+ }
+
revision 2014-10-27 {
description
"Initial revision. This YANG file defines
"Derived from earlier versions of base YANG files";
}
- container vnffgd-catalog {
+ augment "/rw-project:project" {
+ container vnffgd-catalog {
- list vnffgd {
- key "id";
+ list vnffgd {
+ key "id";
- leaf name {
- description "VNF Forwarding Graph Descriptor name.";
- type string;
- }
+ leaf name {
+ description "VNF Forwarding Graph Descriptor name.";
+ type string;
+ }
- leaf id {
- description "Identifier for the VNFFGD.";
- type yang:uuid;
- }
+ leaf id {
+ description "Identifier for the VNFFGD.";
+ type yang:uuid;
+ }
- leaf provider {
- description "Provider of the VNFFGD.";
- type string;
- }
+ leaf provider {
+ description "Provider of the VNFFGD.";
+ type string;
+ }
- leaf description {
- description "Description of the VNFFGD.";
- type string;
- }
+ leaf description {
+ description "Description of the VNFFGD.";
+ type string;
+ }
- leaf version {
- description "Version of the VNFFGD";
- type string;
- }
+ leaf version {
+ description "Version of the VNFFGD";
+ type string;
+ }
- //TODO: Add more content here
+ //TODO: Add more content here
+ }
}
}
}
/*
*
- * Copyright 2016 RIFT.IO Inc
+ * Copyright 2016-2017 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
prefix vnfr;
}
- tailf:annotate "/vnfr:vnfr-catalog" {
+ import rw-project {
+ prefix "rw-project";
+ }
+
+ tailf:annotate "/rw-project:project/vnfr:vnfr-catalog" {
tailf:callpoint rw_callpoint;
}
/*
*
- * Copyright 2016 RIFT.IO Inc
+ * Copyright 2016-2017 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
prefix "inet";
}
+ import rw-project {
+ prefix "rw-project";
+ }
+
+ import rw-cloud {
+ prefix "rw-cloud";
+ }
+
+ revision 2017-02-08 {
+ description
+ "Update model to support projects.";
+ }
+
revision 2015-09-10 {
description
"Initial revision. This YANG file defines
}
}
- container vnfr-catalog {
- config false;
- list vnfr {
- description
+ augment "/rw-project:project" {
+ container vnfr-catalog {
+ config false;
+ list vnfr {
+ description
"Virtual Network Function Record (VNFR).";
- key "id";
- unique "name";
+ key "id";
+ unique "name";
- leaf id {
- description "Identifier for the VNFR.";
- type yang:uuid;
- }
+ leaf id {
+ description "Identifier for the VNFR.";
+ type yang:uuid;
+ }
- leaf nsr-id-ref {
- description
+ leaf nsr-id-ref {
+ description
"NS instance identifier.
This is a leafref /nsr:ns-instance-config/nsr:nsr/nsr:id";
- type yang:uuid;
- }
+ type yang:uuid;
+ }
- leaf member-vnf-index-ref {
- description "Reference to member VNF index in Network service.";
- type leafref {
- path "/nsd:nsd-catalog/nsd:nsd/nsd:constituent-vnfd/nsd:member-vnf-index";
+ leaf member-vnf-index-ref {
+ description "Reference to member VNF index in Network service.";
+ type leafref {
+ path "../../../nsd:nsd-catalog/nsd:nsd/nsd:constituent-vnfd/nsd:member-vnf-index";
+ }
}
- }
- leaf dashboard-url {
- description "Dashboard URL";
- type inet:uri;
- }
+ leaf dashboard-url {
+ description "Dashboard URL";
+ type inet:uri;
+ }
- leaf name {
- description "VNFR name.";
- type string;
- }
+ leaf name {
+ description "VNFR name.";
+ type string;
+ }
- leaf short-name {
- description "VNFR short name.";
- type string;
- }
+ leaf short-name {
+ description "VNFR short name.";
+ type string;
+ }
- leaf vendor {
- description "Vendor of the VNFR.";
- type string;
- }
+ leaf vendor {
+ description "Vendor of the VNFR.";
+ type string;
+ }
- leaf description {
- description "Description of the VNFR.";
- type string;
- }
+ leaf description {
+ description "Description of the VNFR.";
+ type string;
+ }
- leaf version {
- description "Version of the VNFR";
- type string;
- }
+ leaf version {
+ description "Version of the VNFR";
+ type string;
+ }
- leaf create-time {
- description
- "Creation timestamp of this Virtual Network
+ leaf create-time {
+ description
+ "Creation timestamp of this Virtual Network
Function. The timestamp is expressed as
seconds since unix epoch - 1970-01-01T00:00:00Z";
- type uint32;
- }
+ type uint32;
+ }
- leaf uptime {
- description
- "Active period of this Virtual Network Function.
+ leaf uptime {
+ description
+ "Active period of this Virtual Network Function.
Uptime is expressed in seconds";
- type uint32;
- }
+ type uint32;
+ }
- container vnfd {
- description "VNF descriptor used to instantiate this VNF";
- uses vnfd:vnfd-descriptor;
- }
+ container vnfd {
+ description "VNF descriptor used to instantiate this VNF";
+ uses vnfd:vnfd-descriptor;
+ }
- // Use parameters provided here to configure this VNF
- uses manotypes:vnf-configuration;
+ // Use parameters provided here to configure this VNF
+ uses manotypes:vnf-configuration;
- // Mainly used by Mon-params & dashboard url
- container mgmt-interface {
- leaf ip-address {
- type inet:ip-address;
- }
- leaf port {
- type inet:port-number;
+ // Mainly used by Mon-params & dashboard url
+ container mgmt-interface {
+ leaf ip-address {
+ type inet:ip-address;
+ }
+ leaf port {
+ type inet:port-number;
+ }
}
- }
- list internal-vlr {
- key "vlr-ref";
+ list internal-vlr {
+ key "vlr-ref";
- leaf vlr-ref {
- description "Reference to a VLR record in the VLR catalog";
- type leafref {
- path "/vlr:vlr-catalog/vlr:vlr/vlr:id";
+ leaf vlr-ref {
+ description "Reference to a VLR record in the VLR catalog";
+ type leafref {
+ path "../../../../vlr:vlr-catalog/vlr:vlr/vlr:id";
+ }
}
- }
- leaf-list internal-connection-point-ref {
- type leafref {
- path "../../vdur/internal-connection-point/id";
+ leaf-list internal-connection-point-ref {
+ type leafref {
+ path "../../vdur/internal-connection-point/id";
+ }
}
}
- }
- list connection-point {
- key "name";
- description
+ list connection-point {
+ key "name";
+ description
"List for external connection points. Each VNF has one
or more external connection points. As the name
implies that external connection points are used for
different VNFs. The NFVO will use VLDs and VNFFGs at
the network service level to construct network services.";
- uses vnfd:common-connection-point;
+ uses vnfd:common-connection-point;
- leaf vlr-ref {
- description
+ leaf vlr-ref {
+ description
"Reference to the VLR associated with this connection point";
- type leafref {
- path "/vlr:vlr-catalog/vlr:vlr/vlr:id";
+ type leafref {
+ path "../../../../vlr:vlr-catalog/vlr:vlr/vlr:id";
+ }
}
- }
- leaf ip-address {
- description
+ leaf ip-address {
+ description
"IP address assigned to the external connection point";
- type inet:ip-address;
- }
- leaf mac-address {
- description
+ 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;
- type string;
+ // type inet:mac-address;
+ type string;
+ }
+ leaf connection-point-id {
+ rwpb:field-inline "true";
+ rwpb:field-string-max 64;
+ type string;
+ }
}
- }
- list vdur {
- description "List of Virtual Deployment Units";
- key "id";
- unique "name";
+ list vdur {
+ description "List of Virtual Deployment Units";
+ key "id";
+ unique "name";
- leaf id {
- description "Unique id for the VDU";
- type yang:uuid;
- }
+ leaf id {
+ description "Unique id for the VDU";
+ type yang:uuid;
+ }
- leaf name {
- description "name of the instantiated VDUR";
- type string;
- }
+ leaf name {
+ description "name of the instantiated VDUR";
+ type string;
+ }
- leaf vdu-id-ref {
- type leafref {
- path "../../vnfd/vdu/id";
+ leaf vdu-id-ref {
+ type leafref {
+ path "../../vnfd/vdu/id";
+ }
}
- }
- leaf vim-id {
- description "Allocated VM resource id";
- type string;
- }
+ leaf vim-id {
+ description "Allocated VM resource id";
+ type string;
+ }
- leaf flavor-id {
- description "VIM assigned flavor id";
- type string;
- }
+ leaf flavor-id {
+ description "VIM assigned flavor id";
+ type string;
+ }
- leaf image-id {
- description "VIM assigned image id";
- type string;
- }
+ leaf image-id {
+ description "VIM assigned image id";
+ type string;
+ }
- leaf management-ip {
- description "Management IP address";
- type inet:ip-address;
- }
+ leaf management-ip {
+ description "Management IP address";
+ type inet:ip-address;
+ }
- leaf vm-management-ip {
- description "VM Private Management IP address";
- type inet:ip-address;
- }
+ leaf vm-management-ip {
+ description "VM Private Management IP address";
+ type inet:ip-address;
+ }
- leaf console-url {
- description "Console URL for this VDU, if available";
- type inet:uri;
- }
+ leaf console-url {
+ description "Console URL for this VDU, if available";
+ type inet:uri;
+ }
- uses manotypes:vm-flavor;
- uses manotypes:guest-epa;
- uses manotypes:vswitch-epa;
- uses manotypes:hypervisor-epa;
- uses manotypes:host-epa;
+ uses manotypes:vm-flavor;
+ uses manotypes:guest-epa;
+ uses manotypes:vswitch-epa;
+ uses manotypes:hypervisor-epa;
+ uses manotypes:host-epa;
- uses manotypes:supplemental-boot-data;
+ uses manotypes:supplemental-boot-data;
- list volumes {
- key "name";
+ list volumes {
+ key "name";
- leaf name {
- description "Name of the disk-volumes, e.g. vda, vdb etc";
- type string;
- }
+ leaf name {
+ description "Name of the disk-volumes, e.g. vda, vdb etc";
+ type string;
+ }
- leaf volume-id {
- description "VIM assigned volume id";
- type string;
- }
+ leaf volume-id {
+ description "VIM assigned volume id";
+ type string;
+ }
- uses manotypes:volume-info;
- }
+ uses manotypes:volume-info;
+ }
- list alarms {
- description
+ list alarms {
+ description
"A list of the alarms that have been created for this VDU";
- key "alarm-id";
- uses manotypes:alarm;
- }
+ key "alarm-id";
+ uses manotypes:alarm;
+ }
- list internal-connection-point {
- key "id";
- description
+ list internal-connection-point {
+ key "id";
+ description
"List for internal connection points. Each VNFC
has zero or more internal connection points.
Internal connection points are used for connecting
has only one VNFC, it may not have any internal
connection points.";
- uses vnfd:common-connection-point;
+ uses vnfd:common-connection-point;
- leaf ip-address {
- description
+ leaf ip-address {
+ description
"IP address assigned to the internal connection point";
- type inet:ip-address;
- }
- leaf mac-address {
- description
+ type inet:ip-address;
+ }
+ leaf mac-address {
+ description
"MAC address assigned to the internal connection point";
- // type inet:mac-address;
- type string;
+ // type inet:mac-address;
+ type string;
+ }
}
- }
- list internal-interface {
- description
+ list internal-interface {
+ description
"List of internal interfaces for the VNF";
- key name;
+ key name;
- leaf name {
- description
+ leaf name {
+ description
"Name of internal interface. Note that this
name has only local significance to the VDU.";
- type string;
- }
+ type string;
+ }
- leaf vdur-internal-connection-point-ref {
- type leafref {
- path "../../internal-connection-point/id";
+ leaf vdur-internal-connection-point-ref {
+ type leafref {
+ path "../../internal-connection-point/id";
+ }
}
+ uses virtual-interface;
}
- uses virtual-interface;
- }
- list external-interface {
- description
+ list external-interface {
+ description
"List of external interfaces for the VNF.
The external interfaces enable sending
traffic to and from VNF.";
- key name;
+ key name;
- leaf name {
- description
+ leaf name {
+ description
"Name of the external interface. Note that
this name has only local significance.";
- type string;
- }
+ type string;
+ }
- leaf vnfd-connection-point-ref {
- description
- "Name of the external connection point.";
- type leafref {
- path "../../../connection-point/name";
+ leaf vnfd-connection-point-ref {
+ description
+ "Name of the external connection point.";
+ type leafref {
+ path "../../../connection-point/name";
+ }
}
+ uses virtual-interface;
}
- uses virtual-interface;
- }
- leaf operational-status {
- description
- "The operational status of the VDU
+ leaf operational-status {
+ description
+ "The operational status of the VDU
init : The VDU has just started.
vm-init-phase : The VDUs in the VNF is being created in VIM.
vm-alloc-pending : The VM alloc is pending in VIM
failed : The VDU instantiation failed.
";
- type enumeration {
- rwpb:enum-type "VduOperationalStatus";
- enum init;
- enum vm-init-phase;
- enum vm-alloc-pending;
- enum running;
- enum terminate;
- enum vl-terminate-phase;
- enum terminated;
- enum failed;
+ type enumeration {
+ rwpb:enum-type "VduOperationalStatus";
+ enum init;
+ enum vm-init-phase;
+ enum vm-alloc-pending;
+ enum running;
+ enum terminate;
+ enum vl-terminate-phase;
+ enum terminated;
+ enum failed;
+ }
}
+ uses placement-group-info;
}
- uses placement-group-info;
- }
- uses manotypes:monitoring-param;
+ uses manotypes:monitoring-param;
- leaf operational-status {
- description
- "The operational status of the VNFR instance
+ leaf operational-status {
+ description
+ "The operational status of the VNFR instance
init : The VNF has just started.
vl-init-phase : The internal VLs in the VNF are being instantiated.
vm-init-phase : The VMs for VDUs in the VNF are being instantiated.
failed : The VNF instantiation failed
";
- type enumeration {
- rwpb:enum-type "VnfrOperationalStatus";
- enum init;
- enum vl-init-phase;
- enum vm-init-phase;
- enum running;
- enum terminate;
- enum vm-terminate-phase;
- enum vl-terminate-phase;
- enum terminated;
- enum failed;
+ type enumeration {
+ rwpb:enum-type "VnfrOperationalStatus";
+ enum init;
+ enum vl-init-phase;
+ enum vm-init-phase;
+ enum running;
+ enum terminate;
+ enum vm-terminate-phase;
+ enum vl-terminate-phase;
+ enum terminated;
+ enum failed;
+ }
}
- }
- leaf config-status {
- description
- "The configuration status of the NS instance
+ leaf config-status {
+ description
+ "The configuration status of the NS instance
configuring: At least one of the VNFs in this instance is in configuring state
configured: All the VNFs in this NS instance are configured or config-not-needed state
";
- type enumeration {
- enum configuring {
- value 1;
- }
- enum configured {
- value 2;
- }
- enum failed {
- value 3;
- }
- enum config-not-needed {
- value 4;
+ type enumeration {
+ enum configuring {
+ value 1;
+ }
+ enum configured {
+ value 2;
+ }
+ enum failed {
+ value 3;
+ }
+ enum config-not-needed {
+ value 4;
+ }
}
}
+ uses placement-group-info;
}
- uses placement-group-info;
}
}
rpc create-alarm {
description "Create an alert for a running VDU";
input {
+ uses manotypes:rpc-project-name;
+
leaf cloud-account {
mandatory true;
- type string;
+ type leafref {
+ path "/rw-project:project[rw-project:name=current()/../project-name]" +
+ "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
+ }
}
leaf vdur-id {
rpc destroy-alarm {
description "Destroy an alert that is associated with a running VDU";
input {
+ uses manotypes:rpc-project-name;
+
leaf cloud-account {
mandatory true;
- type string;
+ type leafref {
+ path "/rw-project:project[rw-project:name=current()/../project-name]" +
+ "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
+ }
}
leaf alarm-id {
#
-# Copyright 2016 RIFT.IO Inc
+# Copyright 2016-2017 RIFT.IO Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
VALA_PACKAGES
rw_types-1.0 rw_yang-1.0 rw_keyspec-1.0 rw_yang_pb-1.0 rw_schema_proto-1.0
rw_log_yang-1.0 rw_base_yang-1.0 rwcal_yang-1.0 rw_manifest_yang-1.0 protobuf_c-1.0 ietf_netconf_yang-1.0
- rw_log-1.0
+ rw_log-1.0 rw_project_yang-1.0
VAPI_DIRS ${RIFT_SUBMODULE_BINARY_ROOT}/rwcal/plugins/yang
${RIFT_SUBMODULE_BINARY_ROOT}/models/plugins/yang
${RIFT_SUBMODULE_BINARY_ROOT}/rwvcs/plugins/yang
GENERATE_VAPI_FILE ${VALA_LONG_NAME}.vapi
GENERATE_GIR_FILE ${VALA_TYPELIB_PREFIX}.gir
GENERATE_TYPELIB_FILE ${VALA_TYPELIB_PREFIX}.typelib
- DEPENDS rwcal_yang rwlog_gi rwschema_yang rwmanifest_yang
+ DEPENDS rwcal_yang rwlog_gi rwschema_yang rwmanifest_yang rwproject_yang
)
rift_install_vala_artifacts(
#
-# Copyright 2016 RIFT.IO Inc
+# Copyright 2016-2017 RIFT.IO Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
COMPONENT ${PKG_LONG_NAME}
DEPENDS
mano-types_yang
+ rwproject_yang
LIBRARIES
rwschema_yang_gen
rwyang
rwlog
rwlog-mgmt_yang_gen
mano-types_yang_gen
+ rwproject_yang_gen
)
/*
*
- * Copyright 2016 RIFT.IO Inc
+ * Copyright 2016-2017 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
prefix "manotypes";
}
+ import rw-project {
+ prefix "rw-project";
+ }
+
+ revision 2017-02-08 {
+ description
+ "Update model to support projects.";
+ }
+
revision 2014-12-30 {
description
"Initial revision.";
}
}
- container cloud-accounts {
- list cloud-account-list {
- rwpb:msg-new CloudAccount;
- key "name";
+ augment "/rw-project:project" {
+ container cloud-accounts {
+ list cloud-account-list {
+ rwpb:msg-new CloudAccount;
+ key "name";
- leaf name {
- type string;
+ leaf name {
+ type string;
+ }
+ uses provider-auth;
}
- uses provider-auth;
}
}
- container vim-resources {
- rwpb:msg-new VimResources;
- config false;
-
- list vminfo-list {
- rwpb:msg-new VMInfoItem;
+ augment "/rw-project:project" {
+ container vim-resources {
+ rwpb:msg-new VimResources;
config false;
- key "vm-id";
- uses vm-info-item;
- }
+ list vminfo-list {
+ rwpb:msg-new VMInfoItem;
+ config false;
+ key "vm-id";
- list imageinfo-list {
- rwpb:msg-new ImageInfoItem;
- config false;
- key "id";
-
- uses image-info-item;
- }
+ uses vm-info-item;
+ }
- list tenantinfo-list {
- rwpb:msg-new TenantInfoItem;
- config false;
- key "tenant-id";
+ list imageinfo-list {
+ rwpb:msg-new ImageInfoItem;
+ config false;
+ key "id";
- leaf tenant-name {
- rwpb:field-inline "true";
- rwpb:field-string-max 64;
- type string;
+ uses image-info-item;
}
- leaf tenant-id {
- rwpb:field-inline "true";
- rwpb:field-string-max 64;
- type string;
- }
- }
+ list tenantinfo-list {
+ rwpb:msg-new TenantInfoItem;
+ config false;
+ key "tenant-id";
- list userinfo-list {
- rwpb:msg-new UserInfoItem;
- config false;
- key "user-id";
+ leaf tenant-name {
+ rwpb:field-inline "true";
+ rwpb:field-string-max 64;
+ type string;
+ }
- leaf user-name{
- rwpb:field-inline "true";
- rwpb:field-string-max 64;
- type string;
+ leaf tenant-id {
+ rwpb:field-inline "true";
+ rwpb:field-string-max 64;
+ type string;
+ }
}
- leaf user-id {
- rwpb:field-inline "true";
- rwpb:field-string-max 64;
- type string;
- }
- }
+ list userinfo-list {
+ rwpb:msg-new UserInfoItem;
+ config false;
+ key "user-id";
- list roleinfo-list {
- rwpb:msg-new RoleInfoItem;
- config false;
- key "role-id";
+ leaf user-name{
+ rwpb:field-inline "true";
+ rwpb:field-string-max 64;
+ type string;
+ }
- leaf role-name {
- rwpb:field-inline "true";
- rwpb:field-string-max 64;
- type string;
+ leaf user-id {
+ rwpb:field-inline "true";
+ rwpb:field-string-max 64;
+ type string;
+ }
}
- leaf role-id {
- rwpb:field-inline "true";
- rwpb:field-string-max 64;
- type string;
- }
- }
+ list roleinfo-list {
+ rwpb:msg-new RoleInfoItem;
+ config false;
+ key "role-id";
- list hostinfo-list {
- rwpb:msg-new HostInfoItem;
- config false;
- key "host-id";
+ leaf role-name {
+ rwpb:field-inline "true";
+ rwpb:field-string-max 64;
+ type string;
+ }
- leaf host-name {
- rwpb:field-inline "true";
- rwpb:field-string-max 64;
- type string;
+ leaf role-id {
+ rwpb:field-inline "true";
+ rwpb:field-string-max 64;
+ type string;
+ }
}
- leaf host-id {
- rwpb:field-inline "true";
- rwpb:field-string-max 64;
- type string;
- }
- }
+ list hostinfo-list {
+ rwpb:msg-new HostInfoItem;
+ config false;
+ key "host-id";
- list networkinfo-list {
- rwpb:msg-new NetworkInfoItem;
- config false;
- key "network-id";
+ leaf host-name {
+ rwpb:field-inline "true";
+ rwpb:field-string-max 64;
+ type string;
+ }
- uses network-info-item;
- }
+ leaf host-id {
+ rwpb:field-inline "true";
+ rwpb:field-string-max 64;
+ type string;
+ }
+ }
- list portinfo-list {
- rwpb:msg-new PortInfoItem;
- config false;
- key "port-id";
+ list networkinfo-list {
+ rwpb:msg-new NetworkInfoItem;
+ config false;
+ key "network-id";
- uses port-info-item;
- }
+ uses network-info-item;
+ }
- list flavorinfo-list {
- rwpb:msg-new FlavorInfoItem;
- config false;
- key "id";
+ list portinfo-list {
+ rwpb:msg-new PortInfoItem;
+ config false;
+ key "port-id";
- leaf id {
- rwpb:field-inline "true";
- rwpb:field-string-max 64;
- type string;
+ uses port-info-item;
}
- leaf name {
- rwpb:field-inline "true";
- rwpb:field-string-max 255;
- type string;
- }
+ list flavorinfo-list {
+ rwpb:msg-new FlavorInfoItem;
+ config false;
+ key "id";
- uses manotypes:vm-flavor;
- uses manotypes:guest-epa;
- uses manotypes:vswitch-epa;
- uses manotypes:hypervisor-epa;
- uses manotypes:host-epa;
- uses manotypes:placement-group-input;
+ leaf id {
+ rwpb:field-inline "true";
+ rwpb:field-string-max 64;
+ type string;
+ }
+
+ leaf name {
+ rwpb:field-inline "true";
+ rwpb:field-string-max 255;
+ type string;
+ }
+
+ uses manotypes:vm-flavor;
+ uses manotypes:guest-epa;
+ uses manotypes:vswitch-epa;
+ uses manotypes:hypervisor-epa;
+ uses manotypes:host-epa;
+ uses manotypes:placement-group-input;
+ }
}
}
}
- container virtual-link-req-params {
- description "This object defines the parameters required to create a virtual-link";
- rwpb:msg-new VirtualLinkReqParams;
- uses virtual-link-create-params;
+ augment "/rw-project:project" {
+ container virtual-link-req-params {
+ description "This object defines the parameters required to create a virtual-link";
+ rwpb:msg-new VirtualLinkReqParams;
+ uses virtual-link-create-params;
+ }
}
-
grouping connection-point-type {
leaf type {
description
}
}
- container vdu-init-params {
- description "This object defines the parameters required to create a VDU";
- rwpb:msg-new VDUInitParams;
- uses vdu-create-params;
+ augment "/rw-project:project" {
+ container vdu-init-params {
+ description "This object defines the parameters required to create a VDU";
+ rwpb:msg-new VDUInitParams;
+ uses vdu-create-params;
+ }
}
- container vdu-modify-params {
- description "This object defines the parameters required to modify VDU";
- rwpb:msg-new VDUModifyParams;
-
- leaf vdu-id {
- description "CAL assigned id for VDU to which this connection point belongs";
- rwpb:field-inline "true";
- rwpb:field-string-max 64;
- type string;
- }
+ augment "/rw-project:project" {
+ container vdu-modify-params {
+ description "This object defines the parameters required to modify VDU";
+ rwpb:msg-new VDUModifyParams;
- leaf image-id {
- description "CAL assigned image-id for the VDU image";
- rwpb:field-inline "true";
- rwpb:field-string-max 64;
- type string;
- }
-
- list connection-points-add {
- key "name";
- leaf name {
- description "Name of the connection point";
- type string;
- }
- leaf virtual-link-id {
- description "CAL assigned resource Id for the Virtual Link";
+ leaf vdu-id {
+ description "CAL assigned id for VDU to which this connection point belongs";
+ rwpb:field-inline "true";
+ rwpb:field-string-max 64;
type string;
}
- leaf associate-public-ip {
- type boolean;
- default false;
- }
- leaf port-security-enabled {
- description "Enables the port security";
- type boolean;
- }
- uses connection-point-type;
- }
-
- list connection-points-remove {
- key "connection-point-id";
- leaf connection-point-id {
+ leaf image-id {
+ description "CAL assigned image-id for the VDU image";
rwpb:field-inline "true";
rwpb:field-string-max 64;
type string;
}
+
+ list connection-points-add {
+ key "name";
+ leaf name {
+ description "Name of the connection point";
+ type string;
+ }
+ leaf virtual-link-id {
+ description "CAL assigned resource Id for the Virtual Link";
+ type string;
+ }
+ leaf associate-public-ip {
+ type boolean;
+ default false;
+ }
+ leaf port-security-enabled {
+ description "Enables the port security";
+ type boolean;
+ }
+
+ uses connection-point-type;
+ }
+
+ list connection-points-remove {
+ key "connection-point-id";
+ leaf connection-point-id {
+ rwpb:field-inline "true";
+ rwpb:field-string-max 64;
+ type string;
+ }
+ }
}
}
}
- container vnf-resources {
- rwpb:msg-new VNFResources;
- config false;
-
- list virtual-link-info-list {
- rwpb:msg-new VirtualLinkInfoParams;
+ augment "/rw-project:project" {
+ container vnf-resources {
+ rwpb:msg-new VNFResources;
config false;
- key virtual-link-id;
- uses virtual-link-info-params;
- }
- list vdu-info-list {
- rwpb:msg-new VDUInfoParams;
- config false;
- key vdu-id;
- uses vdu-info-params;
+ list virtual-link-info-list {
+ rwpb:msg-new VirtualLinkInfoParams;
+ config false;
+ key virtual-link-id;
+ uses virtual-link-info-params;
+ }
+
+ list vdu-info-list {
+ rwpb:msg-new VDUInfoParams;
+ config false;
+ key vdu-id;
+ uses vdu-info-params;
+ }
}
}
}
/*
*
- * Copyright 2016 RIFT.IO Inc
+ * Copyright 2016-2017 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
prefix conman;
}
- tailf:annotate "/conman:cm-state" {
+ import rw-project {
+ prefix "rw-project";
+ }
+
+ tailf:annotate "/rw-project:project/conman:cm-state" {
tailf:callpoint rw_callpoint;
}
/*
*
- * Copyright 2016 RIFT.IO Inc
+ * Copyright 2016-2017 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
prefix "rw-config-agent";
}
+ import rw-project {
+ prefix "rw-project";
+ }
+
+ revision 2017-02-08 {
+ description
+ "Update model to support projects.";
+ }
+
revision 2015-10-27 {
description
"Initial revision.";
}
}
- container cm-config {
- description "Service Orchestrator specific configuration";
- rwpb:msg-new "SoConfig";
- rwcli:new-mode "cm-config";
+ augment "/rw-project:project" {
+ container cm-config {
+ description "Service Orchestrator specific configuration";
+ rwpb:msg-new "SoConfig";
+ rwcli:new-mode "cm-config";
- container ro-endpoint {
- description "Resource Orchestrator endpoint ip address";
- rwpb:msg-new "RoEndpoint";
- uses ro-endpoint;
- }
+ container ro-endpoint {
+ description "Resource Orchestrator endpoint ip address";
+ rwpb:msg-new "RoEndpoint";
+ uses ro-endpoint;
+ }
- //uses vnf-cfg-items;
+ //uses vnf-cfg-items;
- list nsr {
- key "id";
- leaf id {
- description "Indicates NSR bringup complete, now initiate configuration of the NSR";
- type yang:uuid;
+ list nsr {
+ key "id";
+ leaf id {
+ description "Indicates NSR bringup complete, now initiate configuration of the NSR";
+ type yang:uuid;
+ }
}
- }
- }// cm-config
+ }// cm-config
+ }
// =================== SHOW ==================
typedef record-state {
// This is also used by RO (Resource Orchestrator) to indicate NSR is ready
// It will only fill in IDs
- container cm-state {
- rwpb:msg-new "CmOpdata";
- config false;
- description "CM NS & VNF states";
+ augment "/rw-project:project" {
+ container cm-state {
+ rwpb:msg-new "CmOpdata";
+ config false;
+ description "CM NS & VNF states";
- leaf states {
- description "CM various states";
- type string;
- }
-
- list cm-nsr {
- description "List of NS Records";
- key "id";
- leaf id {
- type yang:uuid;
- }
- leaf name {
- description "NSR name.";
+ leaf states {
+ description "CM various states";
type string;
}
- leaf state {
- description "State of NSR";
- type record-state;
- }
- leaf state-details {
- description "Details of the state of NSR, in case of errors";
- type string;
- }
-
- list cm-vnfr {
- description "List of VNF Records within NS Record";
+
+ list cm-nsr {
+ description "List of NS Records";
key "id";
leaf id {
type yang:uuid;
}
leaf name {
- description "VNFR name.";
+ description "NSR name.";
type string;
}
leaf state {
- description "Last known state of this VNFR";
+ description "State of NSR";
type record-state;
}
- container mgmt-interface {
- leaf ip-address {
- type inet:ip-address;
- }
- leaf port {
- type inet:port-number;
- }
- }
- leaf cfg-type {
+ leaf state-details {
+ description "Details of the state of NSR, in case of errors";
type string;
}
- leaf cfg-location {
- type inet:uri;
- }
- list connection-point {
- key "name";
+
+ list cm-vnfr {
+ description "List of VNF Records within NS Record";
+ key "id";
+ leaf id {
+ type yang:uuid;
+ }
leaf name {
- description "Connection Point name";
+ description "VNFR name.";
type string;
}
- leaf ip-address {
- description "IP address assigned to this connection point";
- type inet:ip-address;
+ leaf state {
+ description "Last known state of this VNFR";
+ type record-state;
}
- }
- } // list VNFR
- } // list NSR
- } // cm-state
-
+ container mgmt-interface {
+ leaf ip-address {
+ type inet:ip-address;
+ }
+ leaf port {
+ type inet:port-number;
+ }
+ }
+ leaf cfg-type {
+ type string;
+ }
+ leaf cfg-location {
+ type inet:uri;
+ }
+ list connection-point {
+ key "name";
+ leaf name {
+ description "Connection Point name";
+ type string;
+ }
+ leaf ip-address {
+ description "IP address assigned to this connection point";
+ type inet:ip-address;
+ }
+ }
+ } // list VNFR
+ } // list NSR
+ } // cm-state
+ }
+
} // rw-conman
rw-nsm
rw-nsr
rw-pb-ext
+rw-project
rw-resource-mgr
rw-restportforward
rwsdn
#
-# Copyright 2016 RIFT.IO Inc
+# Copyright 2016-2017 RIFT.IO Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
del self._vnffgr_list[vnffgr_id]
class SDNAccountDtsHandler(object):
- XPATH = "C,/rw-sdn:sdn/rw-sdn:account"
+ XPATH = "C,/rw-project:project/rw-sdn:sdn/rw-sdn:account"
def __init__(self, dts, log, parent):
self._dts = dts
#!/usr/bin/env python3
#
-# Copyright 2016 RIFT.IO Inc
+# Copyright 2016-2017 RIFT.IO Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@asyncio.coroutine
def configure_cloud_account(self, dts, acct_type):
- account_xpath = "C,/rw-cloud:cloud/account"
+ account_xpath = "C,/rw-project:project/rw-cloud:cloud/account"
msg = self.get_cloud_account_msg(acct_type)
self.log.info("Configuring cloud-account: %s",msg)
yield from dts.query_create(account_xpath,
#
-# Copyright 2016 RIFT.IO Inc
+# Copyright 2016-2017 RIFT.IO Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
def _register_show_status(self):
def get_xpath(sdn_name=None):
- return "D,/rw-sdn:sdn/rw-sdn:account{}/rw-sdn:connection-status".format(
+ return "D,/rw-project:project/rw-sdn:sdn/rw-sdn:account{}" \
+ "/rw-sdn:connection-status".format(
"[name='%s']" % sdn_name if sdn_name is not None else ''
)
yield from self._register_validate_rpc()
class SDNAccountDtsHandler(object):
- XPATH = "C,/rw-sdn:sdn/rw-sdn:account"
+ XPATH = "C,/rw-project:project/rw-sdn:sdn/rw-sdn:account"
def __init__(self, dts, log, parent):
self._dts = dts
#
-# Copyright 2016 RIFT.IO Inc
+# Copyright 2016-2017 RIFT.IO Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
rw_log_yang-1.0 rw_base_yang-1.0 rwcal_yang-1.0 rwsdn_yang-1.0 rw_manifest_yang-1.0 protobuf_c-1.0 ietf_netconf_yang-1.0
ietf_network_yang-1.0 ietf_network_topology_yang-1.0
ietf_l2_topology_yang-1.0 rw_topology_yang-1.0
- rw_log-1.0
+ rw_log-1.0 rw_project_yang-1.0
VAPI_DIRS
${RIFT_SUBMODULE_BINARY_ROOT}/models/plugins/yang
${RIFT_SUBMODULE_BINARY_ROOT}/rwcal/plugins/yang
GENERATE_VAPI_FILE ${VALA_LONG_NAME}.vapi
GENERATE_GIR_FILE ${VALA_TYPELIB_PREFIX}.gir
GENERATE_TYPELIB_FILE ${VALA_TYPELIB_PREFIX}.typelib
- DEPENDS rwcal_yang rwsdn_yang mano_yang rwlog_gi rwschema_yang
+ DEPENDS rwcal_yang rwsdn_yang mano_yang rwlog_gi rwschema_yang rwproject_yang
)
rift_install_vala_artifacts(
#
-# Copyright 2016 RIFT.IO Inc
+# Copyright 2016-2017 RIFT.IO Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
YANG_FILES ${source_yang_files}
COMPONENT ${PKG_LONG_NAME}
LIBRARIES
- rwschema_yang_gen
- rwyang
- rwlog
- rwlog-mgmt_yang_gen
mano-types_yang_gen
+ rwproject_yang_gen
)
/*
*
- * Copyright 2016 RIFT.IO Inc
+ * Copyright 2016-2017 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
prefix "yang";
}
+ import rw-project {
+ prefix "rw-project";
+ }
+
+ revision 2017-02-08 {
+ description
+ "Update model to support projects.";
+ }
revision 2014-12-30 {
description
}
}
- uses connection-status;
+ // uses connection-status;
typedef sdn-account-type {
description "SDN account type";
}
}
- container sdn-accounts {
- list sdn-account-list {
- rwpb:msg-new SDNAccount;
- key "name";
+ augment "/rw-project:project" {
+ container sdn-accounts {
+ list sdn-account-list {
+ rwpb:msg-new SDNAccount;
+ key "name";
- leaf name {
- type string;
- }
+ leaf name {
+ type string;
+ }
- uses sdn-provider-auth;
- uses connection-status;
+ uses sdn-provider-auth;
+ uses connection-status;
+ }
}
}
- container vnffgs {
- list vnffg-chain {
- key "name";
- rwpb:msg-new VNFFGChain;
-
- leaf name {
- type string;
- }
+ augment "/rw-project:project" {
+ container vnffgs {
+ list vnffg-chain {
+ key "name";
+ rwpb:msg-new VNFFGChain;
- list vnf-chain-path {
- key "order";
- leaf order {
- type uint32;
- description " Order of the VNF in VNFFG chain";
- }
- leaf service-function-type {
- type string;
- }
- leaf nsh-aware {
- type boolean;
- }
- leaf transport-type {
+ leaf name {
type string;
}
- list vnfr-ids {
- key "vnfr-id";
- leaf vnfr-id {
- type yang:uuid;
+
+ list vnf-chain-path {
+ key "order";
+ leaf order {
+ type uint32;
+ description " Order of the VNF in VNFFG chain";
}
- leaf vnfr-name {
+ leaf service-function-type {
type string;
}
- leaf mgmt-address {
- type inet:ip-address;
+ leaf nsh-aware {
+ type boolean;
}
- leaf mgmt-port {
- type inet:port-number;
+ leaf transport-type {
+ type string;
}
- list vdu-list {
- key "vm-id port-id";
- leaf port-id {
- rwpb:field-inline "true";
- rwpb:field-string-max 64;
- type string;
- }
- leaf vm-id {
- rwpb:field-inline "true";
- rwpb:field-string-max 64;
- type string;
+ list vnfr-ids {
+ key "vnfr-id";
+ leaf vnfr-id {
+ type yang:uuid;
}
- leaf name {
+ leaf vnfr-name {
type string;
}
- leaf address {
+ leaf mgmt-address {
type inet:ip-address;
}
- leaf port {
+ leaf mgmt-port {
type inet:port-number;
}
+ list vdu-list {
+ key "vm-id port-id";
+ leaf port-id {
+ rwpb:field-inline "true";
+ rwpb:field-string-max 64;
+ type string;
+ }
+ leaf vm-id {
+ rwpb:field-inline "true";
+ rwpb:field-string-max 64;
+ type string;
+ }
+ leaf name {
+ type string;
+ }
+ leaf address {
+ type inet:ip-address;
+ }
+ leaf port {
+ type inet:port-number;
+ }
+ }
+ leaf sff-name {
+ description "SFF name useful for non OVS based SFF";
+ type string;
+ }
}
- leaf sff-name {
- description "SFF name useful for non OVS based SFF";
- type string;
- }
- }
- }
- list sff {
- rwpb:msg-new VNFFGSff;
- key "name";
- leaf name {
- type string;
- }
- leaf function-type {
- type string;
- }
- leaf mgmt-address {
- type inet:ip-address;
}
- leaf mgmt-port {
- type inet:port-number;
- }
- list dp-endpoints {
+ list sff {
+ rwpb:msg-new VNFFGSff;
key "name";
leaf name {
- type string;
- }
- leaf address {
+ type string;
+ }
+ leaf function-type {
+ type string;
+ }
+ leaf mgmt-address {
type inet:ip-address;
}
- leaf port {
+ leaf mgmt-port {
type inet:port-number;
}
- }
- list vnfr-list {
- key "vnfr-name";
- leaf vnfr-name {
- type string;
+ list dp-endpoints {
+ key "name";
+ leaf name {
+ type string;
+ }
+ leaf address {
+ type inet:ip-address;
+ }
+ leaf port {
+ type inet:port-number;
+ }
+ }
+ list vnfr-list {
+ key "vnfr-name";
+ leaf vnfr-name {
+ type string;
+ }
}
}
- }
- leaf classifier-name {
- type string;
+ leaf classifier-name {
+ type string;
+ }
}
}
}
- container vnffg-rendered-paths {
- rwpb:msg-new VNFFGRenderedPaths;
- list vnffg-rendered-path {
- key "name";
- rwpb:msg-new VNFFGRenderedPath;
- config false;
- leaf name {
- type string;
- }
- leaf path-id {
- description
- "Unique Identifier for the service path";
- type uint32;
- }
- list rendered-path-hop {
- key "hop-number";
- leaf hop-number {
- type uint8;
- }
- leaf service-index {
- description
- "Location within the service path";
- type uint8;
- }
- leaf vnfr-name {
+ augment "/rw-project:project" {
+ container vnffg-rendered-paths {
+ rwpb:msg-new VNFFGRenderedPaths;
+ list vnffg-rendered-path {
+ key "name";
+ rwpb:msg-new VNFFGRenderedPath;
+ config false;
+ leaf name {
type string;
}
- container service-function-forwarder {
- leaf name {
+ leaf path-id {
+ description
+ "Unique Identifier for the service path";
+ type uint32;
+ }
+ list rendered-path-hop {
+ key "hop-number";
+ leaf hop-number {
+ type uint8;
+ }
+ leaf service-index {
description
- "Service Function Forwarder name";
+ "Location within the service path";
+ type uint8;
+ }
+ leaf vnfr-name {
type string;
}
- leaf ip-address {
- description
+ container service-function-forwarder {
+ leaf name {
+ description
+ "Service Function Forwarder name";
+ type string;
+ }
+ leaf ip-address {
+ description
"Service Function Forwarder Data Plane IP address";
- type inet:ip-address;
- }
- leaf port {
- description
+ type inet:ip-address;
+ }
+ leaf port {
+ description
"Service Function Forwarder Data Plane port";
- type inet:port-number;
- }
+ type inet:port-number;
+ }
+ }
}
}
}
}
+ augment "/rw-project:project" {
+ container vnffg-classifiers {
+ list vnffg-classifier {
+ key "name";
+ rwpb:msg-new VNFFGClassifier;
- container vnffg-classifiers {
- list vnffg-classifier {
- key "name";
- rwpb:msg-new VNFFGClassifier;
-
- leaf name {
- type string;
- }
- leaf rsp-name {
- type string;
- }
- leaf port-id {
- rwpb:field-inline "true";
- rwpb:field-string-max 64;
- type string;
- }
- leaf vm-id {
- rwpb:field-inline "true";
- rwpb:field-string-max 64;
- type string;
- }
- leaf sff-name {
- type string;
- }
- container vnffg-metadata {
- leaf ctx1 {
+ leaf name {
type string;
}
- leaf ctx2 {
+ leaf rsp-name {
type string;
}
- leaf ctx3 {
+ leaf port-id {
+ rwpb:field-inline "true";
+ rwpb:field-string-max 64;
type string;
}
- leaf ctx4 {
+ leaf vm-id {
+ rwpb:field-inline "true";
+ rwpb:field-string-max 64;
type string;
}
- }
- list match-attributes {
- description
- "List of match attributes.";
- key "name";
- leaf name {
+ leaf sff-name {
+ type string;
+ }
+ container vnffg-metadata {
+ leaf ctx1 {
+ type string;
+ }
+ leaf ctx2 {
+ type string;
+ }
+ leaf ctx3 {
+ type string;
+ }
+ leaf ctx4 {
+ type string;
+ }
+ }
+ list match-attributes {
description
+ "List of match attributes.";
+ key "name";
+ leaf name {
+ description
"Name for the Access list";
- type string;
- }
+ type string;
+ }
- leaf ip-proto {
- description
+ leaf ip-proto {
+ description
"IP Protocol.";
- type uint8;
- }
+ type uint8;
+ }
- leaf source-ip-address {
- description
+ leaf source-ip-address {
+ description
"Source IP address.";
- type inet:ip-prefix;
- }
+ type inet:ip-prefix;
+ }
- leaf destination-ip-address {
- description
+ leaf destination-ip-address {
+ description
"Destination IP address.";
- type inet:ip-prefix;
- }
+ type inet:ip-prefix;
+ }
- leaf source-port {
- description
+ leaf source-port {
+ description
"Source port number.";
- type inet:port-number;
- }
+ type inet:port-number;
+ }
- leaf destination-port {
- description
+ leaf destination-port {
+ description
"Destination port number.";
- type inet:port-number;
- }
- } //match-attributes
+ type inet:port-number;
+ }
+ } //match-attributes
+ }
}
}
#
-# Copyright 2016 RIFT.IO Inc
+# Copyright 2016-2017 RIFT.IO Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
rw_conman_yang_gen
rwconfig_agent_yang_gen
mano-types_yang_gen
+ rwproject_yang_gen
DEPENDS
mano_yang
rwcloud_yang
rw_conman_yang
rwconfig_agent_yang
mano-types_yang
+ rwproject_yang
)
/*
*
- * Copyright 2016 RIFT.IO Inc
+ * Copyright 2016-2017 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
prefix tailf;
}
- tailf:annotate "/rw-image-mgmt:upload-jobs" {
+ import rw-project {
+ prefix "rw-project";
+ }
+
+ tailf:annotate "/rw-project:project/rw-image-mgmt:upload-jobs" {
tailf:callpoint rw_callpoint;
}
/*
*
- * Copyright 2016 RIFT.IO Inc
+ * Copyright 2016-2017 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
import rw-cloud {
- prefix "rwcloud";
+ prefix "rw-cloud";
}
import rwcal {
prefix "rwcal";
}
+ import rw-project {
+ prefix "rw-project";
+ }
+
+ import mano-types {
+ prefix "mano-types";
+ }
+
+ revision 2017-02-08 {
+ description
+ "Update model to support projects.";
+ }
+
revision 2016-06-01 {
description
"Initial revision.";
leaf cloud-account {
description "The cloud account to upload the image to";
type leafref {
- path "/rwcloud:cloud/rwcloud:account/rwcloud:name";
+ path "../../../../rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
}
}
uses upload-task-status;
}
- container upload-jobs {
- rwpb:msg-new UploadJobs;
- description "Image upload jobs";
- config false;
+ augment "/rw-project:project" {
+ container upload-jobs {
+ rwpb:msg-new UploadJobs;
+ description "Image upload jobs";
+ config false;
- list job {
- rwpb:msg-new UploadJob;
- key "id";
+ list job {
+ rwpb:msg-new UploadJob;
+ key "id";
- leaf id {
- description "Unique image upload job-id";
- type uint32;
- }
+ leaf id {
+ description "Unique image upload job-id";
+ type uint32;
+ }
- leaf status {
- description "Current job status";
- type job-status;
- }
+ leaf status {
+ description "Current job status";
+ type job-status;
+ }
- leaf start-time {
- description "The job start time (unix epoch)";
- type uint32;
- }
+ leaf start-time {
+ description "The job start time (unix epoch)";
+ type uint32;
+ }
- leaf stop-time {
- description "The job stop time (unix epoch)";
- type uint32;
- }
+ leaf stop-time {
+ description "The job stop time (unix epoch)";
+ type uint32;
+ }
- list upload-tasks {
- rwpb:msg-new UploadTask;
- description "The upload tasks that are part of this job";
- uses upload-task;
+ list upload-tasks {
+ rwpb:msg-new UploadTask;
+ description "The upload tasks that are part of this job";
+ uses upload-task;
+ }
}
}
}
input {
rwpb:msg-new CreateUploadJob;
+ uses mano-types:rpc-project-name;
+
choice image-selection {
case onboarded-image {
description "Use an image previously onboarded in the image catalog";
leaf-list cloud-account {
description "List of cloud accounts to upload the image to";
type leafref {
- path "/rwcloud:cloud/rwcloud:account/rwcloud:name";
+ path "/rw-project:project[rw-project:name=current()/.." +
+ "/project-name]/rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
}
}
}
rpc cancel-upload-job {
input {
rwpb:msg-new CancelUploadJob;
+
leaf job-id {
type uint32;
}
+
+ uses mano-types:rpc-project-name;
}
}
}
/*
*
- * Copyright 2016 RIFT.IO Inc
+ * Copyright 2016-2017 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
prefix tailf;
}
- tailf:annotate "/rw-launchpad:datacenters" {
+ import rw-project {
+ prefix "rw-project";
+ }
+
+ tailf:annotate "/rw-project:project/rw-launchpad:datacenters" {
tailf:callpoint rw_callpoint;
}
}
/*
*
- * Copyright 2016 RIFT.IO Inc
+ * Copyright 2016-2017 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
prefix "manotypes";
}
+ import rw-project {
+ prefix "rw-project";
+ }
+
+ revision 2017-02-08 {
+ description
+ "Update model to support projects.";
+ }
+
revision 2015-09-14 {
description
"Initial revision.";
}
- container datacenters {
- description "OpenMano data centers";
+ augment "/rw-project:project" {
+ container datacenters {
+ description "OpenMano data centers";
- rwpb:msg-new DataCenters;
- config false;
+ rwpb:msg-new DataCenters;
+ config false;
- list ro-accounts {
- description
+ list ro-accounts {
+ description
"A list of OpenMano cloud accounts that have data centers associated
with them";
- rwpb:msg-new ROAccount;
- key "name";
+ rwpb:msg-new ROAccount;
+ key "name";
- leaf name {
- description "The name of the cloud account";
- type leafref {
- path "/rw-launchpad:resource-orchestrator/rw-launchpad:name";
+ leaf name {
+ description "The name of the cloud account";
+ type leafref {
+ path "../../../rw-launchpad:resource-orchestrator/rw-launchpad:name";
+ }
}
- }
- list datacenters {
- rwpb:msg-new DataCenter;
- leaf uuid {
- description "The UUID of the data center";
- type yang:uuid;
- }
+ list datacenters {
+ rwpb:msg-new DataCenter;
+ leaf uuid {
+ description "The UUID of the data center";
+ type yang:uuid;
+ }
- leaf name {
- description "The name of the data center";
- type string;
+ leaf name {
+ description "The name of the data center";
+ type string;
+ }
}
}
}
}
}
- container resource-orchestrator {
- rwpb:msg-new ResourceOrchestrator;
-
- leaf name {
- type string;
- }
+ augment "/rw-project:project" {
+ container resource-orchestrator {
+ rwpb:msg-new ResourceOrchestrator;
- leaf account-type {
- type resource-orchestrator-account-type;
- }
+ leaf name {
+ type string;
+ }
- choice resource-orchestrator {
- description
- "The resource orchestrator to use by the Launchpad";
- default rift-ro;
+ leaf account-type {
+ type resource-orchestrator-account-type;
+ }
- case rift-ro {
+ choice resource-orchestrator {
description
- "Use the RIFT.io resource orchestrator";
+ "The resource orchestrator to use by the Launchpad";
+ default rift-ro;
+
+ case rift-ro {
+ description
+ "Use the RIFT.io resource orchestrator";
- container rift-ro {
- leaf rift-ro {
- type empty;
+ container rift-ro {
+ leaf rift-ro {
+ type empty;
+ }
}
}
- }
- case openmano {
- description
- "Use OpenMano as RO";
+ case openmano {
+ description
+ "Use OpenMano as RO";
- container openmano {
- leaf host {
- type string;
- default "localhost";
- }
+ container openmano {
+ leaf host {
+ type string;
+ default "localhost";
+ }
- leaf port {
- type uint16;
- default 9090;
- }
+ leaf port {
+ type uint16;
+ default 9090;
+ }
- leaf tenant-id {
- type string {
- length "36";
+ leaf tenant-id {
+ type string {
+ length "36";
+ }
+ mandatory true;
}
- mandatory true;
}
}
}
}
}
- container launchpad-config {
- leaf public-ip {
- description
+ augment "/rw-project:project" {
+ container launchpad-config {
+ leaf public-ip {
+ description
"An IP address that can, at least, be reached by the host that the
launchpad is running on. This is not a mandatory but is required for
alarms to function correctly.";
- type string;
+ type string;
+ }
}
}
}
/*
*
- * Copyright 2016 RIFT.IO Inc
+ * Copyright 2016-2017 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
prefix "rw-config-agent";
}
+ import rw-project {
+ prefix "rw-project";
+ }
+
+ revision 2017-02-08 {
+ description
+ "Update model to support projects.";
+ }
+
revision 2015-10-07 {
description
"Initial revision.";
}
}
- container ro-config {
- description "Resource Orchestrator endpoint ip address";
- rwpb:msg-new "roConfig";
- rwcli:new-mode "ro-config";
+ augment "/rw-project:project" {
+ container ro-config {
+ description "Resource Orchestrator endpoint ip address";
+ rwpb:msg-new "roConfig";
+ rwcli:new-mode "ro-config";
- container cm-endpoint {
- description "Service Orchestrator endpoint ip address";
- rwpb:msg-new "SoEndpoint";
- uses cm-endpoint;
+ container cm-endpoint {
+ description "Service Orchestrator endpoint ip address";
+ rwpb:msg-new "SoEndpoint";
+ uses cm-endpoint;
+ }
}
}
}
/*
*
- * Copyright 2016 RIFT.IO Inc
+ * Copyright 2016-2017 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
prefix tailf;
}
- tailf:annotate "/rw-pkg-mgmt:download-jobs" {
+ import rw-project {
+ prefix "rw-project";
+ }
+
+ tailf:annotate "/rw-project:project/rw-pkg-mgmt:download-jobs" {
tailf:callpoint rw_callpoint;
}
/*
*
- * Copyright 2016 RIFT.IO Inc
+ * Copyright 2016-2017 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
prefix "manotypes";
}
+ import rw-project {
+ prefix "rw-project";
+ }
+
+ revision 2017-02-08 {
+ description
+ "Update model to support projects.";
+ }
+
revision 2016-06-01 {
description
"Initial revision.";
}
}
- container download-jobs {
- rwpb:msg-new DownloadJobs;
- description "Download jobs";
- config false;
+ augment "/rw-project:project" {
+ container download-jobs {
+ rwpb:msg-new DownloadJobs;
+ description "Download jobs";
+ config false;
- list job {
- rwpb:msg-new DownloadJob;
- key "download-id";
+ list job {
+ rwpb:msg-new DownloadJob;
+ key "download-id";
- leaf download-id {
- description "Unique UUID";
- type string;
- }
+ leaf download-id {
+ description "Unique UUID";
+ type string;
+ }
- leaf url {
- description "URL of the download";
- type string;
- }
+ leaf url {
+ description "URL of the download";
+ type string;
+ }
- uses package-file-identifer;
- uses download-task-status;
+ uses package-file-identifer;
+ uses download-task-status;
+ }
}
}
input {
uses package-identifer;
+
}
output {
description "Type of the package";
type manotypes:package-type;
}
+
+ uses manotypes:rpc-project-name;
}
output {
input {
uses package-identifer;
uses external-url-data;
+ uses manotypes:rpc-project-name;
}
output {
input {
uses package-identifer;
uses external-url-data;
+ uses manotypes:rpc-project-name;
}
output {
input {
uses package-identifer;
+ uses manotypes:rpc-project-name;
leaf export-schema {
description "Schema to export";
type export-format;
default YAML;
}
-
}
output {
input {
uses package-file-identifer;
uses external-url-data;
+ uses manotypes:rpc-project-name;
}
output {
input {
uses package-file-identifer;
+ uses manotypes:rpc-project-name;
}
output {
description "Trace in case of a failure";
type string;
}
-
}
}
/*
*
- * Copyright 2016 RIFT.IO Inc
+ * Copyright 2016-2017 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
prefix tailf;
}
- tailf:annotate "/rw-resource-mgr:resource-pool-records" {
+ import rw-project {
+ prefix "rw-project";
+ }
+
+ tailf:annotate "/rw-project:project/rw-resource-mgr:resource-pool-records" {
tailf:callpoint rw_callpoint;
}
- tailf:annotate "/rw-resource-mgr:resource-mgmt" {
+ tailf:annotate "/rw-project:project/rw-resource-mgr:resource-mgmt" {
tailf:callpoint rw_callpoint;
}
}
/*
*
- * Copyright 2016 RIFT.IO Inc
+ * Copyright 2016-2017 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
prefix "manotypes";
}
+ import rw-project {
+ prefix "rw-project";
+ }
+
+ revision 2017-02-08 {
+ description
+ "Update model to support projects.";
+ }
+
revision 2015-10-16 {
description
"Initial revision.";
}
- container resource-mgr-config {
- description "Data model for configuration of resource-mgr";
- rwpb:msg-new ResourceManagerConfig;
- config true;
-
- container management-domain {
- leaf name {
- description "The management domain name this launchpad is associated with.";
- rwpb:field-inline "true";
- rwpb:field-string-max 64;
- type string;
- //mandatory true;
- }
- }
+ augment "/rw-project:project" {
+ container resource-mgr-config {
+ description "Data model for configuration of resource-mgr";
+ rwpb:msg-new ResourceManagerConfig;
+ config true;
- container resource-pools {
- description "Resource Pool configuration";
- rwpb:msg-new ResourcePools;
- list cloud-account {
- key "name";
+ container management-domain {
leaf name {
- description
- "Resource pool for the configured cloud account";
- type leafref {
- path "/rwcloud:cloud/rwcloud:account/rwcloud:name";
+ description "The management domain name this launchpad is associated with.";
+ rwpb:field-inline "true";
+ rwpb:field-string-max 64;
+ type string;
+ //mandatory true;
+ }
+ }
+
+ container resource-pools {
+ description "Resource Pool configuration";
+ rwpb:msg-new ResourcePools;
+ list cloud-account {
+ key "name";
+ leaf name {
+ description
+ "Resource pool for the configured cloud account";
+ type leafref {
+ path "../../../../rwcloud:cloud/rwcloud:account/rwcloud:name";
+ }
}
}
}
}
}
- container resource-mgmt {
- description "Resource management ";
- config false;
+ augment "/rw-project:project" {
+ container resource-mgmt {
+ description "Resource management ";
+ config false;
- container vdu-event {
- description "Events for VDU Management";
- rwpb:msg-new VDUEvent;
+ container vdu-event {
+ description "Events for VDU Management";
+ rwpb:msg-new VDUEvent;
- list vdu-event-data {
- rwpb:msg-new VDUEventData;
- key "event-id";
+ list vdu-event-data {
+ rwpb:msg-new VDUEventData;
+ key "event-id";
- leaf event-id {
- description "Identifier associated with the VDU transaction";
- type yang:uuid;
- }
+ leaf event-id {
+ description "Identifier associated with the VDU transaction";
+ type yang:uuid;
+ }
- leaf cloud-account {
- description "The cloud account to use for this resource request";
- type leafref {
- path "/rwcloud:cloud/rwcloud:account/rwcloud:name";
+ leaf cloud-account {
+ description "The cloud account to use for this resource request";
+ type leafref {
+ path "../../../../rwcloud:cloud/rwcloud:account/rwcloud:name";
+ }
}
- }
- container request-info {
- description "Information about required resource";
+ container request-info {
+ description "Information about required resource";
- uses rwcal:vdu-create-params;
- }
+ uses rwcal:vdu-create-params;
+ }
- container resource-info {
- description "Information about allocated resource";
- leaf pool-name {
- type string;
+ container resource-info {
+ description "Information about allocated resource";
+ leaf pool-name {
+ type string;
+ }
+ uses resource-state;
+ uses rwcal:vdu-info-params;
}
- uses resource-state;
- uses rwcal:vdu-info-params;
}
}
- }
- container vlink-event {
- description "Events for Virtual Link management";
- rwpb:msg-new VirtualLinkEvent;
+ container vlink-event {
+ description "Events for Virtual Link management";
+ rwpb:msg-new VirtualLinkEvent;
- list vlink-event-data {
- rwpb:msg-new VirtualLinkEventData;
+ list vlink-event-data {
+ rwpb:msg-new VirtualLinkEventData;
- key "event-id";
+ key "event-id";
- leaf event-id {
- description "Identifier associated with the Virtual Link transaction";
- type yang:uuid;
- }
+ leaf event-id {
+ description "Identifier associated with the Virtual Link transaction";
+ type yang:uuid;
+ }
- leaf cloud-account {
- description "The cloud account to use for this resource request";
- type leafref {
- path "/rwcloud:cloud/rwcloud:account/rwcloud:name";
+ leaf cloud-account {
+ description "The cloud account to use for this resource request";
+ type leafref {
+ path "../../../../rwcloud:cloud/rwcloud:account/rwcloud:name";
+ }
}
- }
- container request-info {
- description "Information about required resource";
+ container request-info {
+ description "Information about required resource";
- uses rwcal:virtual-link-create-params;
- }
+ uses rwcal:virtual-link-create-params;
+ }
- container resource-info {
- leaf pool-name {
- type string;
+ container resource-info {
+ leaf pool-name {
+ type string;
+ }
+ uses resource-state;
+ uses rwcal:virtual-link-info-params;
}
- uses resource-state;
- uses rwcal:virtual-link-info-params;
}
}
}
}
- container resource-pool-records {
- description "Resource Pool Records";
- rwpb:msg-new ResourcePoolRecords;
- config false;
+ augment "/rw-project:project" {
+ container resource-pool-records {
+ description "Resource Pool Records";
+ rwpb:msg-new ResourcePoolRecords;
+ config false;
- list cloud-account {
- key "name";
- leaf name {
- description
- "The configured cloud account's pool records.";
- type leafref {
- path "/rwcloud:cloud/rwcloud:account/rwcloud:name";
+ list cloud-account {
+ key "name";
+ leaf name {
+ description
+ "The configured cloud account's pool records.";
+ type leafref {
+ path "../../../rwcloud:cloud/rwcloud:account/rwcloud:name";
+ }
}
- }
- list records {
- rwpb:msg-new ResourceRecordInfo;
- key "name";
- uses resource-pool-info;
+ list records {
+ rwpb:msg-new ResourceRecordInfo;
+ key "name";
+ uses resource-pool-info;
- leaf pool-status {
- type enumeration {
- enum unknown;
- enum locked;
- enum unlocked;
+ leaf pool-status {
+ type enumeration {
+ enum unknown;
+ enum locked;
+ enum unlocked;
+ }
}
- }
- leaf total-resources {
- type uint32;
- }
+ leaf total-resources {
+ type uint32;
+ }
- leaf free-resources {
- type uint32;
- }
+ leaf free-resources {
+ type uint32;
+ }
- leaf allocated-resources {
- type uint32;
+ leaf allocated-resources {
+ type uint32;
+ }
}
}
}
}
- container resource-mgr-data{
- description "Resource Manager operational data";
- config false;
+ augment "/rw-project:project" {
+ container resource-mgr-data {
+ description "Resource Manager operational data";
+ config false;
- container pool-record {
- description "Resource Pool record";
+ container pool-record {
+ description "Resource Pool record";
- list cloud {
- key "name";
- max-elements 16;
- rwpb:msg-new "ResmgrCloudPoolRecords";
- leaf name {
- description
- "The configured cloud account's pool records.";
- type leafref {
- path "/rwcloud:cloud/rwcloud:account/rwcloud:name";
+ list cloud {
+ key "name";
+ max-elements 16;
+ rwpb:msg-new "ResmgrCloudPoolRecords";
+ leaf name {
+ description
+ "The configured cloud account's pool records.";
+ type leafref {
+ path "../../../../rwcloud:cloud/rwcloud:account/rwcloud:name";
+ }
}
- }
- list records {
- key "name";
- uses resource-pool-info;
+ list records {
+ key "name";
+ uses resource-pool-info;
- list free-vdu-list {
- key vdu-id;
- uses rwcal:vdu-info-params;
- }
+ list free-vdu-list {
+ key vdu-id;
+ uses rwcal:vdu-info-params;
+ }
- list in-use-vdu-list {
- key vdu-id;
- uses rwcal:vdu-info-params;
- }
+ list in-use-vdu-list {
+ key vdu-id;
+ uses rwcal:vdu-info-params;
+ }
- list free-vlink-list {
- key virtual-link-id;
- uses rwcal:virtual-link-info-params;
- }
+ list free-vlink-list {
+ key virtual-link-id;
+ uses rwcal:virtual-link-info-params;
+ }
- list in-use-vlink-list {
+ list in-use-vlink-list {
key virtual-link-id;
- uses rwcal:virtual-link-info-params;
+ uses rwcal:virtual-link-info-params;
+ }
}
}
}
/*
*
- * Copyright 2016 RIFT.IO Inc
+ * Copyright 2016-2017 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
prefix tailf;
}
+ import rw-project {
+ prefix "rw-project";
+ }
+
tailf:annotate "/rw-staging-mgmt:create-staging-area" {
tailf:actionpoint rw_actionpoint;
}
- tailf:annotate "/rw-staging-mgmt:staging-areas" {
+ tailf:annotate "/rw-project:project/rw-staging-mgmt:staging-areas" {
tailf:callpoint rw_callpoint;
}
/*
*
- * Copyright 2016 RIFT.IO Inc
+ * Copyright 2016-2017 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
prefix "manotypes";
}
+ import rw-project {
+ prefix "rw-project";
+ }
+
+ revision 2017-02-08 {
+ description
+ "Update model to support projects.";
+ }
+
revision 2016-06-01 {
description
"Initial revision.";
}
- container staging-areas {
- rwpb:msg-new StagingAreas;
- description "Staging Areas";
- config false;
+ augment "/rw-project:project" {
+ container staging-areas {
+ rwpb:msg-new StagingAreas;
+ description "Staging Areas";
+ config false;
- list staging-area {
- rwpb:msg-new StagingArea;
- key "area-id";
+ list staging-area {
+ rwpb:msg-new StagingArea;
+ key "area-id";
- leaf area-id {
- description "Staging Area ID";
- type string;
- }
+ leaf area-id {
+ description "Staging Area ID";
+ type string;
+ }
- uses staging-area-config;
- uses staging-area-meta;
+ uses staging-area-config;
+ uses staging-area-meta;
+ }
}
}
-
rpc create-staging-area {
description "Creates a staging area for the upload.";
input {
uses staging-area-config;
+ uses manotypes:rpc-project-name;
}
output {
#!/usr/bin/env python3
#
-# Copyright 2016 RIFT.IO Inc
+# Copyright 2016-2017 RIFT.IO Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@asyncio.coroutine
def configure_cloud_account(self, dts, cloud_type, cloud_name="cloud1"):
account = self.get_cal_account(cloud_type, cloud_name)
- account_xpath = "C,/rw-cloud:cloud/rw-cloud:account[rw-cloud:name='{}']".format(cloud_name)
+ account_xpath = "C,/rw-project:project/rw-cloud:cloud/rw-cloud:account[rw-cloud:name='{}']".format(cloud_name)
self.log.info("Configuring cloud-account: %s", account)
yield from dts.query_create(account_xpath,
rwdts.XactFlag.ADVISE,
#!/usr/bin/env python
"""
#
-# Copyright 2016 RIFT.IO Inc
+# Copyright 2016-2017 RIFT.IO Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
cloud_account.openstack.tenant = 'demo'
cloud_account.openstack.mgmt_network = 'private'
- cloud_proxy.merge_config("/rw-cloud:cloud-account", cloud_account)
+ cloud_proxy.merge_config("/rw-project:project/rw-cloud:cloud-account", cloud_account)
def test_configure_pools(self, resource_mgr_proxy):
pools = RwResourceMgrYang.ResourcePools.from_dict({
#!/usr/bin/env python
"""
#
-# Copyright 2016 RIFT.IO Inc
+# Copyright 2016-2017 RIFT.IO Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
cloud_account.openstack.tenant = 'demo'
cloud_account.openstack.mgmt_network = 'private'
- cloud_proxy.merge_config("/rw-cloud:cloud-account", cloud_account)
+ cloud_proxy.merge_config("/rw-project:project/rw-cloud:cloud-account", cloud_account)
def test_configure_pools(self, resource_mgr_proxy):
pools = RwResourceMgrYang.ResourcePools.from_dict({
#!/usr/bin/env python
"""
#
-# Copyright 2016 RIFT.IO Inc
+# Copyright 2016-2017 RIFT.IO Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
cloud_account.openstack.tenant = 'demo'
cloud_account.openstack.mgmt_network = 'private'
- cloud_proxy.merge_config("/rw-cloud:cloud-account", cloud_account)
+ cloud_proxy.merge_config("/rw-project:project/rw-cloud:cloud-account", cloud_account)
def test_configure_pools(self, resource_mgr_proxy):
pools = RwResourceMgrYang.ResourcePools.from_dict({
#!/usr/bin/env python
"""
#
-# Copyright 2016 RIFT.IO Inc
+# Copyright 2016-2017 RIFT.IO Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
cloud_account.openstack.tenant = 'demo'
cloud_account.openstack.mgmt_network = 'private'
- cloud_proxy.merge_config("/rw-cloud:cloud-account", cloud_account)
+ cloud_proxy.merge_config("/rw-project:project/rw-cloud:cloud-account", cloud_account)
def test_configure_pools(self, resource_mgr_proxy):
pools = RwResourceMgrYang.ResourcePools.from_dict({
#
-# Copyright 2016 RIFT.IO Inc
+# Copyright 2016-2017 RIFT.IO Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
VALA_PACKAGES
rw_types-1.0 rw_yang-1.0 rw_keyspec-1.0 rw_yang_pb-1.0 rw_schema_proto-1.0
rw_log_yang-1.0 rw_base_yang-1.0 rwmon_yang-1.0 rw_manifest_yang-1.0 protobuf_c-1.0 ietf_netconf_yang-1.0
- rw_log-1.0 rwcal_yang-1.0
+ rw_log-1.0 rwcal_yang-1.0 rw_project_yang-1.0
VAPI_DIRS ${RIFT_SUBMODULE_BINARY_ROOT}/rwmon/plugins/yang
${RIFT_SUBMODULE_BINARY_ROOT}/rwcal/plugins/yang
${RIFT_SUBMODULE_BINARY_ROOT}/models/plugins/yang
GENERATE_VAPI_FILE ${VALA_LONG_NAME}.vapi
GENERATE_GIR_FILE ${VALA_TYPELIB_PREFIX}.gir
GENERATE_TYPELIB_FILE ${VALA_TYPELIB_PREFIX}.typelib
- DEPENDS rwmon_yang rwcal_yang rwlog_gi rwschema_yang
+ DEPENDS rwmon_yang rwcal_yang rwlog_gi rwschema_yang rwproject_yang
)
rift_install_vala_artifacts(
/*
*
- * Copyright 2016 RIFT.IO Inc
+ * Copyright 2016-2017 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
prefix "manotypes";
}
+ import rw-project {
+ prefix "rw-project";
+ }
+
+ revision 2017-02-08 {
+ description
+ "Update model to support projects.";
+ }
+
revision 2015-10-28 {
description
"Initial revision.";
"RIFT monitoring";
}
- container nfvi-metrics {
- rwpb:msg-new NfviMetrics;
+ augment "/rw-project:project" {
+ container nfvi-metrics {
+ rwpb:msg-new NfviMetrics;
- leaf timestamp {
- description
+ leaf timestamp {
+ description
"This is the time when the metric was captured. The timestamp is
represented as the number of seconds since the beginning of the Unix
epoch.";
- type decimal64 {
- fraction-digits 3;
+ type decimal64 {
+ fraction-digits 3;
+ }
}
- }
- uses manotypes:nfvi-metrics;
- }
+ uses manotypes:nfvi-metrics;
+ }
- container alarm {
- rwpb:msg-new Alarm;
+ container alarm {
+ rwpb:msg-new Alarm;
- uses manotypes:alarm;
+ uses manotypes:alarm;
+ }
}
}
rw-base
+rw-project
rw-mgmtagt
rw-manifest
rw-vcs