Exemplo n.º 1
0
 def __remember_remove(name):
     history = Config.history()
     history.remember_remove(name)
     Config.save_history(history)
Exemplo n.º 2
0
 def __remember_copy(original_name, new_name):
     history = Config.history()
     history.remember_copy(original_name, new_name)
     Config.save_history(history)
Exemplo n.º 3
0
     if args.net_command == 'list':
         IptablesHelper.list()
 if args.command == 'config':
     if args.config_command == 'patch-ip':
         ConsoleHelper.patch_container_config(args.name, args.static_ip)
     if args.config_command == 'unpatch-ip':
         ConsoleHelper.unpatch_container_config(args.name)
     if args.config_command == 'print':
         ConsoleHelper.print_config_file(args.name, args.unprivileged)
     if args.config_command == 'add':
         LxcHelper.config_add_property(args.name, args.key, args.value, args.unprivileged)
     if args.config_command == 'erase':
         LxcHelper.config_erase_property(args.name, args.key, args.unprivileged)
 if args.command == 'history':
     if args.history_command == 'print':
         history = Config.history()
         if not history:
             print('No history yet')
         else:
             print(history)
     if args.history_command == 'wipe':
         return_message = Config.wipe_history()
         print(return_message)
 if args.command == 'wipe':
     Config.wipe()
 if args.command == 'prepare-unprivileged':
     ConsoleHelper.prepare_unprivileged_config(args.user_ids, args.group_ids, args.network_devices_number, args.user)
 if args.command == 'mount':
     ConsoleHelper.mount_backing_store_device(args.device, args.filesystem, args.unprivileged, args.options)
 if args.command == 'print-log':
     print(Config.read_log())