Lots of cross-connection fixes, TUN synchronization, etc
[nepi.git] / src / nepi / core / metadata.py
index 0b30a41..784158c 100644 (file)
@@ -84,6 +84,15 @@ class VersionedMetadataInfo(object):
         """
         return self.configure_order
 
+    @property
+    def start_order(self):
+        """ list of factory ids that indicates the order in which the elements
+        should be started.
+        
+        Default: same as configure_order
+        """
+        return self.configure_order
+
     @property
     def factories_info(self):
         """ dictionary of dictionaries of factory specific information
@@ -255,23 +264,39 @@ class Metadata(object):
                 "name": "tun_proto", 
                 "help": "TUNneling protocol used",
                 "type": Attribute.STRING,
-                "flags": Attribute.Invisible | Attribute.ReadOnly,
+                "flags": Attribute.Invisible,
+                "validation_function": validation.is_string,
+            }),
+            "tun_key" : dict({
+                "name": "tun_key", 
+                "help": "Randomly selected TUNneling protocol cryptographic key. "
+                        "Endpoints must agree to use the minimum (in lexicographic order) "
+                        "of both the remote and local sides.",
+                "type": Attribute.STRING,
+                "flags": Attribute.Invisible,
                 "validation_function": validation.is_string,
             }),
             "tun_addr" : dict({
                 "name": "tun_addr", 
-                "help": "IP address of the tunnel endpoint",
+                "help": "Address (IP, unix socket, whatever) of the tunnel endpoint",
                 "type": Attribute.STRING,
-                "flags": Attribute.Invisible | Attribute.ReadOnly,
-                "validation_function": validation.is_ip_address,
+                "flags": Attribute.Invisible,
+                "validation_function": validation.is_string,
             }),
             "tun_port" : dict({
                 "name": "tun_port", 
                 "help": "IP port of the tunnel endpoint",
                 "type": Attribute.INTEGER,
-                "flags": Attribute.Invisible | Attribute.ReadOnly,
+                "flags": Attribute.Invisible,
                 "validation_function": validation.is_integer,
             }),
+            ATTR_NEPI_TESTBED_ENVIRONMENT_SETUP : dict({
+                "name": ATTR_NEPI_TESTBED_ENVIRONMENT_SETUP,
+                "help": "Commands to set up the environment needed to run NEPI testbeds",
+                "type": Attribute.STRING,
+                "flags": Attribute.Invisible,
+                "validation_function": validation.is_string
+            }),
     }
     
 
@@ -293,6 +318,10 @@ class Metadata(object):
     def preconfigure_order(self):
         return self._metadata.preconfigure_order
 
+    @property
+    def start_order(self):
+        return self._metadata.start_order
+
     def testbed_attributes(self):
         attributes = AttributesMap()