# GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # ''' Remove domains from the system ''' import sys import qubesadmin.exc from qubesadmin.tools import QubesArgumentParser import qubesadmin.utils parser = QubesArgumentParser(description=__doc__, want_app=True, vmname_nargs='+') parser.add_argument("--force", "-f", action="store_true", dest="no_confirm", default=False, help="Do not prompt for confirmation") def main(args=None, app=None): # pylint: disable=missing-docstring args = parser.parse_args(args, app=app) go_ahead = "" if not args.no_confirm: print("This will completely remove the selected VM(s)...") for vm in args.domains:
strace += "file: %s\n" % filename msg_box = QtGui.QMessageBox() msg_box.setDetailedText(strace) msg_box.setIcon(QtGui.QMessageBox.Critical) msg_box.setWindowTitle("Houston, we have a problem...") msg_box.setText("Whoops. A critical error has occured. " "This is most likely a bug in Qubes Manager.<br><br>" "<b><i>%s</i></b>" % error + "<br/>at line <b>%d</b><br/>of file %s.<br/><br/>" % (line, filename)) msg_box.exec_() parser = QubesArgumentParser(vmname_nargs=1) parser.add_argument('--tab', metavar='TAB', action='store', choices=VMSettingsWindow.tabs_indices.keys()) parser.set_defaults(tab='basic', ) def main(args=None): args = parser.parse_args(args) vm = args.domains.pop() qapp = QtGui.QApplication(sys.argv) qapp.setOrganizationName('Invisible Things Lab')
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # ''' Clone a domain ''' import sys import qubesadmin.exc from qubesadmin.tools import QubesArgumentParser parser = QubesArgumentParser(description=__doc__, vmname_nargs=1) parser.add_argument('new_name', metavar='NEWVM', action='store', help='name of the domain to create') parser.add_argument('--class', '-C', dest='cls', default=None, help='specify the class of the new domain (default: same as source)') parser.add_argument('--ignore-errors', action='store_true', default=False, help='log errors encountered during setting metadata' 'but continue clone operation') group = parser.add_mutually_exclusive_group()
# but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # ''' Clone a domain ''' import sys import qubesadmin.exc from qubesadmin.tools import QubesArgumentParser parser = QubesArgumentParser(description=__doc__, vmname_nargs=1) parser.add_argument('new_name', metavar='NEWVM', action='store', help='name of the domain to create') parser.add_argument( '--class', '-C', dest='cls', default=None, help='specify the class of the new domain (default: same as source)') group = parser.add_mutually_exclusive_group() group.add_argument('-P', metavar='POOL',
# This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # ''' Remove domains from the system ''' import sys from qubesadmin.tools import QubesArgumentParser parser = QubesArgumentParser(description=__doc__, want_app=True, vmname_nargs='+') def main(args=None, app=None): # pylint: disable=missing-docstring args = parser.parse_args(args, app=app) for vm in args.domains: del args.app.domains[vm.name] return 0 if __name__ == '__main__': sys.exit(main())
# but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # ''' Clone a domain ''' import sys from qubesadmin.tools import QubesArgumentParser parser = QubesArgumentParser(description=__doc__, vmname_nargs=1) parser.add_argument('new_name', metavar='NEWVM', action='store', help='name of the domain to create') group = parser.add_mutually_exclusive_group() group.add_argument('-P', metavar='POOL', dest='one_pool', default='', help='pool to use for the new domain') group.add_argument('-p', '--pool', action='append',