blob: 7fa098eef89c7204a6d61ae608ac30087866c7c9 [file] [log] [blame]
module cord-subscriber {
namespace "urn:onlab:cord:subscriber";
prefix csub;
yang-version 1.1;
organization
"Open Networking Lab (CORD) / Corenova Technologies";
contact
"Larry Peterson <llp@onlab.us>
Peter K. Lee <peter@corenova.com>";
description
"This module contains CORD Subscriber model representing its
relationship to features, services, and devices.
Copyright (c) 2016 ON.LAB and the persons identified as authors of
the code. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, is permitted pursuant to, and subject to the license
terms of the Apache License, Version 2.0 which accompanies this
distribution, and is available at
(http://www.apache.org/licenses/LICENSE-2.0).";
revision 2016-07-14 {
description "Initial revision.";
}
import xos-core { prefix xos; }
import cord-device { prefix dev; }
import ietf-yang-types { prefix yang; }
import corenova-node { prefix node; }
identity cord-subscriber { base xos:subscriber; }
grouping subscriber {
uses xos:subscriber {
refine kind { default cord-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 dev:bandwidth;
default 1000000000;
}
leaf downlink-speed {
type dev:bandwidth;
default 1000000000;
}
container services {
description
"Contains various services available to the subscriber";
container cdn {
leaf enabled { type boolean; default false; }
}
container firewall {
leaf enabled { type boolean; default false; }
leaf-list rules {
// should qualify further
type string;
}
}
container url-filter {
leaf enabled { type boolean; default false; }
leaf level {
type enumeration {
enum "PG";
// other types of level...
}
}
leaf-list rules {
// should qualify further
type string;
}
}
container uverse {
leaf enabled { type boolean; default false; }
}
}
list device {
uses dev:device;
key "mac";
action create {
input { uses dev:device; }
}
action update {
input { uses dev:device; }
}
action delete;
}
}
grouping subscriber-controller {
uses subscriber;
node:view "features identity related";
container features {
node:link cdn { path "../services/cdn/enabled"; }
node:link uplink-speed { path "../uplink-speed"; }
node:link downlink-speed { path "../downlink-speed"; }
node:link uverse { path "../services/uverse/enabled"; }
node:link status { path "../status"; }
action update {
description "when invoked, updates the features container (PUT)";
}
}
container identity {
node:link account-num { path "../service-specific-id"; }
node:link name { path "../name"; }
action update {
description "when invoked, updates the identity container (PUT)";
}
}
container related {
config false;
description
"placeholder where other services can augment for info they want to
share (READ-ONLY)";
}
}
}