Commit a727dac1 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Two new minor functions:

* tb-set-node-sharingmode{node mode} sets the sharing mode for a
  physical node. Only admins can do this, to create an experiment to
  contain shared nodes.

* tb-set-node-usesharednode{node weight} sets a desire to use a shared
  node (for a pcvm). This goes into assign, against the a feature that
  is set for all nodes actining as a shared host.
parent 02661f36
......@@ -80,6 +80,7 @@ Node instproc init {s} {
$self set plab_plcnet "none"
$self set fixed ""
$self set nseconfig ""
$self set sharing_mode ""
$self set topo ""
......@@ -158,6 +159,7 @@ Node instproc updatedb {DB} {
$self instvar desirelist
$self instvar nseconfig
$self instvar simulated
$self instvar sharing_mode
$self instvar topo
$self instvar X_
$self instvar Y_
......@@ -286,6 +288,11 @@ Node instproc updatedb {DB} {
lappend values $plab_plcnet
}
if { $sharing_mode != "" } {
lappend fields "sharing_mode"
lappend values $sharing_mode
}
if { $numeric_id != {} } {
lappend fields "numeric_id"
lappend values $numeric_id
......
# -*- tcl -*-
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2004, 2006 University of Utah and the Flux Group.
# Copyright (c) 2000-2004, 2006, 2009 University of Utah and the Flux Group.
# All rights reserved.
#
......@@ -53,6 +53,7 @@ proc tb-set-link-encap {link style} {}
proc tb-set-allowcolocate {lanlink onoff} {}
proc tb-set-colocate-factor {factor} {}
proc tb-set-sync-server {node} {}
proc tb-set-node-usesharednode {node} {}
proc tb-set-mem-usage {usage} {}
proc tb-set-cpu-usage {usage} {}
proc tb-bind-parent {sub phys} {}
......@@ -93,6 +94,8 @@ proc tb-set-node-plab-role {node role} {}
proc tb-set-node-plab-plcnet {node lanlink} {}
proc tb-set-dpdb {onoff} {}
proc tb-fix-interface {vnode lanlink iface} {}
proc tb-set-node-usesharednode {node weight} {}
proc tb-set-node-sharingmode {node sharemode} {}
proc tb-set-security-level {level} {
......
......@@ -510,6 +510,12 @@ proc tb-set-ip-routing {type} {
}
set default_ip_routing_type $type
}
proc tb-set-node-usesharednode {node weight} {
$node add-desire "pcshared" $weight
}
proc tb-set-node-sharingmode {node sharemode} {
$node set sharing_mode $sharemode
}
# Lan/Link state routines.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment