Quota exceeded for resources: ['port'] [closed]

asked 2016-04-15 03:28:42 -0500

vuhiep gravatar image

I using openstack network api to create network and router. then I want to attach that network to router: " def CreateRouter(self, router_name): self.neutron.format = 'json' request = {'router' : {'name' : router_name, 'admin_state_up' : True}} router = self.neutron.create_router(request) router_id = router['router']['id'] router = self.neutron.show_router(router_id) return router_id

def AddPort(self, router_id, network_id, ports):
    server_detail = router_id
    if server_detail != None:
        body_value = {'port' : {'admin_state_up' : True,
                                   'device_id' : router_id,
                                   'name' : 'port{0}'.format(ports),
                                   'network_id' : network_id}}
        response = self.neutron.create_port(body = body_value)
    return response
def CreateNetwork(self, course_id, network_name, subnets):
    data = {'network' : {'name' : utils.NET_NAME % (course_id, network_name), 
                         'admin_state_up' : True}}
    netw = self.neutron.create_network(body = data)
    net_dict = netw['network']
    network_id = net_dict['id']

    #Create subnets
    subnet_data = {'subnets' : []}
    subnet_data['subnets'].append({'cidr' : subnets,
                                    'ip_version' : 4,
                                    'network_id' : network_id})
    self.neutron.create_subnet(body = subnet_data)
    return network_id
    ##attach network to router
    response = net.AddPort(router_id = routerid, network_id = network, ports = name)

" when it run I get the error: OverQuotaClient: Quota exceeded for resources: ['port'] Neutron server returns request_ids: ['req-3b93501b-d4d0-46f1-90e7-80f5eb916b2d']

please teach me how to fix this, tks

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by dbaxps
close date 2016-04-15 10:55:59.254767