update_ipv6addr-slivertag.py and ipv6.py were updated to support VS,
since "import libvirt" raises error and fails the build on -f14.
* The prefix specified on 'sliversipv6prefix' tag must be at least 64
It should vary between 1 and 64, since it is the minimum amount of bits to
have native IPv6 auto-configuration.
* The prefix specified on 'sliversipv6prefix' tag must be at least 64
It should vary between 1 and 64, since it is the minimum amount of bits to
have native IPv6 auto-configuration.
-* The ipv6_address on 'sliversipv6prefix' tag can be any valid IPv6 address.
+* The ipv6_address in 'sliversipv6prefix' tag value can be any valid IPv6 address.
E.g., 2002:1000:: or 2002:1000::1
* It is the node manager/admin responsibility to properly set the IPv6 routing,
since slivers should receive/send any kind of traffic.
E.g., 2002:1000:: or 2002:1000::1
* It is the node manager/admin responsibility to properly set the IPv6 routing,
since slivers should receive/send any kind of traffic.
-from sliver_libvirt import Sliver_Libvirt
from xml.dom.minidom import parseString
from xml.dom.minidom import parseString
+# TODO: is there anything better to do if the "libvirt", "sliver_libvirt",
+# and are not in place in the VS distro?
+try:
+ import libvirt
+ from sliver_libvirt import Sliver_Libvirt
+except:
+ logger.log("Could not import 'sliver_lxc' or 'libvirt'.")
+
priority=4
radvd_conf_file = '/etc/radvd.conf'
priority=4
radvd_conf_file = '/etc/radvd.conf'
-from sliver_libvirt import Sliver_Libvirt
from xml.dom.minidom import parseString
from xml.dom.minidom import parseString
+# TODO: is there anything better to do if the "libvirt", "sliver_libvirt",
+# and are not in place in the VS distro?
+try:
+ import libvirt
+ from sliver_libvirt import Sliver_Libvirt
+except:
+ logger.log("Could not import 'sliver_lxc' or 'libvirt'.")
+
priority=150
ipv6addrtag = 'ipv6_address'
priority=150
ipv6addrtag = 'ipv6_address'
def SetSliverTag(plc, data, tagname):
def SetSliverTag(plc, data, tagname):
+ virt=tools.get_node_virt()
+ if virt!='lxc':
+ return
+
for slice in data['slivers']:
logger.log("update_ipv6addr_slivertag: starting with slice=%s" % (slice['name']) )
for slice in data['slivers']:
logger.log("update_ipv6addr_slivertag: starting with slice=%s" % (slice['name']) )
path = l.split(':')[0]
comp = l.rsplit(':')[-1]
slice_name_check = comp.rsplit('/')[-1]
path = l.split(':')[0]
comp = l.rsplit(':')[-1]
slice_name_check = comp.rsplit('/')[-1]
- # the lines above were added by Guilherme <gsm@machados.org>
- # due to the ipv6 plugin requirements
+ # the lines below were added by Guilherme <gsm@machados.org>
+ # due to the ipv6 plugin requirements (LXC)
virt=get_node_virt()
if virt=='lxc':
slice_name_check = slice_name_check.rsplit('.')[0]
virt=get_node_virt()
if virt=='lxc':
slice_name_check = slice_name_check.rsplit('.')[0]