X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=rwlaunchpad%2Fplugins%2Fyang%2Frw-resource-mgr.yang;h=08d606d729d3e5df2c58c67fd51c5ce7732261b6;hb=refs%2Fchanges%2F71%2F1271%2F2;hp=9bf914a015aa8b6c0ad1fb149ba7d3533ff19029;hpb=6f07e6f33f751ab4ffe624f6037f887b243bece2;p=osm%2FSO.git diff --git a/rwlaunchpad/plugins/yang/rw-resource-mgr.yang b/rwlaunchpad/plugins/yang/rw-resource-mgr.yang index 9bf914a0..08d606d7 100644 --- a/rwlaunchpad/plugins/yang/rw-resource-mgr.yang +++ b/rwlaunchpad/plugins/yang/rw-resource-mgr.yang @@ -1,7 +1,7 @@ /* * - * 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. @@ -52,6 +52,19 @@ module rw-resource-mgr prefix "manotypes"; } + import rw-project { + prefix "rw-project"; + } + + import rw-project-mano { + prefix "rw-project-mano"; + } + + revision 2017-02-08 { + description + "Update model to support projects."; + } + revision 2015-10-16 { description "Initial revision."; @@ -90,31 +103,33 @@ module rw-resource-mgr } - 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"; + } } } } @@ -136,171 +151,177 @@ module rw-resource-mgr } } - 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; + } } } }