mirror of
https://github.com/retspen/webvirtcloud
synced 2026-12-01 16:36:06 +00:00
refactor(instances): the VM list calls refresh_instance_database itself
instances.utils.refr() only imported and called computes.utils.refresh_instance_database(); the views import it directly, as they import its siblings from computes.utils. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kk4h2TcUiaWmU5MUszYSea
This commit is contained in:
parent
e554390ddf
commit
496d3a48ad
15 changed files with 29 additions and 35 deletions
|
|
@ -18,7 +18,7 @@ from operations.models import Operation
|
|||
from vrtManager.tests import livetest
|
||||
from .test_create_instance import run
|
||||
from instances.models import Flavor, Instance
|
||||
from instances.utils import refr
|
||||
from computes.utils import refresh_instance_database
|
||||
|
||||
TEST_COMPUTE_HOST = os.environ.get("TEST_LIBVIRT_HOST", "localhost")
|
||||
TEST_COMPUTE_LOGIN = os.environ.get("TEST_LIBVIRT_LOGIN", "")
|
||||
|
|
@ -87,7 +87,7 @@ class InstancesTestCase(TestCase):
|
|||
|
||||
# Create testing vm from XML
|
||||
cls.connection._defineXML(cls.xml)
|
||||
refr(cls.compute)
|
||||
refresh_instance_database(cls.compute)
|
||||
# The compute may hold other VMs; never pick one of them.
|
||||
cls.instance: Instance = Instance.objects.get(compute=cls.compute, name="wvc-test-vm")
|
||||
except Exception as e:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue