This commit is contained in:
parent
f83e889d22
commit
1daf5d1298
2 changed files with 6 additions and 4 deletions
|
@ -9,9 +9,11 @@ class ControllerIps:
|
||||||
|
|
||||||
def getfree(self, datacenter_id):
|
def getfree(self, datacenter_id):
|
||||||
# select IP
|
# select IP
|
||||||
return models.Ips.select().where(
|
return models.Ips.select().join(models.Servers).where(
|
||||||
models.Ips.datacenter == datacenter_id and models.Ips.status == 0
|
models.Ips.datacenter == datacenter_id,
|
||||||
).get()
|
models.Servers.status == 1,
|
||||||
|
models.Ips.status == 0
|
||||||
|
).first()
|
||||||
|
|
||||||
def setbusy(self, ip_id):
|
def setbusy(self, ip_id):
|
||||||
# mark ip as busy (taken)
|
# mark ip as busy (taken)
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -4,7 +4,7 @@ from setuptools import setup
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='SWSCloudCore',
|
name='SWSCloudCore',
|
||||||
version='2.5.8',
|
version='2.5.9',
|
||||||
author='Vyacheslav Anzhiganov',
|
author='Vyacheslav Anzhiganov',
|
||||||
author_email='hello@anzhiganov.com',
|
author_email='hello@anzhiganov.com',
|
||||||
packages=[
|
packages=[
|
||||||
|
|
Loading…
Add table
Reference in a new issue