introduce cord-service-volt.yang and cord-service-vsg.yang. complete re-rendering of the underyling service/tenancy associations. need to review further with team.
diff --git a/schema/cord-service-volt.yang b/schema/cord-service-volt.yang
new file mode 100644
index 0000000..3073366
--- /dev/null
+++ b/schema/cord-service-volt.yang
@@ -0,0 +1,167 @@
+module cord-service-volt {
+ namespace "urn:onlab:cord:service:volt";
+ prefix volt;
+ yang-version 1.1;
+
+ import ietf-yang-types { prefix yang; }
+ import xos-core { prefix xos; }
+
+ organization
+ "Open Networking Lab (CORD) / Corenova Technologies";
+
+ contact
+ "Larry Peterson <llp@onlab.us>
+ Peter K. Lee <peter@corenova.com>";
+
+ revision 2016-09-09 {
+ description "Initial revision.";
+ }
+
+ identity volt-service { base xos:service; }
+
+ feature onos-app-olt {
+ description "System facility to configure VLAN tags on the OLT.";
+ }
+ feature onos-app-aaa {
+ description "System facility to broker authentication between CPE and Radius server.";
+ }
+
+ typedef bandwidth {
+ type xos:bandwidth;
+ default 1000000000; // VOLT bandwidth default is 1Gbps
+ }
+ typedef subscriber-flow {
+ type leafref {
+ path "/volt:service/volt:provider/volt:port/volt:id";
+ }
+ }
+
+ grouping devices-list {
+ grouping olt-device {
+ description
+ "This grouping describes an OLT device which contains ODN link attachments.";
+
+ leaf name {
+ description "name of OLT device";
+ type string {
+ length 1..254;
+ }
+ }
+ leaf mac { type yang:mac-address; mandatory true; }
+
+ container uplink {
+ description "Uplink description of the OLT device.";
+ leaf network { type yang:uuid; }
+ leaf tag {
+ if-feature onos-app-olt;
+ type xos:vlan;
+ description
+ "Represents S-Tag for instructing OLT to associate a VLAN tag for
+ traffic originating from OLT device.";
+ }
+ }
+
+ list link {
+ description
+ "Each link represents an ONU/ONT (Optical Network Termination) endpoint
+ connection.";
+
+ key serial;
+ unique tag;
+
+ leaf mac { type yang:mac-address; mandatory true; }
+ leaf serial { type string; mandatory true; }
+ leaf active { type boolean; default false; }
+ leaf tag {
+ if-feature onos-app-olt;
+ type xos:vlan;
+ description
+ "Represents C-Tag for instructing ONT to add/remove vlan tag for
+ traffic within OLT device.";
+ }
+ }
+ }
+ list device {
+ description
+ "Each entry represents an OLT device.";
+ key mac;
+ //unique 'uplink/tag';
+ uses olt-device;
+ }
+ }
+ grouping provider {
+ description
+ "This grouping represents a VOLT agent/provider which manages multiple
+ OLT devices. The VOLT agent provides aggregate abstraction of
+ the entire PON as a sigle switch to the controller. Each port
+ entry of the agent represents each ONU/ONT endpoint as a
+ separate openflow port.";
+
+ uses devices-list {
+ description
+ "Each entry represents an OLT device managed by the agent.";
+ }
+ list port {
+ description
+ "Each entry represents an ONU/ONT endpoint connected across OLT devices.";
+ key id;
+ leaf id {
+ description "OpenFlow Port ID";
+ type yang:uuid;
+ mandatory true;
+ }
+ leaf link {
+ type leafref {
+ path '../../device/link/serial';
+ }
+ mandatory true;
+ }
+ }
+ container radius {
+ if-feature onos-app-aaa;
+ // configuration for how to broker authentication requests
+ }
+ }
+ grouping subscriber {
+ description
+ "This grouping represents a VOLT service subscriber along with
+ references to ONU/ONT access endpoints used by the subscriber.";
+
+ list tag {
+ description
+ "Each entry represents a unique combination of the OLT uplink VLAN
+ (outer tag) and the ONU/ONT link VLAN (inner tag) connecting
+ into the fabric for the subscriber.";
+
+ key 'outer inner';
+ leaf outer {
+ type leafref {
+ path "/volt:service/volt:provider/volt:device/volt:uplink/volt:tag";
+ }
+ }
+ leaf inner {
+ type leafref {
+ path "/volt:service/volt:provider/volt:device/volt:link/volt:tag";
+ }
+ }
+ }
+ leaf-list flows {
+ description
+ "Each entry represents a unique openflow port ID that the subscriber
+ uses to connect into the fabric from the VOLT service.";
+ config false;
+ type subscriber-flow;
+ }
+ }
+
+ /*
+ * Configuration data
+ */
+ container service {
+ uses xos:service {
+ refine kind { default volt-service; }
+ augment "provider" { uses volt:provider; }
+ augment "subscriber" { uses volt:subscriber; }
+ }
+ }
+}
diff --git a/schema/cord-service-vsg.yang b/schema/cord-service-vsg.yang
new file mode 100644
index 0000000..aeae976
--- /dev/null
+++ b/schema/cord-service-vsg.yang
@@ -0,0 +1,148 @@
+module cord-service-vsg {
+ namespace "urn:onlab:cord:service:volt";
+ prefix volt;
+ yang-version 1.1;
+
+ import ietf-yang-types { prefix yang; }
+ import xos-core { prefix xos; }
+ import cord-service-volt { prefix volt; }
+
+ organization
+ "Open Networking Lab (CORD) / Corenova Technologies";
+
+ contact
+ "Larry Peterson <llp@onlab.us>
+ Peter K. Lee <peter@corenova.com>";
+
+ revision 2016-09-09 {
+ description "Initial revision.";
+ }
+
+ identity vsg-service { base xos:service; }
+
+ typedef subscriber-flow {
+ type leafref {
+ path "/vsg:service/vsg:provider/vsg:port/vsg:id";
+ }
+ }
+
+ grouping provider {
+ description
+ "This grouping represents a VSG agent/provider which manages multiple
+ VSG gateways. The VSG agent provides agregate abstraction of
+ the entire NFaaS as a single switch to the controller. Each
+ port entry of the agent represents each VSG endpoint as a
+ separate openflow port.";
+
+ list gateway {
+ description
+ "Each entry represents a VSG instance managed by the agent.";
+
+ leaf id { type yang:uuid; }
+ container services {
+ description
+ "Contains various services provided by the gateway.";
+ container cdn {
+ if-feature cdn;
+ }
+ container firewall {
+ if-feature firewall;
+ leaf-list rules { type string; }
+ }
+ container url-filter {
+ if-feature url-filter;
+ leaf level {
+ type enumeration {
+ enum "PG";
+ // others...
+ }
+ }
+ leaf-list rules { type string; }
+ }
+ container uverse {
+ if-feature uverse;
+ }
+ }
+ }
+ list port {
+ description
+ "Each entry represents a VSG endpoint connected across VSG gateways.";
+ key id;
+ leaf id {
+ description "OpenFlow Port ID";
+ type yang:uuid;
+ mandatory true;
+ }
+ leaf link {
+ type leafref {
+ path '../../gateway/id';
+ }
+ mandatory true;
+ }
+ }
+ }
+ grouping subscriber {
+ description
+ "This grouping represents a VSG service subscriber along with
+ reference to fabric flows used by the subscriber.";
+
+ leaf status {
+ type enumeration {
+ enum "enabled" {
+ description "Enabled";
+ value 1;
+ }
+ enum "suspended" {
+ description "Suspended";
+ }
+ enum "delinquent" {
+ description "Delinquent";
+ }
+ enum "violation" {
+ description "Copyright Violation";
+ }
+ }
+ default enabled;
+ }
+ leaf demo { type boolean; default false; }
+ leaf uplink-speed { type volt:bandwidth; }
+ leaf downlink-speed { type volt:bandwidth; }
+
+ list tag {
+ description
+ "Each entry represents a unique openflow port ID that the subscriber
+ connects to the VSG service from the fabric.";
+
+ key flow;
+ leaf flow {
+ type union {
+ type volt:subscriber-flow;
+ type vsg:subscriber-flow {
+ description "can be an output flow from the VSG service.";
+ }
+ type yang:uuid {
+ description "supports a generic openflow port ID";
+ }
+ }
+ }
+ }
+ leaf-list flows {
+ description
+ "Each entry represents a unique openflow port ID that the subscriber
+ uses to connect into the fabric from the VSG service.";
+ config false;
+ type subscriber-flow;
+ }
+ }
+
+ /*
+ * Configuration data
+ */
+ container service {
+ uses xos:service {
+ refine kind { default vsg-service; }
+ augment "provider" { uses vsg:provider; }
+ augment "subscriber" { uses vsg:subscriber; }
+ }
+ }
+}
diff --git a/schema/cord-subscriber.yang b/schema/cord-subscriber.yang
index 7fa098e..86fa0e8 100644
--- a/schema/cord-subscriber.yang
+++ b/schema/cord-subscriber.yang
@@ -1,5 +1,4 @@
module cord-subscriber {
-
namespace "urn:onlab:cord:subscriber";
prefix csub;
yang-version 1.1;
@@ -13,7 +12,7 @@
description
"This module contains CORD Subscriber model representing its
- relationship to features, services, and devices.
+ relationship to features and services.
Copyright (c) 2016 ON.LAB and the persons identified as authors of
the code. All rights reserved.
diff --git a/schema/xos-core.yang b/schema/xos-core.yang
index 44a702c..1137c28 100644
--- a/schema/xos-core.yang
+++ b/schema/xos-core.yang
@@ -35,8 +35,8 @@
}
identity kind;
- identity generic { base kind; }
- identity subscriber { base kind; }
+ identity generic { base kind; }
+ identity service { base kind; }
typedef unique-identifier {
description "defines valid formats for external reference id";
@@ -46,14 +46,23 @@
type inet:uri;
}
}
+ typedef bandwidth {
+ type uint32 {
+ range 1000000..max; // should be at least 1 Mbps?
+ }
+ units 'bps';
+ }
+ typedef vlan {
+ type uint16 { range 0..4095; }
+ }
- grouping xos-attribute {
+ grouping attribute-pair {
leaf name { type string { length 0..128; } }
leaf value { type string; }
// don't need pointer back to service
}
- grouping xos-sync-record {
+ grouping sync-record {
description "Synchronizer-specific properties for model records";
leaf created { type yang:date-and-time; }
@@ -100,25 +109,18 @@
}
}
- grouping xos-base {
+ grouping base-common {
leaf id {
type unique-identifier;
mandatory true;
}
- leaf kind {
- type identityref {
- base kind;
- }
- default generic;
- }
leaf name {
type string {
length 0..255;
}
}
-
list attribute {
- uses xos-attribute;
+ uses attribute-pair;
key name;
status deprecated;
reference "XOS: service-specific-attribute";
@@ -129,15 +131,14 @@
mandatory true;
status deprecated;
}
-
container record {
if-feature synchronizer;
- uses xos-sync-record;
+ uses sync-record;
}
}
grouping tenant-root {
- uses xos-base {
+ uses base-common {
refine 'name' {
description "Specify name of the TenantRoot";
}
@@ -167,11 +168,17 @@
}
grouping service {
- uses xos-base {
+ uses base-common {
refine 'name' {
description "Name of the Service";
}
}
+ leaf kind {
+ type identityref {
+ base kind;
+ }
+ default generic;
+ }
leaf description {
type string {
length 0..254;
@@ -197,6 +204,22 @@
leaf public { type string { length 0..1024; } }
leaf private { type string { length 0..1024; } }
}
+ list provider {
+ description
+ "Each entry represents a provider of the service. Each unique service
+ should augment this block with service specific attributes.";
+ key id;
+ uses xos:provider;
+ }
+ list subscriber {
+ description
+ "Each entry represents a subscriber of the service. Each unique service
+ should augment this block with service specific attributes.";
+ key id;
+ uses xos:subscriber;
+ notification subscriber-added;
+ notification subscriber-deleted;
+ }
// TOOD: need to better understand relationship between Service and Slice
action scale {
@@ -207,7 +230,7 @@
}
grouping tenancy {
- uses xos-base;
+ uses base-common;
choice provider {
description "only one type of provider node is valid.";