4 * Copyright 2016-2017 RIFT.IO Inc
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
22 module rw-resource-mgr
24 namespace "http://riftio.com/ns/riftware-1.0/rw-resource-mgr";
25 prefix "rw-resource-mgr";
35 import rw-yang-types {
47 import ietf-yang-types {
59 import rw-project-mano {
60 prefix "rw-project-mano";
65 "Update model to support projects.";
73 grouping resource-pool-info {
75 description "Name of the resource pool";
76 rwpb:field-inline "true";
77 rwpb:field-string-max 64;
83 description "Type of resource";
91 description "Type of pool";
100 description "Maximum size to which a dynamic resource pool can grow";
106 augment "/rw-project:project" {
107 container resource-mgr-config {
108 description "Data model for configuration of resource-mgr";
109 rwpb:msg-new ResourceManagerConfig;
112 container management-domain {
114 description "The management domain name this launchpad is associated with.";
115 rwpb:field-inline "true";
116 rwpb:field-string-max 64;
122 container resource-pools {
123 description "Resource Pool configuration";
124 rwpb:msg-new ResourcePools;
129 "Resource pool for the configured cloud account";
131 path "../../../../rwcloud:cloud/rwcloud:account/rwcloud:name";
139 grouping resource-state {
140 leaf resource-state {
148 leaf resource-errors {
149 description "Error message details in case of failed resource state";
154 augment "/rw-project:project" {
155 container resource-mgmt {
156 description "Resource management ";
159 container vdu-event {
160 description "Events for VDU Management";
161 rwpb:msg-new VDUEvent;
163 list vdu-event-data {
164 rwpb:msg-new VDUEventData;
168 description "Identifier associated with the VDU transaction";
173 description "The cloud account to use for this resource request";
175 path "../../../../rwcloud:cloud/rwcloud:account/rwcloud:name";
179 container request-info {
180 description "Information about required resource";
182 uses rwcal:vdu-create-params;
185 container resource-info {
186 description "Information about allocated resource";
191 uses rwcal:vdu-info-params;
196 container vlink-event {
197 description "Events for Virtual Link management";
198 rwpb:msg-new VirtualLinkEvent;
200 list vlink-event-data {
201 rwpb:msg-new VirtualLinkEventData;
206 description "Identifier associated with the Virtual Link transaction";
211 description "The cloud account to use for this resource request";
213 path "../../../../rwcloud:cloud/rwcloud:account/rwcloud:name";
217 container request-info {
218 description "Information about required resource";
220 uses rwcal:virtual-link-create-params;
223 container resource-info {
228 uses rwcal:virtual-link-info-params;
236 augment "/rw-project:project" {
237 container resource-pool-records {
238 description "Resource Pool Records";
239 rwpb:msg-new ResourcePoolRecords;
246 "The configured cloud account's pool records.";
248 path "../../../rwcloud:cloud/rwcloud:account/rwcloud:name";
253 rwpb:msg-new ResourceRecordInfo;
255 uses resource-pool-info;
265 leaf total-resources {
269 leaf free-resources {
273 leaf allocated-resources {
282 augment "/rw-project:project" {
283 container resource-mgr-data {
284 description "Resource Manager operational data";
287 container pool-record {
288 description "Resource Pool record";
293 rwpb:msg-new "ResmgrCloudPoolRecords";
296 "The configured cloud account's pool records.";
298 path "../../../../rwcloud:cloud/rwcloud:account/rwcloud:name";
304 uses resource-pool-info;
308 uses rwcal:vdu-info-params;
311 list in-use-vdu-list {
313 uses rwcal:vdu-info-params;
316 list free-vlink-list {
318 uses rwcal:virtual-link-info-params;
321 list in-use-vlink-list {
323 uses rwcal:virtual-link-info-params;