Ecosyste.ms: OpenCollective

An open API service for software projects hosted on Open Collective.

github.com/QubesOS/qubes-core-admin-client

Qubes management API client
https://github.com/QubesOS/qubes-core-admin-client

tools: qvm-start

The tool and tests for it.

b6d06d856d4970a85be53031eda818aaf55a2d05 authored over 7 years ago by Marek Marczykowski-Górecki <[email protected]>
Make pylint happy

275a53e545619753b547bba882b3bffd82f668f7 authored over 7 years ago by Marek Marczykowski-Górecki <[email protected]>
tools: qvm-check

The tool and tests.

ed93b40e726faac892a465b8220ab033d3e9ceda authored over 7 years ago by Marek Marczykowski-Górecki <[email protected]>
tools: qvm-run

The tool and tests for it.

8f7b902034b402fdc0fbcdca420fbdc754851546 authored over 7 years ago by Marek Marczykowski-Górecki <[email protected]>
tests: very naive mockup of app.run_service

Currently it doesn't check passed arguments, does not allow specify
expected stdout/stderr or ev...

e76af930a79eab30cca6ab2c0601c87e7f03da67 authored over 7 years ago by Marek Marczykowski-Górecki <[email protected]>
events: add qubesd reconnection support

If connection is interrupted (for example qubesd restart), attempt to
reconnect.

ef683485e20dd7973677f397ddc3be7a49471eb2 authored over 7 years ago by Marek Marczykowski-Górecki <[email protected]>
tools: add monitor layout support to qvm-start-gui

Again, mostly moved from qubes/exc/gui.py in core-admin.

3559ec0c548c1cdd70ea90ca87ce0e0b1f105def authored over 7 years ago by Marek Marczykowski-Górecki <[email protected]>
tests: basic tests for qvm-start-gui tool

e7118b53ce593b4b0384add0bb3e71bfeb9d3947 authored over 7 years ago by Marek Marczykowski-Górecki <[email protected]>
vm: add run* methods

The base method is run_service, but also implement convenient wrappers.

6dd7c69b3f4f47e9a0d3595dffef24dd940cba63 authored over 7 years ago by Marek Marczykowski-Górecki <[email protected]>
tests: add/fix VM state tests

7a4f36f01585ded9d59bd3b3bfeabbaa5f85faac authored over 7 years ago by Marek Marczykowski-Górecki <[email protected]>
tools: improve --all switch

Don't check VM 'qid' (which require mgmt call), but VM class instead

21c65d7ea8a30bdfc429809e1a002cc63195b79b authored over 7 years ago by Marek Marczykowski-Górecki <[email protected]>
features: client-side API

e066656903fe17a3d94b43c855d3e4ecfedaefa4 authored over 7 years ago by Marek Marczykowski-Górecki <[email protected]>
vm: add/fix lifecycle-related methods

914c2d7e5ef90dd6d7807b31271d3397bc2f36f5 authored over 7 years ago by Marek Marczykowski-Górecki <[email protected]>
tests: events

Since qubesmgmt.events require python3, those tests can use python3
features. But it should be s...

e40875ee5ff53dcdcbc46bb0eef71fbdbc720029 authored over 7 years ago by Marek Marczykowski-Górecki <[email protected]>
tests: fix label test file location

8989c1c010be12fb0dd893efdc7fee21fb1c2bc7 authored over 7 years ago by Marek Marczykowski-Górecki <[email protected]>
tools: add qvm-start-gui tool

This is mostly moved from qubes.ext.gui module.

5ed3d8d262d6cb385a957b1e961f92336c55c461 authored over 7 years ago by Marek Marczykowski-Górecki <[email protected]>
Add logging to Qubes() and QubesVM() objects

e66b96edd13f40100166ef00c6a081a3b4002e5a authored over 7 years ago by Marek Marczykowski-Górecki <[email protected]>
label: add index and icon

d0e8c0515e70de4aab93a676ba4bf1ec1d70b374 authored over 7 years ago by Marek Marczykowski-Górecki <[email protected]>
Exclude tools and events from python2 tests and packaging

Those two parts require python3.
To avoid duplicating the exclude list, run tests and pylint on ...

7bafd631d4d4361afc9b1707b74367d61da9fc52 authored over 7 years ago by Marek Marczykowski-Górecki <[email protected]>
events: initial implementation

This module use asyncio, so require Python 3. And actually >= 3.5.2
because of asyncio.StreamRea...

785706af2f5fbc8f573a4139bd111e456e794c9d authored over 7 years ago by Marek Marczykowski-Górecki <[email protected]>
refactor 'QUBESD_SOCKET' into separate module

This will avoid cyclic imports in upcoming events implementation

d8b0ff349d5ca38dbb0b569e7d089cd8e43a878a authored over 7 years ago by Marek Marczykowski-Górecki <[email protected]>
Add qvm-pool and qvm-volume tool

36d8ee9b32c4ecc0d9d80e43ce09089ce81f47cd authored over 7 years ago by Marek Marczykowski-Górecki <[email protected]>
Add StoragePoolException

1fd09f4e58df28a0f41c57a15727f58283637e93 authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
tools: recognize size units regardless of case

f42b8d072175d1d4e18b0372d0587f83b63fd2ac authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
Make names always 'str'

Regardless of python version, always have names as 'str' type.

9a26eec1accd92631e506bbf0503638eb3e7141f authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
Add app.pools collection and related functions

Collection to access storage pools and methods to create/remove pools.

e7d89bcc0d000bed3aa478b75cee9057a98c3097 authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
Make generic named objects collection instead of separate for each type

There will be more:
- labels
- storage pools
- storage volumes

64d2f13212014daa575fa51ab239ef7367b0470b authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
tools: make print_table compatible with python2 and python3 tests

StringIO expect 'str' object, but on python2 it's different from
'unicode' (returned by decode()...

ad570ec027a0623ad114272d6659a30f4680a7f1 authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
tests: add qvm-ls

Very few tests for qvm-ls, but include two very broad (multiple VMs,
various columns etc).

a493352e5d7e92303a571c2a7d4bcb4e6c76a90c authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
tools/qvm-ls: various fixes

1. Fix displaying non-str values - convert them to string.
2. Always sort VMs.
3. Add app argume...

e2481b19a254048dae41a1ee8ed6b3356b8df539 authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
storage: pass volume id as a payload in mgmt.pool.volume.* methods

Volume id may contain characters normally not allowed in qrexec argument
(like '/'). Also, don't...

0e775209fdb6fbd5d30f2f60abd7b3fbd80a1113 authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
Adjust property value decoding

Now property.Get contains also explicit value type.

c1ae5f8bf5fa693e0ca83965861f3219c381147e authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
tests: catch and check stderr from invalid argument type tests

Verify if tool failed with expected message, but also make tests output
more readable.

ede625d1ddcc88f066e6dee556f4685f0a923628 authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
Make QubesVM objects comparable and str()-able

Required for sorting and displaying easily.

92623635694af62543df1877fd46b8a65cc08623 authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
tests: add convenient TestVM and TestVMCollection classes

Very simple mockups for other tests.

310d9da3819537023d59c3e740abc5bab4d59828 authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
Initial labels support

It's just first part - reading info about them. The missing part:
creating and removing.

f323fdec533e573f66beaa1c2af50d0c585988e5 authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
tools/qvm-prefs: re-add --help-properties action

Specific VM object is required to get list of properties and help on
them, so convert HelpProper...

795909bc055bc0f08955488803735e54968cc1b2 authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
Improve handling rejected access to properties

When qubesd reject access to property (do not return anything), it may
mean various things - inv...

f027aa5385364f473c64c7ce0c95e5c683f7fdcb authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
Implement vm.get_power_state()

ade0030efe8b7995f47471b3f4e42ead499c246c authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
Implement property_help() method

2472be9d6144a4a93c9c794a239b272fe5122773 authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
tools/qvm-ls: kill fixed column width

Calculate column width dynamically, besed on actual contents.

435a465d7046128699188ea81d9ce4689931c26e authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
Rename methods for global properties

Finally we've settled for `mgmt.property.`, instead of
`mgmt.global.property.` prefix.

QubesOS/...

f6e48cb3ff880f6ed535bd73ae44f878c5fd1d61 authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
Simplify reading data from local socket

9d5e974c5b98bdf079b03bc79e8f630cef393329 authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
Add specific exception for qubesd communication error

5615510da5d0cdda0f5d070e5dbaa347d36688c9 authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
tools/qvm-ls: adjust VM classes

QubesOS/qubes-issues#853

fea3d3391f1d8a6d87d12f691ea9c4d8bd06306c authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
tools/qvm-ls: assume "unknown" colums being VM properties

Listing VM properties require specific object, so instead of collecting
all properties from all ...

554081498d6ed8312800b7a54f1e29fb9093cc5d authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
tools/qvm-ls: copy mostly-unmodified version from core-admin

77250ab5296d35b06ea78453d8a6d9904d0bc1aa authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
pylint: disable duplicate-code

It's triggered by various qvm-* tools. While it could be improved, in
most cases it isn't worth it.

f9241c854ac4087183a63f7739eba228c98ffb39 authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
tests: add tests for simple tools

QubesOS/qubes-issues#853

6dd6d9e2541a2cc984c1029bd93b29e6ff04c1e8 authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
Import full exceptions hierarchy

QubesOS/qubes-issues#853

7baa7e486213116c7662f9b642236341b4817913 authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
Add vm.shutdown(force) parameter

But not it's implementation (currently not specified in API).

QubesOS/qubes-issues#853

21d60eff4c9dfd80e7b36cca41e430e1f5408d3f authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
tools: pause/unpause/shutdown - don't stop on first failed VM

But still report a failure with exit code if any of them failed.

QubesOS/qubes-issues#853

795a06e4007c1bb38ae11e239bc03ba96ec92799 authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
Fix global properties handling

API name isn't 'mgmt.global.*' - discussed options are
'mgmt.global.property.*' or 'mgmt.propert...

69396040fd0d5011f56bdfbf2e646911e8df728c authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
tests: add qubes-prefs tests

Based on qvm-prefs.

484743faf05d497d44e72db4ac83255c7f8cd60e authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
tools/qvm-prefs: handle invalid properties by catching AttributeError

This may avoid unneded qubesd call (listing properties).

4ffd44da496b681a4f28f1775205de16483ff19c authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
tools/qvm-kill: don't use deprecated force_shutdown method

QubesOS/qubes-issues#853

e0af402c1653b91f61a7c55678cc376d7b33e22a authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
tools: allow supplying app object to main function

This is mostly for tests, which use dummy app instance.

a575bc34224ba5f7b0f4f32e2a7beb05ce79e634 authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
tools/qvm-prefs: adjust for qubesmgmt module

list_properties() returns strings, not property objects.

e4c2294ce0eb5e2d369f840c035c54ae80262f93 authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
tests: adjust StdoutBuffer for python2/python3 compatibility

io.StringIO expects unicode writes, while string literal on python2 are
bytes. Act accordingly.

6b8bbd9c51107a1a555cc35fefa0791e91885994 authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
Handle python standard exceptions in qubesd response

This may be useful for things like AttributeError, ValueError etc.
Use error name directly as ex...

bf03f6630f0786e37dcb70c74afff5775e4ceed2 authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
Update license headers

Update GPL->LGPL for tools moved from core-admin repository.
While at it, change mailing address...

32bd75da77e7d992beae19ed074db2a0e5107084 authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
tools: kill --force-root and --qubesxml arguments

Those are no longer useful, as all actions are delegated to qubesd. Keep
--force-root argument (...

61731a9490b64e9d83cfc3f30624b151fc3dc6f6 authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
tools: reduce code duplication

Have one implementation for all property-related tools.

6b8d58885bb16c4cb5807fd1e8362f7900a078a6 authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
tests: migrate basic tools tests

fe74b05049f4c76a92f43d2cd08b860a7aba978a authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
tools: include a few simple tools

QubesOS/qubes-issues#853

bb770b47447558a5f6d06498b7ffe44802b23e3d authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
tools: adjust for qubesmgmt module

For now comment out HelpPropertiesAction, as we don't have VM classes
here and accessing propert...

a813d5026769f86eeaa614967ecf8be2f7c55e26 authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
tools: copy unmodified file from core-admin

2e2ce8454b81fd026a61b68fcb803dbf2e884c84 authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
travis: integrate test coverage reports via codecov

45dcc6b1ddf9f1b56644791a24c2cc6f34c02260 authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
utils: copy tools-related utility functions

e826ebff53e1b268a17372afeb7b0c24e4bed5f3 authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
make pylint happy

Add mock dbus module

7d7f1724ff7fd9c5dbe6f78b63cc81f6ebf6a90d authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
mgmt.vm.volume.* API support

QubesOS/qubes-issues#853

f59ff0c641809765cdb2bd0c50a53ca8cb45cfdb authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
Add run-tests script

Since we use endpoints, those are needed for running tests. Provide
wrapper script.

QubesOS/qub...

f41b51385bffa17e0d27304ce7e3265a3d7dbfae authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
Fix refreshing VM cache on python3

dict.items() iterator don't like adding/removing items at the same time.

5f81b9b809e0fcee87ecaac11e641cbc8584aa42 authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
Add logging module

Based on qubes.log module from core-admin

0abff5b57a61ae8222143afa4106205420a785a7 authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
vm: add actual VM classes

QubesOS/qubes-issues#853

2b1ebba547aa0b56f68e5faddd20ecb5a4e819a7 authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
rpm: add packaging

QubesOS/qubes-issues#853

58ee672743a1e7005b10a6fb53775b60606a44b9 authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
travis: enable package build

0126d29246bbb62c3b615e9e38e6647eb30beb94 authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
Add missing docstrings, require them by pylint

3e73b242d1120ace635df65b9c0b1d9d4b046786 authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
Implement simple VM actions

QubesOS/qubes-issues#853

61cb9887af9f0f3203b121db36e13d012312cbce authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
Fix local socket communication

Don't try to send 'None' argument.
Close writing end after sending full request.

QubesOS/qubes-...

45ab24ce12137ea7601e86dfc8cc2714f147a84f authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
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 Q...

4bbc7a6b1f194b2263d214ecf6750df93e10312d authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
Fix handling '%d' in exception message

QubesOS/qubes-issues#853

851ba6aedbb96c5a6d58b29567dc7fb633a2bf13 authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
make pylint happy again

544870f1adb4ae84ddb7b60fd28e4007757f78fa authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
Fix py3k compatibility

QubesOS/qubes-issues#853

8f922506654a9821c09e3908258a2dac96b71b19 authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
travis: actually install pylint

a9eb23b0e57f247db04707d3ae79e2ab83c96667 authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
Avoid cyclic imports

QubesOS/qubes-issues#853

c298eddd161525b84d7f50ad9f1690b0fbca8b8b authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
travis basic configuration

No RPM/DEB building stuff yet.

f2b8b849fcfb029c3a645ded690155c4ce955a37 authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
Add pylint configuration

181c6c00d6a07f327ff567431309b338342ebf5b authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
make pylint happy

b4e6089cd5e0bdb26dd97ab1e8cf8bfa20f7415d authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
Rename '_do_qubesd_call' to 'qubesd_call'

This method don't need to be private. Also the 'do_' prefix is
superfluous - methods typically d...

745d16a879c5ac93ff4e18fcea1ae876b9459804 authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
Rename qubesmgmt.property.DEFAULT to qubesmgmt.DEFAULT

Don't shadow builtin 'property' type. We don't need to kee compatibility
with actual core3 imple...

58c940b5c0f3c6c751094a3dd49855209a3e55ed authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
Add setup.py and related files

1fc6cceb732d619582beaa6d9714775654bc895e authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>
Initial commit

First minimal version, with just listing VMs and handling properties.

QubesOS/qubes-issues#853

3a2e0b770ba85787bda2487745751b9bd598c6ae authored almost 8 years ago by Marek Marczykowski-Górecki <[email protected]>