added the accessor for the ipv6 support in slices
Guilherme Sperb Machado [Fri, 12 Sep 2014 15:28:39 +0000 (17:28 +0200)]
PLC/Accessors/Accessors_ipv6.py [new file with mode: 0644]

diff --git a/PLC/Accessors/Accessors_ipv6.py b/PLC/Accessors/Accessors_ipv6.py
new file mode 100644 (file)
index 0000000..6252074
--- /dev/null
@@ -0,0 +1,24 @@
+# Author:
+# Guilherme Sperb Machado <gsm@machados.org> - UZH
+# Created: 01/Aug/2014
+# Last modified: 01/Sep/2014
+
+from PLC.Nodes import Node
+from PLC.Interfaces import Interface
+from PLC.Slices import Slice
+
+from PLC.Accessors.Factory import define_accessors, all_roles, tech_roles
+
+import sys
+current_module = sys.modules[__name__]
+
+#### IPv6 addr/prefix to distribute to slivers on the node!
+define_accessors(current_module, Interface, "SliversIPv6Prefix", "sliversipv6prefix",
+                 "interface/ipv6", "The IPv6 Range/Prefix for the Slivers",
+                 set_roles=tech_roles)
+
+#### IPv6 address assigned to the sliver of a particular node!
+define_accessors(current_module, Slice, "IPv6Address", "ipv6_address",
+                 "slice/usertools","IPv6 address assigned to the sliver on a particular node",
+                 set_roles=all_roles, expose_in_api=True)
+