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):
|
||||
# select IP
|
||||
return models.Ips.select().where(
|
||||
models.Ips.datacenter == datacenter_id and models.Ips.status == 0
|
||||
).get()
|
||||
return models.Ips.select().join(models.Servers).where(
|
||||
models.Ips.datacenter == datacenter_id,
|
||||
models.Servers.status == 1,
|
||||
models.Ips.status == 0
|
||||
).first()
|
||||
|
||||
def setbusy(self, ip_id):
|
||||
# mark ip as busy (taken)
|
||||
|
|
2
setup.py
2
setup.py
|
@ -4,7 +4,7 @@ from setuptools import setup
|
|||
|
||||
setup(
|
||||
name='SWSCloudCore',
|
||||
version='2.5.8',
|
||||
version='2.5.9',
|
||||
author='Vyacheslav Anzhiganov',
|
||||
author_email='hello@anzhiganov.com',
|
||||
packages=[
|
||||
|
|
Loading…
Add table
Reference in a new issue