Merge branch 'master' of code.ungleich.ch:uncloud/uncloud
This commit is contained in:
commit
d5a7f8ef59
2 changed files with 3 additions and 7 deletions
|
@ -1,4 +1,5 @@
|
|||
import argparse
|
||||
import logging
|
||||
|
||||
from uncloud.hack.vm import VM
|
||||
from uncloud.hack.config import Config
|
||||
|
@ -22,11 +23,11 @@ arg_parser.add_argument('--run-dns-ra', action='store_true',
|
|||
help="Provide router advertisements and DNS resolution via dnsmasq")
|
||||
arg_parser.add_argument('--use-sudo', help="Use sudo for command requiring root!", action='store_true')
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def main(arguments):
|
||||
print(arguments)
|
||||
log.debug("args={}".format(arguments))
|
||||
config = Config(arguments)
|
||||
|
||||
if arguments['create_vm']:
|
||||
|
|
|
@ -37,11 +37,7 @@ class VXLANBridge(object):
|
|||
self.config['vni_hex'] = "{:x}".format(vni)
|
||||
self.config['multicast_address'] = self.multicast_network[vni]
|
||||
|
||||
#try:
|
||||
self.config['route_network'] = ipaddress.IPv6Network(route)
|
||||
#except Exception as e:
|
||||
# print("Ahhhhhhhhhhhhhhhhh, die: {}".format(e))
|
||||
|
||||
self.config['route'] = route
|
||||
|
||||
self.config['uplinkdev'] = uplinkdev
|
||||
|
@ -69,7 +65,6 @@ class VXLANBridge(object):
|
|||
def _execute_cmd(self, cmd_string, **kwargs):
|
||||
cmd = cmd_string.format(**self.config, **kwargs)
|
||||
log.info("Executing: {}".format(cmd))
|
||||
print("Executing: {}".format(cmd))
|
||||
subprocess.run(cmd.split())
|
||||
|
||||
class ManagementBridge(VXLANBridge):
|
||||
|
|
Loading…
Reference in a new issue