mirror of
https://github.com/GNS3/gns3-server
synced 2024-12-29 18:28:11 +00:00
Merge branch 'master' into unstable
This commit is contained in:
commit
75267f9d53
@ -1564,6 +1564,9 @@ class Router(BaseVM):
|
|||||||
module_workdir = self.project.module_working_directory(self.manager.module_name.lower())
|
module_workdir = self.project.module_working_directory(self.manager.module_name.lower())
|
||||||
startup_config_base64, private_config_base64 = yield from self.extract_config()
|
startup_config_base64, private_config_base64 = yield from self.extract_config()
|
||||||
if startup_config_base64:
|
if startup_config_base64:
|
||||||
|
if not self.startup_config:
|
||||||
|
self._startup_config = os.path.join("configs", "i{}_startup-config.cfg".format(self._dynamips_id))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
config = base64.b64decode(startup_config_base64).decode("utf-8", errors="replace")
|
config = base64.b64decode(startup_config_base64).decode("utf-8", errors="replace")
|
||||||
config = "!\n" + config.replace("\r", "")
|
config = "!\n" + config.replace("\r", "")
|
||||||
@ -1575,6 +1578,9 @@ class Router(BaseVM):
|
|||||||
raise DynamipsError("Could not save the startup configuration {}: {}".format(config_path, e))
|
raise DynamipsError("Could not save the startup configuration {}: {}".format(config_path, e))
|
||||||
|
|
||||||
if private_config_base64:
|
if private_config_base64:
|
||||||
|
if not self.private_config:
|
||||||
|
self._private_config = os.path.join("configs", "i{}_private-config.cfg".format(self._dynamips_id))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
config = base64.b64decode(private_config_base64).decode("utf-8", errors="replace")
|
config = base64.b64decode(private_config_base64).decode("utf-8", errors="replace")
|
||||||
config = "!\n" + config.replace("\r", "")
|
config = "!\n" + config.replace("\r", "")
|
||||||
|
@ -34,7 +34,7 @@ class ColouredFormatter(logging.Formatter):
|
|||||||
|
|
||||||
message = super().format(record)
|
message = super().format(record)
|
||||||
|
|
||||||
if not colour:
|
if not colour or sys.platform.startswith("win"):
|
||||||
return message.replace("#RESET#", "")
|
return message.replace("#RESET#", "")
|
||||||
|
|
||||||
level_no = record.levelno
|
level_no = record.levelno
|
||||||
|
@ -2,4 +2,4 @@ jsonschema>=2.4.0
|
|||||||
aiohttp>=0.15.1
|
aiohttp>=0.15.1
|
||||||
Jinja2>=2.7.3
|
Jinja2>=2.7.3
|
||||||
raven>=5.2.0
|
raven>=5.2.0
|
||||||
netifaces>=0.10.4
|
gns3-netifaces==0.10.4.1
|
||||||
|
4
setup.py
4
setup.py
@ -25,6 +25,7 @@ if sys.version_info < (3, 4):
|
|||||||
|
|
||||||
|
|
||||||
class PyTest(TestCommand):
|
class PyTest(TestCommand):
|
||||||
|
|
||||||
def finalize_options(self):
|
def finalize_options(self):
|
||||||
TestCommand.finalize_options(self)
|
TestCommand.finalize_options(self)
|
||||||
self.test_args = []
|
self.test_args = []
|
||||||
@ -39,13 +40,14 @@ class PyTest(TestCommand):
|
|||||||
|
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"netifaces>=0.10.4",
|
"gns3-netifaces>=0.10.4.1",
|
||||||
"jsonschema>=2.4.0",
|
"jsonschema>=2.4.0",
|
||||||
"aiohttp>=0.15.1",
|
"aiohttp>=0.15.1",
|
||||||
"Jinja2>=2.7.3",
|
"Jinja2>=2.7.3",
|
||||||
"raven>=5.2.0"
|
"raven>=5.2.0"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="gns3-server",
|
name="gns3-server",
|
||||||
version=__import__("gns3server").__version__,
|
version=__import__("gns3server").__version__,
|
||||||
|
Loading…
Reference in New Issue
Block a user