Contract attributes cannot be read-only
authorClaudio-Daniel Freire <claudio-daniel.freire@inria.fr>
Fri, 6 May 2011 16:44:51 +0000 (18:44 +0200)
committerClaudio-Daniel Freire <claudio-daniel.freire@inria.fr>
Fri, 6 May 2011 16:44:51 +0000 (18:44 +0200)
src/nepi/core/metadata.py

index 3fbf783..f0c1417 100644 (file)
@@ -255,7 +255,7 @@ 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({
@@ -264,23 +264,30 @@ class Metadata(object):
                         "Endpoints must agree to use the minimum (in lexicographic order) "
                         "of both the remote and local sides.",
                 "type": Attribute.STRING,
-                "flags": Attribute.Invisible | Attribute.ReadOnly,
+                "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
+            }),
     }