Commit Graph

10 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
9a26eec1ac
Make names always 'str'
Regardless of python version, always have names as 'str' type.
2017-03-13 04:41:54 +01:00
Marek Marczykowski-Górecki
64d2f13212
Make generic named objects collection instead of separate for each type
There will be more:
 - labels
 - storage pools
 - storage volumes
2017-03-13 04:41:54 +01:00
Marek Marczykowski-Górecki
c1ae5f8bf5
Adjust property value decoding
Now property.Get contains also explicit value type.
2017-03-13 04:37:30 +01:00
Marek Marczykowski-Górecki
2472be9d61
Implement property_help() method 2017-03-13 04:37:29 +01:00
Marek Marczykowski-Górecki
f027aa5385
Improve handling rejected access to properties
When qubesd reject access to property (do not return anything), it may
mean various things - invalid property, permission denied, or even
invalid VM. Handle all of those with exception inheriting from
AttributeError.
2017-03-13 04:37:29 +01:00
Marek Marczykowski-Górecki
5615510da5
Add specific exception for qubesd communication error 2017-03-13 04:37:28 +01:00
Marek Marczykowski-Górecki
bf03f6630f
Handle python standard exceptions in qubesd response
This may be useful for things like AttributeError, ValueError etc.
Use error name directly as exception name without much validation, as it
comes from dom0.
2017-03-09 02:39:52 +01:00
Marek Marczykowski-Górecki
3e73b242d1
Add missing docstrings, require them by pylint 2017-03-01 23:49:21 +01:00
Marek Marczykowski-Górecki
4bbc7a6b1f
Cache vm.name property
It doesn't make sense to send mgmt call to _named_ VM just to ask for
its name. Use value that QubesVM object already have.
This also means we can safely access vm.name, no need to touch any
private attribute.

QubesOS/qubes-issues#853
2017-03-01 23:49:21 +01:00
Marek Marczykowski-Górecki
c298eddd16
Avoid cyclic imports
QubesOS/qubes-issues#853
2017-03-01 23:49:20 +01:00