forked from uncloud/uncloud
		
	Progress with networking
This commit is contained in:
		
					parent
					
						
							
								8a451ff4ff
							
						
					
				
			
			
				commit
				
					
						1b5a3f6d2e
					
				
			
		
					 3 changed files with 25 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -3,12 +3,18 @@ import argparse
 | 
			
		|||
from uncloud.hack.vm import VM
 | 
			
		||||
from uncloud.hack.config import Config
 | 
			
		||||
from uncloud.hack.mac import MAC
 | 
			
		||||
from uncloud import UncloudException
 | 
			
		||||
 | 
			
		||||
arg_parser = argparse.ArgumentParser('hack', add_help=False)
 | 
			
		||||
                                     #description="Commands that are unfinished - use at own risk")
 | 
			
		||||
arg_parser.add_argument('--create-vm', action='store_true')
 | 
			
		||||
arg_parser.add_argument('--last-used-mac', action='store_true')
 | 
			
		||||
arg_parser.add_argument('--get-new-mac', action='store_true')
 | 
			
		||||
arg_parser.add_argument('--management-network', help="IPv6 management network")
 | 
			
		||||
arg_parser.add_argument('--run-dns-ra', action='store_true',
 | 
			
		||||
                        help="Provide router advertisements and DNS resolution via dnsmasq")
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def main(arguments):
 | 
			
		||||
| 
						 | 
				
			
			@ -26,3 +32,7 @@ def main(arguments):
 | 
			
		|||
 | 
			
		||||
    if arguments['get_new_mac']:
 | 
			
		||||
        print(MAC(config).get_next())
 | 
			
		||||
 | 
			
		||||
    if arguments['run_dns_ra']:
 | 
			
		||||
        if not arguments['management_network']:
 | 
			
		||||
            raise UncloudException("Providing DNS/RAs requires a /64 IPv6 network. You can use fd00::/64 for testing (non production!)")
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -19,3 +19,7 @@ class VXLANBridge(object):
 | 
			
		|||
class DNSRA(object):
 | 
			
		||||
    def __init__(self):
 | 
			
		||||
        pass
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class Firewall(object):
 | 
			
		||||
    pass
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue