add admission handler for device resources allocation

This commit is contained in:
lichuqiang
2017-11-02 09:17:48 +08:00
parent 441e646827
commit ebd445eb8c
12 changed files with 157 additions and 37 deletions

View File

@@ -255,6 +255,11 @@ func (n *NodeInfo) AllocatableResource() Resource {
return *n.allocatableResource
}
// SetAllocatableResource sets the allocatableResource information of given node.
func (n *NodeInfo) SetAllocatableResource(allocatableResource *Resource) {
n.allocatableResource = allocatableResource
}
func (n *NodeInfo) Clone() *NodeInfo {
clone := &NodeInfo{
node: n.node,