#NEWLINE# def new_subnet( subnet_dict = None , version = 4 ) : #NEWLINE# #INDENT# if ( version == 6 ) : #NEWLINE# #INDENT# new_subnet = dict ( cidr = 'fd00::/48' , dns = [ new_ip ( dict ( address = '1:2:3:4::' ) , version = 6 ) , new_ip ( dict ( address = '2:3:4:5::' ) , version = 6 ) ] , gateway = new_ip ( dict ( address = 'fd00::1' ) , version = 6 ) , ips = [ new_fixed_ip ( dict ( address = 'fd00::2' ) , version = 6 ) , new_fixed_ip ( dict ( address = 'fd00::3' ) , version = 6 ) ] , routes = [ new_route ( version = 6 ) ] , version = 6 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( version == 4 ) : #NEWLINE# #INDENT# new_subnet = dict ( cidr = '10.10.0.0/24' , dns = [ new_ip ( dict ( address = '1.2.3.4' ) ) , new_ip ( dict ( address = '2.3.4.5' ) ) ] , gateway = new_ip ( dict ( address = '10.10.0.1' ) ) , ips = [ new_fixed_ip ( dict ( address = '10.10.0.2' ) ) , new_fixed_ip ( dict ( address = '10.10.0.3' ) ) ] , routes = [ new_route ( ) ] ) #NEWLINE# #UNINDENT# #UNINDENT# subnet_dict = ( subnet_dict or { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# new_subnet . update ( subnet_dict ) #NEWLINE# return model . Subnet ( ** new_subnet )