--
-- Copyright (C) 2006 The Trustees of Princeton University
--
--- $Id: planetlab4.sql,v 1.74 2007/04/02 20:45:49 tmack Exp $
+-- $Id: planetlab4.sql,v 1.77 2007/04/30 18:53:50 tmack Exp $
--
SET client_encoding = 'UNICODE';
INSERT INTO slice_instantiations (instantiation) VALUES ('not-instantiated'); -- Placeholder slice
INSERT INTO slice_instantiations (instantiation) VALUES ('plc-instantiated'); -- Instantiated by Node Manager
INSERT INTO slice_instantiations (instantiation) VALUES ('delegated'); -- Manually instantiated
+INSERT INTO slice_instantiations (instantiation) VALUES ('nm-controller'); -- NM Controller
-- Slices
CREATE TABLE slices (
slice_attribute_id serial PRIMARY KEY, -- Slice attribute identifier
slice_id integer REFERENCES slices NOT NULL, -- Slice identifier
node_id integer REFERENCES nodes, -- Sliver attribute if set
+ nodegroup_id integer REFERENCES nodegroups, -- Node group attribute if set
attribute_type_id integer REFERENCES slice_attribute_types NOT NULL, -- Attribute type identifier
value text
) WITH OIDS;
CREATE INDEX slice_attribute_slice_id_idx ON slice_attribute (slice_id);
CREATE INDEX slice_attribute_node_id_idx ON slice_attribute (node_id);
+CREATE INDEX slice_attribute_nodegroup_id_idx ON slice_attribute (nodegroup_id);
CREATE VIEW slice_attributes AS
SELECT slice_id,
CREATE TABLE event_object (
event_id integer REFERENCES events NOT NULL, -- Event identifier
object_id integer NOT NULL, -- Object identifier
- object_type text -- What type of object is this event affecting
+ object_type text NOT NULL Default 'Unknown' -- What type of object is this event affecting
) WITH OIDS;
CREATE INDEX event_object_event_id_idx ON event_object (event_id);
CREATE INDEX event_object_object_id_idx ON event_object (object_id);
slice_attribute.slice_attribute_id,
slice_attribute.slice_id,
slice_attribute.node_id,
+slice_attribute.nodegroup_id,
slice_attribute_types.attribute_type_id,
slice_attribute_types.name,
slice_attribute_types.description,