+list.prototype.count = function() {
+ return this.elements.length;
+};
+
+
+/*
+ * resources, users, leases
+ */
+
+function resources() {
+ this.pending = {
+ toremove: new list(),
+ toadd: new list(),
+ };
+};
+
+function users() {
+ this.pending = {
+ toremove: new list(),
+ toadd: new list(),
+ };
+};
+
+function leases() {
+ this.pending = {
+ toremove: new list(),
+ toadd: new list(),
+ };
+};
+
+/*
+ * Slice
+ */
+function slice(name) {
+ this.name = name;
+ this.resources = new resources();
+ this.users = new users();
+ this.leases = new leases();
+
+};
+slice.prototype.pending = function() {
+
+};
+slice.prototype.reserve = function() {
+
+};
+slice.prototype.unreserve = function() {
+
+};
+
+/*
+ * User
+ */
+function user(u) {
+ this.u = u;
+ this.testbeds = {};
+ this.slices = {};
+
+ for (i = 0; i < this.u.slices.length; i++) {
+ this.slices[this.u.slices[i]] = new slice(this.u.slices[i]);
+ }
+};
+
+user.prototype.slice = function(name) {
+ return this.slices[name];
+};
+
+user.prototype.list = function() {
+ for (s in this.slices) {
+ for (o in s) {
+ if (typeof o != 'function') {
+ console.log(o);
+ } else {
+ console.log("w "+o);
+ }
+ }
+ }
+};
+
+/*
+ * MySlice
+ */
+var myslice = {
+ user: {},