12 lines
452 B
Python
12 lines
452 B
Python
import os,settings
|
|
import ng_openstack.openstackRequest
|
|
|
|
def listAllFloatingIPsByProject(projectID):
|
|
allIPs=ng_openstack.openstackRequest.openstackRequest("GET", "floatingips?project_id="+projectID, "",
|
|
"http://172.25.110.153:9696/v2.0").json()
|
|
return allIPs
|
|
|
|
def ipInSubnet(network,netmask,ip):
|
|
#Network, netmask and ip must be supplied in integer form
|
|
return (ip & netmask) == network
|