multiple slices. This results in the slice not being able to start.
import os, os.path
import subprocess
import pprint
import os, os.path
import subprocess
import pprint
# Call the upper configure method (ssh keys...)
Account.configure(self, rec)
# Call the upper configure method (ssh keys...)
Account.configure(self, rec)
+ @staticmethod
+ def get_unique_vif():
+ return 'veth%s' % random.getrandbits(32)
+
# A placeholder until we get true VirtualInterface objects
@staticmethod
def get_interfaces_xml(rec):
xml = """
<interface type='network'>
<source network='default'/>
# A placeholder until we get true VirtualInterface objects
@staticmethod
def get_interfaces_xml(rec):
xml = """
<interface type='network'>
<source network='default'/>
+""" % (Sliver_Libvirt.get_unique_vif())
try:
tags = rec['rspec']['tags']
if 'interface' in tags:
try:
tags = rec['rspec']['tags']
if 'interface' in tags:
<source bridge='%s'/>
%s
<virtualport type='openvswitch'/>
<source bridge='%s'/>
%s
<virtualport type='openvswitch'/>
- """ % (interface['bridge'], vlanxml)
+ """ % (interface['bridge'], vlanxml, Sliver_Libvirt.get_unique_vif())
else:
tag_xml = tag_xml + """
<interface type='network'>
<source network='default'/>
else:
tag_xml = tag_xml + """
<interface type='network'>
<source network='default'/>
+ """ % (Sliver_Libvirt.get_unique_vif())
+
xml = tag_xml
logger.log('sliver_libvirty.py: interface XML is: %s' % xml)
xml = tag_xml
logger.log('sliver_libvirty.py: interface XML is: %s' % xml)