mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Cleanup unused and duplicates
This commit is contained in:
1 parent
58d2a5d4b0
commit
1248584841
12 files changed
+9
-53
No files matched your search
@@ -24,7 +24,6 @@ from ...web.route import Route
|
||||
from ...schemas.project import PROJECT_OBJECT_SCHEMA, PROJECT_CREATE_SCHEMA, PROJECT_UPDATE_SCHEMA, PROJECT_FILE_LIST_SCHEMA, PROJECT_LIST_SCHEMA
|
||||
from ...modules.project_manager import ProjectManager
|
||||
from ...modules import MODULES
|
||||
from ...utils.asyncio import wait_run_in_executor
|
||||
|
||||
import logging
|
||||
log = logging.getLogger()
|
||||
@@ -41,8 +40,8 @@ class ProjectHandler:
|
||||
description="List projects opened on the server",
|
||||
status_codes={
|
||||
200: "Project list",
|
||||
}
|
||||
# output=PROJECT_LIST_SCHEMA)
|
||||
},
|
||||
output=PROJECT_LIST_SCHEMA
|
||||
)
|
||||
def list_projects(request, response):
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
from aiohttp.web import HTTPConflict
|
||||
from ...web.route import Route
|
||||
@@ -42,7 +41,7 @@ class VirtualBoxHandler:
|
||||
200: "Success",
|
||||
},
|
||||
description="Get all VirtualBox VMs available")
|
||||
def show(request, response):
|
||||
def index(request, response):
|
||||
|
||||
vbox_manager = VirtualBox.instance()
|
||||
vms = yield from vbox_manager.list_images()
|
||||
|
||||
@@ -41,7 +41,7 @@ class VMwareHandler:
|
||||
200: "Success",
|
||||
},
|
||||
description="Get all VMware VMs available")
|
||||
def show(request, response):
|
||||
def index(request, response):
|
||||
|
||||
vmware_manager = VMware.instance()
|
||||
vms = yield from vmware_manager.list_vms()
|
||||
|
||||
@@ -479,14 +479,6 @@ class Dynamips(BaseManager):
|
||||
yield from nio.create()
|
||||
return nio
|
||||
|
||||
@asyncio.coroutine
|
||||
def ghost_ios_support(self, vm):
|
||||
|
||||
ghost_ios_support = self.config.get_section_config("Dynamips").getboolean("ghost_ios_support", True)
|
||||
if ghost_ios_support:
|
||||
with (yield from Dynamips._ghost_ios_lock):
|
||||
yield from self._set_ghost_ios(vm)
|
||||
|
||||
@asyncio.coroutine
|
||||
def _set_ghost_ios(self, vm):
|
||||
"""
|
||||
|
||||
@@ -19,8 +19,6 @@
|
||||
Base interface for NIOs.
|
||||
"""
|
||||
|
||||
import uuid
|
||||
|
||||
|
||||
class NIO(object):
|
||||
|
||||
|
||||
@@ -143,10 +143,6 @@ class Project:
|
||||
if path != self._path and self.is_local() is False:
|
||||
raise aiohttp.web.HTTPForbidden(text="You are not allowed to modify the project directory location")
|
||||
|
||||
old_path = None
|
||||
if hasattr(self, "_path"):
|
||||
old_path = self._path
|
||||
|
||||
self._path = path
|
||||
self._update_temporary_file()
|
||||
|
||||
|
||||
@@ -1454,7 +1454,6 @@ class QemuVM(BaseVM):
|
||||
if self._run_with_kvm(self.qemu_path, self._options):
|
||||
command.extend(["-enable-kvm"])
|
||||
command.extend(["-boot", "order={}".format(self._boot_priority)])
|
||||
disk_options = yield from self._disk_options()
|
||||
cdrom_option = self._cdrom_option()
|
||||
command.extend(cdrom_option)
|
||||
command.extend((yield from self._disk_options()))
|
||||
|
||||
+1
-1
@@ -162,7 +162,7 @@ def pid_lock(path):
|
||||
except OSError:
|
||||
pid = None
|
||||
except OSError as e:
|
||||
log.critical("Can't open pid file %s: %s", args.pid, str(e))
|
||||
log.critical("Can't open pid file %s: %s", pid, str(e))
|
||||
sys.exit(1)
|
||||
|
||||
if pid:
|
||||
|
||||
@@ -27,7 +27,6 @@ import re
|
||||
|
||||
from pkg_resources import parse_version
|
||||
from gns3server.utils.asyncio import wait_for_process_termination
|
||||
from gns3server.utils.asyncio import monitor_process
|
||||
from gns3server.utils.asyncio import subprocess_check_output
|
||||
from .ubridge_hypervisor import UBridgeHypervisor
|
||||
from .ubridge_error import UbridgeError
|
||||
@@ -152,7 +151,6 @@ class Hypervisor(UBridgeHypervisor):
|
||||
stderr=subprocess.STDOUT,
|
||||
cwd=self._working_dir)
|
||||
|
||||
#monitor_process(self._process, self._termination_callback)
|
||||
log.info("ubridge started PID={}".format(self._process.pid))
|
||||
except (OSError, subprocess.SubprocessError) as e:
|
||||
ubridge_stdout = self.read_stdout()
|
||||
|
||||
Reference in new issue
Block a user