#NEWLINE# @ rest_utils . ajax ( data_required = True ) #NEWLINE# def post( self , request ) : #NEWLINE# #INDENT# 'Create a Subnet for a given Network\n\n        :param name (optional):  The subnet name.\n        :param network_id: The ID of the attached network.\n        :param tenant_id (optional): The ID of the tenant who owns the network.\n                Only administrative users can specify a tenant ID other than\n                their own.\n        :param allocation_pools (optional): The start and end addresses for the\n                allocation pools.\n        :param gateway_ip (optional): The gateway IP address.\n        :param ip_version: The IP version, which is 4 or 6.\n        :param cidr: The CIDR.\n        :param id (optional): The ID of the subnet.\n        :param enable_dhcp (optional): Set to true if DHCP is enabled and false\n                if DHCP is disabled.\n\n        :return: JSON representation of a Subnet\n\n        ' #NEWLINE# new_subnet = api . neutron . subnet_create ( request , ** request . DATA ) #NEWLINE# return rest_utils . CreatedResponse ( ( '/api/neutron/subnets/%s' % new_subnet . id ) , new_subnet . to_dict ( ) )