From f363e36ba79bbe1bd1b700c3b8a9434fc46b47d6 Mon Sep 17 00:00:00 2001 From: Claudio-Daniel Freire Date: Fri, 6 May 2011 18:44:51 +0200 Subject: [PATCH] Contract attributes cannot be read-only --- src/nepi/core/metadata.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/nepi/core/metadata.py b/src/nepi/core/metadata.py index 3fbf7831..f0c1417b 100644 --- a/src/nepi/core/metadata.py +++ b/src/nepi/core/metadata.py @@ -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 + }), } -- 2.47.0