RealGecko
RealGecko
> i have never write coverage tests, i do not now how to... i should work on it.. i need time. It sounds harder [than it actually is](https://docs.djangoproject.com/en/2.2/topics/testing/overview/). If you...
I see a lot of views doing more than one task which makes them hard to maintain and test. I think we need to split views functionality like so: one...
`urls.py` is just like route map user request can take to receive required answer, so it's ok for it to be big, but big views that do more than one...
Correct me if I'm wrong: we establish new connection to libvirt host every time there's any operation on instance. Am I right?
Never mind, look like I've figured it out.
Yep, there's wvmConnectionManager class that pools all connections. I was just confused by wvmInstance close method.
I'm currently working on instances app, some serious optimizations in progress. Please avoid any work in this app, to prevent source code clashing during PR.
Yep, but it's worth it, unoptimized compute instances view: more than 5 seconds to response, 41 database requests.  Optimized: 1.5 seconds, 2 database queries. 
Currently I replaced it with this code: ```python def refr(compute): domains = compute.proxy.wvm.listAllDomains() domain_names = [d.name() for d in domains] # Delete instances that're not on host Instance.objects.filter(compute=compute).exclude(name__in=domain_names).delete() # Create...
OK, I think I know what to do with VM status. I added `wvmInstance` to `Instance` model that we can use to get info about domain directly via libvirt: ```python...