Commit Graph

190 Commits

Author SHA1 Message Date
Marta Marczykowska-Górecka
ec3d6eb84a
Fixed python2 in settings.py
settings.py was erroneously using python2. Replaced with python3.
2018-01-13 00:19:58 +01:00
Marta Marczykowska-Górecka
670c41e4ff
Fixed minor error in VM Settings
When init page was 'firewall', the tool incorrectly displayed warnings about wrong firewall vm configuration, without actually checking if they should be displayed.
2018-01-12 04:30:47 +01:00
Marta Marczykowska-Górecka
5b19c825e3
Enabled Firewall config without a netvm
Enabled Firewall tab even when there's no working netvm or the netvm
doesn't support qubes-firewall. An appropriate warning label and message
are shown in both cases.

fixes QubesOS/qubes-issues#3290
2017-11-20 14:20:01 +01:00
Marta Marczykowska-Górecka
5f1e4803fe
Applied corrections from @marmarek 2017-11-17 17:42:19 +01:00
Marta Marczykowska-Górecka
135060dfe7
Final corrections
Errors that my local pylint ignored and travis' pylint didn't.
2017-11-14 15:44:43 +01:00
Marta Marczykowska-Górecka
8b296fab0d
Disable too-many-attributes warning
It's the settings window, it has a lot of attributes.
2017-11-09 17:41:10 +01:00
Marta Marczykowska-Górecka
95599dff9f
A bunch of misc errors
Fixed a bunch of small errors: bad indents, superfluous parentheses,
missing whitespace, superfluous statement.
2017-11-09 17:41:10 +01:00
Marta Marczykowska-Górecka
e543144aec
Too-few-public-methods warning
Checked, are sensible, disabled pylint warnings.
2017-11-09 17:41:10 +01:00
Marta Marczykowska-Górecka
ff4ee713b1
Removed unnecessary global variables
Removed three variables set to global, which were all used only in their
respective "main" function.
2017-11-09 17:41:09 +01:00
Marta Marczykowska-Górecka
695303f16a
Fixed unused variables
When possible removed, otherwise renamed to start with an underscore.
2017-11-09 16:26:05 +01:00
Marta Marczykowska-Górecka
b9e4f99fec
Fixed unusued arguments
Places where the variable is used in a overriding method were marked for
pylint to ignore them.
2017-11-09 16:19:12 +01:00
Marta Marczykowska-Górecka
04aa844a9d
Removed variable "anything_changed"
It was assigned in 17 places and not used otherwise in any other place.
It's highly likely it was useless.
2017-11-09 16:18:23 +01:00
Marta Marczykowska-Górecka
6e5d611f70
Fixed invalid names
Fixed camel case, too long and too short variable and function names.
2017-11-09 16:18:16 +01:00
Marta Marczykowska-Górecka
d7fbacf0d7
Fixed broad exceptions
Fixed broad exception errors: replacing them with more precise error
catching where sensible and adding appropriate pylint skip comments
where not.
2017-11-08 15:40:35 +01:00
Marta Marczykowska-Górecka
2b24abb8c8
Fixed trailing and bad whitespaces
Fixed trailing and bad whitespaces
2017-11-06 23:55:58 +01:00
Marta Marczykowska-Górecka
91572eea2d
Fixed too-long lines
Fixed lines over 80 characters.
2017-11-06 23:55:58 +01:00
Marta Marczykowska-Górecka
c252e9ec3c
Fixed wildcard imports
Fixed wildcard imports and any further problems resulting from them.
2017-11-06 23:55:58 +01:00
Marta Marczykowska-Górecka
eaccc323fb
Fixed unused imports
Fixed all unused imports errors.
2017-11-06 23:20:09 +01:00
Marta Marczykowska-Górecka
3009610a62
Fixed GPL license
Replaced old, address-having, too-many-characters-in-a-line version with
the new one with URL.
2017-11-06 21:06:30 +01:00
Marta Marczykowska-Górecka
41b602ec48
Initial setup
Initialize .pylintrc, put ignore in used files' headers.
2017-11-06 20:36:09 +01:00
Marta Marczykowska-Górecka
ef86e33dee
Style fixes
Changes requested by @marmarek
2017-11-06 19:45:36 +01:00
Marta Marczykowska-Górecka
b7e4e55d05
Added Clone VM button
Button added on the basic tab of VM Settings. Also some refactoring to
clean up the rename/clone/delete buttons.
2017-11-03 23:50:04 +01:00
Marta Marczykowska-Górecka
458968d37f
Added Remove VM button
Button added on the basic tab of VM Settings. Button active only when
VM is shutdown; furthermore, requires the user to enter full VM name
to confirm.
2017-11-03 22:20:34 +01:00
Marek Marczykowski-Górecki
d165bd33b6
Merge remote-tracking branch 'qubesos/pr/45'
* qubesos/pr/45:
  Firewall settings
2017-10-21 01:38:20 +02:00
Marek Marczykowski-Górecki
43576d786c
Fix setting include_in_balancing checkbox
Generally vm.features values are strings, need to cast them to boot to
use in such context.
Additionally fix typo in feature name ('services' -> 'service').

Fixes QubesOS/qubes-issues#2947
Fixes QubesOS/qubes-issues#3104
2017-10-16 03:18:27 +02:00
Marek Marczykowski-Górecki
9ebd602407
One more place to use vm.klass instead of type(vm) 2017-10-16 03:10:19 +02:00
Marta Marczykowska-Górecka
dd990c04ac
Firewall settings
Modified VM Settings - Firewall tab to be easier to use and saner.
2017-10-13 22:41:10 +02:00
HW42
ebc7426cab Add handling for virt_mode including PVH mode 2017-10-12 17:06:17 +02:00
Marek Marczykowski-Górecki
0c5a2b1dcc
Fix resizing root volume
Use "system storage" value from the window, not "private storage"...

Reported by @0spinboson
Fixes QubesOS/qubes-issues#3143
2017-10-08 16:57:08 +02:00
Marek Marczykowski-Górecki
4d3a992ac6
Fix setting kernel property
Fixes QubesOS/qubes-issues#3145
2017-10-07 00:23:37 +02:00
Marek Marczykowski-Górecki
07162ba089
use 'klass' property instead of actual VM object class
The later is going to be generic QubesVM class, to save admin.vm.List
calls.
2017-10-07 00:22:41 +02:00
Marek Marczykowski-Górecki
c2aad3ce20
Remove code referencing removed "extra drive" box 2017-09-14 02:34:10 +02:00
Marta Marczykowska-Górecka
2ac9b1d182
Added gui for booting VM from CDROM/block device.
Available via command line (qubes-vm-boot-from-device) and
from a button in VM Settings/Advanced.
2017-09-13 23:30:45 +02:00
Marta Marczykowska-Górecka
0e5feeac0d
Remove obsolete sections from VM Settings:
- drive image
- paths
2017-09-08 22:39:54 +02:00
Marek Marczykowski-Górecki
da23873b47
settings: fix volume resize
- use MiB instead of MB
- do not allow root volume resize for template-based VMs
- do not resize if nothing was changed (use int, not float)
2017-07-30 18:56:35 +02:00
Marta Marczykowska-Górecka
693e1340ed
'rename VM' button in VM Settings
rename VM button in VM settings: it asks for a new name, and then clones
VM under the new name and deletes old one. Renaming VM closes VM settings
window without saving any other changes.
Changed max size of VM name field to 32 characters.
2017-07-29 13:28:53 +02:00
Marta Marczykowska-Górecka
2dda433fd3
'refresh available apps' button in VM Setting
added a button in VM Settings, Applications tab to refresh the list of
available apps
2017-07-29 13:28:53 +02:00
Marek Marczykowski-Górecki
402f1db80d
firewall: check for 'qubes-firewall' feature instead of being ProxyVM
This enable better detection whether firewall settings will really be
respected.

Fixes QubesOS/qubes-issues#2003
2017-07-16 10:50:07 +02:00
Wojtek Porczyk
96fc9c192c fixes from @marmarek's review 2017-07-14 02:19:24 +02:00
Wojtek Porczyk
1861ff386d settings: devices 2017-07-12 15:12:44 +02:00
Wojtek Porczyk
c32391a030 settings: services 2017-07-12 15:12:44 +02:00
Wojtek Porczyk
e78ede26f1 adminapi storage 2017-07-12 15:12:43 +02:00
Wojtek Porczyk
092d38e09a settings: misc removed 2017-07-12 15:12:43 +02:00
Wojtek Porczyk
cd2d3d7c0e settings: firewall and network 2017-07-12 15:05:05 +02:00
Wojtek Porczyk
ac06eee39b settings: dir_path, config_path 2017-07-12 15:05:05 +02:00
Wojtek Porczyk
cae10193e7 qubesmanager/settings: imports 2017-07-12 15:05:05 +02:00
Wojtek Porczyk
eefa6c31c2 appmenus fix 2017-07-12 15:05:05 +02:00
Wojtek Porczyk
6462ae88b7 qubesmanager/utils 2017-07-12 15:05:05 +02:00
Wojtek Porczyk
ea28980717 settings: debug mode 2017-07-12 15:05:05 +02:00
Wojtek Porczyk
f6a5c02adb qubesmanager/settings: make it work on qubesadmin, part 0 2017-07-12 15:04:55 +02:00
Wojtek Porczyk
2c3df7bd67 spring cleaning part 5: more python3 fixes 2017-07-12 14:54:14 +02:00
M. Vefa Bicakci
2ba6df43fc
Remove left-over debugging print-outs 2017-05-26 02:02:25 -04:00
M. Vefa Bicakci
a2d0b128b7
Make sure that new value of uses_default_kernel persists
Prior to this commit, whenever the user selected the default kernel in
a VM's "Advanced Settings" dialog in Qubes Manager, the
"uses_default_kernel" flag would not be saved as expected. Instead of
the intent to use the default kernel version for the VM in the future,
the VM would be stuck with the specific kernel version and not any new
future default kernel versions.

This issue occurs because the "kernel" property setter for the QubesVm
class resets the "uses_default_kernel" member variable to False, and
Qubes Manager sets the "uses_default_kernel" property before setting the
"kernel" property.

Resolve this issue by making sure that the "uses_default_kernel"
member variable of the VM in question is set after the "kernel" member
variable.
2017-05-26 02:02:25 -04:00
Marek Marczykowski-Górecki
23fc7df23c
settings: save qubes.xml after saving firewall rules
Saving (and also applying) firewall rules may modify VM's "services",
which are stored in qubes.xml. This is the case for "Allow connection to
Updates Proxy" - which also enables/disables 'yum-proxy-setup' service.
Without this commit, such change was ignored.

Fixes QubesOS/qubes-issues#2770
2017-04-24 01:59:00 +02:00
Marek Marczykowski-Górecki
d073b3582d
i18n: wrap self.tf in unicode() where 'format' function is used
Qstring (returned by self.tr) does not have 'format' method.

Fixes QubesOS/qubes-issues#2599
2017-02-06 04:20:13 +01:00
Marek Marczykowski-Górecki
7c602bf7d2
i18n: wrap strings with self.tr
Allow translations to handle strings defined in code.

Fixes QubesOS/qubes-issues#2599
2017-01-22 13:22:26 +01:00
Marek Marczykowski-Górecki
00caebda95
wrap long lines 2016-06-21 02:03:32 +02:00
Marek Marczykowski-Górecki
d2a4dd810b
Remove unused imports 2015-07-23 07:34:30 +02:00
Michal Rostecki
43bc59bfa6 Checking whether the "default NetVM" exists
The "default NetVM" is usually the first created ProxyVM which is
set by qubes-core during its creation. [1] If there is no ProxyVM,
there is no "default NetVM". Therefore, creating an AppVM and
launching its settings dialog raised AttributeError, because
get_default_netvm method returned None.

This can be reproduced by installing QubesOS without creating VMs
by installer.

[1] https://github.com/QubesOS/qubes-core-admin/blob/master/core/qubes.py#L355

Fixes qubesos/qubes-issues#1008
2015-05-24 11:23:57 +02:00
Marek Marczykowski-Górecki
dd93b1237f settings: add "dispvm_netvm" property in advanced tab 2015-04-06 00:59:15 +02:00
Marek Marczykowski-Górecki
4e5f63be24 settings: mark template as read-only when the VM is running 2015-04-05 21:53:09 +02:00
Marek Marczykowski-Górecki
97620f76a7 settings: hide "add all" widget from devices tab
It is very dangerous - adding all the devices to some VM will make the
system unusable once such VM is started.
2014-11-01 19:57:17 +01:00
Marek Marczykowski-Górecki
c8a8a56c73 settings: prevent changing VM name and label while the VM is running
Those changes will take effect after VM restart (at least for VM windows
borders), so to not confuse the user with partly updated colors, simply
block the change while the VM is running. The same applies to VM name.
2014-10-28 04:55:14 +01:00
Victor Lopez
473b822e0c Linux VM specific: force minimum init mem to allow scaling up memory
Check init_mem and max_mem_size in a single function (merging the
previous two) taking into account the minimum init memory that allows
the requested maximum memory.

Explanation:
Linux kernel needs space for memory-related structures created at boot.
If init_mem is just 400MB, then max_mem can't balloon above 4.3GB (at
which poing it yields "add_memory() failed: -17" messages and apps
crash), regardless of the max_mem_size value.

Base of Marek's findings and my tests on a 16GB PC, using several
processes like:
   stress -m 1 --vm-bytes 1g --vm-hang 100

result in the following points:
init_mem  ==> actual max memory
400             4300
700             7554
800             8635
1024            11051
1200            12954
1300            14038
1500            14045 <== probably capped on my 16GB system

The actual ratio of max_mem_size/init_mem is surprisingly constant at
10.79

If less init memory is set than that ratio allows, then the set
max_mem_size is unreachable and the VM becomes unstable (app crashes)

Based on qubes-devel discussion titled "Qubes Dom0 init memory against
Xen best practices?" at:
https://groups.google.com/d/msg/qubes-devel/VRqkFj1IOtA/UgMgnwfxVSIJ
2014-10-06 04:00:20 +02:00
Marek Marczykowski-Górecki
1cadc1e943 Merge remote-tracking branch 'woju/master' 2014-09-09 22:01:54 +02:00
Marek Marczykowski-Górecki
c992fc0f48 settings: fix drive path setting (#897) 2014-09-09 21:59:54 +02:00
Wojciech Zygmunt Porczyk
24759d2762 settings.py: do not attempt to remove service when none selected
Thanks to Andrew B (kyboren at gmail dot com) for bug report.
2014-09-04 21:59:05 +02:00
Marek Marczykowski-Górecki
61ef08eb47 settings: cast all QString to str
QString does not have "startswith" method.
2014-07-05 14:57:47 +02:00
Marek Marczykowski-Górecki
aca43a46da Filter out 'dom0' from selectable netvm list
This is workaround until #757 will be done.
2014-06-07 04:07:26 +02:00
Wojciech Zygmunt Porczyk
e834b33d42 Merge remote-tracking branch 'marmarek/master' 2014-05-19 13:54:02 +02:00
Hansi
44fe1cc845 small update to add "autostart" checkbox to the basic settings dialog 2014-05-17 21:43:29 +02:00
Wojciech Zygmunt Porczyk
f882042994 settings.py: launch lspci by full path (/usr/sbin/lspci) 2014-05-16 19:16:16 +02:00
Marek Marczykowski-Górecki
a09f558b4b settings: add seamless_gui_mode settings (#810) 2014-04-01 01:13:34 +02:00
Marek Marczykowski-Górecki
41bf7b448e firewall: add an option to temporary allow full network access (#760)
Add rule "*" with expire time set.
2014-03-28 06:41:35 +01:00
Marek Marczykowski-Górecki
3b3846eeb5 firewall: simplify rules handling code
Use directly rule provided by qubes core, not intermediate class
QubesFirewallRuleItem. This also will improve compatibility - if no
firewall changes made (but still "OK" clicked instead of "Cancel")
really the same settings are saved, even if rules contains some not
supported by Qubes Manager attributes.
2014-03-28 05:15:52 +01:00
Marek Marczykowski-Górecki
4f77108c5f settings: add an option to resize root.img (#699) 2014-03-21 18:40:23 +01:00
Marek Marczykowski-Górecki
3ea49b5192 Remove trailing semicolons 2014-02-23 00:44:08 +01:00
Marek Marczykowski-Górecki
17107a7012 settings: add 'drive' setting to advanced tab (#712) 2014-02-20 01:05:38 +01:00
Marek Marczykowski-Górecki
8e0a441dfe settings: do not assume that kernel is the last setting 2014-02-20 01:05:38 +01:00
Marek Marczykowski-Górecki
95e9680e96 Whitespace fixes 2014-02-20 01:05:37 +01:00
Marek Marczykowski-Górecki
9c1e2f496c List only compatible templates 2013-11-21 04:17:59 +01:00
Marek Marczykowski-Górecki
8d38a948e5 settings: indentation fix 2013-10-29 13:41:46 +01:00
Marek Marczykowski-Górecki
56d7807fec settings: gray out maxmem when qmemman is disabled
'Max memory' setting only makes sense for dynamic memory management.
2013-10-29 13:40:49 +01:00
Marek Marczykowski
bc485d2928 Update imports to match new qubes global settings layout 2013-03-16 21:07:53 +01:00
Marek Marczykowski
4d9e30784e settings apply: fix error message 2013-02-23 06:46:56 +01:00
Marek Marczykowski
34ea444a42 settings apply: catch exceptions and show them to the user
Settings are applied in separate thread, so when any exception occured there,
the user had no way to know it (besides hanging "applying settings" window).
2013-02-23 06:44:06 +01:00
Marek Marczykowski
69a2ac62fb use any python2, not explicit python2.6
Especially allow python2.7.
2013-01-23 15:55:14 +01:00
Marek Marczykowski
3b223aacd0 settings: disable dynamic memory management setting for HVM (#690) 2012-12-12 16:33:10 +01:00
Marek Marczykowski
8e333a7653 Display correct gateway IP (#685) 2012-12-10 16:13:14 +01:00
Marek Marczykowski
1026d19340 settings: allow application list modifications for NetVM/ProxyVM 2012-10-03 22:08:42 +02:00
Marek Marczykowski
d2a753c289 indent fix 2012-10-03 22:08:37 +02:00
Marek Marczykowski
d0eb5a2fd5 validate VM name also at GUI level (#656) 2012-08-23 03:57:19 +02:00
Marek Marczykowski
2a8afab83e include VM name in settings window title (#642) 2012-07-22 01:47:36 +02:00
Marek Marczykowski
24432ea1bc fix indenting 2012-06-19 00:15:46 +02:00
Marek Marczykowski
da09aa79fc Add "Allow connections to Updates Proxy" firewall setting (#582) 2012-06-05 20:29:57 +02:00
Agnieszka Kostrzewa
42828835cc Bind init_mem and maxmem setting (#572) 2012-05-19 09:33:29 +02:00
Agnieszka Kostrzewa
b140d0e2cf No Dom0 label in settings 2012-04-27 11:54:53 +02:00
Agnieszka Kostrzewa
e890a61a49 Fix to tab option to settings run as a standalone app 2012-04-25 15:08:21 +02:00
Agnieszka Kostrzewa
51a6edd5cd Tab option to settings run as a standalone app 2012-04-25 14:25:26 +02:00
Agnieszka Kostrzewa
26b958e1d9 Merge branch 'master' of git.qubes-os.org:/var/lib/qubes/git/marmarek/qubes-manager 2012-04-25 13:15:29 +02:00