mirror of
https://gitlab.com/libvirt/libvirt-python.git
synced 2025-08-04 12:21:57 +03:00
Implement virDomain{Get,Set}Time APIs
While the setter can be generated automatically, the getter is not. However, it would be a lot easier if they both share the same logic: a python dictionary to represent the time: dict['seconds'] to represent seconds, and dict['nseconds'] to represent nanoseconds. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
@ -152,7 +152,7 @@ for name in sorted(basicklassmap):
|
||||
# and virDomainSnapshot namespaces which stupidly used a different
|
||||
# convention which we now can't fix without breaking API
|
||||
if func[0:3] == "Get" and klass not in ["virConnect", "virDomainSnapshot", "libvirt"]:
|
||||
if func not in ["GetCPUStats"]:
|
||||
if func not in ["GetCPUStats", "GetTime"]:
|
||||
func = func[3:]
|
||||
|
||||
# The object creation and lookup APIs all have to get re-mapped
|
||||
|
Reference in New Issue
Block a user